@lyxa.ai/core 1.4.68-test-filter-container-model → 1.4.68

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 (26) hide show
  1. package/dist/libraries/logger-kit/logger.service.d.ts +6 -6
  2. package/dist/libraries/logger-kit/logger.service.js.map +1 -1
  3. package/dist/libraries/mongo/models/embedded/external-ref.model.d.ts +4 -0
  4. package/dist/libraries/mongo/models/embedded/external-ref.model.js +32 -0
  5. package/dist/libraries/mongo/models/embedded/external-ref.model.js.map +1 -0
  6. package/dist/libraries/mongo/models/filter-container.model.js +1 -1
  7. package/dist/libraries/mongo/models/filter-container.model.js.map +1 -1
  8. package/dist/libraries/mongo/models/index.d.ts +5 -0
  9. package/dist/libraries/mongo/models/index.js +9 -1
  10. package/dist/libraries/mongo/models/index.js.map +1 -1
  11. package/dist/libraries/mongo/models/integration-configuration.model.d.ts +5 -0
  12. package/dist/libraries/mongo/models/integration-configuration.model.js +33 -0
  13. package/dist/libraries/mongo/models/integration-configuration.model.js.map +1 -0
  14. package/dist/libraries/mongo/models/log.model.d.ts +2 -2
  15. package/dist/libraries/mongo/models/log.model.js.map +1 -1
  16. package/dist/libraries/mongo/models/product.model.d.ts +3 -1
  17. package/dist/libraries/mongo/models/product.model.js +6 -0
  18. package/dist/libraries/mongo/models/product.model.js.map +1 -1
  19. package/dist/libraries/trpc/middlewares/auth.d.ts +1 -1
  20. package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +1 -1
  21. package/dist/libraries/trpc/middlewares/phone-verified.d.ts +1 -1
  22. package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +1 -1
  23. package/dist/types/README.md +1 -1
  24. package/dist/types/package.json +1 -1
  25. package/dist/types/utilities/validation/common-validation.d.ts +12 -12
  26. package/package.json +7 -4
@@ -35,7 +35,7 @@ export declare class LyxaLoggerKit {
35
35
  private consoleLog;
36
36
  private write;
37
37
  info(message: string, options: {
38
- tag: LogTag;
38
+ tag: LogTag | string;
39
39
  data?: Record<string, any>;
40
40
  metadata?: LogMetadata;
41
41
  request?: Record<string, any>;
@@ -47,7 +47,7 @@ export declare class LyxaLoggerKit {
47
47
  __v: number;
48
48
  }, "typegooseName"> & import("@typegoose/typegoose/lib/types").IObjectWithTypegooseFunction)>;
49
49
  debug(message: string, options: {
50
- tag: LogTag;
50
+ tag: LogTag | string;
51
51
  data?: Record<string, any>;
52
52
  metadata?: LogMetadata;
53
53
  request?: Record<string, any>;
@@ -59,7 +59,7 @@ export declare class LyxaLoggerKit {
59
59
  __v: number;
60
60
  }, "typegooseName"> & import("@typegoose/typegoose/lib/types").IObjectWithTypegooseFunction)>;
61
61
  warn(message: string, options: {
62
- tag: LogTag;
62
+ tag: LogTag | string;
63
63
  data?: Record<string, any>;
64
64
  metadata?: LogMetadata;
65
65
  request?: Record<string, any>;
@@ -71,7 +71,7 @@ export declare class LyxaLoggerKit {
71
71
  __v: number;
72
72
  }, "typegooseName"> & import("@typegoose/typegoose/lib/types").IObjectWithTypegooseFunction)>;
73
73
  error(message: string, error: TRPCError | Error | unknown, options: {
74
- tag: LogTag;
74
+ tag: LogTag | string;
75
75
  data?: Record<string, any>;
76
76
  metadata?: LogMetadata;
77
77
  context?: RequestContext;
@@ -84,7 +84,7 @@ export declare class LyxaLoggerKit {
84
84
  __v: number;
85
85
  }, "typegooseName"> & import("@typegoose/typegoose/lib/types").IObjectWithTypegooseFunction)>;
86
86
  fatal(message: string, error: TRPCError | Error | unknown, options: {
87
- tag: LogTag;
87
+ tag: LogTag | string;
88
88
  data?: Record<string, any>;
89
89
  metadata?: LogMetadata;
90
90
  context?: RequestContext;
@@ -99,7 +99,7 @@ export declare class LyxaLoggerKit {
99
99
  private getHttpLogLevel;
100
100
  httpRequest(method: string, url: string, statusCode: HttpStatus, durationMs: number, userId?: string): void;
101
101
  child(defaultContext: {
102
- tag?: LogTag;
102
+ tag?: LogTag | string;
103
103
  data?: Record<string, any>;
104
104
  metadata?: LogMetadata;
105
105
  request?: Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.service.js","sourceRoot":"/","sources":["libraries/logger-kit/logger.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAicA,gDAUC;AA3cD,4CAAoB;AACpB,gDAAwB;AACxB,mCAAiC;AACjC,4CAAsD;AACtD,+CAAoE;AAEpE,uDAAqD;AACrD,wDAAgC;AASnB,QAAA,cAAc,GAAG,IAAI,oCAAiB,EAAgB,CAAC;AAW7D,IAAM,aAAa,GAAnB,MAAM,aAAa;IACR,KAAK,CAAoC;IACzC,MAAM,CAAyB;IAEhD,YAAY,MAAoB;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAA,uBAAc,EAAC,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAEO,eAAe,CAAC,MAAoB;QAC3C,OAAO;YACN,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC;YAC5B,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,MAAM;YAC9E,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,MAAM;YAC3C,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa;SACxE,CAAC;IACH,CAAC;IAEO,kBAAkB;QACzB,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACnE,YAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IA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/C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ;gBAClD,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM;aAC5C,CAAC;SACH,CAAC;IACH,CAAC;CACD,CAAA;AApaY,sCAAa;wBAAb,aAAa;IADzB,IAAA,gBAAO,GAAE;;GACG,aAAa,CAoazB;AAED,SAAgB,kBAAkB,CAAI,KAAmB,EAAE,EAAwB;IAClF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,sBAAc,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE;YACpC,IAAI,CAAC;gBACJ,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACrB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,MAAM,CAAC,GAAG,CAAC,CAAC;YACb,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { Service } from 'typedi';\nimport { createLogModel, Log } from '../mongo/models';\nimport { HttpStatus, LogLevel, LogTag } from '../../utilities/enum';\nimport { ErrorInfo, LogMetadata, RequestContext } from './types';\nimport { AsyncLocalStorage } from 'node:async_hooks';\nimport mongoose from 'mongoose';\nimport { TRPCError } from '@trpc/server';\n\ninterface RequestStore {\n\trequestId?: string;\n\tuserId?: string;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport const requestContext = new AsyncLocalStorage<RequestStore>();\n\ninterface LoggerConfig {\n\tinstanceType: string;\n\tttlDays?: number;\n\tpersistDebug?: boolean;\n\tlogDirectory?: string;\n\tenvironment?: string;\n}\n\n@Service()\nexport class LyxaLoggerKit {\n\tprivate readonly model: ReturnType<typeof createLogModel>;\n\tprivate readonly config: Required<LoggerConfig>;\n\n\tconstructor(config: LoggerConfig) {\n\t\tthis.config = this.normalizeConfig(config);\n\t\tthis.model = createLogModel({ ttlDays: this.config.ttlDays });\n\t\tthis.ensureLogDirectory();\n\t}\n\n\tprivate normalizeConfig(config: LoggerConfig): Required<LoggerConfig> {\n\t\treturn {\n\t\t\tinstanceType: config.instanceType,\n\t\t\tttlDays: config.ttlDays ?? 7,\n\t\t\tpersistDebug: config.persistDebug ?? process.env.PERSIST_DEBUG_LOGS === 'true',\n\t\t\tlogDirectory: config.logDirectory ?? 'logs',\n\t\t\tenvironment: config.environment ?? process.env.NODE_ENV ?? 'development',\n\t\t};\n\t}\n\n\tprivate ensureLogDirectory(): void {\n\t\tconst logPath = path.join(process.cwd(), this.config.logDirectory);\n\t\tfs.mkdirSync(logPath, { recursive: true });\n\t}\n\n\tprivate getRequestStore(): RequestStore {\n\t\treturn requestContext.getStore() ?? {};\n\t}\n\n\tprivate enrichWithContext(data: Record<string, any> = {}): Record<string, any> {\n\t\tconst store = this.getRequestStore();\n\t\treturn {\n\t\t\t...data,\n\t\t\t...(store.requestId && { requestId: store.requestId }),\n\t\t\t...(store.userId && { userId: store.userId }),\n\t\t};\n\t}\n\n\tprivate shouldPersist(level: LogLevel): boolean {\n\t\t// return level !== LogLevel.DEBUG || this.config.persistDebug;\n\t\treturn true;\n\t}\n\n\tprivate async persistLog(log: Partial<Log>) {\n\t\tconst currentDebug = mongoose.get('debug');\n\t\ttry {\n\t\t\tmongoose.set('debug', false);\n\t\t\treturn await this.model.create({\n\t\t\t\t...log,\n\t\t\t\tmicroService: this.config.instanceType,\n\t\t\t\ttimestamp: new Date(),\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tconsole.error('[Logger] MongoDB persistence failed:', err);\n\t\t} finally {\n\t\t\tmongoose.set('debug', currentDebug);\n\t\t}\n\t}\n\n\tprivate normalizeError(error: TRPCError | Error | unknown): ErrorInfo {\n\t\tif (error instanceof Error) {\n\t\t\treturn {\n\t\t\t\tname: error.name,\n\t\t\t\tmessage: error.message,\n\t\t\t\tstacktrace: error.stack?.split('\\n').map(line => line.trim()),\n\t\t\t\tcode: (error as any).code,\n\t\t\t};\n\t\t}\n\t\tif (typeof error === 'object' && error !== null) {\n\t\t\tconst err = error as any;\n\t\t\treturn {\n\t\t\t\tname: err.name,\n\t\t\t\tmessage: err.message,\n\t\t\t\tstacktrace: err.stack?.split('\\n').map((line: string) => line.trim()) || err.stacktrace,\n\t\t\t\tcode: err.code,\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tmessage: String(error),\n\t\t};\n\t}\n\n\tprivate buildLogEntry(\n\t\tmessage: string,\n\t\tpayload: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\terror?: ErrorInfo;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\tconst store = this.getRequestStore();\n\n\t\treturn {\n\t\t\ttag: payload.tag,\n\t\t\tmessage,\n\t\t\tdata: this.enrichWithContext(payload.data),\n\t\t\tmetadata: {\n\t\t\t\t...payload.metadata,\n\t\t\t\t...store.metadata,\n\t\t\t},\n\t\t\terror: payload.error,\n\t\t\tcontext: payload.context,\n\t\t\trequestId: store.requestId,\n\t\t\trequest: payload.request,\n\t\t\tresponse: payload.response,\n\t\t\tstatus: payload.status,\n\t\t};\n\t}\n\n\tprivate getColorCode(level: LogLevel): string {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.DEBUG:\n\t\t\t\treturn '\\x1b[96m'; // Cyan\n\t\t\tcase LogLevel.INFO:\n\t\t\t\treturn '\\x1b[32m'; // Green\n\t\t\tcase LogLevel.WARN:\n\t\t\t\treturn '\\x1b[33m'; // Yellow\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\treturn '\\x1b[31m'; // Red\n\t\t\tcase LogLevel.FATAL:\n\t\t\t\treturn '\\x1b[35m'; // Magenta\n\t\t\tdefault:\n\t\t\t\treturn '\\x1b[37m'; // White\n\t\t}\n\t}\n\n\tprivate formatTimestamp(date: Date): string {\n\t\tconst year = date.getFullYear();\n\t\tconst month = String(date.getMonth() + 1).padStart(2, '0');\n\t\tconst day = String(date.getDate()).padStart(2, '0');\n\t\tconst hours = String(date.getHours()).padStart(2, '0');\n\t\tconst minutes = String(date.getMinutes()).padStart(2, '0');\n\t\tconst seconds = String(date.getSeconds()).padStart(2, '0');\n\n\t\treturn `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n\t}\n\n\tprivate formatLogMessage(level: LogLevel, message: string, entry: any): string {\n\t\tconst timestamp = this.formatTimestamp(new Date());\n\t\tconst tag = (entry.tag || 'GENERAL').toUpperCase();\n\t\tconst levelUpper = level.toUpperCase();\n\n\t\t// ANSI color codes\n\t\tconst grey = '\\x1b[90m';\n\t\tconst cyan = '\\x1b[36m';\n\t\tconst levelColor = this.getColorCode(level);\n\t\tconst reset = '\\x1b[0m';\n\n\t\t// Pad level to 5 characters for alignment (DEBUG, INFO, WARN, ERROR, FATAL)\n\t\tconst paddedLevel = levelUpper.padEnd(5);\n\n\t\tconst parts = [\n\t\t\t`${grey}[${timestamp}]${reset}`,\n\t\t\t`${levelColor}[${levelUpper}]${reset}`,\n\t\t\t`${cyan}[${tag}]${reset}`,\n\t\t\tmessage,\n\t\t];\n\n\t\treturn parts.join(' ');\n\t}\n\n\tprivate consoleLog(level: LogLevel, formattedMessage: string, entry: any): void {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.DEBUG:\n\t\t\t\tconsole.log(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.log(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.INFO:\n\t\t\t\tconsole.log(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.log(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.WARN:\n\t\t\t\tconsole.warn(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.warn(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\tconsole.error(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.error(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.FATAL:\n\t\t\t\tconsole.error(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.error(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.log(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.log(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate async write(\n\t\tlevel: LogLevel,\n\t\tmessage: string,\n\t\tpayload: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\terror?: ErrorInfo;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t},\n\t\topts: { shouldWrite?: boolean } = {}\n\t) {\n\t\tconst { shouldWrite = true } = opts;\n\t\tconst entry = this.buildLogEntry(message, payload);\n\n\t\t// Console logging with switch case\n\t\tif (shouldWrite) {\n\t\t\tconst formattedMessage = this.formatLogMessage(level, message, entry);\n\t\t\tthis.consoleLog(level, formattedMessage, entry);\n\t\t}\n\n\t\t// Async persistence (fire-and-forget)\n\t\tif (this.shouldPersist(level)) {\n\t\t\treturn this.persistLog({\n\t\t\t\tlevel,\n\t\t\t\ttag: payload.tag,\n\t\t\t\tmessage,\n\t\t\t\tdata: entry.data,\n\t\t\t\tmetadata: entry.metadata ?? {},\n\t\t\t\terror: payload.error,\n\t\t\t\trequestId: entry.requestId,\n\t\t\t\tcontext: payload.context,\n\t\t\t\trequest: payload.request,\n\t\t\t\tresponse: payload.response,\n\t\t\t\tstatus: payload.status,\n\t\t\t}).catch(e => {\n\t\t\t\tconsole.error('Something went wrong', e);\n\t\t\t});\n\t\t}\n\t}\n\n\t/* ---------------------------------- */\n\t/* Public Logging API */\n\t/* ---------------------------------- */\n\n\tinfo(\n\t\tmessage: string,\n\t\toptions: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.INFO, message, options);\n\t}\n\n\tdebug(\n\t\tmessage: string,\n\t\toptions: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.DEBUG, message, options);\n\t}\n\n\twarn(\n\t\tmessage: string,\n\t\toptions: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.WARN, message, options);\n\t}\n\n\terror(\n\t\tmessage: string,\n\t\terror: TRPCError | Error | unknown,\n\t\toptions: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.ERROR, message, {\n\t\t\t...options,\n\t\t\terror: this.normalizeError(error),\n\t\t});\n\t}\n\n\tfatal(\n\t\tmessage: string,\n\t\terror: TRPCError | Error | unknown,\n\t\toptions: {\n\t\t\ttag: LogTag;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.FATAL, message, {\n\t\t\t...options,\n\t\t\terror: this.normalizeError(error),\n\t\t});\n\t}\n\n\t/* ---------------------------------- */\n\t/* HTTP Convenience Methods */\n\t/* ---------------------------------- */\n\n\tprivate getHttpLogLevel(statusCode: number): LogLevel {\n\t\tif (statusCode >= 500) return LogLevel.ERROR;\n\t\tif (statusCode >= 400) return LogLevel.WARN;\n\t\treturn LogLevel.INFO;\n\t}\n\n\thttpRequest(method: string, url: string, statusCode: HttpStatus, durationMs: number, userId?: string): void {\n\t\tthis.write(this.getHttpLogLevel(statusCode), 'HTTP request completed', {\n\t\t\ttag: LogTag.HTTP_REQUEST,\n\t\t\tdata: {\n\t\t\t\tmethod,\n\t\t\t\turl,\n\t\t\t\tdurationMs,\n\t\t\t\t...(userId && { userId }),\n\t\t\t},\n\t\t\tmetadata: {\n\t\t\t\t...(userId && { userId }),\n\t\t\t\tresponseTime: durationMs,\n\t\t\t},\n\t\t\tcontext: { method, url },\n\t\t\tstatus: statusCode,\n\t\t});\n\t}\n\n\tchild(defaultContext: {\n\t\ttag?: LogTag;\n\t\tdata?: Record<string, any>;\n\t\tmetadata?: LogMetadata;\n\t\trequest?: Record<string, any>;\n\t\tresponse?: Record<string, any>;\n\t\tstatus?: HttpStatus;\n\t}): {\n\t\tinfo: (message: string, options?: Partial<typeof defaultContext>) => void;\n\t\tdebug: (message: string, options?: Partial<typeof defaultContext>) => void;\n\t\twarn: (message: string, options?: Partial<typeof defaultContext>) => void;\n\t\terror: (message: string, error: Error | ErrorInfo, options?: Partial<typeof defaultContext>) => void;\n\t} {\n\t\treturn {\n\t\t\tinfo: (message, opts = {}) =>\n\t\t\t\tthis.info(message, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t\tdebug: (message, opts = {}) =>\n\t\t\t\tthis.debug(message, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t\twarn: (message, opts = {}) =>\n\t\t\t\tthis.warn(message, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t\terror: (message, error, opts = {}) =>\n\t\t\t\tthis.error(message, error, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t};\n\t}\n}\n\nexport function withRequestContext<T>(store: RequestStore, fn: () => T | Promise<T>): Promise<T> {\n\treturn new Promise((resolve, reject) => {\n\t\trequestContext.run(store, async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await fn());\n\t\t\t} catch (err) {\n\t\t\t\treject(err);\n\t\t\t}\n\t\t});\n\t});\n}"]}
1
+ {"version":3,"file":"logger.service.js","sourceRoot":"/","sources":["libraries/logger-kit/logger.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAicA,gDAUC;AA3cD,4CAAoB;AACpB,gDAAwB;AACxB,mCAAiC;AACjC,4CAAsD;AACtD,+CAAoE;AAEpE,uDAAqD;AACrD,wDAAgC;AASnB,QAAA,cAAc,GAAG,IAAI,oCAAiB,EAAgB,CAAC;AAW7D,IAAM,aAAa,GAAnB,MAAM,aAAa;IACR,KAAK,CAAoC;IACzC,MAAM,CAAyB;IAEhD,YAAY,MAAoB;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAA,uBAAc,EAAC,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAEO,eAAe,CAAC,MAAoB;QAC3C,OAAO;YACN,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC;YAC5B,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,MAAM;YAC9E,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,MAAM;YAC3C,WAAW,EAAE,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,IAAI,CAAC,GAAG,IAAI,cAAc,CAAC,GAAG,IAAI,aAAM,CAAC,YAAY;gBAC1D,IAAI,EAAE,EAAE,GAAG,cAAc,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE;gBAC9C,QAAQ,EAAE,EAAE,GAAG,cAAc,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE;gBAC1D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO;gBAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ;gBAClD,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM;aAC5C,CAAC;SACH,CAAC;IACH,CAAC;CACD,CAAA;AApaY,sCAAa;wBAAb,aAAa;IADzB,IAAA,gBAAO,GAAE;;GACG,aAAa,CAoazB;AAED,SAAgB,kBAAkB,CAAI,KAAmB,EAAE,EAAwB;IAClF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,sBAAc,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE;YACpC,IAAI,CAAC;gBACJ,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACrB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,MAAM,CAAC,GAAG,CAAC,CAAC;YACb,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { Service } from 'typedi';\nimport { createLogModel, Log } from '../mongo/models';\nimport { HttpStatus, LogLevel, LogTag } from '../../utilities/enum';\nimport { ErrorInfo, LogMetadata, RequestContext } from './types';\nimport { AsyncLocalStorage } from 'node:async_hooks';\nimport mongoose from 'mongoose';\nimport { TRPCError } from '@trpc/server';\n\ninterface RequestStore {\n\trequestId?: string;\n\tuserId?: string;\n\tmetadata?: Record<string, unknown>;\n}\n\nexport const requestContext = new AsyncLocalStorage<RequestStore>();\n\ninterface LoggerConfig {\n\tinstanceType: string;\n\tttlDays?: number;\n\tpersistDebug?: boolean;\n\tlogDirectory?: string;\n\tenvironment?: string;\n}\n\n@Service()\nexport class LyxaLoggerKit {\n\tprivate readonly model: ReturnType<typeof createLogModel>;\n\tprivate readonly config: Required<LoggerConfig>;\n\n\tconstructor(config: LoggerConfig) {\n\t\tthis.config = this.normalizeConfig(config);\n\t\tthis.model = createLogModel({ ttlDays: this.config.ttlDays });\n\t\tthis.ensureLogDirectory();\n\t}\n\n\tprivate normalizeConfig(config: LoggerConfig): Required<LoggerConfig> {\n\t\treturn {\n\t\t\tinstanceType: config.instanceType,\n\t\t\tttlDays: config.ttlDays ?? 7,\n\t\t\tpersistDebug: config.persistDebug ?? process.env.PERSIST_DEBUG_LOGS === 'true',\n\t\t\tlogDirectory: config.logDirectory ?? 'logs',\n\t\t\tenvironment: config.environment ?? process.env.NODE_ENV ?? 'development',\n\t\t};\n\t}\n\n\tprivate ensureLogDirectory(): void {\n\t\tconst logPath = path.join(process.cwd(), this.config.logDirectory);\n\t\tfs.mkdirSync(logPath, { recursive: true });\n\t}\n\n\tprivate getRequestStore(): RequestStore {\n\t\treturn requestContext.getStore() ?? {};\n\t}\n\n\tprivate enrichWithContext(data: Record<string, any> = {}): Record<string, any> {\n\t\tconst store = this.getRequestStore();\n\t\treturn {\n\t\t\t...data,\n\t\t\t...(store.requestId && { requestId: store.requestId }),\n\t\t\t...(store.userId && { userId: store.userId }),\n\t\t};\n\t}\n\n\tprivate shouldPersist(level: LogLevel): boolean {\n\t\t// return level !== LogLevel.DEBUG || this.config.persistDebug;\n\t\treturn true;\n\t}\n\n\tprivate async persistLog(log: Partial<Log>) {\n\t\tconst currentDebug = mongoose.get('debug');\n\t\ttry {\n\t\t\tmongoose.set('debug', false);\n\t\t\treturn await this.model.create({\n\t\t\t\t...log,\n\t\t\t\tmicroService: this.config.instanceType,\n\t\t\t\ttimestamp: new Date(),\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tconsole.error('[Logger] MongoDB persistence failed:', err);\n\t\t} finally {\n\t\t\tmongoose.set('debug', currentDebug);\n\t\t}\n\t}\n\n\tprivate normalizeError(error: TRPCError | Error | unknown): ErrorInfo {\n\t\tif (error instanceof Error) {\n\t\t\treturn {\n\t\t\t\tname: error.name,\n\t\t\t\tmessage: error.message,\n\t\t\t\tstacktrace: error.stack?.split('\\n').map(line => line.trim()),\n\t\t\t\tcode: (error as any).code,\n\t\t\t};\n\t\t}\n\t\tif (typeof error === 'object' && error !== null) {\n\t\t\tconst err = error as any;\n\t\t\treturn {\n\t\t\t\tname: err.name,\n\t\t\t\tmessage: err.message,\n\t\t\t\tstacktrace: err.stack?.split('\\n').map((line: string) => line.trim()) || err.stacktrace,\n\t\t\t\tcode: err.code,\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tmessage: String(error),\n\t\t};\n\t}\n\n\tprivate buildLogEntry(\n\t\tmessage: string,\n\t\tpayload: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\terror?: ErrorInfo;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\tconst store = this.getRequestStore();\n\n\t\treturn {\n\t\t\ttag: payload.tag,\n\t\t\tmessage,\n\t\t\tdata: this.enrichWithContext(payload.data),\n\t\t\tmetadata: {\n\t\t\t\t...payload.metadata,\n\t\t\t\t...store.metadata,\n\t\t\t},\n\t\t\terror: payload.error,\n\t\t\tcontext: payload.context,\n\t\t\trequestId: store.requestId,\n\t\t\trequest: payload.request,\n\t\t\tresponse: payload.response,\n\t\t\tstatus: payload.status,\n\t\t};\n\t}\n\n\tprivate getColorCode(level: LogLevel): string {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.DEBUG:\n\t\t\t\treturn '\\x1b[96m'; // Cyan\n\t\t\tcase LogLevel.INFO:\n\t\t\t\treturn '\\x1b[32m'; // Green\n\t\t\tcase LogLevel.WARN:\n\t\t\t\treturn '\\x1b[33m'; // Yellow\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\treturn '\\x1b[31m'; // Red\n\t\t\tcase LogLevel.FATAL:\n\t\t\t\treturn '\\x1b[35m'; // Magenta\n\t\t\tdefault:\n\t\t\t\treturn '\\x1b[37m'; // White\n\t\t}\n\t}\n\n\tprivate formatTimestamp(date: Date): string {\n\t\tconst year = date.getFullYear();\n\t\tconst month = String(date.getMonth() + 1).padStart(2, '0');\n\t\tconst day = String(date.getDate()).padStart(2, '0');\n\t\tconst hours = String(date.getHours()).padStart(2, '0');\n\t\tconst minutes = String(date.getMinutes()).padStart(2, '0');\n\t\tconst seconds = String(date.getSeconds()).padStart(2, '0');\n\n\t\treturn `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n\t}\n\n\tprivate formatLogMessage(level: LogLevel, message: string, entry: any): string {\n\t\tconst timestamp = this.formatTimestamp(new Date());\n\t\tconst tag = (entry.tag || 'GENERAL').toUpperCase();\n\t\tconst levelUpper = level.toUpperCase();\n\n\t\t// ANSI color codes\n\t\tconst grey = '\\x1b[90m';\n\t\tconst cyan = '\\x1b[36m';\n\t\tconst levelColor = this.getColorCode(level);\n\t\tconst reset = '\\x1b[0m';\n\n\t\t// Pad level to 5 characters for alignment (DEBUG, INFO, WARN, ERROR, FATAL)\n\t\tconst paddedLevel = levelUpper.padEnd(5);\n\n\t\tconst parts = [\n\t\t\t`${grey}[${timestamp}]${reset}`,\n\t\t\t`${levelColor}[${levelUpper}]${reset}`,\n\t\t\t`${cyan}[${tag}]${reset}`,\n\t\t\tmessage,\n\t\t];\n\n\t\treturn parts.join(' ');\n\t}\n\n\tprivate consoleLog(level: LogLevel, formattedMessage: string, entry: any): void {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.DEBUG:\n\t\t\t\tconsole.log(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.log(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.INFO:\n\t\t\t\tconsole.log(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.log(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.WARN:\n\t\t\t\tconsole.warn(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.warn(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\tconsole.error(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.error(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase LogLevel.FATAL:\n\t\t\t\tconsole.error(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.error(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.log(formattedMessage);\n\t\t\t\tif (entry.data && Object.keys(entry.data).length > 0) {\n\t\t\t\t\tconsole.log(entry.data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate async write(\n\t\tlevel: LogLevel,\n\t\tmessage: string,\n\t\tpayload: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\terror?: ErrorInfo;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t},\n\t\topts: { shouldWrite?: boolean } = {}\n\t) {\n\t\tconst { shouldWrite = true } = opts;\n\t\tconst entry = this.buildLogEntry(message, payload);\n\n\t\t// Console logging with switch case\n\t\tif (shouldWrite) {\n\t\t\tconst formattedMessage = this.formatLogMessage(level, message, entry);\n\t\t\tthis.consoleLog(level, formattedMessage, entry);\n\t\t}\n\n\t\t// Async persistence (fire-and-forget)\n\t\tif (this.shouldPersist(level)) {\n\t\t\treturn this.persistLog({\n\t\t\t\tlevel,\n\t\t\t\ttag: payload.tag,\n\t\t\t\tmessage,\n\t\t\t\tdata: entry.data,\n\t\t\t\tmetadata: entry.metadata ?? {},\n\t\t\t\terror: payload.error,\n\t\t\t\trequestId: entry.requestId,\n\t\t\t\tcontext: payload.context,\n\t\t\t\trequest: payload.request,\n\t\t\t\tresponse: payload.response,\n\t\t\t\tstatus: payload.status,\n\t\t\t}).catch(e => {\n\t\t\t\tconsole.error('Something went wrong', e);\n\t\t\t});\n\t\t}\n\t}\n\n\t/* ---------------------------------- */\n\t/* Public Logging API */\n\t/* ---------------------------------- */\n\n\tinfo(\n\t\tmessage: string,\n\t\toptions: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.INFO, message, options);\n\t}\n\n\tdebug(\n\t\tmessage: string,\n\t\toptions: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.DEBUG, message, options);\n\t}\n\n\twarn(\n\t\tmessage: string,\n\t\toptions: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.WARN, message, options);\n\t}\n\n\terror(\n\t\tmessage: string,\n\t\terror: TRPCError | Error | unknown,\n\t\toptions: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.ERROR, message, {\n\t\t\t...options,\n\t\t\terror: this.normalizeError(error),\n\t\t});\n\t}\n\n\tfatal(\n\t\tmessage: string,\n\t\terror: TRPCError | Error | unknown,\n\t\toptions: {\n\t\t\ttag: LogTag | string;\n\t\t\tdata?: Record<string, any>;\n\t\t\tmetadata?: LogMetadata;\n\t\t\tcontext?: RequestContext;\n\t\t\trequest?: Record<string, any>;\n\t\t\tresponse?: Record<string, any>;\n\t\t\tstatus?: HttpStatus;\n\t\t}\n\t) {\n\t\treturn this.write(LogLevel.FATAL, message, {\n\t\t\t...options,\n\t\t\terror: this.normalizeError(error),\n\t\t});\n\t}\n\n\t/* ---------------------------------- */\n\t/* HTTP Convenience Methods */\n\t/* ---------------------------------- */\n\n\tprivate getHttpLogLevel(statusCode: number): LogLevel {\n\t\tif (statusCode >= 500) return LogLevel.ERROR;\n\t\tif (statusCode >= 400) return LogLevel.WARN;\n\t\treturn LogLevel.INFO;\n\t}\n\n\thttpRequest(method: string, url: string, statusCode: HttpStatus, durationMs: number, userId?: string): void {\n\t\tthis.write(this.getHttpLogLevel(statusCode), 'HTTP request completed', {\n\t\t\ttag: LogTag.HTTP_REQUEST,\n\t\t\tdata: {\n\t\t\t\tmethod,\n\t\t\t\turl,\n\t\t\t\tdurationMs,\n\t\t\t\t...(userId && { userId }),\n\t\t\t},\n\t\t\tmetadata: {\n\t\t\t\t...(userId && { userId }),\n\t\t\t\tresponseTime: durationMs,\n\t\t\t},\n\t\t\tcontext: { method, url },\n\t\t\tstatus: statusCode,\n\t\t});\n\t}\n\n\tchild(defaultContext: {\n\t\ttag?: LogTag | string;\n\t\tdata?: Record<string, any>;\n\t\tmetadata?: LogMetadata;\n\t\trequest?: Record<string, any>;\n\t\tresponse?: Record<string, any>;\n\t\tstatus?: HttpStatus;\n\t}): {\n\t\tinfo: (message: string, options?: Partial<typeof defaultContext>) => void;\n\t\tdebug: (message: string, options?: Partial<typeof defaultContext>) => void;\n\t\twarn: (message: string, options?: Partial<typeof defaultContext>) => void;\n\t\terror: (message: string, error: Error | ErrorInfo, options?: Partial<typeof defaultContext>) => void;\n\t} {\n\t\treturn {\n\t\t\tinfo: (message, opts = {}) =>\n\t\t\t\tthis.info(message, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t\tdebug: (message, opts = {}) =>\n\t\t\t\tthis.debug(message, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t\twarn: (message, opts = {}) =>\n\t\t\t\tthis.warn(message, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t\terror: (message, error, opts = {}) =>\n\t\t\t\tthis.error(message, error, {\n\t\t\t\t\ttag: opts.tag ?? defaultContext.tag ?? LogTag.HTTP_REQUEST,\n\t\t\t\t\tdata: { ...defaultContext.data, ...opts.data },\n\t\t\t\t\tmetadata: { ...defaultContext.metadata, ...opts.metadata },\n\t\t\t\t\trequest: opts.request ?? defaultContext.request,\n\t\t\t\t\tresponse: opts.response ?? defaultContext.response,\n\t\t\t\t\tstatus: opts.status ?? defaultContext.status,\n\t\t\t\t}),\n\t\t};\n\t}\n}\n\nexport function withRequestContext<T>(store: RequestStore, fn: () => T | Promise<T>): Promise<T> {\n\treturn new Promise((resolve, reject) => {\n\t\trequestContext.run(store, async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await fn());\n\t\t\t} catch (err) {\n\t\t\t\treject(err);\n\t\t\t}\n\t\t});\n\t});\n}"]}
@@ -0,0 +1,4 @@
1
+ export declare class ExternalRef {
2
+ source: string;
3
+ externalId: string;
4
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ExternalRef = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ let ExternalRef = class ExternalRef {
15
+ source;
16
+ externalId;
17
+ };
18
+ exports.ExternalRef = ExternalRef;
19
+ __decorate([
20
+ (0, typegoose_1.prop)({ required: true, type: String }),
21
+ __metadata("design:type", String)
22
+ ], ExternalRef.prototype, "source", void 0);
23
+ __decorate([
24
+ (0, typegoose_1.prop)({ required: true, type: String }),
25
+ __metadata("design:type", String)
26
+ ], ExternalRef.prototype, "externalId", void 0);
27
+ exports.ExternalRef = ExternalRef = __decorate([
28
+ (0, typegoose_1.modelOptions)({
29
+ schemaOptions: { _id: false },
30
+ })
31
+ ], ExternalRef);
32
+ //# sourceMappingURL=external-ref.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-ref.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/external-ref.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAKnD,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEhB,MAAM,CAAU;IAGhB,UAAU,CAAU;CAC3B,CAAA;AANY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CAChB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACZ;sBALf,WAAW;IAHvB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE;KAC7B,CAAC;GACW,WAAW,CAMvB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\n\n@modelOptions({\n\tschemaOptions: { _id: false },\n})\nexport class ExternalRef {\n\t@prop({ required: true, type: String })\n\tpublic source!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic externalId!: string;\n}\n"]}
@@ -25,7 +25,7 @@ let FilterContainer = class FilterContainer extends defaultClasses_1.TimeStamps
25
25
  };
26
26
  exports.FilterContainer = FilterContainer;
27
27
  __decorate([
28
- (0, typegoose_1.prop)({ required: true, type: String, unique: true }),
28
+ (0, typegoose_1.prop)({ required: true, type: String }),
29
29
  __metadata("design:type", String)
30
30
  ], FilterContainer.prototype, "name", void 0);
31
31
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"filter-container.model.js","sourceRoot":"/","sources":["libraries/mongo/models/filter-container.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAyE;AACzE,wBAAyC;AAEzC,0EAG0C;AAcnC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAU;IAGd,KAAK,CAAY;IAGjB,QAAQ,CAA0B;IAGlC,MAAM,CAAU;IAGhB,SAAS,CAAW;IAGpB,YAAY,CAAU;CAC7B,CAAA;AAlBY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;6CAChC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;;8CACjB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAAsB,EAAE,CAAC;;iDACZ;AAGlC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;+CACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kDACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACM;0BAjBjB,eAAe;IAZ3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;IACnE,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACpC,IAAA,eAAG,EAAkB,MAAM,EAAE,KAAK,WAAW,IAAI;QACjD,MAAM,uDAAiC,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEtG,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAkB,kBAAkB,EAAE,KAAK,WAA8C,IAAI;QAChG,MAAM,yDAAmC,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAoB,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAEzF,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,eAAe,CAkB3B","sourcesContent":["import { Index, modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status, UserAppSectionItemType } from '../../../utilities/enum';\nimport { FilterContainerModel } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'filterContainers' } })\n@Index({ itemType: 1, deletedAt: 1 })\n@pre<FilterContainer>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, FilterContainerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<FilterContainer>('findOneAndUpdate', async function (this: Query<any, FilterContainer>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, FilterContainerModel, ['itemType']);\n\n\tnext();\n})\nexport class FilterContainer extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: [String] })\n\tpublic deals!: string[]; // e.g., \"5\", \"10\", \"20\", \"30\", \"buy1get1\", \"free_delivery\"\n\n\t@prop({ type: String, enum: UserAppSectionItemType })\n\tpublic itemType?: UserAppSectionItemType;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible!: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
1
+ {"version":3,"file":"filter-container.model.js","sourceRoot":"/","sources":["libraries/mongo/models/filter-container.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAyE;AACzE,wBAAyC;AAEzC,0EAG0C;AAcnC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAU;IAGd,KAAK,CAAY;IAGjB,QAAQ,CAA0B;IAGlC,MAAM,CAAU;IAGhB,SAAS,CAAW;IAGpB,YAAY,CAAU;CAC7B,CAAA;AAlBY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;;8CACjB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAAsB,EAAE,CAAC;;iDACZ;AAGlC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;+CACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kDACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACM;0BAjBjB,eAAe;IAZ3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;IACnE,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACpC,IAAA,eAAG,EAAkB,MAAM,EAAE,KAAK,WAAW,IAAI;QACjD,MAAM,uDAAiC,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEtG,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAkB,kBAAkB,EAAE,KAAK,WAA8C,IAAI;QAChG,MAAM,yDAAmC,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAoB,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAEzF,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,eAAe,CAkB3B","sourcesContent":["import { Index, modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status, UserAppSectionItemType } from '../../../utilities/enum';\nimport { FilterContainerModel } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'filterContainers' } })\n@Index({ itemType: 1, deletedAt: 1 })\n@pre<FilterContainer>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, FilterContainerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<FilterContainer>('findOneAndUpdate', async function (this: Query<any, FilterContainer>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, FilterContainerModel, ['itemType']);\n\n\tnext();\n})\nexport class FilterContainer extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: [String] })\n\tpublic deals!: string[]; // e.g., \"5\", \"10\", \"20\", \"30\", \"buy1get1\", \"free_delivery\"\n\n\t@prop({ type: String, enum: UserAppSectionItemType })\n\tpublic itemType?: UserAppSectionItemType;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible!: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
@@ -109,6 +109,7 @@ import { PaymentIntent } from './payment-intent.model';
109
109
  import { AppInstance } from './app-instance.model';
110
110
  import { PaymentConfiguration } from './payment-configuration.model';
111
111
  import { ServiceFlag } from './service-flag.model';
112
+ import { IntegrationConfiguration } from './integration-configuration.model';
112
113
  export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
113
114
  export * from './activity-log.model';
114
115
  export declare const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl>;
@@ -295,6 +296,7 @@ export * from './agent-performance.model';
295
296
  export declare const ChatroomModel: ReturnModelType<typeof Chatroom>;
296
297
  export * from './chat-room.model';
297
298
  export * from './embedded/chat-participant.model';
299
+ export * from './embedded/external-ref.model';
298
300
  export declare const ServiceModel: ReturnModelType<typeof Service>;
299
301
  export * from './service.model';
300
302
  export declare const VendorParentModel: ReturnModelType<typeof VendorParent>;
@@ -332,3 +334,6 @@ export declare const PaymentConfigurationModel: ReturnModelType<typeof PaymentCo
332
334
  export * from './payment-configuration.model';
333
335
  export declare const ServiceFlagModel: ReturnModelType<typeof ServiceFlag>;
334
336
  export * from './service-flag.model';
337
+ export declare const IntegrationConfigurationModel: ReturnModelType<typeof IntegrationConfiguration>;
338
+ export * from './integration-configuration.model';
339
+ export declare function createIntegrationDiscriminator<U extends new (...args: any[]) => IntegrationConfiguration>(cls: U, key: string): ReturnModelType<U>;
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.ShopPayoutModel = exports.PayoutModel = exports.ParentModel = exports.ShopCourierOrderModel = exports.CourierOrderModel = exports.RegularOrderModel = exports.OrderModel = exports.NutritionModel = exports.NotificationModel = exports.MealPlanModel = exports.PunchMarketingModel = exports.FreeDeliveryMarketingModel = exports.FeaturedMarketingModel = exports.DiscountMarketingModel = exports.Buy1Get1MarketingModel = exports.MarketingModel = exports.ListContainerModel = exports.LineItemModel = exports.GalleryUploadModel = exports.GalleryModel = exports.FlagModel = exports.FinanceSettlementModel = exports.FilterContainerModel = exports.FeaturedSettingModel = exports.FavouriteModel = exports.DishModel = exports.DealSettingModel = exports.ReferralRewardCouponModel = exports.ReferralCodeCouponModel = exports.IndividualUserCouponModel = exports.IndividualStoreCouponModel = exports.ShopsCategoriesCouponModel = exports.GlobalCouponModel = exports.CustomCouponModel = exports.BaseCouponModel = exports.CouponModel = exports.CounterModel = exports.CategoryModel = exports.CartParticipantModel = exports.CartModel = exports.ServiceControlModel = exports.AppAppearanceModel = exports.BrandModel = exports.BOBFinanceModel = exports.BannerModel = exports.AttributeModel = exports.UserAppSectionSettingModel = exports.AdminModel = exports.AdminAccessControlModel = exports.ActivityLogModel = void 0;
18
18
  exports.AppInstanceModel = exports.ZoneExtraTimeModel = exports.LoggerModel = exports.ServicePromotionModel = exports.TicketActionModel = exports.ProfessionalBlockedTimeModel = exports.ServiceBookingModel = exports.ServiceCartModel = exports.ProfessionalModel = exports.ServicePackageModel = exports.ServiceAddonModel = exports.ServiceCategoryModel = exports.VendorAccessControlModel = exports.VendorModel = exports.VendorParentModel = exports.ServiceModel = exports.ChatroomModel = exports.AgentPerformanceModel = exports.MessageModel = exports.TicketModel = exports.RewardModel = exports.CancellationReasonModel = exports.SupportReasonModel = exports.TermsAndConditionsModel = exports.DefaultChatModel = exports.ZoneModel = exports.UserModel = exports.TagModel = exports.SubscriptionModel = exports.ShopModel = exports.ShopMealPlanModel = exports.ShopCategoryModel = exports.ShopAccessControlModel = exports.SettingModel = exports.RiderModel = exports.RiderTrackingModel = exports.RiderTimeoutModel = exports.ServiceBookingReviewModel = exports.RiderReviewModel = exports.ShopReviewModel = exports.ReviewModel = exports.RequestAreaModel = exports.ReferralSettingModel = exports.RatingSettingModel = exports.PunchMarketingHistoryModel = exports.ProductUploadModel = exports.ProductModel = exports.ProductStockTrackerModel = exports.ProductMarketingModel = exports.RiderPayoutModel = void 0;
19
- exports.ServiceFlagModel = exports.PaymentConfigurationModel = void 0;
19
+ exports.IntegrationConfigurationModel = exports.ServiceFlagModel = exports.PaymentConfigurationModel = void 0;
20
20
  exports.getCoreAuthIdentityModel = getCoreAuthIdentityModel;
21
21
  exports.getCoreEmailAuthIdentityModel = getCoreEmailAuthIdentityModel;
22
22
  exports.getCorePhoneAuthIdentityModel = getCorePhoneAuthIdentityModel;
@@ -26,6 +26,7 @@ exports.getCoreUserModel = getCoreUserModel;
26
26
  exports.getCardModel = getCardModel;
27
27
  exports.getPaymentIntentModel = getPaymentIntentModel;
28
28
  exports.initializeGlobalModels = initializeGlobalModels;
29
+ exports.createIntegrationDiscriminator = createIntegrationDiscriminator;
29
30
  const rider_payout_model_1 = require("./providers/rider-payout.model");
30
31
  const shop_payout_model_1 = require("./providers/shop-payout.model");
31
32
  const typegoose_1 = require("@typegoose/typegoose");
@@ -140,6 +141,7 @@ const payment_intent_model_1 = require("./payment-intent.model");
140
141
  const app_instance_model_1 = require("./app-instance.model");
141
142
  const payment_configuration_model_1 = require("./payment-configuration.model");
142
143
  const service_flag_model_1 = require("./service-flag.model");
144
+ const integration_configuration_model_1 = require("./integration-configuration.model");
143
145
  exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
144
146
  __exportStar(require("./activity-log.model"), exports);
145
147
  exports.AdminAccessControlModel = (0, typegoose_1.getModelForClass)(admin_access_control_model_1.AdminAccessControl);
@@ -381,6 +383,7 @@ __exportStar(require("./agent-performance.model"), exports);
381
383
  exports.ChatroomModel = (0, typegoose_1.getModelForClass)(chat_room_model_1.Chatroom);
382
384
  __exportStar(require("./chat-room.model"), exports);
383
385
  __exportStar(require("./embedded/chat-participant.model"), exports);
386
+ __exportStar(require("./embedded/external-ref.model"), exports);
384
387
  exports.ServiceModel = (0, typegoose_1.getModelForClass)(service_model_1.Service);
385
388
  __exportStar(require("./service.model"), exports);
386
389
  exports.VendorParentModel = (0, typegoose_1.getModelForClass)(vendor_parent_model_1.VendorParent);
@@ -418,4 +421,9 @@ exports.PaymentConfigurationModel = (0, typegoose_1.getModelForClass)(payment_co
418
421
  __exportStar(require("./payment-configuration.model"), exports);
419
422
  exports.ServiceFlagModel = (0, typegoose_1.getModelForClass)(service_flag_model_1.ServiceFlag);
420
423
  __exportStar(require("./service-flag.model"), exports);
424
+ exports.IntegrationConfigurationModel = (0, typegoose_1.getModelForClass)(integration_configuration_model_1.IntegrationConfiguration);
425
+ __exportStar(require("./integration-configuration.model"), exports);
426
+ function createIntegrationDiscriminator(cls, key) {
427
+ return (0, typegoose_1.getDiscriminatorModelForClass)(exports.IntegrationConfigurationModel, cls, key);
428
+ }
421
429
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAyKA,4DAIC;AAED,sEAIC;AAED,sEAIC;AAED,wEAIC;AAED,sEAIC;AAED,4CAIC;AAED,oCAGC;AAED,sDAIC;AAGD,wDAuCC;AAhQD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,gEAAsD;AACtD,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;A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ayout } from './providers/shop-payout.model';\nimport { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\nimport { Admin } from './admin.model';\nimport { AdminAccessControl } from './admin-access-control.model';\nimport { ActivityLog } from './activity-log.model';\nimport { UserAppSectionSetting } from './user-app-section-setting.model';\nimport { Attribute } from './attribute.model';\nimport { Banner } from './banner.model';\nimport { BaseCoupon } from './base/base-coupon.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { Brand } from './brand.model';\nimport { Category } from './category.model';\nimport { Counter } from './counter.model';\nimport { Coupon } from './coupon.model';\nimport { DealSetting } from './deal-setting.model';\nimport { Dish } from './dish.model';\nimport { Favourite } from './favourite.model';\nimport { FeaturedSetting } from './featured-setting.model';\nimport { FilterContainer } from './filter-container.model';\nimport { ListContainer } from './list-container.model';\nimport { Marketing } from './marketing.model';\nimport { MealPlan } from './meal-plan.model';\nimport { Nutrition } from './nutrition.model';\nimport { Parent } from './parent.model';\nimport { ProductMarketing } from './product-marketing.model';\nimport { Product } from './product.model';\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\nimport { RatingSetting } from './rating-setting.model';\nimport { ReferralSetting } from './referral-setting.model';\nimport { RequestArea } from './request-area.model';\nimport { Setting } from './setting.model';\nimport { ShopAccessControl } from './shop-access-control.model';\nimport { ShopCategory } from './shop-category.model';\nimport { ShopMealPlan } from './shop-meal-plan.model';\nimport { Shop } from './shop.model';\nimport { Subscription } from './subscription.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\nimport {\n\tCoreAuthIdentityType,\n\tCounterType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n\tReviewType,\n} from '../../../utilities/enum';\nimport { ServiceAddon } from './service-addon.model';\nimport { CustomCoupon } from './providers/custom-coupon.model';\nimport { DiscountMarketing } from './providers/discount-marketing.model';\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\nimport { GlobalCoupon } from './providers/global-coupon.model';\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\nimport { Notification } from './notification.model';\nimport { CoreAuthIdentity } from './core-auth-identity.model';\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\nimport { CoreUser } from './core-user.model';\nimport { RiderTracking } from './rider-tracking.model';\nimport { Rider } from './rider.model';\nimport { RiderTimeout } from './rider-timeout.model';\nimport { User } from './user.model';\nimport { Cart } from './cart.model';\nimport { LineItem } from './line-item.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { Gallery } from './gallery.model';\nimport { Order } from './order.model';\nimport { RegularOrder } from './providers/regular-order.model';\nimport { CourierOrder } from './providers/courier-order.model';\nimport { FinanceSettlement } from './finance-settlement.model';\nimport { DefaultChat } from './default-chat.model';\nimport { TermsAndConditions } from './terms-and-conditions.model';\nimport { SupportReason } from './support-reason.model';\nimport { CancellationReason } from './cancellation-reason.model';\nimport { Payout } from './payout.model';\nimport { Reward } from './reward.model';\nimport { Ticket } from './ticket.model';\nimport { Message } from './message.model';\nimport { AgentPerformance } from './agent-performance.model';\nimport { Chatroom } from './chat-room.model';\nimport { initializeRefreshTokenModel } from '../../auth';\nimport { VendorParent } from './vendor-parent.model';\nimport { Vendor } from './vendor.model';\nimport { VendorAccessControl } from './vendor-access-control.model';\nimport { ServiceCategory } from './service-category.model';\nimport { ServicePackage } from './service-package.model';\nimport { Professional } from './professional.model';\nimport { ServiceBooking } from './service-booking.model';\nimport { Service } from './service.model';\nimport { TicketAction } from './ticket-action.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ShopCourierOrder } from './providers/shop-courier.model';\nimport { ServicePromotion } from './service-promotion.model';\nimport { Flag } from './flag.model';\nimport { Review } from './review.model';\nimport { ShopReview } from './providers/shop-review.model';\nimport { RiderReview } from './providers/rider-review.model';\nimport { ServiceBookingReview } from './providers/service-booking-review.model';\nimport { assignIdsToDocuments } from '../../../utilities/id-generator';\nimport { GalleryUpload } from './gallery-upload.model';\nimport { ProductUpload } from './product-upload.model';\nimport { ShopsCategoriesCoupon } from './providers/shops-categories-coupon.model';\nimport { ProfessionalBlockedTime } from './professional-blocked-time.model';\nimport { ZoneExtraTime } from './zone-extra-time';\nimport { AppAppearance } from './app-appearance.model';\nimport { ServiceControl } from './service-control.model';\nimport { Log } from './log.model';\nimport { Card } from './card.model';\nimport { ProductStockTracker } from './product-stock-tracker.model';\nimport { PaymentIntent } from './payment-intent.model';\nimport { AppInstance } from './app-instance.model';\nimport { PaymentConfiguration } from './payment-configuration.model';\nimport { ServiceFlag } from './service-flag.model';\n\n// Regular models (using standard getModelForClass)\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\nexport * from './activity-log.model';\n\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\n\tgetModelForClass(AdminAccessControl);\nexport * from './admin-access-control.model';\n\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\nexport * from './admin.model';\n\nexport const UserAppSectionSettingModel: ReturnModelType<typeof UserAppSectionSetting> =\n\tgetModelForClass(UserAppSectionSetting);\nexport * from './user-app-section-setting.model';\n\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\nexport * from './attribute.model';\n\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\nexport * from './banner.model';\n\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\nexport * from './bob-finance.model';\n\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\nexport * from './brand.model';\n\nexport const AppAppearanceModel: ReturnModelType<typeof AppAppearance> = getModelForClass(AppAppearance);\nexport * from './app-appearance.model';\n\nexport const ServiceControlModel: ReturnModelType<typeof ServiceControl> = getModelForClass(ServiceControl);\nexport * from './service-control.model';\n\n// Global models - will be set after initGlobalConnection()\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualPaymentIntentModel: ReturnModelType<typeof PaymentIntent> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\nlet actualCoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> | null = null;\nlet actualCorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> | null = null;\nlet actualCoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> | null = null;\nlet actualCoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> | null = null;\n\n// Export getter functions for global models\nexport function getCoreAuthIdentityModel(): ReturnModelType<typeof CoreAuthIdentity> {\n\tif (!actualCoreAuthIdentityModel)\n\t\tthrow new Error('CoreAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAuthIdentityModel;\n}\n\nexport function getCoreEmailAuthIdentityModel(): ReturnModelType<typeof CoreEmailAuthIdentity> {\n\tif (!actualCoreEmailAuthIdentityModel)\n\t\tthrow new Error('CoreEmailAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreEmailAuthIdentityModel;\n}\n\nexport function getCorePhoneAuthIdentityModel(): ReturnModelType<typeof CorePhoneAuthIdentity> {\n\tif (!actualCorePhoneAuthIdentityModel)\n\t\tthrow new Error('CorePhoneAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCorePhoneAuthIdentityModel;\n}\n\nexport function getCoreGoogleAuthIdentityModel(): ReturnModelType<typeof CoreGoogleAuthIdentity> {\n\tif (!actualCoreGoogleAuthIdentityModel)\n\t\tthrow new Error('CoreGoogleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreGoogleAuthIdentityModel;\n}\n\nexport function getCoreAppleAuthIdentityModel(): ReturnModelType<typeof CoreAppleAuthIdentity> {\n\tif (!actualCoreAppleAuthIdentityModel)\n\t\tthrow new Error('CoreAppleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAppleAuthIdentityModel;\n}\n\nexport function getCoreUserModel(): ReturnModelType<typeof CoreUser> {\n\tif (!actualCoreUserModel)\n\t\tthrow new Error('CoreUser model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreUserModel;\n}\n\nexport function getCardModel(): ReturnModelType<typeof Card> {\n\tif (!actualCardModel) throw new Error('Card model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCardModel;\n}\n\nexport function getPaymentIntentModel(): ReturnModelType<typeof PaymentIntent> {\n\tif (!actualPaymentIntentModel)\n\t\tthrow new Error('Payment Intent model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualPaymentIntentModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualPaymentIntentModel = getModelForClass(PaymentIntent, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\n\tactualCoreEmailAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreEmailAuthIdentity,\n\t\tCoreAuthIdentityType.EMAIL,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCorePhoneAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCorePhoneAuthIdentity,\n\t\tCoreAuthIdentityType.PHONE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreGoogleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreGoogleAuthIdentity,\n\t\tCoreAuthIdentityType.GOOGLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreAppleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreAppleAuthIdentity,\n\t\tCoreAuthIdentityType.APPLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tinitializeRefreshTokenModel(globalConnection);\n\n\tconsole.log('✅ All global models initialized');\n}\n\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\nexport * from './cart.model';\n\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\n\tgetModelForClass(CartParticipant);\nexport * from './cart-participant.model';\n\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\nexport * from './category.model';\n\nexport * from './core-auth-identity.model';\nexport * from './providers/core-apple-auth-identity.model';\nexport * from './providers/core-email-auth-identity.model';\nexport * from './providers/core-google-auth-identity.model';\nexport * from './providers/core-phone-auth-identity.model';\nexport * from './core-user.model';\n\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\nexport * from './counter.model';\n\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\nexport const BaseCouponModel: ReturnModelType<typeof BaseCoupon> = getModelForClass(BaseCoupon);\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tCustomCoupon,\n\tCouponType.CUSTOM_COUPON\n);\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tGlobalCoupon,\n\tCouponType.GLOBAL\n);\nexport const ShopsCategoriesCouponModel: ReturnModelType<typeof ShopsCategoriesCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ShopsCategoriesCoupon, CouponType.SHOPS_CATEGORIES);\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\nexport * from './coupon.model';\nexport * from './base/base-coupon.model';\nexport * from './providers/custom-coupon.model';\nexport * from './providers/global-coupon.model';\nexport * from './providers/shops-categories-coupon.model';\nexport * from './providers/individual-store-coupon.model';\nexport * from './providers/individual-user-coupon.model';\nexport * from './providers/referral-code-coupon.model';\nexport * from './providers/referral-reward-coupon.model';\n\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\nexport * from './deal-setting.model';\n\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\nexport * from './dish.model';\n\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\nexport * from './favourite.model';\n\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\n\tgetModelForClass(FeaturedSetting);\nexport * from './featured-setting.model';\n\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\n\tgetModelForClass(FilterContainer);\nexport * from './filter-container.model';\n\nexport const FinanceSettlementModel: ReturnModelType<typeof FinanceSettlement> =\n\tgetModelForClass(FinanceSettlement);\nexport * from './finance-settlement.model';\n\nexport const FlagModel: ReturnModelType<typeof Flag> = getModelForClass(Flag);\nexport * from './flag.model';\n\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\nexport * from './gallery.model';\n\nexport const GalleryUploadModel: ReturnModelType<typeof GalleryUpload> = getModelForClass(GalleryUpload);\nexport * from './gallery-upload.model';\n\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\nexport * from './line-item.model';\n\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\nexport * from './list-container.model';\n\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\n\tMarketingModel,\n\tPunchMarketing,\n\tMarketingType.PUNCH_MARKETING\n);\nexport * from './marketing.model';\nexport * from './providers/buy1-get1-marketing.model';\nexport * from './providers/discount-marketing.model';\nexport * from './providers/featured-marketing.model';\nexport * from './providers/free-delivery-marketing.model';\nexport * from './providers/punch-marketing.model';\n\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\nexport * from './meal-plan.model';\n\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\nexport * from './notification.model';\n\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\nexport * from './nutrition.model';\n\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tRegularOrder,\n\tOrderType.REGULAR\n);\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tCourierOrder,\n\tOrderType.COURIER\n);\n\nexport const ShopCourierOrderModel: ReturnModelType<typeof ShopCourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tShopCourierOrder,\n\tOrderType.SHOP_COURIER\n);\n\nexport * from './order.model';\nexport * from './providers/regular-order.model';\nexport * from './providers/courier-order.model';\nexport * from './providers/shop-courier.model';\n\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\nexport * from './parent.model';\n\nexport const PayoutModel: ReturnModelType<typeof Payout> = getModelForClass(Payout);\nexport const ShopPayoutModel: ReturnModelType<typeof ShopPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tShopPayout,\n\tPayoutType.SHOP\n);\nexport const RiderPayoutModel: ReturnModelType<typeof RiderPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tRiderPayout,\n\tPayoutType.RIDER\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductStockTrackerModel: ReturnModelType<typeof ProductStockTracker> =\n\tgetModelForClass(ProductStockTracker);\nexport * from './product-stock-tracker.model';\n\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\nexport * from './product.model';\nProductModel.schema.pre('insertMany', async function (next, docs: Product[]) {\n\t// Generate all IDs at once (ATOMIC)\n\tawait assignIdsToDocuments(CounterModel, CounterType.ITEM, docs, 'productId');\n\tnext();\n});\n\nexport const ProductUploadModel: ReturnModelType<typeof ProductUpload> = getModelForClass(ProductUpload);\nexport * from './product-upload.model';\n\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\n\tgetModelForClass(PunchMarketingHistory);\nexport * from './punch-marketing-history.model';\n\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\nexport * from './rating-setting.model';\n\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\n\tgetModelForClass(ReferralSetting);\nexport * from './referral-setting.model';\n\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\nexport * from './request-area.model';\n\nexport const ReviewModel: ReturnModelType<typeof Review> = getModelForClass(Review);\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tShopReview,\n\tReviewType.SHOP\n);\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tRiderReview,\n\tReviewType.RIDER\n);\nexport const ServiceBookingReviewModel: ReturnModelType<typeof ServiceBookingReview> =\n\tgetDiscriminatorModelForClass(ReviewModel, ServiceBookingReview, ReviewType.SERVICE_BOOKING);\nexport * from './review.model';\nexport * from './providers/shop-review.model';\nexport * from './providers/rider-review.model';\nexport * from './providers/service-booking-review.model';\n\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\nexport * from './rider-timeout.model';\n\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\nexport * from './rider-tracking.model';\n\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\nexport * from './rider.model';\n\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\nexport * from './setting.model';\n\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\n\tgetModelForClass(ShopAccessControl);\nexport * from './shop-access-control.model';\n\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\nexport * from './shop-category.model';\n\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\nexport * from './shop-meal-plan.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.model';\n\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\nexport * from './subscription.model';\n\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\nexport * from './tag.model';\n\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\nexport * from './user.model';\n\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\nexport * from './zone.model';\n\nexport const DefaultChatModel: ReturnModelType<typeof DefaultChat> = getModelForClass(DefaultChat);\nexport * from './default-chat.model';\n\nexport const TermsAndConditionsModel: ReturnModelType<typeof TermsAndConditions> =\n\tgetModelForClass(TermsAndConditions);\nexport * from './terms-and-conditions.model';\n\nexport const SupportReasonModel: ReturnModelType<typeof SupportReason> = getModelForClass(SupportReason);\nexport * from './support-reason.model';\n\nexport const CancellationReasonModel: ReturnModelType<typeof CancellationReason> =\n\tgetModelForClass(CancellationReason);\nexport * from './cancellation-reason.model';\n\nexport * from './embedded/trip-leg.mode';\nexport * from './embedded/rider-assignment-model';\n\nexport const RewardModel: ReturnModelType<typeof Reward> = getModelForClass(Reward);\nexport * from './reward.model';\n\nexport const TicketModel: ReturnModelType<typeof Ticket> = getModelForClass(Ticket);\nexport * from './ticket.model';\n\nexport const MessageModel: ReturnModelType<typeof Message> = getModelForClass(Message);\nexport * from './message.model';\n\nexport const AgentPerformanceModel: ReturnModelType<typeof AgentPerformance> =\n\tgetModelForClass(AgentPerformance);\nexport * from './agent-performance.model';\n\nexport const ChatroomModel: ReturnModelType<typeof Chatroom> = getModelForClass(Chatroom);\nexport * from './chat-room.model';\n\nexport * from './embedded/chat-participant.model';\n\nexport const ServiceModel: ReturnModelType<typeof Service> = getModelForClass(Service);\nexport * from './service.model';\n\nexport const VendorParentModel: ReturnModelType<typeof VendorParent> = getModelForClass(VendorParent);\nexport * from './vendor-parent.model';\n\nexport const VendorModel: ReturnModelType<typeof Vendor> = getModelForClass(Vendor);\nexport * from './vendor.model';\n\nexport const VendorAccessControlModel: ReturnModelType<typeof VendorAccessControl> =\n\tgetModelForClass(VendorAccessControl);\nexport * from './vendor-access-control.model';\n\nexport const ServiceCategoryModel: ReturnModelType<typeof ServiceCategory> =\n\tgetModelForClass(ServiceCategory);\nexport * from './service-category.model';\n\nexport const ServiceAddonModel: ReturnModelType<typeof ServiceAddon> = getModelForClass(ServiceAddon);\nexport * from './service-addon.model';\n\nexport const ServicePackageModel: ReturnModelType<typeof ServicePackage> = getModelForClass(ServicePackage);\nexport * from './service-package.model';\n\nexport const ProfessionalModel: ReturnModelType<typeof Professional> = getModelForClass(Professional);\nexport * from './professional.model';\n\nexport const ServiceCartModel: ReturnModelType<typeof ServiceCart> = getModelForClass(ServiceCart);\nexport * from './service-cart.model';\n\nexport const ServiceBookingModel: ReturnModelType<typeof ServiceBooking> = getModelForClass(ServiceBooking);\nexport * from './service-booking.model';\n\nexport const ProfessionalBlockedTimeModel: ReturnModelType<typeof ProfessionalBlockedTime> =\n\tgetModelForClass(ProfessionalBlockedTime);\nexport * from './professional-blocked-time.model';\n\nexport const TicketActionModel: ReturnModelType<typeof TicketAction> = getModelForClass(TicketAction);\nexport * from './ticket-action.model';\n\nexport const ServicePromotionModel: ReturnModelType<typeof ServicePromotion> =\n\tgetModelForClass(ServicePromotion);\nexport * from './service-promotion.model';\n\nexport const LoggerModel: ReturnModelType<typeof Log> = getModelForClass(Log);\nexport * from './log.model';\n\nexport const ZoneExtraTimeModel: ReturnModelType<typeof ZoneExtraTime> = getModelForClass(ZoneExtraTime);\nexport * from './zone-extra-time';\n\nexport * from './google-maps-usage.model';\n\nexport const AppInstanceModel: ReturnModelType<typeof AppInstance> = getModelForClass(AppInstance);\nexport * from './app-instance.model';\n\nexport const PaymentConfigurationModel: ReturnModelType<typeof PaymentConfiguration> =\n\tgetModelForClass(PaymentConfiguration);\nexport * from './payment-configuration.model';\n\nexport const ServiceFlagModel: ReturnModelType<typeof ServiceFlag> = getModelForClass(ServiceFlag);\nexport * from './service-flag.model';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA0KA,4DAIC;AAED,sEAIC;AAED,sEAIC;AAED,wEAIC;AAED,sEAIC;AAED,4CAIC;AAED,oCAGC;AAED,sDAIC;AAGD,wDAuCC;AA8VD,wEAKC;AApmBD,uEAA6D;AAC7D,qEAA2D;AAC3D,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,qFAAyE;AACzE,uDAA8C;AAC9C,iDAAwC;AACxC,gEAAsD;AACtD,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,6CAAoC;AACpC,6DAAoD;AACpD,2CAAkC;AAClC,6CAAoC;AACpC,qFAA0E;AAC1E,kDAQiC;AACjC,+DAAqD;AACrD,yEAA+D;AAC/D,mFAAyE;AACzE,mFAAyE;AACzE,6FAAkF;AAClF,yEAA+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AAExB,QAAA,mBAAmB,GAA2C,IAAA,4BAAgB,EAAC,sCAAc,CAAC,CAAC;AAC5G,0DAAwC;AAE3B,QAAA,4BAA4B,GACxC,IAAA,4BAAgB,EAAC,yDAAuB,CAAC,CAAC;AAC3C,oEAAkD;AAErC,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,kCAAY,CAAC,CAAC;AACtG,wDAAsC;AAEzB,QAAA,qBAAqB,GACjC,IAAA,4BAAgB,EAAC,0CAAgB,CAAC,CAAC;AACpC,4DAA0C;AAE7B,QAAA,WAAW,GAAgC,IAAA,4BAAgB,EAAC,eAAG,CAAC,CAAC;AAC9E,8CAA4B;AAEf,QAAA,kBAAkB,GAA0C,IAAA,4BAAgB,EAAC,+BAAa,CAAC,CAAC;AACzG,oDAAkC;AAElC,4DAA0C;AAE7B,QAAA,gBAAgB,GAAwC,IAAA,4BAAgB,EAAC,gCAAW,CAAC,CAAC;AACnG,uDAAqC;AAExB,QAAA,yBAAyB,GACrC,IAAA,4BAAgB,EAAC,kDAAoB,CAAC,CAAC;AACxC,gEAA8C;AAEjC,QAAA,gBAAgB,GAAwC,IAAA,4BAAgB,EAAC,gCAAW,CAAC,CAAC;AACnG,uDAAqC;AAExB,QAAA,6BAA6B,GACzC,IAAA,4BAAgB,EAAC,0DAAwB,CAAC,CAAC;AAC5C,oEAAkD;AAElD,SAAgB,8BAA8B,CAC7C,GAAM,EACN,GAAW;IAEX,OAAO,IAAA,yCAA6B,EAAC,qCAA6B,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["import { RiderPayout } from './providers/rider-payout.model';\nimport { ShopPayout } from './providers/shop-payout.model';\nimport { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\nimport { Admin } from './admin.model';\nimport { AdminAccessControl } from './admin-access-control.model';\nimport { ActivityLog } from './activity-log.model';\nimport { UserAppSectionSetting } from './user-app-section-setting.model';\nimport { Attribute } from './attribute.model';\nimport { Banner } from './banner.model';\nimport { BaseCoupon } from './base/base-coupon.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { Brand } from './brand.model';\nimport { Category } from './category.model';\nimport { Counter } from './counter.model';\nimport { Coupon } from './coupon.model';\nimport { DealSetting } from './deal-setting.model';\nimport { Dish } from './dish.model';\nimport { Favourite } from './favourite.model';\nimport { FeaturedSetting } from './featured-setting.model';\nimport { FilterContainer } from './filter-container.model';\nimport { ListContainer } from './list-container.model';\nimport { Marketing } from './marketing.model';\nimport { MealPlan } from './meal-plan.model';\nimport { Nutrition } from './nutrition.model';\nimport { Parent } from './parent.model';\nimport { ProductMarketing } from './product-marketing.model';\nimport { Product } from './product.model';\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\nimport { RatingSetting } from './rating-setting.model';\nimport { ReferralSetting } from './referral-setting.model';\nimport { RequestArea } from './request-area.model';\nimport { Setting } from './setting.model';\nimport { ShopAccessControl } from './shop-access-control.model';\nimport { ShopCategory } from './shop-category.model';\nimport { ShopMealPlan } from './shop-meal-plan.model';\nimport { Shop } from './shop.model';\nimport { Subscription } from './subscription.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\nimport {\n\tCoreAuthIdentityType,\n\tCounterType,\n\tCouponType,\n\tMarketingType,\n\tOrderType,\n\tPayoutType,\n\tReviewType,\n} from '../../../utilities/enum';\nimport { ServiceAddon } from './service-addon.model';\nimport { CustomCoupon } from './providers/custom-coupon.model';\nimport { DiscountMarketing } from './providers/discount-marketing.model';\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\nimport { GlobalCoupon } from './providers/global-coupon.model';\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\nimport { PunchMarketing } from './providers/punch-marketing.model';\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\nimport { Notification } from './notification.model';\nimport { CoreAuthIdentity } from './core-auth-identity.model';\nimport { CoreEmailAuthIdentity } from './providers/core-email-auth-identity.model';\nimport { CorePhoneAuthIdentity } from './providers/core-phone-auth-identity.model';\nimport { CoreGoogleAuthIdentity } from './providers/core-google-auth-identity.model';\nimport { CoreAppleAuthIdentity } from './providers/core-apple-auth-identity.model';\nimport { CoreUser } from './core-user.model';\nimport { RiderTracking } from './rider-tracking.model';\nimport { Rider } from './rider.model';\nimport { RiderTimeout } from './rider-timeout.model';\nimport { User } from './user.model';\nimport { Cart } from './cart.model';\nimport { LineItem } from './line-item.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { Gallery } from './gallery.model';\nimport { Order } from './order.model';\nimport { RegularOrder } from './providers/regular-order.model';\nimport { CourierOrder } from './providers/courier-order.model';\nimport { FinanceSettlement } from './finance-settlement.model';\nimport { DefaultChat } from './default-chat.model';\nimport { TermsAndConditions } from './terms-and-conditions.model';\nimport { SupportReason } from './support-reason.model';\nimport { CancellationReason } from './cancellation-reason.model';\nimport { Payout } from './payout.model';\nimport { Reward } from './reward.model';\nimport { Ticket } from './ticket.model';\nimport { Message } from './message.model';\nimport { AgentPerformance } from './agent-performance.model';\nimport { Chatroom } from './chat-room.model';\nimport { initializeRefreshTokenModel } from '../../auth';\nimport { VendorParent } from './vendor-parent.model';\nimport { Vendor } from './vendor.model';\nimport { VendorAccessControl } from './vendor-access-control.model';\nimport { ServiceCategory } from './service-category.model';\nimport { ServicePackage } from './service-package.model';\nimport { Professional } from './professional.model';\nimport { ServiceBooking } from './service-booking.model';\nimport { Service } from './service.model';\nimport { TicketAction } from './ticket-action.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ShopCourierOrder } from './providers/shop-courier.model';\nimport { ServicePromotion } from './service-promotion.model';\nimport { Flag } from './flag.model';\nimport { Review } from './review.model';\nimport { ShopReview } from './providers/shop-review.model';\nimport { RiderReview } from './providers/rider-review.model';\nimport { ServiceBookingReview } from './providers/service-booking-review.model';\nimport { assignIdsToDocuments } from '../../../utilities/id-generator';\nimport { GalleryUpload } from './gallery-upload.model';\nimport { ProductUpload } from './product-upload.model';\nimport { ShopsCategoriesCoupon } from './providers/shops-categories-coupon.model';\nimport { ProfessionalBlockedTime } from './professional-blocked-time.model';\nimport { ZoneExtraTime } from './zone-extra-time';\nimport { AppAppearance } from './app-appearance.model';\nimport { ServiceControl } from './service-control.model';\nimport { Log } from './log.model';\nimport { Card } from './card.model';\nimport { ProductStockTracker } from './product-stock-tracker.model';\nimport { PaymentIntent } from './payment-intent.model';\nimport { AppInstance } from './app-instance.model';\nimport { PaymentConfiguration } from './payment-configuration.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { IntegrationConfiguration } from './integration-configuration.model';\n\n// Regular models (using standard getModelForClass)\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\nexport * from './activity-log.model';\n\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\n\tgetModelForClass(AdminAccessControl);\nexport * from './admin-access-control.model';\n\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\nexport * from './admin.model';\n\nexport const UserAppSectionSettingModel: ReturnModelType<typeof UserAppSectionSetting> =\n\tgetModelForClass(UserAppSectionSetting);\nexport * from './user-app-section-setting.model';\n\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\nexport * from './attribute.model';\n\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\nexport * from './banner.model';\n\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\nexport * from './bob-finance.model';\n\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\nexport * from './brand.model';\n\nexport const AppAppearanceModel: ReturnModelType<typeof AppAppearance> = getModelForClass(AppAppearance);\nexport * from './app-appearance.model';\n\nexport const ServiceControlModel: ReturnModelType<typeof ServiceControl> = getModelForClass(ServiceControl);\nexport * from './service-control.model';\n\n// Global models - will be set after initGlobalConnection()\nlet actualCoreAuthIdentityModel: ReturnModelType<typeof CoreAuthIdentity> | null = null;\nlet actualCoreUserModel: ReturnModelType<typeof CoreUser> | null = null;\nlet actualCardModel: ReturnModelType<typeof Card> | null = null;\nlet actualPaymentIntentModel: ReturnModelType<typeof PaymentIntent> | null = null;\n\n// Global discriminator models - will be set after initGlobalConnection()\nlet actualCoreEmailAuthIdentityModel: ReturnModelType<typeof CoreEmailAuthIdentity> | null = null;\nlet actualCorePhoneAuthIdentityModel: ReturnModelType<typeof CorePhoneAuthIdentity> | null = null;\nlet actualCoreGoogleAuthIdentityModel: ReturnModelType<typeof CoreGoogleAuthIdentity> | null = null;\nlet actualCoreAppleAuthIdentityModel: ReturnModelType<typeof CoreAppleAuthIdentity> | null = null;\n\n// Export getter functions for global models\nexport function getCoreAuthIdentityModel(): ReturnModelType<typeof CoreAuthIdentity> {\n\tif (!actualCoreAuthIdentityModel)\n\t\tthrow new Error('CoreAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAuthIdentityModel;\n}\n\nexport function getCoreEmailAuthIdentityModel(): ReturnModelType<typeof CoreEmailAuthIdentity> {\n\tif (!actualCoreEmailAuthIdentityModel)\n\t\tthrow new Error('CoreEmailAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreEmailAuthIdentityModel;\n}\n\nexport function getCorePhoneAuthIdentityModel(): ReturnModelType<typeof CorePhoneAuthIdentity> {\n\tif (!actualCorePhoneAuthIdentityModel)\n\t\tthrow new Error('CorePhoneAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCorePhoneAuthIdentityModel;\n}\n\nexport function getCoreGoogleAuthIdentityModel(): ReturnModelType<typeof CoreGoogleAuthIdentity> {\n\tif (!actualCoreGoogleAuthIdentityModel)\n\t\tthrow new Error('CoreGoogleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreGoogleAuthIdentityModel;\n}\n\nexport function getCoreAppleAuthIdentityModel(): ReturnModelType<typeof CoreAppleAuthIdentity> {\n\tif (!actualCoreAppleAuthIdentityModel)\n\t\tthrow new Error('CoreAppleAuthIdentity model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreAppleAuthIdentityModel;\n}\n\nexport function getCoreUserModel(): ReturnModelType<typeof CoreUser> {\n\tif (!actualCoreUserModel)\n\t\tthrow new Error('CoreUser model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCoreUserModel;\n}\n\nexport function getCardModel(): ReturnModelType<typeof Card> {\n\tif (!actualCardModel) throw new Error('Card model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualCardModel;\n}\n\nexport function getPaymentIntentModel(): ReturnModelType<typeof PaymentIntent> {\n\tif (!actualPaymentIntentModel)\n\t\tthrow new Error('Payment Intent model not initialized yet. Call initGlobalConnection() first.');\n\treturn actualPaymentIntentModel;\n}\n\n// Function to initialize all global models (called from initGlobalConnection)\nexport function initializeGlobalModels(globalConnection: any) {\n\t// Initialize base global models\n\tactualCoreAuthIdentityModel = getModelForClass(CoreAuthIdentity, { existingConnection: globalConnection });\n\tactualCoreUserModel = getModelForClass(CoreUser, { existingConnection: globalConnection });\n\tactualCardModel = getModelForClass(Card, { existingConnection: globalConnection });\n\tactualPaymentIntentModel = getModelForClass(PaymentIntent, { existingConnection: globalConnection });\n\n\t// Initialize discriminator models\n\tactualCoreEmailAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreEmailAuthIdentity,\n\t\tCoreAuthIdentityType.EMAIL,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCorePhoneAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCorePhoneAuthIdentity,\n\t\tCoreAuthIdentityType.PHONE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreGoogleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreGoogleAuthIdentity,\n\t\tCoreAuthIdentityType.GOOGLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tactualCoreAppleAuthIdentityModel = getDiscriminatorModelForClass(\n\t\tactualCoreAuthIdentityModel,\n\t\tCoreAppleAuthIdentity,\n\t\tCoreAuthIdentityType.APPLE,\n\t\t{ existingConnection: globalConnection }\n\t);\n\n\tinitializeRefreshTokenModel(globalConnection);\n\n\tconsole.log('✅ All global models initialized');\n}\n\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\nexport * from './cart.model';\n\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\n\tgetModelForClass(CartParticipant);\nexport * from './cart-participant.model';\n\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\nexport * from './category.model';\n\nexport * from './core-auth-identity.model';\nexport * from './providers/core-apple-auth-identity.model';\nexport * from './providers/core-email-auth-identity.model';\nexport * from './providers/core-google-auth-identity.model';\nexport * from './providers/core-phone-auth-identity.model';\nexport * from './core-user.model';\n\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\nexport * from './counter.model';\n\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\nexport const BaseCouponModel: ReturnModelType<typeof BaseCoupon> = getModelForClass(BaseCoupon);\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tCustomCoupon,\n\tCouponType.CUSTOM_COUPON\n);\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\n\tCouponModel,\n\tGlobalCoupon,\n\tCouponType.GLOBAL\n);\nexport const ShopsCategoriesCouponModel: ReturnModelType<typeof ShopsCategoriesCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ShopsCategoriesCoupon, CouponType.SHOPS_CATEGORIES);\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\nexport * from './coupon.model';\nexport * from './base/base-coupon.model';\nexport * from './providers/custom-coupon.model';\nexport * from './providers/global-coupon.model';\nexport * from './providers/shops-categories-coupon.model';\nexport * from './providers/individual-store-coupon.model';\nexport * from './providers/individual-user-coupon.model';\nexport * from './providers/referral-code-coupon.model';\nexport * from './providers/referral-reward-coupon.model';\n\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\nexport * from './deal-setting.model';\n\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\nexport * from './dish.model';\n\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\nexport * from './favourite.model';\n\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\n\tgetModelForClass(FeaturedSetting);\nexport * from './featured-setting.model';\n\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\n\tgetModelForClass(FilterContainer);\nexport * from './filter-container.model';\n\nexport const FinanceSettlementModel: ReturnModelType<typeof FinanceSettlement> =\n\tgetModelForClass(FinanceSettlement);\nexport * from './finance-settlement.model';\n\nexport const FlagModel: ReturnModelType<typeof Flag> = getModelForClass(Flag);\nexport * from './flag.model';\n\nexport const GalleryModel: ReturnModelType<typeof Gallery> = getModelForClass(Gallery);\nexport * from './gallery.model';\n\nexport const GalleryUploadModel: ReturnModelType<typeof GalleryUpload> = getModelForClass(GalleryUpload);\nexport * from './gallery-upload.model';\n\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\nexport * from './line-item.model';\n\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\nexport * from './list-container.model';\n\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\n\tMarketingModel,\n\tPunchMarketing,\n\tMarketingType.PUNCH_MARKETING\n);\nexport * from './marketing.model';\nexport * from './providers/buy1-get1-marketing.model';\nexport * from './providers/discount-marketing.model';\nexport * from './providers/featured-marketing.model';\nexport * from './providers/free-delivery-marketing.model';\nexport * from './providers/punch-marketing.model';\n\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\nexport * from './meal-plan.model';\n\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\nexport * from './notification.model';\n\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\nexport * from './nutrition.model';\n\nexport const OrderModel: ReturnModelType<typeof Order> = getModelForClass(Order);\nexport const RegularOrderModel: ReturnModelType<typeof RegularOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tRegularOrder,\n\tOrderType.REGULAR\n);\nexport const CourierOrderModel: ReturnModelType<typeof CourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tCourierOrder,\n\tOrderType.COURIER\n);\n\nexport const ShopCourierOrderModel: ReturnModelType<typeof ShopCourierOrder> = getDiscriminatorModelForClass(\n\tOrderModel,\n\tShopCourierOrder,\n\tOrderType.SHOP_COURIER\n);\n\nexport * from './order.model';\nexport * from './providers/regular-order.model';\nexport * from './providers/courier-order.model';\nexport * from './providers/shop-courier.model';\n\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\nexport * from './parent.model';\n\nexport const PayoutModel: ReturnModelType<typeof Payout> = getModelForClass(Payout);\nexport const ShopPayoutModel: ReturnModelType<typeof ShopPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tShopPayout,\n\tPayoutType.SHOP\n);\nexport const RiderPayoutModel: ReturnModelType<typeof RiderPayout> = getDiscriminatorModelForClass(\n\tPayoutModel,\n\tRiderPayout,\n\tPayoutType.RIDER\n);\nexport * from './payout.model';\nexport * from './providers/shop-payout.model';\nexport * from './providers/rider-payout.model';\n\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\n\tgetModelForClass(ProductMarketing);\nexport * from './product-marketing.model';\n\nexport const ProductStockTrackerModel: ReturnModelType<typeof ProductStockTracker> =\n\tgetModelForClass(ProductStockTracker);\nexport * from './product-stock-tracker.model';\n\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\nexport * from './product.model';\nProductModel.schema.pre('insertMany', async function (next, docs: Product[]) {\n\t// Generate all IDs at once (ATOMIC)\n\tawait assignIdsToDocuments(CounterModel, CounterType.ITEM, docs, 'productId');\n\tnext();\n});\n\nexport const ProductUploadModel: ReturnModelType<typeof ProductUpload> = getModelForClass(ProductUpload);\nexport * from './product-upload.model';\n\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\n\tgetModelForClass(PunchMarketingHistory);\nexport * from './punch-marketing-history.model';\n\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\nexport * from './rating-setting.model';\n\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\n\tgetModelForClass(ReferralSetting);\nexport * from './referral-setting.model';\n\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\nexport * from './request-area.model';\n\nexport const ReviewModel: ReturnModelType<typeof Review> = getModelForClass(Review);\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tShopReview,\n\tReviewType.SHOP\n);\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getDiscriminatorModelForClass(\n\tReviewModel,\n\tRiderReview,\n\tReviewType.RIDER\n);\nexport const ServiceBookingReviewModel: ReturnModelType<typeof ServiceBookingReview> =\n\tgetDiscriminatorModelForClass(ReviewModel, ServiceBookingReview, ReviewType.SERVICE_BOOKING);\nexport * from './review.model';\nexport * from './providers/shop-review.model';\nexport * from './providers/rider-review.model';\nexport * from './providers/service-booking-review.model';\n\nexport const RiderTimeoutModel: ReturnModelType<typeof RiderTimeout> = getModelForClass(RiderTimeout);\nexport * from './rider-timeout.model';\n\nexport const RiderTrackingModel: ReturnModelType<typeof RiderTracking> = getModelForClass(RiderTracking);\nexport * from './rider-tracking.model';\n\nexport const RiderModel: ReturnModelType<typeof Rider> = getModelForClass(Rider);\nexport * from './rider.model';\n\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\nexport * from './setting.model';\n\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\n\tgetModelForClass(ShopAccessControl);\nexport * from './shop-access-control.model';\n\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\nexport * from './shop-category.model';\n\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\nexport * from './shop-meal-plan.model';\n\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\nexport * from './shop.model';\n\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\nexport * from './subscription.model';\n\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\nexport * from './tag.model';\n\nexport const UserModel: ReturnModelType<typeof User> = getModelForClass(User);\nexport * from './user.model';\n\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\nexport * from './zone.model';\n\nexport const DefaultChatModel: ReturnModelType<typeof DefaultChat> = getModelForClass(DefaultChat);\nexport * from './default-chat.model';\n\nexport const TermsAndConditionsModel: ReturnModelType<typeof TermsAndConditions> =\n\tgetModelForClass(TermsAndConditions);\nexport * from './terms-and-conditions.model';\n\nexport const SupportReasonModel: ReturnModelType<typeof SupportReason> = getModelForClass(SupportReason);\nexport * from './support-reason.model';\n\nexport const CancellationReasonModel: ReturnModelType<typeof CancellationReason> =\n\tgetModelForClass(CancellationReason);\nexport * from './cancellation-reason.model';\n\nexport * from './embedded/trip-leg.mode';\nexport * from './embedded/rider-assignment-model';\n\nexport const RewardModel: ReturnModelType<typeof Reward> = getModelForClass(Reward);\nexport * from './reward.model';\n\nexport const TicketModel: ReturnModelType<typeof Ticket> = getModelForClass(Ticket);\nexport * from './ticket.model';\n\nexport const MessageModel: ReturnModelType<typeof Message> = getModelForClass(Message);\nexport * from './message.model';\n\nexport const AgentPerformanceModel: ReturnModelType<typeof AgentPerformance> =\n\tgetModelForClass(AgentPerformance);\nexport * from './agent-performance.model';\n\nexport const ChatroomModel: ReturnModelType<typeof Chatroom> = getModelForClass(Chatroom);\nexport * from './chat-room.model';\n\nexport * from './embedded/chat-participant.model';\nexport * from './embedded/external-ref.model';\n\nexport const ServiceModel: ReturnModelType<typeof Service> = getModelForClass(Service);\nexport * from './service.model';\n\nexport const VendorParentModel: ReturnModelType<typeof VendorParent> = getModelForClass(VendorParent);\nexport * from './vendor-parent.model';\n\nexport const VendorModel: ReturnModelType<typeof Vendor> = getModelForClass(Vendor);\nexport * from './vendor.model';\n\nexport const VendorAccessControlModel: ReturnModelType<typeof VendorAccessControl> =\n\tgetModelForClass(VendorAccessControl);\nexport * from './vendor-access-control.model';\n\nexport const ServiceCategoryModel: ReturnModelType<typeof ServiceCategory> =\n\tgetModelForClass(ServiceCategory);\nexport * from './service-category.model';\n\nexport const ServiceAddonModel: ReturnModelType<typeof ServiceAddon> = getModelForClass(ServiceAddon);\nexport * from './service-addon.model';\n\nexport const ServicePackageModel: ReturnModelType<typeof ServicePackage> = getModelForClass(ServicePackage);\nexport * from './service-package.model';\n\nexport const ProfessionalModel: ReturnModelType<typeof Professional> = getModelForClass(Professional);\nexport * from './professional.model';\n\nexport const ServiceCartModel: ReturnModelType<typeof ServiceCart> = getModelForClass(ServiceCart);\nexport * from './service-cart.model';\n\nexport const ServiceBookingModel: ReturnModelType<typeof ServiceBooking> = getModelForClass(ServiceBooking);\nexport * from './service-booking.model';\n\nexport const ProfessionalBlockedTimeModel: ReturnModelType<typeof ProfessionalBlockedTime> =\n\tgetModelForClass(ProfessionalBlockedTime);\nexport * from './professional-blocked-time.model';\n\nexport const TicketActionModel: ReturnModelType<typeof TicketAction> = getModelForClass(TicketAction);\nexport * from './ticket-action.model';\n\nexport const ServicePromotionModel: ReturnModelType<typeof ServicePromotion> =\n\tgetModelForClass(ServicePromotion);\nexport * from './service-promotion.model';\n\nexport const LoggerModel: ReturnModelType<typeof Log> = getModelForClass(Log);\nexport * from './log.model';\n\nexport const ZoneExtraTimeModel: ReturnModelType<typeof ZoneExtraTime> = getModelForClass(ZoneExtraTime);\nexport * from './zone-extra-time';\n\nexport * from './google-maps-usage.model';\n\nexport const AppInstanceModel: ReturnModelType<typeof AppInstance> = getModelForClass(AppInstance);\nexport * from './app-instance.model';\n\nexport const PaymentConfigurationModel: ReturnModelType<typeof PaymentConfiguration> =\n\tgetModelForClass(PaymentConfiguration);\nexport * from './payment-configuration.model';\n\nexport const ServiceFlagModel: ReturnModelType<typeof ServiceFlag> = getModelForClass(ServiceFlag);\nexport * from './service-flag.model';\n\nexport const IntegrationConfigurationModel: ReturnModelType<typeof IntegrationConfiguration> =\n\tgetModelForClass(IntegrationConfiguration);\nexport * from './integration-configuration.model';\n\nexport function createIntegrationDiscriminator<U extends new (...args: any[]) => IntegrationConfiguration>(\n\tcls: U,\n\tkey: string\n): ReturnModelType<U> {\n\treturn getDiscriminatorModelForClass(IntegrationConfigurationModel, cls, key);\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
+ export declare class IntegrationConfiguration extends TimeStamps {
3
+ name: string;
4
+ active: boolean;
5
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.IntegrationConfiguration = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
+ let IntegrationConfiguration = class IntegrationConfiguration extends defaultClasses_1.TimeStamps {
16
+ name;
17
+ active;
18
+ };
19
+ exports.IntegrationConfiguration = IntegrationConfiguration;
20
+ __decorate([
21
+ (0, typegoose_1.prop)({ required: true, type: String }),
22
+ __metadata("design:type", String)
23
+ ], IntegrationConfiguration.prototype, "name", void 0);
24
+ __decorate([
25
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
26
+ __metadata("design:type", Boolean)
27
+ ], IntegrationConfiguration.prototype, "active", void 0);
28
+ exports.IntegrationConfiguration = IntegrationConfiguration = __decorate([
29
+ (0, typegoose_1.modelOptions)({
30
+ schemaOptions: { collection: 'integrationConfigurations', discriminatorKey: 'name' },
31
+ })
32
+ ], IntegrationConfiguration);
33
+ //# sourceMappingURL=integration-configuration.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-configuration.model.js","sourceRoot":"/","sources":["libraries/mongo/models/integration-configuration.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AAK9D,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,2BAAU;IAEhD,IAAI,CAAU;IAGd,MAAM,CAAW;CACxB,CAAA;AANY,4DAAwB;AAE7B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDAChB;mCALZ,wBAAwB;IAHpC,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,EAAE;KACpF,CAAC;GACW,wBAAwB,CAMpC","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\n\n@modelOptions({\n\tschemaOptions: { collection: 'integrationConfigurations', discriminatorKey: 'name' },\n})\nexport class IntegrationConfiguration extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic active!: boolean;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { ReturnModelType } from '@typegoose/typegoose';
2
2
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
- import { HttpStatus, LogLevel } from '../../../utilities/enum';
3
+ import { HttpStatus, LogLevel, LogTag } from '../../../utilities/enum';
4
4
  import { LogMetadata, RequestContext } from '../../logger-kit';
5
5
  export interface LogModelConfig {
6
6
  ttlDays?: number;
@@ -10,7 +10,7 @@ export interface LogModelConfig {
10
10
  export declare class Log extends TimeStamps {
11
11
  level: LogLevel;
12
12
  microService: string;
13
- tag: string;
13
+ tag: LogTag | string;
14
14
  subtag?: string;
15
15
  requestId?: string;
16
16
  data?: Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"log.model.js","sourceRoot":"/","sources":["libraries/mongo/models/log.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AA4HA,wCAmBC;AA/ID,oDAAoG;AACpG,4EAAqE;AACrE,kDAA+D;AAwBxD,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,2BAAU;IAO3B,KAAK,CAAY;IAOjB,YAAY,CAAU;IAQtB,GAAG,CAAU;IAOb,MAAM,CAAU;IAOhB,SAAS,CAAU;IAGnB,IAAI,CAAuB;IAG3B,OAAO,CAAuB;IAG9B,QAAQ,CAAuB;IAO/B,MAAM,CAAc;IAMpB,KAAK,CAKV;IAOK,OAAO,CAAU;IAOjB,QAAQ,CAAe;IAGvB,OAAO,CAAkB;IAMzB,MAAM,CAAU;IAMhB,QAAQ,CAAU;CACzB,CAAA;AA7FY,kBAAG;AAOR;IANN,IAAA,gBAAI,EAAC;QACL,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,eAAQ;QACd,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACX,CAAC;;kCACsB;AAOjB;IALN,IAAA,gBAAI,EAAC;QACL,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM;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AO,IAAA,4BAAgB,EAAC,GAAG,EAAE;QAC5B,aAAa,EAAE;YACd,UAAU,EAAE,cAAc;YAC1B,MAAM;YACN,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SACf;QACD,OAAO,EAAE;YACR,aAAa,EAAE,KAAK;SACpB;KACD,CAAC,CAAC;AACJ,CAAC;AAGY,QAAA,aAAa,GAAG,cAAc,EAAE,CAAC","sourcesContent":["import { getModelForClass, index, modelOptions, prop, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { HttpStatus, LogLevel } from '../../../utilities/enum';\nimport { LogMetadata, RequestContext } from '../../logger-kit';\n\n/**\n * Configuration options for log model creation\n */\nexport interface LogModelConfig {\n\t/** TTL in days for log retention (default: 7) */\n\tttlDays?: number;\n\t/** Collection name (default: 'logs') */\n\tcollectionName?: string;\n\t/** Enable strict mode for schema (default: true) */\n\tstrict?: boolean;\n}\n\n/**\n * LogModel document model with indexed fields for efficient querying\n */\n@index({ microService: 1, level: 1, createdAt: -1 })\n@index({ requestId: 1 })\n@index({ 'metadata.userId': 1 }, { sparse: true })\n@index({ tag: 1, createdAt: -1 })\n@index({ status: 1 }, { sparse: true })\n@modelOptions({ schemaOptions: { collection: 'logs', timestamps: true } })\nexport class Log extends TimeStamps {\n\t@prop({\n\t\trequired: true,\n\t\tenum: LogLevel,\n\t\ttype: String,\n\t\tindex: true,\n\t})\n\tpublic level!: LogLevel;\n\n\t@prop({\n\t\trequired: true,\n\t\ttype: String,\n\t\tindex: true,\n\t})\n\tpublic microService!: string;\n\n\t@prop({\n\t\trequired: true,\n\t\ttype: String,\n\t\ttrim: true,\n\t\tmaxlength: 100,\n\t})\n\tpublic tag!: string;\n\n\t@prop({\n\t\ttype: String,\n\t\ttrim: true,\n\t\tmaxlength: 100,\n\t})\n\tpublic subtag?: string;\n\n\t@prop({\n\t\ttype: String,\n\t\tsparse: true,\n\t\tindex: true,\n\t})\n\tpublic requestId?: string;\n\n\t@prop({ type: () => Object })\n\tpublic data?: Record<string, any>;\n\n\t@prop({ type: () => Object })\n\tpublic request?: Record<string, any>;\n\n\t@prop({ type: () => Object })\n\tpublic response?: Record<string, any>;\n\n\t@prop({\n\t\ttype: Number,\n\t\tenum: HttpStatus,\n\t\tsparse: true,\n\t})\n\tpublic status?: HttpStatus;\n\n\t@prop({\n\t\ttype: () => Object,\n\t\t_id: false,\n\t})\n\tpublic error?: {\n\t\tcode?: string | number;\n\t\tmessage?: string;\n\t\tstacktrace?: string[];\n\t\tname?: string;\n\t};\n\n\t@prop({\n\t\trequired: true,\n\t\ttype: String,\n\t\tmaxlength: 5000,\n\t})\n\tpublic message!: string;\n\n\t@prop({\n\t\ttype: () => Object,\n\t\tdefault: {},\n\t\t_id: false,\n\t})\n\tpublic metadata!: LogMetadata;\n\n\t@prop({ type: () => Object })\n\tpublic context?: RequestContext;\n\n\t@prop({\n\t\ttype: String,\n\t\tmaxlength: 200,\n\t})\n\tpublic source?: string;\n\n\t@prop({\n\t\ttype: Number,\n\t\tmin: 0,\n\t})\n\tpublic duration?: number;\n}\n\n/**\n * Factory function to create the log model with configurable options\n */\nexport function createLogModel(config: LogModelConfig = {}): ReturnModelType<typeof Log> {\n\tconst { ttlDays = 7, collectionName = 'logs', strict = true } = config;\n\n\tconst ttlSeconds = 60 * 60 * 24 * ttlDays;\n\n\t// Apply TTL index dynamically\n\tindex({ createdAt: 1 }, { expireAfterSeconds: ttlSeconds })(Log);\n\n\treturn getModelForClass(Log, {\n\t\tschemaOptions: {\n\t\t\tcollection: collectionName,\n\t\t\tstrict,\n\t\t\ttimestamps: true,\n\t\t\tminimize: false,\n\t\t},\n\t\toptions: {\n\t\t\tautomaticName: false,\n\t\t},\n\t});\n}\n\n// Default export with 7 days TTL\nexport const LogModelMongo = createLogModel();\n\n// Type exports for external use\nexport type LogDocument = InstanceType<typeof Log>;\nexport type LogModelType = ReturnModelType<typeof Log>;\n"]}
1
+ {"version":3,"file":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EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjD,IAAA,iBAAK,EAAC,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAChC,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACtC,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GAC7D,GAAG,CA6Ff;AAKD,SAAgB,cAAc,CAAC,SAAyB,EAAE;IACzD,MAAM,EAAE,OAAO,GAAG,CAAC,EAAE,cAAc,GAAG,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IAEvE,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAG1C,IAAA,iBAAK,EAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;IAEjE,OAAO,IAAA,4BAAgB,EAAC,GAAG,EAAE;QAC5B,aAAa,EAAE;YACd,UAAU,EAAE,cAAc;YAC1B,MAAM;YACN,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,KAAK;SACf;QACD,OAAO,EAAE;YACR,aAAa,EAAE,KAAK;SACpB;KACD,CAAC,CAAC;AACJ,CAAC;AAGY,QAAA,aAAa,GAAG,cAAc,EAAE,CAAC","sourcesContent":["import { getModelForClass, index, modelOptions, prop, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { HttpStatus, LogLevel, LogTag } from '../../../utilities/enum';\nimport { LogMetadata, RequestContext } from '../../logger-kit';\n\n/**\n * Configuration options for log model creation\n */\nexport interface LogModelConfig {\n\t/** TTL in days for log retention (default: 7) */\n\tttlDays?: number;\n\t/** Collection name (default: 'logs') */\n\tcollectionName?: string;\n\t/** Enable strict mode for schema (default: true) */\n\tstrict?: boolean;\n}\n\n/**\n * LogModel document model with indexed fields for efficient querying\n */\n@index({ microService: 1, level: 1, createdAt: -1 })\n@index({ requestId: 1 })\n@index({ 'metadata.userId': 1 }, { sparse: true })\n@index({ tag: 1, createdAt: -1 })\n@index({ status: 1 }, { sparse: true })\n@modelOptions({ schemaOptions: { collection: 'logs', timestamps: true } })\nexport class Log extends TimeStamps {\n\t@prop({\n\t\trequired: true,\n\t\tenum: LogLevel,\n\t\ttype: String,\n\t\tindex: true,\n\t})\n\tpublic level!: LogLevel;\n\n\t@prop({\n\t\trequired: true,\n\t\ttype: String,\n\t\tindex: true,\n\t})\n\tpublic microService!: string;\n\n\t@prop({\n\t\trequired: true,\n\t\ttype: String,\n\t\ttrim: true,\n\t\tmaxlength: 100,\n\t})\n\tpublic tag!: LogTag | string;\n\n\t@prop({\n\t\ttype: String,\n\t\ttrim: true,\n\t\tmaxlength: 100,\n\t})\n\tpublic subtag?: string;\n\n\t@prop({\n\t\ttype: String,\n\t\tsparse: true,\n\t\tindex: true,\n\t})\n\tpublic requestId?: string;\n\n\t@prop({ type: () => Object })\n\tpublic data?: Record<string, any>;\n\n\t@prop({ type: () => Object })\n\tpublic request?: Record<string, any>;\n\n\t@prop({ type: () => Object })\n\tpublic response?: Record<string, any>;\n\n\t@prop({\n\t\ttype: Number,\n\t\tenum: HttpStatus,\n\t\tsparse: true,\n\t})\n\tpublic status?: HttpStatus;\n\n\t@prop({\n\t\ttype: () => Object,\n\t\t_id: false,\n\t})\n\tpublic error?: {\n\t\tcode?: string | number;\n\t\tmessage?: string;\n\t\tstacktrace?: string[];\n\t\tname?: string;\n\t};\n\n\t@prop({\n\t\trequired: true,\n\t\ttype: String,\n\t\tmaxlength: 5000,\n\t})\n\tpublic message!: string;\n\n\t@prop({\n\t\ttype: () => Object,\n\t\tdefault: {},\n\t\t_id: false,\n\t})\n\tpublic metadata!: LogMetadata;\n\n\t@prop({ type: () => Object })\n\tpublic context?: RequestContext;\n\n\t@prop({\n\t\ttype: String,\n\t\tmaxlength: 200,\n\t})\n\tpublic source?: string;\n\n\t@prop({\n\t\ttype: Number,\n\t\tmin: 0,\n\t})\n\tpublic duration?: number;\n}\n\n/**\n * Factory function to create the log model with configurable options\n */\nexport function createLogModel(config: LogModelConfig = {}): ReturnModelType<typeof Log> {\n\tconst { ttlDays = 7, collectionName = 'logs', strict = true } = config;\n\n\tconst ttlSeconds = 60 * 60 * 24 * ttlDays;\n\n\t// Apply TTL index dynamically\n\tindex({ createdAt: 1 }, { expireAfterSeconds: ttlSeconds })(Log);\n\n\treturn getModelForClass(Log, {\n\t\tschemaOptions: {\n\t\t\tcollection: collectionName,\n\t\t\tstrict,\n\t\t\ttimestamps: true,\n\t\t\tminimize: false,\n\t\t},\n\t\toptions: {\n\t\t\tautomaticName: false,\n\t\t},\n\t});\n}\n\n// Default export with 7 days TTL\nexport const LogModelMongo = createLogModel();\n\n// Type exports for external use\nexport type LogDocument = InstanceType<typeof Log>;\nexport type LogModelType = ReturnModelType<typeof Log>;\n"]}
@@ -1,7 +1,8 @@
1
1
  import { Ref } from '@typegoose/typegoose';
2
2
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
- import { ProductType, ItemType, ProductDietaryType, Status, PriceOption } from '../../../utilities/enum';
3
+ import { ItemType, PriceOption, ProductDietaryType, ProductType, Status } from '../../../utilities/enum';
4
4
  import { ProductNutrition } from './embedded/product-nutrition.model';
5
+ import { ExternalRef } from './embedded/external-ref.model';
5
6
  import { Shop } from './shop.model';
6
7
  import { PriceBreakdown } from './embedded/price-breakdown.model';
7
8
  import { AttributeMap } from './embedded/attribute-map.model';
@@ -45,4 +46,5 @@ export declare class Product extends TimeStamps {
45
46
  isHidden?: boolean;
46
47
  productMarketing?: Ref<ProductMarketing>;
47
48
  productMarketingInfo?: ProductMarketingInfo[];
49
+ externalRefs?: ExternalRef[];
48
50
  }
@@ -15,6 +15,7 @@ const typegoose_1 = require("@typegoose/typegoose");
15
15
  const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
16
16
  const enum_1 = require("../../../utilities/enum");
17
17
  const product_nutrition_model_1 = require("./embedded/product-nutrition.model");
18
+ const external_ref_model_1 = require("./embedded/external-ref.model");
18
19
  const shop_model_1 = require("./shop.model");
19
20
  const price_breakdown_model_1 = require("./embedded/price-breakdown.model");
20
21
  const attribute_map_model_1 = require("./embedded/attribute-map.model");
@@ -61,6 +62,7 @@ let Product = class Product extends defaultClasses_1.TimeStamps {
61
62
  isHidden;
62
63
  productMarketing;
63
64
  productMarketingInfo;
65
+ externalRefs;
64
66
  };
65
67
  exports.Product = Product;
66
68
  __decorate([
@@ -208,6 +210,10 @@ __decorate([
208
210
  (0, typegoose_1.prop)({ type: () => [product_marketing_info_model_1.ProductMarketingInfo], default: [] }),
209
211
  __metadata("design:type", Array)
210
212
  ], Product.prototype, "productMarketingInfo", void 0);
213
+ __decorate([
214
+ (0, typegoose_1.prop)({ type: () => [external_ref_model_1.ExternalRef], default: [] }),
215
+ __metadata("design:type", Array)
216
+ ], Product.prototype, "externalRefs", void 0);
211
217
  exports.Product = Product = __decorate([
212
218
  (0, typegoose_1.modelOptions)({
213
219
  schemaOptions: { collection: 'products', toJSON: { virtuals: true }, toObject: { virtuals: true } },
@@ -1 +1 @@
1
- {"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAqC;AACrC,oDAAmF;AACnF,4EAAqE;AACrE,kDAOiC;AACjC,gFAAsE;AACtE,6CAAoC;AACpC,4EAAkE;AAClE,wEAA8D;AAC9D,+DAAqD;AACrD,wBAA8E;AAC9E,0EAA2E;AAC3E,8EAAyE;AACzE,kEAA6D;AAC7D,0EAAgE;AAEhE,0FAA+E;AAiExE,IAAM,OAAO,GAAb,MAAM,OAAQ,S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AAc,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YAC7D,IAAI,IAAI,CAAC,aAAa,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,oCAAoC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtD,CAAC;QACF,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,kBAAM,EAAC,6CAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;GACnC,OAAO,CAqHnB;AAED,SAAS,kBAAkB,CAAC,UAA6B;IACxD,IAAI,CAAC,UAAU,EAAE,MAAM;QAAE,OAAO;IAChC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG;YAAE,SAAS,CAAC,GAAG,GAAG,IAAA,oBAAW,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;AACF,CAAC;AAED,KAAK,UAAU,oCAAoC,CAAC,SAAkC;IACrF,MAAM,cAAW,CAAC,UAAU,CAC3B;QACC,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,aAAM,CAAC,MAAM;QACrB,SAAS,EAAE,IAAI;KACf,EACD;QACC,IAAI,EAAE,EAAE,MAAM,EAAE,aAAM,CAAC,QAAQ,EAAE;KACjC,CACD,CAAC;AACH,CAAC","sourcesContent":["import { randomBytes } from 'crypto';\nimport { Index, modelOptions, plugin, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tProductType,\n\tItemType,\n\tProductDietaryType,\n\tStatus,\n\tPriceOption,\n\tCounterType,\n} from '../../../utilities/enum';\nimport { ProductNutrition } from './embedded/product-nutrition.model';\nimport { Shop } from './shop.model';\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\nimport { AttributeMap } from './embedded/attribute-map.model';\nimport { ShopCategory } from './shop-category.model';\nimport { BannerModel, CounterModel, ProductMarketing, ProductModel } from '.';\nimport { handlePreSaveForSorting } from '../utilities/sorting-order.hooks';\nimport { normalizeFieldPlugin } from '../plugins/normalize-field.plugin';\nimport { generateId } from '../../../utilities/id-generator';\nimport { PreparingTime } from './embedded/preparing-time.model';\nimport mongoose from 'mongoose';\nimport { ProductMarketingInfo } from './embedded/product-marketing-info.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'products', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n})\n@Index(\n\t{ nameNormalized: 1, shop: 1, shopCategory: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@Index({ shop: 1, shopCategory: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ shop: 1, isStockEnabled: 1, stockQuantity: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ nameNormalized: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index(\n\t{ stockAvailableAt: 1 },\n\t{ partialFilterExpression: { deletedAt: null, stockAvailableAt: { $exists: true, $ne: null } } }\n)\n@pre<Product>('save', async function (next) {\n\t// Set sortingOrder\n\tawait handlePreSaveForSorting.call(this, ProductModel, {\n\t\tshop: this.shop,\n\t\tshopCategory: this.shopCategory,\n\t});\n\n\tnext();\n})\n@pre<Product>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.productId = await generateId(CounterModel, CounterType.ITEM);\n\t}\n})\n@pre<Product>('save', function (next) {\n\tensureBreakdownIds(this.priceBreakdowns);\n\tnext();\n})\n@pre<mongoose.Query<Product, Product>>(['findOneAndUpdate', 'updateOne', 'updateMany'], function (next) {\n\ttry {\n\t\tconst update = this.getUpdate() as any;\n\t\tif (!update) return next();\n\n\t\t// handles direct and $set\n\t\tif (update.priceBreakdowns) ensureBreakdownIds(update.priceBreakdowns);\n\t\tif (update.$set?.priceBreakdowns) ensureBreakdownIds(update.$set.priceBreakdowns);\n\n\t\t// handles $push\n\t\tconst pushed = update.$push?.priceBreakdowns;\n\t\tif (pushed) ensureBreakdownIds(Array.isArray(pushed.$each) ? pushed.$each : [pushed]);\n\n\t\t// handles $addToSet\n\t\tconst addedToSet = update.$addToSet?.priceBreakdowns;\n\t\tif (addedToSet) ensureBreakdownIds(Array.isArray(addedToSet.$each) ? addedToSet.$each : [addedToSet]);\n\n\t\tnext();\n\t} catch (err) {\n\t\tnext(err as Error);\n\t}\n})\n@pre<Product>('save', async function (next) {\n\tif (this.isStockEnabled && this.stockQuantity !== undefined) {\n\t\tif (this.stockQuantity < 1) {\n\t\t\tawait deactivateBannerForOutOfStockProduct(this._id);\n\t\t}\n\t}\n\tnext();\n})\n@plugin(normalizeFieldPlugin, { field: 'name' })\nexport class Product extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic productId: string;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: String, trim: true, maxlength: 100 })\n\tpublic name!: string;\n\n\t@prop({ type: String, trim: true, lowercase: true, select: false })\n\tpublic nameNormalized?: string;\n\n\t@prop({ type: String, trim: true, maxlength: 50 })\n\tpublic barcode?: string;\n\n\t@prop({ required: true, ref: () => ShopCategory })\n\tpublic shopCategory!: Ref<ShopCategory>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ type: String, enum: ProductType })\n\tpublic productType?: ProductType;\n\n\t@prop({ type: String })\n\tpublic logo?: string;\n\n\t@prop({ type: [String], default: [] })\n\tpublic images?: string[];\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: [PriceBreakdown] })\n\tpublic priceBreakdowns?: PriceBreakdown[];\n\n\t@prop({ type: String, maxlength: 500 })\n\tpublic description?: string;\n\n\t@prop({ type: [AttributeMap], default: [] })\n\tpublic attributeMaps?: AttributeMap[];\n\n\t@prop({ ref: () => Product, default: [] })\n\tpublic addons?: Ref<Product>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNutritionEnabled?: boolean;\n\n\t@prop({ type: Number, min: 0 })\n\tpublic nutritionPackSize?: number;\n\n\t@prop({ type: String })\n\tpublic nutritionPackSizeUnit?: string;\n\n\t@prop({ type: [ProductNutrition], default: [] })\n\tpublic nutritions?: ProductNutrition[];\n\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\n\tpublic dietaryTypes?: ProductDietaryType[];\n\n\t@prop({ type: Number, min: -9999, max: 9999 })\n\tpublic storedTemperature?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockEnabled?: boolean;\n\n\t@prop({ type: Number, max: 999999999 }) // isStockEnabled: true and stockQuantity < 1 means out of stock\n\tpublic stockQuantity?: number;\n\n\t/**\n\t * Optional scheduled restore timestamp.\n\t * When set along with stockQuantity < 1, the system will automatically\n\t * set the item back to in-stock once this datetime is reached.\n\t * Cleared when the item is manually restored or the schedule is cancelled.\n\t */\n\t@prop({ type: Date })\n\tpublic stockAvailableAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDrinkIncluded?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLargeItem?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPreOrderEnabled?: boolean;\n\n\t// this field needed when pre-order enabled\n\t@prop({ type: PreparingTime })\n\tpublic preparingTime?: PreparingTime;\n\n\t@prop({ type: Number, min: 0, max: 999999999 }) // 0 means, it is disable\n\tpublic orderQuantityLimit?: number;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isHidden?: boolean;\n\n\t@prop({\n\t\tref: () => ProductMarketing,\n\t\tforeignField: 'product',\n\t\tlocalField: '_id',\n\t\tjustOne: true,\n\t})\n\tpublic productMarketing?: Ref<ProductMarketing>; // Virtual reference to ProductMarketing\n\n\t@prop({ type: () => [ProductMarketingInfo], default: [] })\n\tpublic productMarketingInfo?: ProductMarketingInfo[]; // precomputed product marketing info for efficient query\n}\n\nfunction ensureBreakdownIds(breakdowns: any[] | undefined) {\n\tif (!breakdowns?.length) return;\n\tfor (const breakdown of breakdowns) {\n\t\tif (!breakdown.uid) breakdown.uid = randomBytes(8).toString('hex');\n\t}\n}\n\nasync function deactivateBannerForOutOfStockProduct(productId: mongoose.Types.ObjectId) {\n\tawait BannerModel.updateMany(\n\t\t{\n\t\t\tproduct: productId,\n\t\t\tstatus: Status.ACTIVE,\n\t\t\tdeletedAt: null,\n\t\t},\n\t\t{\n\t\t\t$set: { status: Status.INACTIVE },\n\t\t}\n\t);\n}\n"]}
1
+ {"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAqC;AACrC,oDAAmF;AACnF,4EAAqE;AACrE,kDAOiC;AACjC,gFAAsE;AACtE,sEAA4D;AAC5D,6CAAoC;AACpC,4EAAkE;AAClE,wEAA8D;AAC9D,+DAAqD;AACrD,wBAA8E;AAC9E,0EAA2E;AAC3E,8EAAyE;AACzE,kEAA6D;AAC7D,0EAAgE;AAEhE,0FAA+E;AAiExE,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,SAAS,CAAS;IAGlB,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,cAAc,CAAU;IAGxB,OAAO,CAAU;IAGjB,YAAY,CAAqB;IAGjC,QAAQ,CAAY;IAGpB,WAAW,CAAe;IAG1B,IAAI,CAAU;IAGd,MAAM,CAAY;IAGlB,WAAW,CAAe;IAG1B,eAAe,CAAoB;IAGnC,WAAW,CAAU;IAGrB,aAAa,CAAkB;IAG/B,MAAM,CAAkB;IAGxB,kBAAkB,CAAW;IAG7B,iBAAiB,CAAU;IAG3B,qBAAqB,CAAU;IAG/B,UAAU,CAAsB;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A,kBAAM,EAAC,6CAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;GACnC,OAAO,CAwHnB;AAED,SAAS,kBAAkB,CAAC,UAA6B;IACxD,IAAI,CAAC,UAAU,EAAE,MAAM;QAAE,OAAO;IAChC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG;YAAE,SAAS,CAAC,GAAG,GAAG,IAAA,oBAAW,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;AACF,CAAC;AAED,KAAK,UAAU,oCAAoC,CAAC,SAAkC;IACrF,MAAM,cAAW,CAAC,UAAU,CAC3B;QACC,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,aAAM,CAAC,MAAM;QACrB,SAAS,EAAE,IAAI;KACf,EACD;QACC,IAAI,EAAE,EAAE,MAAM,EAAE,aAAM,CAAC,QAAQ,EAAE;KACjC,CACD,CAAC;AACH,CAAC","sourcesContent":["import { randomBytes } from 'crypto';\nimport { Index, modelOptions, plugin, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tCounterType,\n\tItemType,\n\tPriceOption,\n\tProductDietaryType,\n\tProductType,\n\tStatus,\n} from '../../../utilities/enum';\nimport { ProductNutrition } from './embedded/product-nutrition.model';\nimport { ExternalRef } from './embedded/external-ref.model';\nimport { Shop } from './shop.model';\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\nimport { AttributeMap } from './embedded/attribute-map.model';\nimport { ShopCategory } from './shop-category.model';\nimport { BannerModel, CounterModel, ProductMarketing, ProductModel } from '.';\nimport { handlePreSaveForSorting } from '../utilities/sorting-order.hooks';\nimport { normalizeFieldPlugin } from '../plugins/normalize-field.plugin';\nimport { generateId } from '../../../utilities/id-generator';\nimport { PreparingTime } from './embedded/preparing-time.model';\nimport mongoose from 'mongoose';\nimport { ProductMarketingInfo } from './embedded/product-marketing-info.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'products', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n})\n@Index(\n\t{ nameNormalized: 1, shop: 1, shopCategory: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@Index({ shop: 1, shopCategory: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ shop: 1, isStockEnabled: 1, stockQuantity: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ nameNormalized: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index(\n\t{ stockAvailableAt: 1 },\n\t{ partialFilterExpression: { deletedAt: null, stockAvailableAt: { $exists: true, $ne: null } } }\n)\n@pre<Product>('save', async function (next) {\n\t// Set sortingOrder\n\tawait handlePreSaveForSorting.call(this, ProductModel, {\n\t\tshop: this.shop,\n\t\tshopCategory: this.shopCategory,\n\t});\n\n\tnext();\n})\n@pre<Product>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.productId = await generateId(CounterModel, CounterType.ITEM);\n\t}\n})\n@pre<Product>('save', function (next) {\n\tensureBreakdownIds(this.priceBreakdowns);\n\tnext();\n})\n@pre<mongoose.Query<Product, Product>>(['findOneAndUpdate', 'updateOne', 'updateMany'], function (next) {\n\ttry {\n\t\tconst update = this.getUpdate() as any;\n\t\tif (!update) return next();\n\n\t\t// handles direct and $set\n\t\tif (update.priceBreakdowns) ensureBreakdownIds(update.priceBreakdowns);\n\t\tif (update.$set?.priceBreakdowns) ensureBreakdownIds(update.$set.priceBreakdowns);\n\n\t\t// handles $push\n\t\tconst pushed = update.$push?.priceBreakdowns;\n\t\tif (pushed) ensureBreakdownIds(Array.isArray(pushed.$each) ? pushed.$each : [pushed]);\n\n\t\t// handles $addToSet\n\t\tconst addedToSet = update.$addToSet?.priceBreakdowns;\n\t\tif (addedToSet) ensureBreakdownIds(Array.isArray(addedToSet.$each) ? addedToSet.$each : [addedToSet]);\n\n\t\tnext();\n\t} catch (err) {\n\t\tnext(err as Error);\n\t}\n})\n@pre<Product>('save', async function (next) {\n\tif (this.isStockEnabled && this.stockQuantity !== undefined) {\n\t\tif (this.stockQuantity < 1) {\n\t\t\tawait deactivateBannerForOutOfStockProduct(this._id);\n\t\t}\n\t}\n\tnext();\n})\n@plugin(normalizeFieldPlugin, { field: 'name' })\nexport class Product extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic productId: string;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: String, trim: true, maxlength: 100 })\n\tpublic name!: string;\n\n\t@prop({ type: String, trim: true, lowercase: true, select: false })\n\tpublic nameNormalized?: string;\n\n\t@prop({ type: String, trim: true, maxlength: 50 })\n\tpublic barcode?: string;\n\n\t@prop({ required: true, ref: () => ShopCategory })\n\tpublic shopCategory!: Ref<ShopCategory>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ type: String, enum: ProductType })\n\tpublic productType?: ProductType;\n\n\t@prop({ type: String })\n\tpublic logo?: string;\n\n\t@prop({ type: [String], default: [] })\n\tpublic images?: string[];\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: [PriceBreakdown] })\n\tpublic priceBreakdowns?: PriceBreakdown[];\n\n\t@prop({ type: String, maxlength: 500 })\n\tpublic description?: string;\n\n\t@prop({ type: [AttributeMap], default: [] })\n\tpublic attributeMaps?: AttributeMap[];\n\n\t@prop({ ref: () => Product, default: [] })\n\tpublic addons?: Ref<Product>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNutritionEnabled?: boolean;\n\n\t@prop({ type: Number, min: 0 })\n\tpublic nutritionPackSize?: number;\n\n\t@prop({ type: String })\n\tpublic nutritionPackSizeUnit?: string;\n\n\t@prop({ type: [ProductNutrition], default: [] })\n\tpublic nutritions?: ProductNutrition[];\n\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\n\tpublic dietaryTypes?: ProductDietaryType[];\n\n\t@prop({ type: Number, min: -9999, max: 9999 })\n\tpublic storedTemperature?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockEnabled?: boolean;\n\n\t@prop({ type: Number, max: 999999999 }) // isStockEnabled: true and stockQuantity < 1 means out of stock\n\tpublic stockQuantity?: number;\n\n\t/**\n\t * Optional scheduled restore timestamp.\n\t * When set along with stockQuantity < 1, the system will automatically\n\t * set the item back to in-stock once this datetime is reached.\n\t * Cleared when the item is manually restored or the schedule is cancelled.\n\t */\n\t@prop({ type: Date })\n\tpublic stockAvailableAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDrinkIncluded?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLargeItem?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPreOrderEnabled?: boolean;\n\n\t// this field needed when pre-order enabled\n\t@prop({ type: PreparingTime })\n\tpublic preparingTime?: PreparingTime;\n\n\t@prop({ type: Number, min: 0, max: 999999999 }) // 0 means, it is disable\n\tpublic orderQuantityLimit?: number;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isHidden?: boolean;\n\n\t@prop({\n\t\tref: () => ProductMarketing,\n\t\tforeignField: 'product',\n\t\tlocalField: '_id',\n\t\tjustOne: true,\n\t})\n\tpublic productMarketing?: Ref<ProductMarketing>; // Virtual reference to ProductMarketing\n\n\t@prop({ type: () => [ProductMarketingInfo], default: [] })\n\tpublic productMarketingInfo?: ProductMarketingInfo[]; // precomputed product marketing info for efficient query\n\n\t@prop({ type: () => [ExternalRef], default: [] })\n\tpublic externalRefs?: ExternalRef[];\n}\n\nfunction ensureBreakdownIds(breakdowns: any[] | undefined) {\n\tif (!breakdowns?.length) return;\n\tfor (const breakdown of breakdowns) {\n\t\tif (!breakdown.uid) breakdown.uid = randomBytes(8).toString('hex');\n\t}\n}\n\nasync function deactivateBannerForOutOfStockProduct(productId: mongoose.Types.ObjectId) {\n\tawait BannerModel.updateMany(\n\t\t{\n\t\t\tproduct: productId,\n\t\t\tstatus: Status.ACTIVE,\n\t\t\tdeletedAt: null,\n\t\t},\n\t\t{\n\t\t\t$set: { status: Status.INACTIVE },\n\t\t}\n\t);\n}\n"]}
@@ -5,9 +5,9 @@ interface AuthOptions {
5
5
  autoRefresh?: boolean;
6
6
  }
7
7
  export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
8
- req: import("http").IncomingMessage;
9
8
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
9
  tokenType: TokenType | undefined;
10
+ req: import("http").IncomingMessage;
11
11
  requestId: string | undefined;
12
12
  entity: import("../context").EntityContext | undefined;
13
13
  usedRefreshToken: boolean | undefined;
@@ -4,9 +4,9 @@ interface RoleProtectedOptions {
4
4
  allowedRoles: string[];
5
5
  }
6
6
  export declare function createRoleProtectedProcedure(options: RoleProtectedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
7
- req: import("http").IncomingMessage;
8
7
  res: import("http").ServerResponse<import("http").IncomingMessage>;
9
8
  tokenType: import("../../auth").TokenType | undefined;
9
+ req: import("http").IncomingMessage;
10
10
  requestId: string | undefined;
11
11
  entity: import("../context").EntityContext | undefined;
12
12
  usedRefreshToken: boolean | undefined;
@@ -3,9 +3,9 @@ interface PhoneVerifiedOptions {
3
3
  entityTypes: AuthEntityType[];
4
4
  }
5
5
  export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
6
- req: import("http").IncomingMessage;
7
6
  res: import("http").ServerResponse<import("http").IncomingMessage>;
8
7
  tokenType: import("../../auth").TokenType | undefined;
8
+ req: import("http").IncomingMessage;
9
9
  requestId: string | undefined;
10
10
  entity: import("../context").EntityContext | undefined;
11
11
  usedRefreshToken: boolean | undefined;
@@ -5,9 +5,9 @@ interface AuthOptions {
5
5
  autoRefresh?: boolean;
6
6
  }
7
7
  export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
8
- req: import("http").IncomingMessage;
9
8
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
9
  tokenType: TokenType | undefined;
10
+ req: import("http").IncomingMessage;
11
11
  requestId: string | undefined;
12
12
  entity: import("../context").EntityContext | undefined;
13
13
  usedRefreshToken: boolean | undefined;
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.68-test-filter-container-model
25
+ Version: 1.4.68
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.68-test-filter-container-model",
3
+ "version": "1.4.68",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
26
26
  searchFields?: string[] | undefined;
27
27
  } | undefined;
28
28
  sort?: Record<string, 1 | -1> | undefined;
29
- populate?: any;
30
29
  select?: Record<string, 0 | 1> | undefined;
30
+ populate?: any;
31
31
  query?: Record<string, any> | undefined;
32
32
  }, {
33
33
  search?: {
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
36
36
  } | undefined;
37
37
  sort?: Record<string, 1 | -1> | undefined;
38
38
  size?: number | undefined;
39
- populate?: any;
40
39
  select?: Record<string, 0 | 1> | undefined;
40
+ populate?: any;
41
41
  query?: Record<string, any> | undefined;
42
42
  page?: number | undefined;
43
43
  }>>;
@@ -736,12 +736,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
736
736
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
737
737
  }, "strip", z.ZodTypeAny, {
738
738
  _id: import("mongoose").Types.ObjectId;
739
- populate?: any;
740
739
  select?: Record<string, 0 | 1> | undefined;
740
+ populate?: any;
741
741
  }, {
742
742
  _id: string | import("mongoose").Types.ObjectId;
743
- populate?: any;
744
743
  select?: Record<string, 0 | 1> | undefined;
744
+ populate?: any;
745
745
  }>;
746
746
  export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
747
747
  export declare const GetProductByIdInputSchema: z.ZodObject<{
@@ -754,12 +754,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
754
754
  _id: import("mongoose").Types.ObjectId;
755
755
  withAttributeHiddenItems: boolean;
756
756
  withAddonsHiddenItems: boolean;
757
- populate?: any;
758
757
  select?: Record<string, 0 | 1> | undefined;
758
+ populate?: any;
759
759
  }, {
760
760
  _id: string | import("mongoose").Types.ObjectId;
761
- populate?: any;
762
761
  select?: Record<string, 0 | 1> | undefined;
762
+ populate?: any;
763
763
  withAttributeHiddenItems?: boolean | undefined;
764
764
  withAddonsHiddenItems?: boolean | undefined;
765
765
  }>;
@@ -773,15 +773,15 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
773
773
  userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
774
774
  }, "strip", z.ZodTypeAny, {
775
775
  _id: import("mongoose").Types.ObjectId;
776
- populate?: any;
777
776
  select?: Record<string, 0 | 1> | undefined;
777
+ populate?: any;
778
778
  groupByCategories?: boolean | undefined;
779
779
  getParentCategory?: boolean | undefined;
780
780
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
781
781
  }, {
782
782
  _id: string | import("mongoose").Types.ObjectId;
783
- populate?: any;
784
783
  select?: Record<string, 0 | 1> | undefined;
784
+ populate?: any;
785
785
  groupByCategories?: boolean | undefined;
786
786
  getParentCategory?: boolean | undefined;
787
787
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
@@ -791,11 +791,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
791
791
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
792
792
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
793
793
  }, "strip", z.ZodTypeAny, {
794
- populate?: any;
795
794
  select?: Record<string, 0 | 1> | undefined;
796
- }, {
797
795
  populate?: any;
796
+ }, {
798
797
  select?: Record<string, 0 | 1> | undefined;
798
+ populate?: any;
799
799
  }>>;
800
800
  export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
801
801
  export declare const GetOneQuerySchema: z.ZodObject<{
@@ -803,12 +803,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
803
803
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
804
804
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
805
805
  }, "strip", z.ZodTypeAny, {
806
- populate?: any;
807
806
  select?: Record<string, 0 | 1> | undefined;
807
+ populate?: any;
808
808
  query?: Record<string, any> | undefined;
809
809
  }, {
810
- populate?: any;
811
810
  select?: Record<string, 0 | 1> | undefined;
811
+ populate?: any;
812
812
  query?: Record<string, any> | undefined;
813
813
  }>;
814
814
  export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.68-test-filter-container-model",
3
+ "version": "1.4.68",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -23,7 +23,9 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@trpc/client": "^11.4.3",
26
- "@trpc/server": "^11.4.3"
26
+ "@trpc/server": "^11.4.3",
27
+ "@typegoose/typegoose": "^12.10.1",
28
+ "mongoose": "^8.13.0"
27
29
  },
28
30
  "dependencies": {
29
31
  "@google-cloud/secret-manager": "^5.6.0",
@@ -44,7 +46,6 @@
44
46
  "libphonenumber-js": "^1.12.8",
45
47
  "mime-types": "^3.0.1",
46
48
  "moment": "^2.30.1",
47
- "mongoose": "^8.13.0",
48
49
  "nanoid": "^5.1.5",
49
50
  "p-retry": "^7.1.0",
50
51
  "pino": "9.5.0",
@@ -62,11 +63,13 @@
62
63
  "devDependencies": {
63
64
  "@trpc/client": "^11.4.3",
64
65
  "@trpc/server": "^11.4.3",
65
- "@types/amqplib": "^0.10.8",
66
+ "@typegoose/typegoose": "^12.10.1",
66
67
  "@types/mapbox__polyline": "^1.0.5",
67
68
  "@types/mime-types": "^2.1.4",
68
69
  "@types/shortid": "^2.2.0",
70
+ "@types/amqplib": "^0.10.8",
69
71
  "@types/ws": "^8.18.1",
72
+ "mongoose": "^8.13.0",
70
73
  "prettier": "3.5.3"
71
74
  }
72
75
  }