diff --git a/package.json b/package.json index 619fe26..7e13a13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@togethercrew.dev/db", - "version": "3.0.54", + "version": "3.0.55", "description": "All interactions with DB", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/config/tokens.ts b/src/config/tokens.ts index 1298cf9..8832169 100644 --- a/src/config/tokens.ts +++ b/src/config/tokens.ts @@ -7,4 +7,5 @@ export const tokenTypes = { TWITTER_REFRESH: 'twitter_refresh', GOOGLE_ACCESS: 'google_access', GOOGLE_REFRESH: 'google_refresh', + NOTION_ACCESS: 'notion_access', }; diff --git a/src/interfaces/Module.interface.ts b/src/interfaces/Module.interface.ts index 0618b12..bcf0896 100644 --- a/src/interfaces/Module.interface.ts +++ b/src/interfaces/Module.interface.ts @@ -6,7 +6,7 @@ export interface IModule { options?: { platforms: Array<{ platform: Types.ObjectId; - name: 'discord' | 'google' | 'github'; + name: 'discord' | 'google' | 'github' | 'notion'; metadata?: Record; // dynamic object since structure can change }>; }; @@ -15,7 +15,7 @@ export interface IModuleUpdateBody { options?: { platforms: Array<{ platform: Types.ObjectId; - name: 'discord' | 'google' | 'github'; + name: 'discord' | 'google' | 'github' | 'notion'; metadata?: Record; // dynamic object since structure can change }>; }; diff --git a/src/models/schemas/Module.schema.ts b/src/models/schemas/Module.schema.ts index 450d8e6..1e8b9b6 100644 --- a/src/models/schemas/Module.schema.ts +++ b/src/models/schemas/Module.schema.ts @@ -28,7 +28,7 @@ const moduleSchema = new Schema( name: { type: String, required: true, - enum: ['discord', 'google', 'github'], + enum: ['discord', 'google', 'github', 'notion'], }, }, ], diff --git a/src/models/schemas/Platform.schema.ts b/src/models/schemas/Platform.schema.ts index 600037d..81e1df0 100644 --- a/src/models/schemas/Platform.schema.ts +++ b/src/models/schemas/Platform.schema.ts @@ -8,7 +8,7 @@ const platformSchema = new Schema( name: { type: String, required: true, - enum: ['google', 'discord', 'twitter', 'github'], + enum: ['google', 'discord', 'twitter', 'github', 'notion'], }, metadata: { type: Schema.Types.Mixed,