@lyxa.ai/core 1.4.309 → 1.4.311

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 (23) hide show
  1. package/dist/libraries/llm/interfaces/common-llm-interfaces.d.ts +1 -0
  2. package/dist/libraries/llm/interfaces/common-llm-interfaces.js.map +1 -1
  3. package/dist/libraries/llm/llm-provider-service.js +1 -1
  4. package/dist/libraries/llm/llm-provider-service.js.map +1 -1
  5. package/dist/libraries/mongo/models/user.model.d.ts +1 -0
  6. package/dist/libraries/mongo/models/user.model.js +5 -0
  7. package/dist/libraries/mongo/models/user.model.js.map +1 -1
  8. package/dist/libraries/socket/events/chatlist-message-send.socket.event.d.ts +24 -24
  9. package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +70 -70
  10. package/dist/libraries/socket/events/order-actions.socket.event.d.ts +70 -70
  11. package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
  12. package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +13 -13
  13. package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +16 -16
  14. package/dist/libraries/trpc/middlewares/auth.d.ts +2 -2
  15. package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +2 -2
  16. package/dist/libraries/trpc/middlewares/phone-verified.d.ts +2 -2
  17. package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +2 -2
  18. package/dist/types/README.md +1 -1
  19. package/dist/types/package.json +1 -1
  20. package/dist/types/utilities/validation/common-validation.d.ts +12 -12
  21. package/dist/utilities/pagination.d.ts +3 -3
  22. package/dist/utilities/validation/common-validation.d.ts +72 -72
  23. package/package.json +1 -1
@@ -21,6 +21,7 @@ export interface AiConfiguration {
21
21
  model?: string;
22
22
  instructions?: string;
23
23
  prompt?: string;
24
+ chunkSize?: number;
24
25
  }
25
26
  export interface ItemTextInput {
26
27
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"common-llm-interfaces.js","sourceRoot":"/","sources":["libraries/llm/interfaces/common-llm-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { LLMProvider } from '../llm-provider-service';\n\nexport interface IAICompletionProvider {\n\tgenerateSearchVariantsChunksInBatch(\n\t\titems: ItemTextInput[],\n\t\tmodel?: string,\n\t\tinstructions?: string,\n\t\toptions?: {\n\t\t\tchunkSize?: number;\n\t\t\tmaxArabic?: number;\n\t\t\tmaxArabizi?: number;\n\t\t\tmaxTransliteration?: number;\n\t\t\tpollIntervalMs?: number;\n\t\t\tmaxWaitMs?: number;\n\t\t}\n\t): Promise<TextVariantResult[]>;\n}\n\nexport interface TextVariantResult {\n\tid: string;\n\toriginal: string;\n\tarabic?: string[];\n\tarabizi?: string[];\n\tarabicTransliteration?: string[];\n}\n\nexport interface AiConfiguration {\n\tprovider: LLMProvider;\n\tmodel?: string;\n\tinstructions?: string;\n\tprompt?: string;\n}\n\nexport interface ItemTextInput {\n\tid: string;\n\ttext: string;\n}\n"]}
1
+ {"version":3,"file":"common-llm-interfaces.js","sourceRoot":"/","sources":["libraries/llm/interfaces/common-llm-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { LLMProvider } from '../llm-provider-service';\n\nexport interface IAICompletionProvider {\n\tgenerateSearchVariantsChunksInBatch(\n\t\titems: ItemTextInput[],\n\t\tmodel?: string,\n\t\tinstructions?: string,\n\t\toptions?: {\n\t\t\tchunkSize?: number;\n\t\t\tmaxArabic?: number;\n\t\t\tmaxArabizi?: number;\n\t\t\tmaxTransliteration?: number;\n\t\t\tpollIntervalMs?: number;\n\t\t\tmaxWaitMs?: number;\n\t\t}\n\t): Promise<TextVariantResult[]>;\n}\n\nexport interface TextVariantResult {\n\tid: string;\n\toriginal: string;\n\tarabic?: string[];\n\tarabizi?: string[];\n\tarabicTransliteration?: string[];\n}\n\nexport interface AiConfiguration {\n\tprovider: LLMProvider;\n\tmodel?: string;\n\tinstructions?: string;\n\tprompt?: string;\n\tchunkSize?: number\n}\n\nexport interface ItemTextInput {\n\tid: string;\n\ttext: string;\n}\n"]}
@@ -30,7 +30,7 @@ class LLMCompletionService {
30
30
  async generateSearchVariants(payload, aiConfigurations) {
31
31
  const provider = await this.getProvider();
32
32
  console.log(`You are using llm provider: ${this.provider} with model: ${aiConfigurations.model ?? 'gpt-5-nano'}`);
33
- return provider.generateSearchVariantsChunksInBatch(payload, aiConfigurations.model, aiConfigurations.instructions);
33
+ return provider.generateSearchVariantsChunksInBatch(payload, aiConfigurations.model, aiConfigurations.instructions, { chunkSize: aiConfigurations.chunkSize });
34
34
  }
35
35
  async getProvider() {
36
36
  if (!this.providerInstance) {
@@ -1 +1 @@
1
- {"version":3,"file":"llm-provider-service.js","sourceRoot":"/","sources":["libraries/llm/llm-provider-service.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AAOrC,+DAA+D;AAC/D,iEAAuE;AAEvE,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AAClB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAID,MAAa,oBAAoB;IAgBH;IAfrB,gBAAgB,GAAiC,IAAI,CAAC;IAE7C,SAAS,GAAyC;QAClE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,KAAK,IAAI,EAAE;YAChC,MAAM,MAAM,GAAG,MAAM,IAAA,gBAAY,GAAE,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;YACjF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACb,MAAM,IAAA,8BAAe,EAAC,iCAAiC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;YAC9E,CAAC;YACD,OAAO,IAAI,0CAAwB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC;QACD,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,KAAK,IAAI,EAAE;YAChC,MAAM,IAAA,8BAAe,EAAC,YAAY,WAAW,CAAC,MAAM,yBAAyB,CAAC,CAAC;QAChF,CAAC;KACD,CAAC;IAEF,YAA6B,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;IAAG,CAAC;IAEtD,KAAK,CAAC,sBAAsB,CAC3B,OAAwB,EACxB,gBAAiC;QAEjC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,OAAO,CAAC,GAAG,CACV,+BAA+B,IAAI,CAAC,QAAQ,gBAAgB,gBAAgB,CAAC,KAAK,IAAI,YAAY,EAAE,CACpG,CAAC;QACF,OAAO,QAAQ,CAAC,mCAAmC,CAClD,OAAO,EACP,gBAAgB,CAAC,KAAK,EACtB,gBAAgB,CAAC,YAAY,CAC7B,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,WAAW;QACxB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9C,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,MAAM,IAAA,8BAAe,EAAC,6BAA6B,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrE,CAAC;YACD,IAAI,CAAC,gBAAgB,GAAG,MAAM,OAAO,EAAE,CAAC;QACzC,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC9B,CAAC;CACD;AA3CD,oDA2CC","sourcesContent":["import { getLibraries } from '../..';\nimport {\n\tItemTextInput,\n\tAiConfiguration,\n\tTextVariantResult,\n\tIAICompletionProvider,\n} from './interfaces/common-llm-interfaces';\nimport { badRequestError } from '../../utilities/error-common';\nimport { OpenAICompletionProvider } from './providers/openai-provider';\n\nexport enum LLMProvider {\n\tOPENAI = 'openai',\n\tGEMINI = 'gemini',\n}\n\ntype ProviderFactory = () => Promise<IAICompletionProvider>;\n\nexport class LLMCompletionService {\n\tprivate providerInstance: IAICompletionProvider | null = null;\n\n\tprivate readonly factories: Record<LLMProvider, ProviderFactory> = {\n\t\t[LLMProvider.OPENAI]: async () => {\n\t\t\tconst apiKey = await getLibraries().getSecretsService().getKey('OPENAI_API_KEY');\n\t\t\tif (!apiKey) {\n\t\t\t\tthrow badRequestError(`No API key found for provider ${LLMProvider.OPENAI}`);\n\t\t\t}\n\t\t\treturn new OpenAICompletionProvider(apiKey, 'gpt-5-mini');\n\t\t},\n\t\t[LLMProvider.GEMINI]: async () => {\n\t\t\tthrow badRequestError(`Provider ${LLMProvider.GEMINI} is not implemented yet`);\n\t\t},\n\t};\n\n\tconstructor(private readonly provider: LLMProvider) {}\n\n\tasync generateSearchVariants(\n\t\tpayload: ItemTextInput[],\n\t\taiConfigurations: AiConfiguration\n\t): Promise<TextVariantResult[]> {\n\t\tconst provider = await this.getProvider();\n\t\tconsole.log(\n\t\t\t`You are using llm provider: ${this.provider} with model: ${aiConfigurations.model ?? 'gpt-5-nano'}`\n\t\t);\n\t\treturn provider.generateSearchVariantsChunksInBatch(\n\t\t\tpayload,\n\t\t\taiConfigurations.model,\n\t\t\taiConfigurations.instructions\n\t\t);\n\t}\n\n\tprivate async getProvider(): Promise<IAICompletionProvider> {\n\t\tif (!this.providerInstance) {\n\t\t\tconst factory = this.factories[this.provider];\n\t\t\tif (!factory) {\n\t\t\t\tthrow badRequestError(`Unsupported LLM provider: ${this.provider}`);\n\t\t\t}\n\t\t\tthis.providerInstance = await factory();\n\t\t}\n\t\treturn this.providerInstance;\n\t}\n}"]}
1
+ {"version":3,"file":"llm-provider-service.js","sourceRoot":"/","sources":["libraries/llm/llm-provider-service.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AAOrC,+DAA+D;AAC/D,iEAAuE;AAEvE,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AAClB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAID,MAAa,oBAAoB;IAgBH;IAfrB,gBAAgB,GAAiC,IAAI,CAAC;IAE7C,SAAS,GAAyC;QAClE,C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C,QAAQ,EAAE,CAAC,CAAC;YACrE,CAAC;YACD,IAAI,CAAC,gBAAgB,GAAG,MAAM,OAAO,EAAE,CAAC;QACzC,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC9B,CAAC;CACD;AA5CD,oDA4CC","sourcesContent":["import { getLibraries } from '../..';\nimport {\n\tItemTextInput,\n\tAiConfiguration,\n\tTextVariantResult,\n\tIAICompletionProvider,\n} from './interfaces/common-llm-interfaces';\nimport { badRequestError } from '../../utilities/error-common';\nimport { OpenAICompletionProvider } from './providers/openai-provider';\n\nexport enum LLMProvider {\n\tOPENAI = 'openai',\n\tGEMINI = 'gemini',\n}\n\ntype ProviderFactory = () => Promise<IAICompletionProvider>;\n\nexport class LLMCompletionService {\n\tprivate providerInstance: IAICompletionProvider | null = null;\n\n\tprivate readonly factories: Record<LLMProvider, ProviderFactory> = {\n\t\t[LLMProvider.OPENAI]: async () => {\n\t\t\tconst apiKey = await getLibraries().getSecretsService().getKey('OPENAI_API_KEY');\n\t\t\tif (!apiKey) {\n\t\t\t\tthrow badRequestError(`No API key found for provider ${LLMProvider.OPENAI}`);\n\t\t\t}\n\t\t\treturn new OpenAICompletionProvider(apiKey, 'gpt-5-mini');\n\t\t},\n\t\t[LLMProvider.GEMINI]: async () => {\n\t\t\tthrow badRequestError(`Provider ${LLMProvider.GEMINI} is not implemented yet`);\n\t\t},\n\t};\n\n\tconstructor(private readonly provider: LLMProvider) {}\n\n\tasync generateSearchVariants(\n\t\tpayload: ItemTextInput[],\n\t\taiConfigurations: AiConfiguration\n\t): Promise<TextVariantResult[]> {\n\t\tconst provider = await this.getProvider();\n\t\tconsole.log(\n\t\t\t`You are using llm provider: ${this.provider} with model: ${aiConfigurations.model ?? 'gpt-5-nano'}`\n\t\t);\n\t\treturn provider.generateSearchVariantsChunksInBatch(\n\t\t\tpayload,\n\t\t\taiConfigurations.model,\n\t\t\taiConfigurations.instructions,\n\t\t\t{ chunkSize: aiConfigurations.chunkSize }\n\t\t);\n\t}\n\n\tprivate async getProvider(): Promise<IAICompletionProvider> {\n\t\tif (!this.providerInstance) {\n\t\t\tconst factory = this.factories[this.provider];\n\t\t\tif (!factory) {\n\t\t\t\tthrow badRequestError(`Unsupported LLM provider: ${this.provider}`);\n\t\t\t}\n\t\t\tthis.providerInstance = await factory();\n\t\t}\n\t\treturn this.providerInstance;\n\t}\n}"]}
@@ -29,6 +29,7 @@ export declare class User extends TimeStamps {
29
29
  isPhoneVerified?: boolean;
30
30
  onlineStatus?: OnlineStatus;
31
31
  receiveTicketAgentNotification?: boolean;
32
+ receiveOrderAgentNotification?: boolean;
32
33
  fcmTokens?: string[];
33
34
  wallet?: Wallet;
34
35
  static updateWallet(this: ReturnModelType<typeof User>, userId: string, main?: number, reserve?: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject, {}> & Omit<User & {
@@ -42,6 +42,7 @@ let User = User_1 = class User extends defaultClasses_1.TimeStamps {
42
42
  isPhoneVerified;
43
43
  onlineStatus;
44
44
  receiveTicketAgentNotification;
45
+ receiveOrderAgentNotification;
45
46
  fcmTokens;
46
47
  wallet;
47
48
  static async updateWallet(userId, main = 0, reserve = 0) {
@@ -133,6 +134,10 @@ __decorate([
133
134
  (0, typegoose_1.prop)({ type: Boolean, default: false }),
134
135
  __metadata("design:type", Boolean)
135
136
  ], User.prototype, "receiveTicketAgentNotification", void 0);
137
+ __decorate([
138
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
139
+ __metadata("design:type", Boolean)
140
+ ], User.prototype, "receiveOrderAgentNotification", void 0);
136
141
  __decorate([
137
142
  (0, typegoose_1.prop)({ type: () => [String], default: [] }),
138
143
  __metadata("design:type", Array)
@@ -1 +1 @@
1
- {"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,u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IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,4BAAS,EAAE,CAAC;8BACV,4BAAS;0CAAC;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CACP;AAO1B;IALN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,mBAAY;QAClB,OAAO,EAAE,mBAAY,CAAC,OAAO;KAC7B,CAAC;;0CACiC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;4DACQ;AAGzC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uCAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,qBAAM,EAAE,CAAC;8BACP,qBAAM;oCAAC;eArEX,IAAI;IAPhB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;IACxD,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,iBAAK,EAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACrC,IAAA,iBAAK,EACL,EAAE,WAAW,EAAE,CAAC,EAAE,EAClB,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CACzG;GACY,IAAI,CAmFhB","sourcesContent":["import { index, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CoreUser } from './core-user.model';\nimport { UserAddress } from './shared/address.model';\nimport { Coupon } from './coupon.model';\nimport { Subscription } from './subscription.model';\nimport { OnlineStatus } from '../../../utilities/enum';\nimport { OTPFields } from './embedded/otp-fields.model';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { Wallet } from './embedded/wallet.model';\n\n@modelOptions({ schemaOptions: { collection: 'users' } })\n@index({ location: '2dsphere' })\n@index({ createdAt: 1, addresses: 1 })\n@index(\n\t{ phoneNumber: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null, phoneNumber: { $exists: true, $ne: null } } }\n)\nexport class User extends TimeStamps {\n\t@prop({ required: true, ref: () => CoreUser })\n\tpublic coreUser!: Ref<CoreUser>;\n\n\t@prop({ type: () => String })\n\tpublic deviceId?: string;\n\n\t@prop({ type: () => [UserAddress], default: [] })\n\tpublic addresses?: UserAddress[];\n\n\t@prop({ type: GeoLocation }) // Last order location for finding user zone\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic orderCompleted?: number;\n\n\t@prop({ type: Date })\n\tpublic repeatedOrderAt?: Date;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupons?: Ref<Coupon>[];\n\n\t@prop({ type: String })\n\tpublic newUserCouponDiscountType?: string;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponValue?: number;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponMaximumDiscountLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNewUserCouponShowed?: boolean;\n\n\t@prop({ ref: () => Coupon })\n\tpublic referralCode?: Ref<Coupon>;\n\n\t@prop({ type: String, ref: () => Subscription })\n\tpublic subscription?: Ref<Subscription>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSubscribed?: boolean;\n\n\t@prop({ type: String })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: String })\n\tpublic pendingPhoneNumber?: string;\n\n\t@prop({ type: () => OTPFields })\n\tpublic phoneOtpInfo?: OTPFields;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPhoneVerified?: boolean;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: OnlineStatus,\n\t\tdefault: OnlineStatus.OFFLINE,\n\t})\n\tpublic onlineStatus?: OnlineStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveTicketAgentNotification?: boolean;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmTokens?: string[];\n\n\t@prop({ type: Wallet })\n\tpublic wallet?: Wallet;\n\n\tpublic static async updateWallet(\n\t\tthis: ReturnModelType<typeof User>,\n\t\tuserId: string,\n\t\tmain = 0,\n\t\treserve = 0\n\t) {\n\t\treturn this.findByIdAndUpdate(\n\t\t\tuserId,\n\t\t\t{ $inc: { 'wallet.main': main, 'wallet.reserve': reserve, 'wallet.total': main + reserve } },\n\t\t\t{ new: true }\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAuD;AACvD,kEAAwD;AACxD,oEAA0D;AAC1D,0DAAiD;AAS1C,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,QAAQ,CAAiB;IAGzB,QAAQ,CAAU;IAGlB,SAAS,CAAiB;IAG1B,QAAQ,CAAe;IAGvB,cAAc,CAAU;IAGxB,eAAe,CAAQ;IAGvB,OAAO,CAAiB;IAGxB,yBAAyB,CAAU;IAGnC,kBAAkB,CAAU;IAG5B,iCAAiC,CAAU;IAG3C,qBAAqB,CAAW;IAGhC,YAAY,CAAe;IAG3B,YAAY,CAAqB;IAGjC,YAAY,CAAW;IAGvB,WAAW,CAAU;IAGrB,kBAAkB,CAAU;IAG5B,YAAY,CAAa;IAGzB,eAAe,CAAW;IAO1B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,EAAE,CAAC;;2DACO;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uCAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,qBAAM,EAAE,CAAC;8BACP,qBAAM;oCAAC;eAxEX,IAAI;IAPhB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;IACxD,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,iBAAK,EAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACrC,IAAA,iBAAK,EACL,EAAE,WAAW,EAAE,CAAC,EAAE,EAClB,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CACzG;GACY,IAAI,CAsFhB","sourcesContent":["import { index, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CoreUser } from './core-user.model';\nimport { UserAddress } from './shared/address.model';\nimport { Coupon } from './coupon.model';\nimport { Subscription } from './subscription.model';\nimport { OnlineStatus } from '../../../utilities/enum';\nimport { OTPFields } from './embedded/otp-fields.model';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { Wallet } from './embedded/wallet.model';\n\n@modelOptions({ schemaOptions: { collection: 'users' } })\n@index({ location: '2dsphere' })\n@index({ createdAt: 1, addresses: 1 })\n@index(\n\t{ phoneNumber: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null, phoneNumber: { $exists: true, $ne: null } } }\n)\nexport class User extends TimeStamps {\n\t@prop({ required: true, ref: () => CoreUser })\n\tpublic coreUser!: Ref<CoreUser>;\n\n\t@prop({ type: () => String })\n\tpublic deviceId?: string;\n\n\t@prop({ type: () => [UserAddress], default: [] })\n\tpublic addresses?: UserAddress[];\n\n\t@prop({ type: GeoLocation }) // Last order location for finding user zone\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic orderCompleted?: number;\n\n\t@prop({ type: Date })\n\tpublic repeatedOrderAt?: Date;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupons?: Ref<Coupon>[];\n\n\t@prop({ type: String })\n\tpublic newUserCouponDiscountType?: string;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponValue?: number;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponMaximumDiscountLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNewUserCouponShowed?: boolean;\n\n\t@prop({ ref: () => Coupon })\n\tpublic referralCode?: Ref<Coupon>;\n\n\t@prop({ type: String, ref: () => Subscription })\n\tpublic subscription?: Ref<Subscription>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSubscribed?: boolean;\n\n\t@prop({ type: String })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: String })\n\tpublic pendingPhoneNumber?: string;\n\n\t@prop({ type: () => OTPFields })\n\tpublic phoneOtpInfo?: OTPFields;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPhoneVerified?: boolean;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: OnlineStatus,\n\t\tdefault: OnlineStatus.OFFLINE,\n\t})\n\tpublic onlineStatus?: OnlineStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveTicketAgentNotification?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveOrderAgentNotification?: boolean;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmTokens?: string[];\n\n\t@prop({ type: Wallet })\n\tpublic wallet?: Wallet;\n\n\tpublic static async updateWallet(\n\t\tthis: ReturnModelType<typeof User>,\n\t\tuserId: string,\n\t\tmain = 0,\n\t\treserve = 0\n\t) {\n\t\treturn this.findByIdAndUpdate(\n\t\t\tuserId,\n\t\t\t{ $inc: { 'wallet.main': main, 'wallet.reserve': reserve, 'wallet.total': main + reserve } },\n\t\t\t{ new: true }\n\t\t);\n\t}\n}\n"]}
@@ -11,31 +11,31 @@ export declare const ChatlistMessageSendSocketOutputSchema: z.ZodObject<{
11
11
  content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
12
12
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
13
13
  }, "strip", z.ZodTypeAny, {
14
- content: string;
15
14
  createdAt: Date;
16
- }, {
17
15
  content: string;
16
+ }, {
18
17
  createdAt: Date;
18
+ content: string;
19
19
  }>>;
20
20
  unreadCount: z.ZodNumber;
21
21
  status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
22
22
  }, "strip", z.ZodTypeAny, {
23
- chatroomId: import("mongoose").Types.ObjectId;
24
23
  unreadCount: number;
24
+ chatroomId: import("mongoose").Types.ObjectId;
25
25
  status?: TicketStatus | undefined;
26
26
  orderId?: import("mongoose").Types.ObjectId | undefined;
27
27
  lastMessage?: {
28
- content: string;
29
28
  createdAt: Date;
29
+ content: string;
30
30
  } | undefined;
31
31
  }, {
32
- chatroomId: import("mongoose").Types.ObjectId;
33
32
  unreadCount: number;
33
+ chatroomId: import("mongoose").Types.ObjectId;
34
34
  status?: TicketStatus | undefined;
35
35
  orderId?: import("mongoose").Types.ObjectId | undefined;
36
36
  lastMessage?: {
37
- content: string;
38
37
  createdAt: Date;
38
+ content: string;
39
39
  } | undefined;
40
40
  }>;
41
41
  export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
@@ -45,31 +45,31 @@ export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
45
45
  content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
46
46
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
47
47
  }, "strip", z.ZodTypeAny, {
48
- content: string;
49
48
  createdAt: Date;
50
- }, {
51
49
  content: string;
50
+ }, {
52
51
  createdAt: Date;
52
+ content: string;
53
53
  }>>;
54
54
  unreadCount: z.ZodNumber;
55
55
  status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
56
56
  }, "strip", z.ZodTypeAny, {
57
- chatroomId: import("mongoose").Types.ObjectId;
58
57
  unreadCount: number;
58
+ chatroomId: import("mongoose").Types.ObjectId;
59
59
  status?: TicketStatus | undefined;
60
60
  orderId?: import("mongoose").Types.ObjectId | undefined;
61
61
  lastMessage?: {
62
- content: string;
63
62
  createdAt: Date;
63
+ content: string;
64
64
  } | undefined;
65
65
  }, {
66
- chatroomId: import("mongoose").Types.ObjectId;
67
66
  unreadCount: number;
67
+ chatroomId: import("mongoose").Types.ObjectId;
68
68
  status?: TicketStatus | undefined;
69
69
  orderId?: import("mongoose").Types.ObjectId | undefined;
70
70
  lastMessage?: {
71
- content: string;
72
71
  createdAt: Date;
72
+ content: string;
73
73
  } | undefined;
74
74
  }>;
75
75
  export type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatlistMessageSendPushOutputSchema>;
@@ -85,31 +85,31 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
85
85
  content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
86
86
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
87
87
  }, "strip", z.ZodTypeAny, {
88
- content: string;
89
88
  createdAt: Date;
90
- }, {
91
89
  content: string;
90
+ }, {
92
91
  createdAt: Date;
92
+ content: string;
93
93
  }>>;
94
94
  unreadCount: z.ZodNumber;
95
95
  status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
96
96
  }, "strip", z.ZodTypeAny, {
97
- chatroomId: import("mongoose").Types.ObjectId;
98
97
  unreadCount: number;
98
+ chatroomId: import("mongoose").Types.ObjectId;
99
99
  status?: TicketStatus | undefined;
100
100
  orderId?: import("mongoose").Types.ObjectId | undefined;
101
101
  lastMessage?: {
102
- content: string;
103
102
  createdAt: Date;
103
+ content: string;
104
104
  } | undefined;
105
105
  }, {
106
- chatroomId: import("mongoose").Types.ObjectId;
107
106
  unreadCount: number;
107
+ chatroomId: import("mongoose").Types.ObjectId;
108
108
  status?: TicketStatus | undefined;
109
109
  orderId?: import("mongoose").Types.ObjectId | undefined;
110
110
  lastMessage?: {
111
- content: string;
112
111
  createdAt: Date;
112
+ content: string;
113
113
  } | undefined;
114
114
  }>;
115
115
  pushNotificationOutput: z.ZodObject<{
@@ -119,31 +119,31 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
119
119
  content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
120
120
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
121
121
  }, "strip", z.ZodTypeAny, {
122
- content: string;
123
122
  createdAt: Date;
124
- }, {
125
123
  content: string;
124
+ }, {
126
125
  createdAt: Date;
126
+ content: string;
127
127
  }>>;
128
128
  unreadCount: z.ZodNumber;
129
129
  status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
130
130
  }, "strip", z.ZodTypeAny, {
131
- chatroomId: import("mongoose").Types.ObjectId;
132
131
  unreadCount: number;
132
+ chatroomId: import("mongoose").Types.ObjectId;
133
133
  status?: TicketStatus | undefined;
134
134
  orderId?: import("mongoose").Types.ObjectId | undefined;
135
135
  lastMessage?: {
136
- content: string;
137
136
  createdAt: Date;
137
+ content: string;
138
138
  } | undefined;
139
139
  }, {
140
- chatroomId: import("mongoose").Types.ObjectId;
141
140
  unreadCount: number;
141
+ chatroomId: import("mongoose").Types.ObjectId;
142
142
  status?: TicketStatus | undefined;
143
143
  orderId?: import("mongoose").Types.ObjectId | undefined;
144
144
  lastMessage?: {
145
- content: string;
146
145
  createdAt: Date;
146
+ content: string;
147
147
  } | undefined;
148
148
  }>;
149
149
  };
@@ -21,12 +21,12 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
21
21
  type: z.ZodNativeEnum<typeof UserRef>;
22
22
  }, "strip", z.ZodTypeAny, {
23
23
  type: UserRef;
24
- id: import("mongoose").Types.ObjectId;
25
24
  name: string;
25
+ id: import("mongoose").Types.ObjectId;
26
26
  }, {
27
27
  type: UserRef;
28
- id: import("mongoose").Types.ObjectId;
29
28
  name: string;
29
+ id: import("mongoose").Types.ObjectId;
30
30
  }>;
31
31
  content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
32
32
  media: z.ZodArray<z.ZodObject<{
@@ -36,15 +36,15 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
36
36
  thumbnailUrl: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
37
37
  name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
38
38
  }, "strip", z.ZodTypeAny, {
39
- mimeType: string;
40
- mediaType: MediaType;
41
39
  mediaUrl: string;
40
+ mediaType: MediaType;
41
+ mimeType: string;
42
42
  name?: string | undefined;
43
43
  thumbnailUrl?: string | undefined;
44
44
  }, {
45
- mimeType: string;
46
- mediaType: MediaType;
47
45
  mediaUrl: string;
46
+ mediaType: MediaType;
47
+ mimeType: string;
48
48
  name?: string | undefined;
49
49
  thumbnailUrl?: string | undefined;
50
50
  }>, "many">;
@@ -52,11 +52,11 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
52
52
  longitude: z.ZodOptional<z.ZodNumber>;
53
53
  latitude: z.ZodOptional<z.ZodNumber>;
54
54
  }, "strip", z.ZodTypeAny, {
55
- longitude?: number | undefined;
56
55
  latitude?: number | undefined;
57
- }, {
58
56
  longitude?: number | undefined;
57
+ }, {
59
58
  latitude?: number | undefined;
59
+ longitude?: number | undefined;
60
60
  }>>;
61
61
  ticketId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
62
62
  chatroomId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
@@ -64,56 +64,56 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
64
64
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  _id: import("mongoose").Types.ObjectId;
67
- chatroomType: ChatroomType;
68
- senderId: import("mongoose").Types.ObjectId;
69
- senderType: UserRef;
67
+ createdAt: Date;
70
68
  sender: {
71
69
  type: UserRef;
72
- id: import("mongoose").Types.ObjectId;
73
70
  name: string;
71
+ id: import("mongoose").Types.ObjectId;
74
72
  };
73
+ senderType: UserRef;
75
74
  media: {
76
- mimeType: string;
77
- mediaType: MediaType;
78
75
  mediaUrl: string;
76
+ mediaType: MediaType;
77
+ mimeType: string;
79
78
  name?: string | undefined;
80
79
  thumbnailUrl?: string | undefined;
81
80
  }[];
82
- createdAt: Date;
83
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
84
- content?: string | undefined;
81
+ chatroomType: ChatroomType;
82
+ senderId: import("mongoose").Types.ObjectId;
85
83
  location?: {
86
- longitude?: number | undefined;
87
84
  latitude?: number | undefined;
85
+ longitude?: number | undefined;
88
86
  } | undefined;
89
- ticketId?: import("mongoose").Types.ObjectId | undefined;
90
87
  orderId?: import("mongoose").Types.ObjectId | undefined;
88
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
89
+ content?: string | undefined;
90
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
91
91
  }, {
92
92
  _id: import("mongoose").Types.ObjectId;
93
- chatroomType: ChatroomType;
94
- senderId: import("mongoose").Types.ObjectId;
95
- senderType: UserRef;
93
+ createdAt: Date;
96
94
  sender: {
97
95
  type: UserRef;
98
- id: import("mongoose").Types.ObjectId;
99
96
  name: string;
97
+ id: import("mongoose").Types.ObjectId;
100
98
  };
99
+ senderType: UserRef;
101
100
  media: {
102
- mimeType: string;
103
- mediaType: MediaType;
104
101
  mediaUrl: string;
102
+ mediaType: MediaType;
103
+ mimeType: string;
105
104
  name?: string | undefined;
106
105
  thumbnailUrl?: string | undefined;
107
106
  }[];
108
- createdAt: Date;
109
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
110
- content?: string | undefined;
107
+ chatroomType: ChatroomType;
108
+ senderId: import("mongoose").Types.ObjectId;
111
109
  location?: {
112
- longitude?: number | undefined;
113
110
  latitude?: number | undefined;
111
+ longitude?: number | undefined;
114
112
  } | undefined;
115
- ticketId?: import("mongoose").Types.ObjectId | undefined;
116
113
  orderId?: import("mongoose").Types.ObjectId | undefined;
114
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
115
+ content?: string | undefined;
116
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
117
117
  }>;
118
118
  export declare const ChatroomMessageSendPushOutputSchema: z.ZodObject<{
119
119
  lastMessage: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
@@ -123,16 +123,16 @@ export declare const ChatroomMessageSendPushOutputSchema: z.ZodObject<{
123
123
  type: z.ZodNativeEnum<typeof ChatroomType>;
124
124
  }, "strip", z.ZodTypeAny, {
125
125
  type: ChatroomType;
126
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
127
- ticketId?: import("mongoose").Types.ObjectId | undefined;
128
126
  orderId?: import("mongoose").Types.ObjectId | undefined;
127
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
129
128
  lastMessage?: string | undefined;
129
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
130
130
  }, {
131
131
  type: ChatroomType;
132
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
133
- ticketId?: import("mongoose").Types.ObjectId | undefined;
134
132
  orderId?: import("mongoose").Types.ObjectId | undefined;
133
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
135
134
  lastMessage?: string | undefined;
135
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
136
136
  }>;
137
137
  export type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;
138
138
  export type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;
@@ -157,12 +157,12 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
157
157
  type: z.ZodNativeEnum<typeof UserRef>;
158
158
  }, "strip", z.ZodTypeAny, {
159
159
  type: UserRef;
160
- id: import("mongoose").Types.ObjectId;
161
160
  name: string;
161
+ id: import("mongoose").Types.ObjectId;
162
162
  }, {
163
163
  type: UserRef;
164
- id: import("mongoose").Types.ObjectId;
165
164
  name: string;
165
+ id: import("mongoose").Types.ObjectId;
166
166
  }>;
167
167
  content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
168
168
  media: z.ZodArray<z.ZodObject<{
@@ -172,15 +172,15 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
172
172
  thumbnailUrl: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
173
173
  name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
174
174
  }, "strip", z.ZodTypeAny, {
175
- mimeType: string;
176
- mediaType: MediaType;
177
175
  mediaUrl: string;
176
+ mediaType: MediaType;
177
+ mimeType: string;
178
178
  name?: string | undefined;
179
179
  thumbnailUrl?: string | undefined;
180
180
  }, {
181
- mimeType: string;
182
- mediaType: MediaType;
183
181
  mediaUrl: string;
182
+ mediaType: MediaType;
183
+ mimeType: string;
184
184
  name?: string | undefined;
185
185
  thumbnailUrl?: string | undefined;
186
186
  }>, "many">;
@@ -188,11 +188,11 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
188
188
  longitude: z.ZodOptional<z.ZodNumber>;
189
189
  latitude: z.ZodOptional<z.ZodNumber>;
190
190
  }, "strip", z.ZodTypeAny, {
191
- longitude?: number | undefined;
192
191
  latitude?: number | undefined;
193
- }, {
194
192
  longitude?: number | undefined;
193
+ }, {
195
194
  latitude?: number | undefined;
195
+ longitude?: number | undefined;
196
196
  }>>;
197
197
  ticketId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
198
198
  chatroomId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
@@ -200,56 +200,56 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
200
200
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
201
201
  }, "strip", z.ZodTypeAny, {
202
202
  _id: import("mongoose").Types.ObjectId;
203
- chatroomType: ChatroomType;
204
- senderId: import("mongoose").Types.ObjectId;
205
- senderType: UserRef;
203
+ createdAt: Date;
206
204
  sender: {
207
205
  type: UserRef;
208
- id: import("mongoose").Types.ObjectId;
209
206
  name: string;
207
+ id: import("mongoose").Types.ObjectId;
210
208
  };
209
+ senderType: UserRef;
211
210
  media: {
212
- mimeType: string;
213
- mediaType: MediaType;
214
211
  mediaUrl: string;
212
+ mediaType: MediaType;
213
+ mimeType: string;
215
214
  name?: string | undefined;
216
215
  thumbnailUrl?: string | undefined;
217
216
  }[];
218
- createdAt: Date;
219
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
220
- content?: string | undefined;
217
+ chatroomType: ChatroomType;
218
+ senderId: import("mongoose").Types.ObjectId;
221
219
  location?: {
222
- longitude?: number | undefined;
223
220
  latitude?: number | undefined;
221
+ longitude?: number | undefined;
224
222
  } | undefined;
225
- ticketId?: import("mongoose").Types.ObjectId | undefined;
226
223
  orderId?: import("mongoose").Types.ObjectId | undefined;
224
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
225
+ content?: string | undefined;
226
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
227
227
  }, {
228
228
  _id: import("mongoose").Types.ObjectId;
229
- chatroomType: ChatroomType;
230
- senderId: import("mongoose").Types.ObjectId;
231
- senderType: UserRef;
229
+ createdAt: Date;
232
230
  sender: {
233
231
  type: UserRef;
234
- id: import("mongoose").Types.ObjectId;
235
232
  name: string;
233
+ id: import("mongoose").Types.ObjectId;
236
234
  };
235
+ senderType: UserRef;
237
236
  media: {
238
- mimeType: string;
239
- mediaType: MediaType;
240
237
  mediaUrl: string;
238
+ mediaType: MediaType;
239
+ mimeType: string;
241
240
  name?: string | undefined;
242
241
  thumbnailUrl?: string | undefined;
243
242
  }[];
244
- createdAt: Date;
245
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
246
- content?: string | undefined;
243
+ chatroomType: ChatroomType;
244
+ senderId: import("mongoose").Types.ObjectId;
247
245
  location?: {
248
- longitude?: number | undefined;
249
246
  latitude?: number | undefined;
247
+ longitude?: number | undefined;
250
248
  } | undefined;
251
- ticketId?: import("mongoose").Types.ObjectId | undefined;
252
249
  orderId?: import("mongoose").Types.ObjectId | undefined;
250
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
251
+ content?: string | undefined;
252
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
253
253
  }>;
254
254
  pushNotificationOutput: z.ZodObject<{
255
255
  lastMessage: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
@@ -259,16 +259,16 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
259
259
  type: z.ZodNativeEnum<typeof ChatroomType>;
260
260
  }, "strip", z.ZodTypeAny, {
261
261
  type: ChatroomType;
262
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
263
- ticketId?: import("mongoose").Types.ObjectId | undefined;
264
262
  orderId?: import("mongoose").Types.ObjectId | undefined;
263
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
265
264
  lastMessage?: string | undefined;
265
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
266
266
  }, {
267
267
  type: ChatroomType;
268
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
269
- ticketId?: import("mongoose").Types.ObjectId | undefined;
270
268
  orderId?: import("mongoose").Types.ObjectId | undefined;
269
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
271
270
  lastMessage?: string | undefined;
271
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
272
272
  }>;
273
273
  };
274
274
  get notificationSettings(): NotificationSettings | undefined;
@@ -277,10 +277,10 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
277
277
  static identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string;
278
278
  getPushNotificationPayload(): {
279
279
  type: ChatroomType;
280
- chatroomId?: import("mongoose").Types.ObjectId | undefined;
281
- ticketId?: import("mongoose").Types.ObjectId | undefined;
282
280
  orderId?: import("mongoose").Types.ObjectId | undefined;
281
+ ticketId?: import("mongoose").Types.ObjectId | undefined;
283
282
  lastMessage?: string | undefined;
283
+ chatroomId?: import("mongoose").Types.ObjectId | undefined;
284
284
  } | undefined;
285
285
  protected getIdentifier(): string;
286
286
  }