@intlayer/backend 8.10.0-canary.1 → 8.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/assets/utils/AI/askDocQuestion/embeddings/docs/en/dictionary/markdown.json +10954 -1
  2. package/dist/esm/controllers/organization.controller.mjs +16 -4
  3. package/dist/esm/controllers/organization.controller.mjs.map +1 -1
  4. package/dist/esm/controllers/project.controller.mjs +10 -3
  5. package/dist/esm/controllers/project.controller.mjs.map +1 -1
  6. package/dist/esm/schemas/user.schema.mjs +8 -0
  7. package/dist/esm/schemas/user.schema.mjs.map +1 -1
  8. package/dist/esm/types/user.types.mjs.map +1 -1
  9. package/dist/esm/utils/AI/askDocQuestion/embeddings/docs/en/dictionary/markdown.json +10954 -1
  10. package/dist/esm/utils/auth/getAuth.mjs +34 -8
  11. package/dist/esm/utils/auth/getAuth.mjs.map +1 -1
  12. package/dist/types/controllers/organization.controller.d.ts.map +1 -1
  13. package/dist/types/controllers/project.controller.d.ts.map +1 -1
  14. package/dist/types/schemas/dictionary.schema.d.ts +6 -6
  15. package/dist/types/schemas/discussion.schema.d.ts +7 -7
  16. package/dist/types/schemas/organization.schema.d.ts +2 -2
  17. package/dist/types/schemas/plans.schema.d.ts +9 -9
  18. package/dist/types/schemas/project.schema.d.ts +8 -8
  19. package/dist/types/schemas/showcaseProject.schema.d.ts +6 -6
  20. package/dist/types/schemas/tag.schema.d.ts +6 -6
  21. package/dist/types/schemas/user.schema.d.ts +27 -5
  22. package/dist/types/types/user.types.d.ts +2 -0
  23. package/dist/types/types/user.types.d.ts.map +1 -1
  24. package/dist/types/utils/auth/getAuth.d.ts.map +1 -1
  25. package/dist/types/utils/errors/ErrorHandler.d.ts +10 -6
  26. package/dist/types/utils/errors/ErrorHandler.d.ts.map +1 -1
  27. package/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts +4 -4
  28. package/package.json +10 -10
@@ -9,6 +9,7 @@ import { mapOrganizationToAPI } from "../mapper/organization.mjs";
9
9
  import { mapProjectToAPI } from "../mapper/project.mjs";
10
10
  import { sendVerificationUpdate } from "../../controllers/user.controller.mjs";
11
11
  import { mapSessionToAPI } from "../mapper/session.mjs";
12
+ import { Types } from "mongoose";
12
13
  import { passkey } from "@better-auth/passkey";
13
14
  import { sso } from "@better-auth/sso";
14
15
  import { betterAuth } from "better-auth";
@@ -120,13 +121,29 @@ const getAuth = (dbClient) => {
120
121
  customSession(async ({ session }) => {
121
122
  const typedSession = session;
122
123
  const normalizeId = (id) => typeof id === "string" ? id : id?.buffer instanceof Uint8Array ? Buffer.from(id.buffer).toString("hex") : null;
123
- const orgIdStr = typedSession.activeOrganizationId ? normalizeId(typedSession.activeOrganizationId) : null;
124
- const projectIdStr = typedSession.activeProjectId ? normalizeId(typedSession.activeProjectId) : null;
125
- const [userData, orgData, projectData] = await Promise.all([
126
- typedSession.userId ? getUserById(typedSession.userId) : null,
127
- orgIdStr ? getOrganizationById(orgIdStr) : null,
128
- projectIdStr ? getProjectById(projectIdStr) : null
129
- ]);
124
+ let orgIdStr = typedSession.activeOrganizationId ? normalizeId(typedSession.activeOrganizationId) : null;
125
+ let projectIdStr = typedSession.activeProjectId ? normalizeId(typedSession.activeProjectId) : null;
126
+ const userData = typedSession.userId ? await getUserById(typedSession.userId) : null;
127
+ let isSessionUpdated = false;
128
+ if (userData) {
129
+ if (!orgIdStr && userData.lastActiveOrganizationId) {
130
+ orgIdStr = userData.lastActiveOrganizationId;
131
+ isSessionUpdated = true;
132
+ }
133
+ if (!projectIdStr && userData.lastActiveProjectId) {
134
+ projectIdStr = userData.lastActiveProjectId;
135
+ isSessionUpdated = true;
136
+ }
137
+ if (isSessionUpdated) {
138
+ await dbClient.db().collection("sessions").updateOne({ id: typedSession.id }, { $set: {
139
+ activeOrganizationId: orgIdStr,
140
+ activeProjectId: projectIdStr
141
+ } });
142
+ typedSession.activeOrganizationId = orgIdStr ?? void 0;
143
+ typedSession.activeProjectId = projectIdStr ?? void 0;
144
+ }
145
+ }
146
+ const [orgData, projectData] = await Promise.all([orgIdStr ? getOrganizationById(orgIdStr) : null, projectIdStr ? getProjectById(projectIdStr) : null]);
130
147
  const userAPI = userData ? mapUserToAPI(userData) : null;
131
148
  let organizationAPI = orgData ? mapOrganizationToAPI(orgData) : null;
132
149
  let projectAPI = projectData ? mapProjectToAPI(projectData) : null;
@@ -134,19 +151,28 @@ const getAuth = (dbClient) => {
134
151
  const shouldClearProject = typedSession.activeProjectId && !projectData;
135
152
  if (shouldClearOrg || shouldClearProject) {
136
153
  const updateDoc = {};
154
+ const userUpdateDoc = {};
137
155
  if (shouldClearOrg) {
138
156
  updateDoc.activeOrganizationId = null;
139
157
  updateDoc.activeProjectId = null;
158
+ userUpdateDoc.lastActiveOrganizationId = null;
159
+ userUpdateDoc.lastActiveProjectId = null;
140
160
  typedSession.activeOrganizationId = void 0;
141
161
  typedSession.activeProjectId = void 0;
142
162
  organizationAPI = null;
143
163
  projectAPI = null;
144
164
  } else if (shouldClearProject) {
145
165
  updateDoc.activeProjectId = null;
166
+ userUpdateDoc.lastActiveProjectId = null;
146
167
  typedSession.activeProjectId = void 0;
147
168
  projectAPI = null;
148
169
  }
149
- await dbClient.db().collection("sessions").updateOne({ id: typedSession.id }, { $set: updateDoc });
170
+ const promises = [dbClient.db().collection("sessions").updateOne({ id: typedSession.id }, { $set: updateDoc })];
171
+ if (userData) {
172
+ const userIdObj = typeof userData.id === "string" ? new Types.ObjectId(userData.id) : userData.id;
173
+ promises.push(dbClient.db().collection("users").updateOne({ _id: userIdObj }, { $set: userUpdateDoc }));
174
+ }
175
+ await Promise.all(promises);
150
176
  }
151
177
  return mapSessionToAPI(formatSession({
152
178
  session: typedSession,
@@ -1 +1 @@
1
- {"version":3,"file":"getAuth.mjs","names":[],"sources":["../../../../src/utils/auth/getAuth.ts"],"sourcesContent":["import { passkey } from '@better-auth/passkey';\nimport { sso } from '@better-auth/sso';\nimport { sendVerificationUpdate } from '@controllers/user.controller';\nimport { logger } from '@logger';\nimport { sendEmail } from '@services/email.service';\nimport { getOrganizationById } from '@services/organization.service';\nimport { getProjectById } from '@services/project.service';\nimport { getUserById } from '@services/user.service';\nimport { mapOrganizationToAPI } from '@utils/mapper/organization';\nimport { mapProjectToAPI } from '@utils/mapper/project';\nimport { mapSessionToAPI } from '@utils/mapper/session';\nimport { mapUserToAPI } from '@utils/mapper/user';\nimport type { OmitId } from '@utils/mongoDB/types';\nimport {\n computeEffectivePermission,\n getSessionRoles,\n intersectPermissions,\n} from '@utils/permissions';\nimport { betterAuth } from 'better-auth';\nimport { mongodbAdapter } from 'better-auth/adapters/mongodb';\nimport { createAuthMiddleware } from 'better-auth/api';\nimport { customSession, lastLoginMethod, twoFactor } from 'better-auth/plugins';\nimport { magicLink } from 'better-auth/plugins/magic-link';\nimport type { MongoClient } from 'mongodb';\nimport type { OrganizationAPI } from '@/types/organization.types';\nimport type { ProjectAPI } from '@/types/project.types';\nimport type {\n Session,\n SessionContext,\n SessionDataApi,\n} from '@/types/session.types';\nimport type { UserAPI } from '@/types/user.types';\n\nexport type Auth = ReturnType<typeof betterAuth>;\n\n// Check if we are in production based on the domain or NODE_ENV\nconst isProd = process.env.DOMAIN !== 'localhost';\n\nexport const formatSession = (session: SessionContext): OmitId<Session> => {\n const roles = getSessionRoles(session);\n let permissions = computeEffectivePermission(roles);\n\n // Intersect in the case a Access Token try to override the permissions\n if (session.permissions) {\n permissions = intersectPermissions(permissions, session.permissions);\n }\n\n const resultSession = {\n session: session.session,\n user: session.user,\n organization: session.organization,\n project: session.project,\n authType: 'session',\n permissions,\n roles,\n } as OmitId<Session>;\n\n return resultSession;\n};\n\nexport const getAuth = (dbClient: MongoClient): Auth => {\n if (!dbClient) {\n throw new Error('MongoDB connection not established');\n }\n\n const auth = betterAuth({\n appName: 'Intlayer',\n\n baseURL: process.env.BACKEND_URL,\n\n database: mongodbAdapter(dbClient.db()),\n\n /**\n * User model\n */\n user: {\n modelName: 'users',\n },\n\n databaseHooks: {\n user: {\n create: {\n // Runs once, immediately after the INSERT\n after: async (user) => {\n if (!user?.emailVerified) return;\n\n await sendEmail({\n type: 'welcome',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n loginLink: `${process.env.APP_URL}/auth/login`,\n locale: (user as any).lang,\n });\n logger.info('Welcome e‑mail delivered', {\n email: user.email,\n });\n },\n },\n },\n },\n\n hooks: {\n after: createAuthMiddleware(async (ctx) => {\n const { path, context } = ctx;\n\n const newUser = context.newSession?.user;\n const existingUser = context.session?.user;\n const user = newUser ?? existingUser;\n\n if (!user) return;\n\n if (path.includes('/verify-email')) {\n // Fetch fresh user from DB so emailVerified is definitely up-to-date\n // (the hook context user may be a stale snapshot from before the DB write).\n const freshUser = await getUserById(user.id);\n\n if (freshUser) {\n sendVerificationUpdate(freshUser);\n }\n\n logger.info('SSE verification update sent', {\n email: user.email,\n userId: user.id,\n });\n\n await sendEmail({\n type: 'welcome',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n loginLink: `${process.env.APP_URL}/auth/login`,\n locale: (user as any).lang,\n });\n logger.info('Welcome e‑mail delivered', {\n email: user.email,\n });\n }\n }),\n },\n\n advanced: {\n crossSubDomainCookies: {\n enabled: isProd,\n domain: isProd ? process.env.DOMAIN : undefined,\n additionalCookies: ['session_token'],\n },\n cookiePrefix: 'intlayer',\n cookies: {\n session_token: {\n name: 'session_token',\n attributes: {\n httpOnly: true,\n secure: isProd,\n sameSite: 'lax',\n },\n },\n },\n },\n\n secret: process.env.BETTER_AUTH_SECRET as string,\n session: {\n modelName: 'sessions',\n id: 'id',\n\n // Session lives for 30 days; each access made more than 1 day after the\n // last refresh slides the expiry forward, so an active user effectively\n // stays signed in indefinitely.\n expiresIn: 60 * 60 * 24 * 30,\n updateAge: 60 * 60 * 24,\n\n // Cache the session in a signed cookie for 5 minutes to avoid hitting\n // Mongo on every request while still picking up updateAge refreshes.\n cookieCache: {\n enabled: false,\n maxAge: 5 * 60,\n },\n\n additionalFields: {\n activeOrganizationId: { type: 'string', nullable: true, input: false },\n activeProjectId: { type: 'string', nullable: true, input: false },\n },\n },\n\n plugins: [\n customSession(async ({ session }) => {\n const typedSession = session as unknown as SessionDataApi;\n\n const normalizeId = (id: any): string | null =>\n typeof id === 'string'\n ? id\n : id?.buffer instanceof Uint8Array\n ? Buffer.from(id.buffer).toString('hex')\n : null;\n\n const orgIdStr = typedSession.activeOrganizationId\n ? normalizeId(typedSession.activeOrganizationId)\n : null;\n const projectIdStr = typedSession.activeProjectId\n ? normalizeId(typedSession.activeProjectId)\n : null;\n\n const [userData, orgData, projectData] = await Promise.all([\n typedSession.userId ? getUserById(typedSession.userId) : null,\n orgIdStr ? getOrganizationById(orgIdStr) : null,\n projectIdStr ? getProjectById(projectIdStr) : null,\n ]);\n\n const userAPI: UserAPI | null = userData\n ? mapUserToAPI(userData)\n : null;\n let organizationAPI: OrganizationAPI | null = orgData\n ? mapOrganizationToAPI(orgData)\n : null;\n let projectAPI: ProjectAPI | null = projectData\n ? mapProjectToAPI(projectData)\n : null;\n\n // Cleanup if normalization failed or data not found (Zombie session)\n const shouldClearOrg = typedSession.activeOrganizationId && !orgData;\n const shouldClearProject = typedSession.activeProjectId && !projectData;\n\n if (shouldClearOrg || shouldClearProject) {\n const updateDoc: any = {};\n\n if (shouldClearOrg) {\n updateDoc.activeOrganizationId = null;\n updateDoc.activeProjectId = null;\n\n typedSession.activeOrganizationId = undefined;\n typedSession.activeProjectId = undefined;\n organizationAPI = null;\n projectAPI = null;\n } else if (shouldClearProject) {\n updateDoc.activeProjectId = null;\n\n typedSession.activeProjectId = undefined;\n projectAPI = null;\n }\n\n await dbClient\n .db()\n .collection('sessions')\n .updateOne({ id: typedSession.id }, { $set: updateDoc });\n }\n\n const sessionWithNoPermission: SessionContext = {\n session: typedSession,\n user: userAPI!,\n organization: organizationAPI ?? null,\n project: projectAPI ?? null,\n authType: 'session',\n };\n\n const formattedSession = formatSession(sessionWithNoPermission);\n\n return mapSessionToAPI(formattedSession);\n }),\n lastLoginMethod({\n storeInDatabase: true, // adds user.lastLoginMethod in DB and session\n schema: {\n user: {\n lastLoginMethod: 'lastLoginMethod', // Custom field name\n },\n },\n customResolveMethod: (context) => {\n // When user clicks the magic link\n if (context.path === '/magic-link/verify') {\n return 'magic-link';\n }\n\n // Fallback to default behavior for everything else\n return null;\n },\n }),\n passkey({\n rpID: process.env.DOMAIN,\n rpName: 'Intlayer',\n }),\n twoFactor(),\n magicLink({\n sendMagicLink: async ({ email, url }) => {\n logger.info('sending magic link', { email, url });\n await sendEmail({\n type: 'magicLink',\n to: email,\n username: email.split('@')[0],\n magicLink: url,\n });\n },\n }),\n sso({\n organizationProvisioning: {},\n }),\n ],\n\n emailAndPassword: {\n enabled: true,\n disableSignUp: false,\n requireEmailVerification: true,\n minPasswordLength: 8,\n maxPasswordLength: 128,\n autoSignIn: true,\n sendResetPassword: async ({ user, token }) => {\n logger.info('sending reset password email', { email: user.email });\n await sendEmail({\n type: 'resetPassword',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n resetLink: `${process.env.APP_URL}/auth/password/reset?token=${token}`,\n });\n },\n resetPasswordTokenExpiresIn: 3600,\n },\n\n emailVerification: {\n autoSignInAfterVerification: true,\n sendOnSignIn: true,\n sendVerificationEmail: async ({ user, url }) => {\n logger.info('sending verification email', { email: user.email });\n // Override callbackURL so the link redirects to the app after verification,\n // not to the backend root which just shows the raw API response.\n const verificationUrl = new URL(url);\n verificationUrl.searchParams.set(\n 'callbackURL',\n process.env.APP_URL ?? '/'\n );\n await sendEmail({\n type: 'validate',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n validationLink: verificationUrl.toString(),\n });\n },\n },\n\n trustedOrigins: [\n process.env.WEBSITE_URL,\n process.env.APP_URL,\n process.env.SHOWCASE_URL,\n ].filter(Boolean) as string[],\n\n accountLinking: {\n enabled: true, // allow linking in general\n trustedProviders: [\n 'google',\n 'github',\n 'linkedin',\n 'gitlab',\n 'atlassian',\n 'microsoft',\n 'email-password',\n 'magic-link',\n 'passkey',\n ],\n },\n socialProviders: {\n google: {\n clientId: process.env.GOOGLE_CLIENT_ID as string,\n clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,\n },\n github: {\n clientId: process.env.GITHUB_CLIENT_ID as string,\n clientSecret: process.env.GITHUB_CLIENT_SECRET as string,\n },\n atlassian: {\n clientId: process.env.ATLASSIAN_CLIENT_ID as string,\n clientSecret: process.env.ATLASSIAN_CLIENT_SECRET as string,\n },\n gitlab: {\n clientId: process.env.GITLAB_CLIENT_ID as string,\n clientSecret: process.env.GITLAB_CLIENT_SECRET as string,\n },\n linkedin: {\n clientId: process.env.LINKEDIN_CLIENT_ID as string,\n clientSecret: process.env.LINKEDIN_CLIENT_SECRET as string,\n },\n microsoft: {\n clientId: process.env.MICROSOFT_CLIENT_ID as string,\n clientSecret: process.env.MICROSOFT_CLIENT_SECRET as string,\n },\n // socialProviders: {\n // apple: {\n // clientId: process.env.APPLE_CLIENT_ID as string,\n // clientSecret: process.env.APPLE_CLIENT_SECRET as string,\n // // Optional\n // appBundleIdentifier: process.env\n // .APPLE_APP_BUNDLE_IDENTIFIER as string,\n // },\n // },\n // // Add appleid.apple.com to trustedOrigins for Sign In with Apple flows\n // trustedOrigins: ['https://appleid.apple.com'],\n },\n\n logger: {\n log: (level, message, ...args) => logger[level](message, ...args),\n },\n });\n\n return auth;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,SAAS,QAAQ,IAAI,WAAW;AAEtC,MAAa,iBAAiB,YAA6C;CACzE,MAAM,QAAQ,gBAAgB,OAAO;CACrC,IAAI,cAAc,2BAA2B,KAAK;CAGlD,IAAI,QAAQ,aACV,cAAc,qBAAqB,aAAa,QAAQ,WAAW;CAarE,OAAO;EATL,SAAS,QAAQ;EACjB,MAAM,QAAQ;EACd,cAAc,QAAQ;EACtB,SAAS,QAAQ;EACjB,UAAU;EACV;EACA;CAGiB;AACrB;AAEA,MAAa,WAAW,aA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6BAA6B;EAC/B;EAEA,mBAAmB;GACjB,6BAA6B;GAC7B,cAAc;GACd,uBAAuB,OAAO,EAAE,MAAM,UAAU;IAC9C,OAAO,KAAK,8BAA8B,EAAE,OAAO,KAAK,MAAM,CAAC;IAG/D,MAAM,kBAAkB,IAAI,IAAI,GAAG;IACnC,gBAAgB,aAAa,IAC3B,eACA,QAAQ,IAAI,WAAW,GACzB;IACA,MAAM,UAAU;KACd,MAAM;KACN,IAAI,KAAK;KACT,UAAU,KAAK,QAAQ,KAAK,MAAM,MAAM,GAAG,EAAE;KAC7C,gBAAgB,gBAAgB,SAAS;IAC3C,CAAC;GACH;EACF;EAEA,gBAAgB;GACd,QAAQ,IAAI;GACZ,QAAQ,IAAI;GACZ,QAAQ,IAAI;EACd,EAAE,OAAO,OAAO;EAEhB,gBAAgB;GACd,SAAS;GACT,kBAAkB;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,iBAAiB;GACf,QAAQ;IACN,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;GACA,QAAQ;IACN,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;GACA,WAAW;IACT,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;GACA,QAAQ;IACN,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;GACA,UAAU;IACR,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;GACA,WAAW;IACT,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;EAYF;EAEA,QAAQ,EACN,MAAM,OAAO,SAAS,GAAG,SAAS,OAAO,OAAO,SAAS,GAAG,IAAI,EAClE;CACF,CAEU;AACZ"}
1
+ {"version":3,"file":"getAuth.mjs","names":[],"sources":["../../../../src/utils/auth/getAuth.ts"],"sourcesContent":["import { passkey } from '@better-auth/passkey';\nimport { sso } from '@better-auth/sso';\nimport { sendVerificationUpdate } from '@controllers/user.controller';\nimport { logger } from '@logger';\nimport { sendEmail } from '@services/email.service';\nimport { getOrganizationById } from '@services/organization.service';\nimport { getProjectById } from '@services/project.service';\nimport { getUserById } from '@services/user.service';\nimport { mapOrganizationToAPI } from '@utils/mapper/organization';\nimport { mapProjectToAPI } from '@utils/mapper/project';\nimport { mapSessionToAPI } from '@utils/mapper/session';\nimport { mapUserToAPI } from '@utils/mapper/user';\nimport type { OmitId } from '@utils/mongoDB/types';\nimport {\n computeEffectivePermission,\n getSessionRoles,\n intersectPermissions,\n} from '@utils/permissions';\nimport { betterAuth } from 'better-auth';\nimport { mongodbAdapter } from 'better-auth/adapters/mongodb';\nimport { createAuthMiddleware } from 'better-auth/api';\nimport { customSession, lastLoginMethod, twoFactor } from 'better-auth/plugins';\nimport { magicLink } from 'better-auth/plugins/magic-link';\nimport type { MongoClient } from 'mongodb';\nimport { Types } from 'mongoose';\nimport type { OrganizationAPI } from '@/types/organization.types';\nimport type { ProjectAPI } from '@/types/project.types';\nimport type {\n Session,\n SessionContext,\n SessionDataApi,\n} from '@/types/session.types';\nimport type { UserAPI } from '@/types/user.types';\n\nexport type Auth = ReturnType<typeof betterAuth>;\n\n// Check if we are in production based on the domain or NODE_ENV\nconst isProd = process.env.DOMAIN !== 'localhost';\n\nexport const formatSession = (session: SessionContext): OmitId<Session> => {\n const roles = getSessionRoles(session);\n let permissions = computeEffectivePermission(roles);\n\n // Intersect in the case a Access Token try to override the permissions\n if (session.permissions) {\n permissions = intersectPermissions(permissions, session.permissions);\n }\n\n const resultSession = {\n session: session.session,\n user: session.user,\n organization: session.organization,\n project: session.project,\n authType: 'session',\n permissions,\n roles,\n } as OmitId<Session>;\n\n return resultSession;\n};\n\nexport const getAuth = (dbClient: MongoClient): Auth => {\n if (!dbClient) {\n throw new Error('MongoDB connection not established');\n }\n\n const auth = betterAuth({\n appName: 'Intlayer',\n\n baseURL: process.env.BACKEND_URL,\n\n database: mongodbAdapter(dbClient.db()),\n\n /**\n * User model\n */\n user: {\n modelName: 'users',\n },\n\n databaseHooks: {\n user: {\n create: {\n // Runs once, immediately after the INSERT\n after: async (user) => {\n if (!user?.emailVerified) return;\n\n await sendEmail({\n type: 'welcome',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n loginLink: `${process.env.APP_URL}/auth/login`,\n locale: (user as any).lang,\n });\n logger.info('Welcome e‑mail delivered', {\n email: user.email,\n });\n },\n },\n },\n },\n\n hooks: {\n after: createAuthMiddleware(async (ctx) => {\n const { path, context } = ctx;\n\n const newUser = context.newSession?.user;\n const existingUser = context.session?.user;\n const user = newUser ?? existingUser;\n\n if (!user) return;\n\n if (path.includes('/verify-email')) {\n // Fetch fresh user from DB so emailVerified is definitely up-to-date\n // (the hook context user may be a stale snapshot from before the DB write).\n const freshUser = await getUserById(user.id);\n\n if (freshUser) {\n sendVerificationUpdate(freshUser);\n }\n\n logger.info('SSE verification update sent', {\n email: user.email,\n userId: user.id,\n });\n\n await sendEmail({\n type: 'welcome',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n loginLink: `${process.env.APP_URL}/auth/login`,\n locale: (user as any).lang,\n });\n logger.info('Welcome e‑mail delivered', {\n email: user.email,\n });\n }\n }),\n },\n\n advanced: {\n crossSubDomainCookies: {\n enabled: isProd,\n domain: isProd ? process.env.DOMAIN : undefined,\n additionalCookies: ['session_token'],\n },\n cookiePrefix: 'intlayer',\n cookies: {\n session_token: {\n name: 'session_token',\n attributes: {\n httpOnly: true,\n secure: isProd,\n sameSite: 'lax',\n },\n },\n },\n },\n\n secret: process.env.BETTER_AUTH_SECRET as string,\n session: {\n modelName: 'sessions',\n id: 'id',\n\n // Session lives for 30 days; each access made more than 1 day after the\n // last refresh slides the expiry forward, so an active user effectively\n // stays signed in indefinitely.\n expiresIn: 60 * 60 * 24 * 30,\n updateAge: 60 * 60 * 24,\n\n // Cache the session in a signed cookie for 5 minutes to avoid hitting\n // Mongo on every request while still picking up updateAge refreshes.\n cookieCache: {\n enabled: false,\n maxAge: 5 * 60,\n },\n\n additionalFields: {\n activeOrganizationId: { type: 'string', nullable: true, input: false },\n activeProjectId: { type: 'string', nullable: true, input: false },\n },\n },\n\n plugins: [\n customSession(async ({ session }) => {\n const typedSession = session as unknown as SessionDataApi;\n\n const normalizeId = (id: any): string | null =>\n typeof id === 'string'\n ? id\n : id?.buffer instanceof Uint8Array\n ? Buffer.from(id.buffer).toString('hex')\n : null;\n\n let orgIdStr = typedSession.activeOrganizationId\n ? normalizeId(typedSession.activeOrganizationId)\n : null;\n let projectIdStr = typedSession.activeProjectId\n ? normalizeId(typedSession.activeProjectId)\n : null;\n\n const userData = typedSession.userId\n ? await getUserById(typedSession.userId)\n : null;\n\n // If the session does not have an active organization or project context, try to restore from the user's last active context\n let isSessionUpdated = false;\n if (userData) {\n if (!orgIdStr && userData.lastActiveOrganizationId) {\n orgIdStr = userData.lastActiveOrganizationId;\n isSessionUpdated = true;\n }\n if (!projectIdStr && userData.lastActiveProjectId) {\n projectIdStr = userData.lastActiveProjectId;\n isSessionUpdated = true;\n }\n\n if (isSessionUpdated) {\n await dbClient\n .db()\n .collection('sessions')\n .updateOne(\n { id: typedSession.id },\n {\n $set: {\n activeOrganizationId: orgIdStr,\n activeProjectId: projectIdStr,\n },\n }\n );\n typedSession.activeOrganizationId = orgIdStr ?? undefined;\n typedSession.activeProjectId = projectIdStr ?? undefined;\n }\n }\n\n const [orgData, projectData] = await Promise.all([\n orgIdStr ? getOrganizationById(orgIdStr) : null,\n projectIdStr ? getProjectById(projectIdStr) : null,\n ]);\n\n const userAPI: UserAPI | null = userData\n ? mapUserToAPI(userData)\n : null;\n let organizationAPI: OrganizationAPI | null = orgData\n ? mapOrganizationToAPI(orgData)\n : null;\n let projectAPI: ProjectAPI | null = projectData\n ? mapProjectToAPI(projectData)\n : null;\n\n // Cleanup if normalization failed or data not found (Zombie session)\n const shouldClearOrg = typedSession.activeOrganizationId && !orgData;\n const shouldClearProject = typedSession.activeProjectId && !projectData;\n\n if (shouldClearOrg || shouldClearProject) {\n const updateDoc: any = {};\n const userUpdateDoc: any = {};\n\n if (shouldClearOrg) {\n updateDoc.activeOrganizationId = null;\n updateDoc.activeProjectId = null;\n userUpdateDoc.lastActiveOrganizationId = null;\n userUpdateDoc.lastActiveProjectId = null;\n\n typedSession.activeOrganizationId = undefined;\n typedSession.activeProjectId = undefined;\n organizationAPI = null;\n projectAPI = null;\n } else if (shouldClearProject) {\n updateDoc.activeProjectId = null;\n userUpdateDoc.lastActiveProjectId = null;\n\n typedSession.activeProjectId = undefined;\n projectAPI = null;\n }\n\n const promises: Promise<any>[] = [\n dbClient\n .db()\n .collection('sessions')\n .updateOne({ id: typedSession.id }, { $set: updateDoc }),\n ];\n\n if (userData) {\n const userIdObj =\n typeof userData.id === 'string'\n ? new Types.ObjectId(userData.id)\n : userData.id;\n promises.push(\n dbClient\n .db()\n .collection('users')\n .updateOne({ _id: userIdObj }, { $set: userUpdateDoc })\n );\n }\n\n await Promise.all(promises);\n }\n\n const sessionWithNoPermission: SessionContext = {\n session: typedSession,\n user: userAPI!,\n organization: organizationAPI ?? null,\n project: projectAPI ?? null,\n authType: 'session',\n };\n\n const formattedSession = formatSession(sessionWithNoPermission);\n\n return mapSessionToAPI(formattedSession);\n }),\n lastLoginMethod({\n storeInDatabase: true, // adds user.lastLoginMethod in DB and session\n schema: {\n user: {\n lastLoginMethod: 'lastLoginMethod', // Custom field name\n },\n },\n customResolveMethod: (context) => {\n // When user clicks the magic link\n if (context.path === '/magic-link/verify') {\n return 'magic-link';\n }\n\n // Fallback to default behavior for everything else\n return null;\n },\n }),\n passkey({\n rpID: process.env.DOMAIN,\n rpName: 'Intlayer',\n }),\n twoFactor(),\n magicLink({\n sendMagicLink: async ({ email, url }) => {\n logger.info('sending magic link', { email, url });\n await sendEmail({\n type: 'magicLink',\n to: email,\n username: email.split('@')[0],\n magicLink: url,\n });\n },\n }),\n sso({\n organizationProvisioning: {},\n }),\n ],\n\n emailAndPassword: {\n enabled: true,\n disableSignUp: false,\n requireEmailVerification: true,\n minPasswordLength: 8,\n maxPasswordLength: 128,\n autoSignIn: true,\n sendResetPassword: async ({ user, token }) => {\n logger.info('sending reset password email', { email: user.email });\n await sendEmail({\n type: 'resetPassword',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n resetLink: `${process.env.APP_URL}/auth/password/reset?token=${token}`,\n });\n },\n resetPasswordTokenExpiresIn: 3600,\n },\n\n emailVerification: {\n autoSignInAfterVerification: true,\n sendOnSignIn: true,\n sendVerificationEmail: async ({ user, url }) => {\n logger.info('sending verification email', { email: user.email });\n // Override callbackURL so the link redirects to the app after verification,\n // not to the backend root which just shows the raw API response.\n const verificationUrl = new URL(url);\n verificationUrl.searchParams.set(\n 'callbackURL',\n process.env.APP_URL ?? '/'\n );\n await sendEmail({\n type: 'validate',\n to: user.email,\n username: user.name ?? user.email.split('@')[0],\n validationLink: verificationUrl.toString(),\n });\n },\n },\n\n trustedOrigins: [\n process.env.WEBSITE_URL,\n process.env.APP_URL,\n process.env.SHOWCASE_URL,\n ].filter(Boolean) as string[],\n\n accountLinking: {\n enabled: true, // allow linking in general\n trustedProviders: [\n 'google',\n 'github',\n 'linkedin',\n 'gitlab',\n 'atlassian',\n 'microsoft',\n 'email-password',\n 'magic-link',\n 'passkey',\n ],\n },\n socialProviders: {\n google: {\n clientId: process.env.GOOGLE_CLIENT_ID as string,\n clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,\n },\n github: {\n clientId: process.env.GITHUB_CLIENT_ID as string,\n clientSecret: process.env.GITHUB_CLIENT_SECRET as string,\n },\n atlassian: {\n clientId: process.env.ATLASSIAN_CLIENT_ID as string,\n clientSecret: process.env.ATLASSIAN_CLIENT_SECRET as string,\n },\n gitlab: {\n clientId: process.env.GITLAB_CLIENT_ID as string,\n clientSecret: process.env.GITLAB_CLIENT_SECRET as string,\n },\n linkedin: {\n clientId: process.env.LINKEDIN_CLIENT_ID as string,\n clientSecret: process.env.LINKEDIN_CLIENT_SECRET as string,\n },\n microsoft: {\n clientId: process.env.MICROSOFT_CLIENT_ID as string,\n clientSecret: process.env.MICROSOFT_CLIENT_SECRET as string,\n },\n // socialProviders: {\n // apple: {\n // clientId: process.env.APPLE_CLIENT_ID as string,\n // clientSecret: process.env.APPLE_CLIENT_SECRET as string,\n // // Optional\n // appBundleIdentifier: process.env\n // .APPLE_APP_BUNDLE_IDENTIFIER as string,\n // },\n // },\n // // Add appleid.apple.com to trustedOrigins for Sign In with Apple flows\n // trustedOrigins: ['https://appleid.apple.com'],\n },\n\n logger: {\n log: (level, message, ...args) => logger[level](message, ...args),\n },\n });\n\n return auth;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,SAAS,QAAQ,IAAI,WAAW;AAEtC,MAAa,iBAAiB,YAA6C;CACzE,MAAM,QAAQ,gBAAgB,OAAO;CACrC,IAAI,cAAc,2BAA2B,KAAK;CAGlD,IAAI,QAAQ,aACV,cAAc,qBAAqB,aAAa,QAAQ,WAAW;CAarE,OAAO;EATL,SAAS,QAAQ;EACjB,MAAM,QAAQ;EACd,cAAc,QAAQ;EACtB,SAAS,QAAQ;EACjB,UAAU;EACV;EACA;CAGiB;AACrB;AAEA,MAAa,WAAW,aAAgC;CACtD,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,oCAAoC;CAqYtD,OAlYa,WAAW;EACtB,SAAS;EAET,SAAS,QAAQ,IAAI;EAErB,UAAU,eAAe,SAAS,GAAG,CAAC;;;;EAKtC,MAAM,EACJ,WAAW,QACb;EAEA,eAAe,EACb,MAAM,EACJ,QAAQ,EAEN,OAAO,OAAO,SAAS;GACrB,IAAI,CAAC,MAAM,eAAe;GAE1B,MAAM,UAAU;IACd,MAAM;IACN,IAAI,KAAK;IACT,UAAU,KAAK,QAAQ,KAAK,MAAM,MAAM,GAAG,EAAE;IAC7C,WAAW,GAAG,QAAQ,IAAI,QAAQ;IAClC,QAAS,KAAa;GACxB,CAAC;GACD,OAAO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UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;GACA,WAAW;IACT,UAAU,QAAQ,IAAI;IACtB,cAAc,QAAQ,IAAI;GAC5B;EAYF;EAEA,QAAQ,EACN,MAAM,OAAO,SAAS,GAAG,SAAS,OAAO,OAAO,SAAS,GAAG,IAAI,EAClE;CACF,CAEU;AACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization.controller.d.ts","names":[],"sources":["../../../src/controllers/organization.controller.ts"],"mappings":";;;;;;;;;KAmCY,sBAAA,GACV,oBAAoB,CAAC,yBAAA;AAAA,KACX,sBAAA,GAAyB,iBAAiB,CAAC,eAAA;AAFvD;;;AAAA,cAOa,gBAAA,GACX,OAAA,EAAS,cAAA;EAAiB,WAAA,EAAa,sBAAA;AAAA,IACvC,KAAA,EAAO,YAAA,KAAY,OAAA;AAAA,KAiDT,oBAAA;EAAyB,cAAc;AAAA;AAAA,KACvC,qBAAA,GAAwB,YAAY,CAAC,eAAA;AApDjD;;;AAAA,cAyDa,eAAA,GACX,OAAA,EAAS,cAAA;EAAiB,MAAA,EAAQ,oBAAA;AAAA,IAClC,KAAA,EAAO,YAAA,KACN,OAAA;AAAA,KAwCS,mBAAA,GAAsB,wBAAwB;AAAA,KAC9C,qBAAA,GAAwB,YAAY,CAAC,eAAA;;;;cAKpC,eAAA,GACX,OAAA,EAAS,cAAA;EAAiB,IAAA,EAAM,mBAAA;AAAA,IAChC,KAAA,EAAO,YAAA,KACN,OAAA;AAAA,KAuES,sBAAA,GAAyB,OAAO,CAAC,YAAA;AAAA,KACjC,wBAAA,GAA2B,YAAY,CAAC,eAAA;;AAnL/B;AAiDrB;cAuIa,kBAAA,GACX,OAAA,EAAS,cAAA;EAAiB,IAAA,EAAM,sBAAA;AAAA,IAChC,KAAA,EAAO,YAAA,KACN,OAAA;AAAA,KAuFS,yBAAA;EACV,SAAS;AAAA;AAAA,KAEC,2BAAA,GAA8B,YAAY,CAAC,eAAA;;AAnOS;AAKhE;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AO,YAAA,KACN,OAAA;AAAA,KAmGS,0BAAA,GAA6B,YAAY;AA9xBrD;;;AAAA,cAmyBa,oBAAA,GACX,QAAA,EAAU,cAAA,EACV,KAAA,EAAO,YAAA,KACN,OAAA"}
1
+ {"version":3,"file":"organization.controller.d.ts","names":[],"sources":["../../../src/controllers/organization.controller.ts"],"mappings":";;;;;;;;;KAmCY,sBAAA,GACV,oBAAoB,CAAC,yBAAA;AAAA,KACX,sBAAA,GAAyB,iBAAiB,CAAC,eAAA;AAFvD;;;AAAA,cAOa,gBAAA,GACX,OAAA,EAAS,cAAA;EAAiB,WAAA,EAAa,sBAAA;AAAA,IACvC,KAAA,EAAO,YAAA,KAAY,OAAA;AAAA,KAiDT,oBAAA;EAAyB,cAAc;AAAA;AAAA,KACvC,qBAAA,GAAwB,YAAY,CAAC,eAAA;AApDjD;;;AAAA,cAyDa,eAAA,GACX,OAAA,EAAS,cAAA;EAAiB,MAAA,EAAQ,oBAAA;AAAA,IAClC,KAAA,EAAO,YAAA,KACN,OAAA;AAAA,KAwCS,mBAAA,GAAsB,wBAAwB;AAAA,KAC9C,qBAAA,GAAwB,YAAY,CAAC,eAAA;;;;cAKpC,eAAA,GACX,OAAA,EAAS,cAAA;EAAiB,IAAA,EAAM,mBAAA;AAAA,IAChC,KAAA,EAAO,YAAA,KACN,OAAA;AAAA,KAuES,sBAAA,GAAyB,OAAO,CAAC,YAAA;AAAA,KACjC,wBAAA,GAA2B,YAAY,CAAC,eAAA;;AAnL/B;AAiDrB;cAuIa,kBAAA,GACX,OAAA,EAAS,cAAA;EAAiB,IAAA,EAAM,sBAAA;AAAA,IAChC,KAAA,EAAO,YAAA,KACN,OAAA;AAAA,KAuFS,yBAAA;EACV,SAAS;AAAA;AAAA,KAEC,2BAAA,GAA8B,YAAY,CAAC,eAAA;;AAnOS;AAKhE;cAmOa,qBAAA,GACX,OAAA,EAAS,cAAA;EAAiB,IAAA,EAAM,yBAAA;AAAA,IAChC,KAAA,EAAO,YAAA,K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AA,EAAO,YAAA,KACN,OAAA;AAAA,KAqCS,yBAAA,GAA4B,YAAY;EAAG,OAAO;AAAA;AAr5BE;AAKhE;;AALgE,cA05BnD,mBAAA,GACX,OAAA,EAAS,cAAA,EACT,KAAA,EAAO,YAAA,KACN,OAAA"}
@@ -46,7 +46,7 @@ declare const dictionarySchema: Schema<DictionarySchema, import("mongoose").Mode
46
46
  }, "id"> & {
47
47
  id: string;
48
48
  }>;
49
- key?: import("mongoose").SchemaDefinitionProperty<string, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
49
+ title?: import("mongoose").SchemaDefinitionProperty<string, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
50
50
  id: string;
51
51
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Dictionary, "id"> & {
52
52
  _id: import("mongoose").Types.ObjectId;
@@ -57,7 +57,7 @@ declare const dictionarySchema: Schema<DictionarySchema, import("mongoose").Mode
57
57
  }, "id"> & {
58
58
  id: string;
59
59
  }>;
60
- creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
60
+ content?: import("mongoose").SchemaDefinitionProperty<VersionedContent, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
61
61
  id: string;
62
62
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Dictionary, "id"> & {
63
63
  _id: import("mongoose").Types.ObjectId;
@@ -68,7 +68,7 @@ declare const dictionarySchema: Schema<DictionarySchema, import("mongoose").Mode
68
68
  }, "id"> & {
69
69
  id: string;
70
70
  }>;
71
- title?: import("mongoose").SchemaDefinitionProperty<string, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
71
+ creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
72
72
  id: string;
73
73
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Dictionary, "id"> & {
74
74
  _id: import("mongoose").Types.ObjectId;
@@ -79,7 +79,7 @@ declare const dictionarySchema: Schema<DictionarySchema, import("mongoose").Mode
79
79
  }, "id"> & {
80
80
  id: string;
81
81
  }>;
82
- tags?: import("mongoose").SchemaDefinitionProperty<string[], DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
82
+ key?: import("mongoose").SchemaDefinitionProperty<string, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
83
83
  id: string;
84
84
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Dictionary, "id"> & {
85
85
  _id: import("mongoose").Types.ObjectId;
@@ -90,7 +90,7 @@ declare const dictionarySchema: Schema<DictionarySchema, import("mongoose").Mode
90
90
  }, "id"> & {
91
91
  id: string;
92
92
  }>;
93
- content?: import("mongoose").SchemaDefinitionProperty<VersionedContent, DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
93
+ projectIds?: import("mongoose").SchemaDefinitionProperty<(string | import("mongoose").Types.ObjectId)[], DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
94
94
  id: string;
95
95
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Dictionary, "id"> & {
96
96
  _id: import("mongoose").Types.ObjectId;
@@ -101,7 +101,7 @@ declare const dictionarySchema: Schema<DictionarySchema, import("mongoose").Mode
101
101
  }, "id"> & {
102
102
  id: string;
103
103
  }>;
104
- projectIds?: import("mongoose").SchemaDefinitionProperty<(string | import("mongoose").Types.ObjectId)[], DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
104
+ tags?: import("mongoose").SchemaDefinitionProperty<string[], DictionarySchema, import("mongoose").Document<unknown, {}, DictionarySchema, {
105
105
  id: string;
106
106
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Dictionary, "id"> & {
107
107
  _id: import("mongoose").Types.ObjectId;
@@ -13,7 +13,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
13
13
  }, "id"> & {
14
14
  id: string;
15
15
  }, {
16
- _id?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
16
+ type?: import("mongoose").SchemaDefinitionProperty<DiscussionType, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
17
17
  id: string;
18
18
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
19
19
  _id: import("mongoose").Types.ObjectId;
@@ -24,7 +24,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
24
24
  }, "id"> & {
25
25
  id: string;
26
26
  }>;
27
- type?: import("mongoose").SchemaDefinitionProperty<DiscussionType, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
27
+ _id?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
28
28
  id: string;
29
29
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
30
30
  _id: import("mongoose").Types.ObjectId;
@@ -68,7 +68,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
68
68
  }, "id"> & {
69
69
  id: string;
70
70
  }>;
71
- projectId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
71
+ discussionId?: import("mongoose").SchemaDefinitionProperty<string, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
72
72
  id: string;
73
73
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
74
74
  _id: import("mongoose").Types.ObjectId;
@@ -79,7 +79,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
79
79
  }, "id"> & {
80
80
  id: string;
81
81
  }>;
82
- organizationId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
82
+ messages?: import("mongoose").SchemaDefinitionProperty<Message[], DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
83
83
  id: string;
84
84
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
85
85
  _id: import("mongoose").Types.ObjectId;
@@ -90,7 +90,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
90
90
  }, "id"> & {
91
91
  id: string;
92
92
  }>;
93
- title?: import("mongoose").SchemaDefinitionProperty<string, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
93
+ projectId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
94
94
  id: string;
95
95
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
96
96
  _id: import("mongoose").Types.ObjectId;
@@ -101,7 +101,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
101
101
  }, "id"> & {
102
102
  id: string;
103
103
  }>;
104
- discussionId?: import("mongoose").SchemaDefinitionProperty<string, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
104
+ organizationId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
105
105
  id: string;
106
106
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
107
107
  _id: import("mongoose").Types.ObjectId;
@@ -112,7 +112,7 @@ declare const discussionSchema: Schema<DiscussionSchema, import("mongoose").Mode
112
112
  }, "id"> & {
113
113
  id: string;
114
114
  }>;
115
- messages?: import("mongoose").SchemaDefinitionProperty<Message[], DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
115
+ title?: import("mongoose").SchemaDefinitionProperty<string, DiscussionSchema, import("mongoose").Document<unknown, {}, DiscussionSchema, {
116
116
  id: string;
117
117
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Discussion, "id"> & {
118
118
  _id: import("mongoose").Types.ObjectId;
@@ -47,7 +47,7 @@ declare const organizationSchema: Schema<OrganizationSchema, import("mongoose").
47
47
  }, "id"> & {
48
48
  id: string;
49
49
  }>;
50
- creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, OrganizationSchema, import("mongoose").Document<unknown, {}, OrganizationSchema, {
50
+ domain?: import("mongoose").SchemaDefinitionProperty<string, OrganizationSchema, import("mongoose").Document<unknown, {}, OrganizationSchema, {
51
51
  id: string;
52
52
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Organization, "id"> & {
53
53
  _id: import("mongoose").Types.ObjectId;
@@ -91,7 +91,7 @@ declare const organizationSchema: Schema<OrganizationSchema, import("mongoose").
91
91
  }, "id"> & {
92
92
  id: string;
93
93
  }>;
94
- domain?: import("mongoose").SchemaDefinitionProperty<string, OrganizationSchema, import("mongoose").Document<unknown, {}, OrganizationSchema, {
94
+ creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, OrganizationSchema, import("mongoose").Document<unknown, {}, OrganizationSchema, {
95
95
  id: string;
96
96
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Organization, "id"> & {
97
97
  _id: import("mongoose").Types.ObjectId;
@@ -13,7 +13,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
13
13
  }, "id"> & {
14
14
  id: string;
15
15
  }, {
16
- type?: import("mongoose").SchemaDefinitionProperty<PlanType, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
16
+ period?: import("mongoose").SchemaDefinitionProperty<"MONTHLY" | "YEARLY" | "LIFETIME", PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
17
17
  id: string;
18
18
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
19
19
  _id: import("mongoose").Types.ObjectId;
@@ -24,7 +24,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
24
24
  }, "id"> & {
25
25
  id: string;
26
26
  }>;
27
- createdAt?: import("mongoose").SchemaDefinitionProperty<number, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
27
+ type?: import("mongoose").SchemaDefinitionProperty<PlanType, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
28
28
  id: string;
29
29
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
30
30
  _id: import("mongoose").Types.ObjectId;
@@ -35,7 +35,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
35
35
  }, "id"> & {
36
36
  id: string;
37
37
  }>;
38
- updatedAt?: import("mongoose").SchemaDefinitionProperty<number, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
38
+ createdAt?: import("mongoose").SchemaDefinitionProperty<number, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
39
39
  id: string;
40
40
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
41
41
  _id: import("mongoose").Types.ObjectId;
@@ -46,7 +46,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
46
46
  }, "id"> & {
47
47
  id: string;
48
48
  }>;
49
- status?: import("mongoose").SchemaDefinitionProperty<"active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing", PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
49
+ updatedAt?: import("mongoose").SchemaDefinitionProperty<number, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
50
50
  id: string;
51
51
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
52
52
  _id: import("mongoose").Types.ObjectId;
@@ -57,7 +57,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
57
57
  }, "id"> & {
58
58
  id: string;
59
59
  }>;
60
- creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
60
+ status?: import("mongoose").SchemaDefinitionProperty<"active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing", PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
61
61
  id: string;
62
62
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
63
63
  _id: import("mongoose").Types.ObjectId;
@@ -68,7 +68,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
68
68
  }, "id"> & {
69
69
  id: string;
70
70
  }>;
71
- subscriptionId?: import("mongoose").SchemaDefinitionProperty<string, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
71
+ customerId?: import("mongoose").SchemaDefinitionProperty<string, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
72
72
  id: string;
73
73
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
74
74
  _id: import("mongoose").Types.ObjectId;
@@ -79,7 +79,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
79
79
  }, "id"> & {
80
80
  id: string;
81
81
  }>;
82
- customerId?: import("mongoose").SchemaDefinitionProperty<string, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
82
+ creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
83
83
  id: string;
84
84
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
85
85
  _id: import("mongoose").Types.ObjectId;
@@ -90,7 +90,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
90
90
  }, "id"> & {
91
91
  id: string;
92
92
  }>;
93
- priceId?: import("mongoose").SchemaDefinitionProperty<string, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
93
+ subscriptionId?: import("mongoose").SchemaDefinitionProperty<string, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
94
94
  id: string;
95
95
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
96
96
  _id: import("mongoose").Types.ObjectId;
@@ -101,7 +101,7 @@ declare const planSchema: Schema<PlanSchema, import("mongoose").Model<PlanSchema
101
101
  }, "id"> & {
102
102
  id: string;
103
103
  }>;
104
- period?: import("mongoose").SchemaDefinitionProperty<"LIFETIME" | "MONTHLY" | "YEARLY", PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
104
+ priceId?: import("mongoose").SchemaDefinitionProperty<string, PlanSchema, import("mongoose").Document<unknown, {}, PlanSchema, {
105
105
  id: string;
106
106
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Plan, "id"> & {
107
107
  _id: import("mongoose").Types.ObjectId;
@@ -46,7 +46,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
46
46
  }, "id"> & {
47
47
  id: string;
48
48
  }>;
49
- creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
49
+ organizationId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
50
50
  id: string;
51
51
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
52
52
  _id: import("mongoose").Types.ObjectId;
@@ -57,7 +57,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
57
57
  }, "id"> & {
58
58
  id: string;
59
59
  }>;
60
- organizationId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
60
+ membersIds?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId[], ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
61
61
  id: string;
62
62
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
63
63
  _id: import("mongoose").Types.ObjectId;
@@ -68,7 +68,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
68
68
  }, "id"> & {
69
69
  id: string;
70
70
  }>;
71
- imageUrl?: import("mongoose").SchemaDefinitionProperty<string, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
71
+ adminsIds?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId[], ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
72
72
  id: string;
73
73
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
74
74
  _id: import("mongoose").Types.ObjectId;
@@ -79,7 +79,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
79
79
  }, "id"> & {
80
80
  id: string;
81
81
  }>;
82
- membersIds?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId[], ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
82
+ creatorId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
83
83
  id: string;
84
84
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
85
85
  _id: import("mongoose").Types.ObjectId;
@@ -90,7 +90,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
90
90
  }, "id"> & {
91
91
  id: string;
92
92
  }>;
93
- adminsIds?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId[], ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
93
+ configuration?: import("mongoose").SchemaDefinitionProperty<ProjectConfiguration, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
94
94
  id: string;
95
95
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
96
96
  _id: import("mongoose").Types.ObjectId;
@@ -112,7 +112,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
112
112
  }, "id"> & {
113
113
  id: string;
114
114
  }>;
115
- configuration?: import("mongoose").SchemaDefinitionProperty<ProjectConfiguration, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
115
+ webhooks?: import("mongoose").SchemaDefinitionProperty<ProjectConfigCI, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
116
116
  id: string;
117
117
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
118
118
  _id: import("mongoose").Types.ObjectId;
@@ -123,7 +123,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
123
123
  }, "id"> & {
124
124
  id: string;
125
125
  }>;
126
- webhooks?: import("mongoose").SchemaDefinitionProperty<ProjectConfigCI, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
126
+ autoFill?: import("mongoose").SchemaDefinitionProperty<boolean, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
127
127
  id: string;
128
128
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
129
129
  _id: import("mongoose").Types.ObjectId;
@@ -134,7 +134,7 @@ declare const projectSchema: Schema<ProjectSchema, import("mongoose").Model<Proj
134
134
  }, "id"> & {
135
135
  id: string;
136
136
  }>;
137
- autoFill?: import("mongoose").SchemaDefinitionProperty<boolean, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
137
+ imageUrl?: import("mongoose").SchemaDefinitionProperty<string, ProjectSchema, import("mongoose").Document<unknown, {}, ProjectSchema, {
138
138
  id: string;
139
139
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Project, "id"> & {
140
140
  _id: import("mongoose").Types.ObjectId;
@@ -29,7 +29,7 @@ declare const showcaseProjectSchema: Schema<ShowcaseProjectDocument, import("mon
29
29
  }, "id"> & {
30
30
  id: string;
31
31
  }>;
32
- status?: import("mongoose").SchemaDefinitionProperty<ShowcaseProjectStatus, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
32
+ description?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
33
33
  id: string;
34
34
  }, import("mongoose").DefaultSchemaOptions> & Omit<ShowcaseProject & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & Required<{
35
35
  _id: import("mongoose").Types.ObjectId;
@@ -38,7 +38,7 @@ declare const showcaseProjectSchema: Schema<ShowcaseProjectDocument, import("mon
38
38
  }, "id"> & {
39
39
  id: string;
40
40
  }>;
41
- description?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
41
+ status?: import("mongoose").SchemaDefinitionProperty<ShowcaseProjectStatus, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
42
42
  id: string;
43
43
  }, import("mongoose").DefaultSchemaOptions> & Omit<ShowcaseProject & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & Required<{
44
44
  _id: import("mongoose").Types.ObjectId;
@@ -65,7 +65,7 @@ declare const showcaseProjectSchema: Schema<ShowcaseProjectDocument, import("mon
65
65
  }, "id"> & {
66
66
  id: string;
67
67
  }>;
68
- logoUrl?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
68
+ tags?: import("mongoose").SchemaDefinitionProperty<string[], ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
69
69
  id: string;
70
70
  }, import("mongoose").DefaultSchemaOptions> & Omit<ShowcaseProject & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & Required<{
71
71
  _id: import("mongoose").Types.ObjectId;
@@ -74,7 +74,7 @@ declare const showcaseProjectSchema: Schema<ShowcaseProjectDocument, import("mon
74
74
  }, "id"> & {
75
75
  id: string;
76
76
  }>;
77
- websiteUrl?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
77
+ logoUrl?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
78
78
  id: string;
79
79
  }, import("mongoose").DefaultSchemaOptions> & Omit<ShowcaseProject & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & Required<{
80
80
  _id: import("mongoose").Types.ObjectId;
@@ -83,7 +83,7 @@ declare const showcaseProjectSchema: Schema<ShowcaseProjectDocument, import("mon
83
83
  }, "id"> & {
84
84
  id: string;
85
85
  }>;
86
- githubUrl?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
86
+ websiteUrl?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
87
87
  id: string;
88
88
  }, import("mongoose").DefaultSchemaOptions> & Omit<ShowcaseProject & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & Required<{
89
89
  _id: import("mongoose").Types.ObjectId;
@@ -92,7 +92,7 @@ declare const showcaseProjectSchema: Schema<ShowcaseProjectDocument, import("mon
92
92
  }, "id"> & {
93
93
  id: string;
94
94
  }>;
95
- tags?: import("mongoose").SchemaDefinitionProperty<string[], ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
95
+ githubUrl?: import("mongoose").SchemaDefinitionProperty<string, ShowcaseProjectDocument, import("mongoose").Document<unknown, {}, ShowcaseProjectDocument, {
96
96
  id: string;
97
97
  }, import("mongoose").DefaultSchemaOptions> & Omit<ShowcaseProject & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & Required<{
98
98
  _id: import("mongoose").Types.ObjectId;
@@ -35,7 +35,7 @@ declare const tagSchema: Schema<TagSchema, import("mongoose").Model<TagSchema, a
35
35
  }, "id"> & {
36
36
  id: string;
37
37
  }>;
38
- description?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
38
+ name?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
39
39
  id: string;
40
40
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Tag, "id"> & {
41
41
  _id: import("mongoose").Types.ObjectId;
@@ -46,7 +46,7 @@ declare const tagSchema: Schema<TagSchema, import("mongoose").Model<TagSchema, a
46
46
  }, "id"> & {
47
47
  id: string;
48
48
  }>;
49
- name?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
49
+ description?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
50
50
  id: string;
51
51
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Tag, "id"> & {
52
52
  _id: import("mongoose").Types.ObjectId;
@@ -57,7 +57,7 @@ declare const tagSchema: Schema<TagSchema, import("mongoose").Model<TagSchema, a
57
57
  }, "id"> & {
58
58
  id: string;
59
59
  }>;
60
- key?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
60
+ projectId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
61
61
  id: string;
62
62
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Tag, "id"> & {
63
63
  _id: import("mongoose").Types.ObjectId;
@@ -68,7 +68,7 @@ declare const tagSchema: Schema<TagSchema, import("mongoose").Model<TagSchema, a
68
68
  }, "id"> & {
69
69
  id: string;
70
70
  }>;
71
- instructions?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
71
+ organizationId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
72
72
  id: string;
73
73
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Tag, "id"> & {
74
74
  _id: import("mongoose").Types.ObjectId;
@@ -90,7 +90,7 @@ declare const tagSchema: Schema<TagSchema, import("mongoose").Model<TagSchema, a
90
90
  }, "id"> & {
91
91
  id: string;
92
92
  }>;
93
- projectId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
93
+ key?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
94
94
  id: string;
95
95
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Tag, "id"> & {
96
96
  _id: import("mongoose").Types.ObjectId;
@@ -101,7 +101,7 @@ declare const tagSchema: Schema<TagSchema, import("mongoose").Model<TagSchema, a
101
101
  }, "id"> & {
102
102
  id: string;
103
103
  }>;
104
- organizationId?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
104
+ instructions?: import("mongoose").SchemaDefinitionProperty<string, TagSchema, import("mongoose").Document<unknown, {}, TagSchema, {
105
105
  id: string;
106
106
  }, import("mongoose").DefaultSchemaOptions> & Omit<Omit<Tag, "id"> & {
107
107
  _id: import("mongoose").Types.ObjectId;