@lyxa.ai/core 1.3.166 → 1.3.168

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.
@@ -20,8 +20,8 @@ export declare class AdjustmentInformation {
20
20
  }
21
21
  export declare class AdjustmentHistory {
22
22
  suggestedProduct?: Map<string, Ref<Product>[]>;
23
- adjustedLineItems?: Ref<LineItem>[];
24
- addedLineItems?: Ref<LineItem>[];
23
+ adjustedLineItems?: AdjustedLineItem[];
24
+ addedLineItems?: AdjustedLineItem[];
25
25
  timestamp?: Date;
26
26
  adjustmentType?: AdjustmentType;
27
27
  adjustmentRef: string;
@@ -91,11 +91,11 @@ __decorate([
91
91
  __metadata("design:type", Map)
92
92
  ], AdjustmentHistory.prototype, "suggestedProduct", void 0);
93
93
  __decorate([
94
- (0, typegoose_1.prop)({ ref: () => line_item_model_1.LineItem, default: [] }),
94
+ (0, typegoose_1.prop)({ type: () => [AdjustedLineItem], default: [] }),
95
95
  __metadata("design:type", Array)
96
96
  ], AdjustmentHistory.prototype, "adjustedLineItems", void 0);
97
97
  __decorate([
98
- (0, typegoose_1.prop)({ ref: () => line_item_model_1.LineItem, default: [] }),
98
+ (0, typegoose_1.prop)({ type: () => [AdjustedLineItem], default: [] }),
99
99
  __metadata("design:type", Array)
100
100
  ], AdjustmentHistory.prototype, "addedLineItems", void 0);
101
101
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/adjustment-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,qDAAgG;AAEhG,wDAA8C;AAC9C,gDAAuC;AACvC,uCAAiC;AAEjC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;IAGd,gBAAgB,CAAoB;IAGpC,gBAAgB,CAAU;CACjC;AAZD,4CAYC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IA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AdjustmentType } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\nimport { Types } from 'mongoose';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: AdjustmentStatus })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\n}\n\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\n}\n\nexport class AdjustmentHistory {\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic adjustedLineItems?: Ref<LineItem>[];\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic addedLineItems?: Ref<LineItem>[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ type: String, enum: AdjustmentType })\n\tpublic adjustmentType?: AdjustmentType;\n\n\t@prop({ required: true, type: String })\n\tpublic adjustmentRef!: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n}\n"]}
1
+ {"version":3,"file":"adjustment-information.model.js","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IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAc,EAAE,CAAC;;yDACN;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACT;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;gDACD","sourcesContent":["import { prop, PropType, Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason, AdjustmentStatus, AdjustmentType } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\nimport { Types } from 'mongoose';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: AdjustmentStatus })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\n}\n\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\n}\n\nexport class AdjustmentHistory {\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic addedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ type: String, enum: AdjustmentType })\n\tpublic adjustmentType?: AdjustmentType;\n\n\t@prop({ required: true, type: String })\n\tpublic adjustmentRef!: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n}\n"]}
@@ -72,7 +72,7 @@ class ChatroomMessageSendSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
72
72
  super(enum_1.SocketEventType.CHATROOM_MESSAGE_SEND, ChatroomMessageSendSocketEvent.schemas, payload, pushPayload, socketNotificationEvent);
73
73
  }
74
74
  getTitle() {
75
- if (this.payload().sender.name === 'Customer Support') {
75
+ if (this.payload().sender.name === 'agent') {
76
76
  return 'Customer Support';
77
77
  }
78
78
  return this.payload().senderType === enum_1.UserRef.RIDER
@@ -1 +1 @@
1
- {"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAuG;AACvG,8DAA6E;AAC7E,wDAAqD;AAErD,kCAAuC;AAE1B,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,qBAAQ;CACpB,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;IACzC,YAAY,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,cAAc,CAAC;IAClE,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;IACnD,UAAU,EAAE,0BAAa,CAAC,QAAQ,CAAC,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I,CAAC,OAAO,EAAE,CAAC,UAAU,KAAK,cAAO,CAAC,KAAK;YACjD,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,IAAI;YAC5B,CAAC,CAAC,0BAA0B,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAA2D;QAC5E,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;IAEM,0BAA0B;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAES,aAAa;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,SAAS,CAAC;IACtD,CAAC;;AA7DF,wEA8DC","sourcesContent":["import z from 'zod';\nimport { ChatroomType, ClickType, MediaType, SocketEventType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\nimport { EventFactory } from '../core';\n\nexport const ChatroomMessageSendSocketInputSchema = z.object({\n\tchatroomId: IdSchema,\n});\n\nexport const ChatroomMessageSendOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId('_id'),\n\tchatroomType: ZodValidation.enumType(ChatroomType, 'chatroomType'),\n\tsenderId: ZodValidation.coerce.objectId('senderId'), // DEPRECATED\n\tsenderType: ZodValidation.enumType(UserRef, 'senderType'), // DEPRECATED\n\tsender: z.object({\n\t\tid: ZodValidation.coerce.objectId('sender.id'),\n\t\tname: ZodValidation.string('senderName'),\n\t\ttype: ZodValidation.enumType(UserRef, 'sender.type'),\n\t}),\n\tcontent: ZodValidation.string('content').optional(),\n\tmedia: z.array(\n\t\tz.object({\n\t\t\tmimeType: ZodValidation.string('mimeType'),\n\t\t\tmediaType: ZodValidation.enumType(MediaType, 'mediaType'),\n\t\t\tmediaUrl: ZodValidation.string('url'),\n\t\t\tthumbnailUrl: ZodValidation.string('thumbnailUrl').optional(),\n\t\t\tname: ZodValidation.string('name').optional(),\n\t\t})\n\t),\n\tlocation: z\n\t\t.object({\n\t\t\tlongitude: ZodValidation.coerce.number('longitude').optional(),\n\t\t\tlatitude: ZodValidation.coerce.number('latitude').optional(),\n\t\t})\n\t\t.optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport const ChatroomMessageSendPushOutputSchema = z.object({\n\tlastMessage: ZodValidation.string('lastMessage').optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\ttype: ZodValidation.enumType(ChatroomType, 'type'),\n});\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;\n\nexport type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;\nexport type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;\n\nexport class ChatroomMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatroomMessageSendSocketInputSchema,\n\ttypeof ChatroomMessageSendOutputSchema,\n\ttypeof ChatroomMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t\tpushNotificationOutput: ChatroomMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t\ttitle: this.getTitle(),\n\t\t};\n\t}\n\n\tconstructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\tconst pushPayload: ChatlistMessageSendPushOutputDTO = {\n\t\t\tlastMessage: payload.content,\n\t\t\tchatroomId: payload.chatroomId,\n\t\t\ttype: payload.chatroomType,\n\t\t};\n\n\t\tconst socketNotificationEvent = EventFactory.createEvent(SocketEventType.NOTIFICATION, {\n\t\t\tmessage: 'New message!',\n\t\t\tnotificationType: SocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\t_id: payload._id,\n\t\t});\n\n\t\tsuper(\n\t\t\tSocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\tChatroomMessageSendSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tpushPayload,\n\t\t\tsocketNotificationEvent\n\t\t);\n\t}\n\n\tprivate getTitle(): string {\n\t\tif (this.payload().sender.name === 'Customer Support') {\n\t\t\treturn 'Customer Support';\n\t\t}\n\t\treturn this.payload().senderType === UserRef.RIDER\n\t\t\t? this.payload().sender.name\n\t\t\t: 'New message from support';\n\t}\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\n\t}\n\n\tpublic getPushNotificationPayload() {\n\t\treturn this.pushNotificationData;\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn this.data.chatroomId?.toString() ?? 'default';\n\t}\n}\n"]}
1
+ {"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAuG;AACvG,8DAA6E;AAC7E,wDAAqD;AAErD,kCAAuC;AAE1B,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,qBAAQ;CACpB,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;IACzC,YAAY,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,cAAc,CAAC;IAClE,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;IACnD,UAAU,EAAE,0BAAa,CAAC,QAAQ,CAA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AI,CAAC,OAAO,EAAE,CAAC,UAAU,KAAK,cAAO,CAAC,KAAK;YACjD,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,IAAI;YAC5B,CAAC,CAAC,0BAA0B,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAA2D;QAC5E,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;IAEM,0BAA0B;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAES,aAAa;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,SAAS,CAAC;IACtD,CAAC;;AA7DF,wEA8DC","sourcesContent":["import z from 'zod';\nimport { ChatroomType, ClickType, MediaType, SocketEventType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\nimport { EventFactory } from '../core';\n\nexport const ChatroomMessageSendSocketInputSchema = z.object({\n\tchatroomId: IdSchema,\n});\n\nexport const ChatroomMessageSendOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId('_id'),\n\tchatroomType: ZodValidation.enumType(ChatroomType, 'chatroomType'),\n\tsenderId: ZodValidation.coerce.objectId('senderId'), // DEPRECATED\n\tsenderType: ZodValidation.enumType(UserRef, 'senderType'), // DEPRECATED\n\tsender: z.object({\n\t\tid: ZodValidation.coerce.objectId('sender.id'),\n\t\tname: ZodValidation.string('senderName'),\n\t\ttype: ZodValidation.enumType(UserRef, 'sender.type'),\n\t}),\n\tcontent: ZodValidation.string('content').optional(),\n\tmedia: z.array(\n\t\tz.object({\n\t\t\tmimeType: ZodValidation.string('mimeType'),\n\t\t\tmediaType: ZodValidation.enumType(MediaType, 'mediaType'),\n\t\t\tmediaUrl: ZodValidation.string('url'),\n\t\t\tthumbnailUrl: ZodValidation.string('thumbnailUrl').optional(),\n\t\t\tname: ZodValidation.string('name').optional(),\n\t\t})\n\t),\n\tlocation: z\n\t\t.object({\n\t\t\tlongitude: ZodValidation.coerce.number('longitude').optional(),\n\t\t\tlatitude: ZodValidation.coerce.number('latitude').optional(),\n\t\t})\n\t\t.optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport const ChatroomMessageSendPushOutputSchema = z.object({\n\tlastMessage: ZodValidation.string('lastMessage').optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\ttype: ZodValidation.enumType(ChatroomType, 'type'),\n});\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;\n\nexport type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;\nexport type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;\n\nexport class ChatroomMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatroomMessageSendSocketInputSchema,\n\ttypeof ChatroomMessageSendOutputSchema,\n\ttypeof ChatroomMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t\tpushNotificationOutput: ChatroomMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t\ttitle: this.getTitle(),\n\t\t};\n\t}\n\n\tconstructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\tconst pushPayload: ChatlistMessageSendPushOutputDTO = {\n\t\t\tlastMessage: payload.content,\n\t\t\tchatroomId: payload.chatroomId,\n\t\t\ttype: payload.chatroomType,\n\t\t};\n\n\t\tconst socketNotificationEvent = EventFactory.createEvent(SocketEventType.NOTIFICATION, {\n\t\t\tmessage: 'New message!',\n\t\t\tnotificationType: SocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\t_id: payload._id,\n\t\t});\n\n\t\tsuper(\n\t\t\tSocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\tChatroomMessageSendSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tpushPayload,\n\t\t\tsocketNotificationEvent\n\t\t);\n\t}\n\n\tprivate getTitle(): string {\n\t\tif (this.payload().sender.name === 'agent') {\n\t\t\treturn 'Customer Support';\n\t\t}\n\t\treturn this.payload().senderType === UserRef.RIDER\n\t\t\t? this.payload().sender.name\n\t\t\t: 'New message from support';\n\t}\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\n\t}\n\n\tpublic getPushNotificationPayload() {\n\t\treturn this.pushNotificationData;\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn this.data.chatroomId?.toString() ?? 'default';\n\t}\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.3.166
25
+ Version: 1.3.168
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.3.166",
3
+ "version": "1.3.168",
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
- select?: Record<string, 0 | 1> | undefined;
30
29
  populate?: any;
30
+ select?: Record<string, 0 | 1> | undefined;
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
- select?: Record<string, 0 | 1> | undefined;
40
39
  populate?: any;
40
+ select?: Record<string, 0 | 1> | undefined;
41
41
  query?: Record<string, any> | undefined;
42
42
  page?: number | undefined;
43
43
  }>>;
@@ -733,12 +733,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
733
733
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
734
734
  }, "strip", z.ZodTypeAny, {
735
735
  _id: import("mongoose").Types.ObjectId;
736
- select?: Record<string, 0 | 1> | undefined;
737
736
  populate?: any;
737
+ select?: Record<string, 0 | 1> | undefined;
738
738
  }, {
739
739
  _id: string | import("mongoose").Types.ObjectId;
740
- select?: Record<string, 0 | 1> | undefined;
741
740
  populate?: any;
741
+ select?: Record<string, 0 | 1> | undefined;
742
742
  }>;
743
743
  export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
744
744
  export declare const GetProductByIdInputSchema: z.ZodObject<{
@@ -751,12 +751,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
751
751
  _id: import("mongoose").Types.ObjectId;
752
752
  withAttributeHiddenItems: boolean;
753
753
  withAddonsHiddenItems: boolean;
754
- select?: Record<string, 0 | 1> | undefined;
755
754
  populate?: any;
755
+ select?: Record<string, 0 | 1> | undefined;
756
756
  }, {
757
757
  _id: string | import("mongoose").Types.ObjectId;
758
- select?: Record<string, 0 | 1> | undefined;
759
758
  populate?: any;
759
+ select?: Record<string, 0 | 1> | undefined;
760
760
  withAttributeHiddenItems?: boolean | undefined;
761
761
  withAddonsHiddenItems?: boolean | undefined;
762
762
  }>;
@@ -768,13 +768,13 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
768
768
  userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
769
769
  }, "strip", z.ZodTypeAny, {
770
770
  _id: import("mongoose").Types.ObjectId;
771
- select?: Record<string, 0 | 1> | undefined;
772
771
  populate?: any;
772
+ select?: Record<string, 0 | 1> | undefined;
773
773
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
774
774
  }, {
775
775
  _id: string | import("mongoose").Types.ObjectId;
776
- select?: Record<string, 0 | 1> | undefined;
777
776
  populate?: any;
777
+ select?: Record<string, 0 | 1> | undefined;
778
778
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
779
779
  }>;
780
780
  export type GetOrderByIdInputDTO = DTO<typeof GetOrderByIdInputSchema>;
@@ -782,11 +782,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
782
782
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
783
783
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
784
784
  }, "strip", z.ZodTypeAny, {
785
- select?: Record<string, 0 | 1> | undefined;
786
785
  populate?: any;
787
- }, {
788
786
  select?: Record<string, 0 | 1> | undefined;
787
+ }, {
789
788
  populate?: any;
789
+ select?: Record<string, 0 | 1> | undefined;
790
790
  }>>;
791
791
  export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
792
792
  export declare const GetOneQuerySchema: z.ZodObject<{
@@ -794,12 +794,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
794
794
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
795
795
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
796
796
  }, "strip", z.ZodTypeAny, {
797
- select?: Record<string, 0 | 1> | undefined;
798
797
  populate?: any;
798
+ select?: Record<string, 0 | 1> | undefined;
799
799
  query?: Record<string, any> | undefined;
800
800
  }, {
801
- select?: Record<string, 0 | 1> | undefined;
802
801
  populate?: any;
802
+ select?: Record<string, 0 | 1> | undefined;
803
803
  query?: Record<string, any> | undefined;
804
804
  }>;
805
805
  export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
@@ -5,6 +5,7 @@ type DayjsWithTimezone = {
5
5
  getTimezone(): string;
6
6
  max(...dates: (Dayjs | undefined)[]): Dayjs;
7
7
  min(...dates: (Dayjs | undefined)[]): Dayjs;
8
+ duration: typeof dayjs.duration;
8
9
  } & typeof dayjs;
9
10
  declare const dayjsWithTimezone: DayjsWithTimezone;
10
11
  export declare const _setTimezone: (timezone: string) => void;
@@ -8,10 +8,12 @@ const dayjs_1 = __importDefault(require("dayjs"));
8
8
  const utc_1 = __importDefault(require("dayjs/plugin/utc"));
9
9
  const minMax_1 = __importDefault(require("dayjs/plugin/minMax"));
10
10
  const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
11
+ const duration_1 = __importDefault(require("dayjs/plugin/duration"));
11
12
  const time_1 = require("../time");
12
13
  dayjs_1.default.extend(utc_1.default);
13
14
  dayjs_1.default.extend(timezone_1.default);
14
15
  dayjs_1.default.extend(minMax_1.default);
16
+ dayjs_1.default.extend(duration_1.default);
15
17
  let DEFAULT_TIMEZONE = 'Asia/Beirut';
16
18
  const dayjsWithTimezone = ((date, format, tz) => {
17
19
  const targetTimezone = tz || DEFAULT_TIMEZONE;
@@ -30,6 +32,7 @@ dayjsWithTimezone.setTimezone = (timezone) => {
30
32
  dayjsWithTimezone.getTimezone = () => DEFAULT_TIMEZONE;
31
33
  dayjsWithTimezone.max = dayjs_1.default.max;
32
34
  dayjsWithTimezone.min = dayjs_1.default.min;
35
+ dayjsWithTimezone.duration = dayjs_1.default.duration;
33
36
  const _setTimezone = (timezone) => {
34
37
  DEFAULT_TIMEZONE = timezone;
35
38
  };
@@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AE3B,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;IAChD,gBAAgB,GAAG,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAGF,kBAAe,iBAAiB,CAAC","sourcesContent":["import dayjs, { Dayjs } from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport minMax from 'dayjs/plugin/minMax';\nimport timezone from 'dayjs/plugin/timezone';\nimport { _setLyxaTimezoneVariable } from '../time';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(minMax);\n\nlet DEFAULT_TIMEZONE = 'Asia/Beirut';\n\ntype DayjsWithTimezone = {\n\t(date?: any, format?: any, tz?: string): Dayjs;\n\tsetTimezone(timezone: string): void;\n\tgetTimezone(): string;\n\tmax(...dates: (Dayjs | undefined)[]): Dayjs;\n\tmin(...dates: (Dayjs | undefined)[]): Dayjs;\n} & typeof dayjs;\n\nconst dayjsWithTimezone = ((date?: any, format?: any, tz?: string) => {\n\tconst targetTimezone = tz || DEFAULT_TIMEZONE;\n\n\t_setLyxaTimezoneVariable(targetTimezone);\n\n\tif (format) {\n\t\treturn dayjs(date, format).tz(targetTimezone);\n\t}\n\treturn dayjs(date).tz(targetTimezone);\n}) as DayjsWithTimezone;\n\nObject.keys(dayjs).forEach(key => {\n\t(dayjsWithTimezone as any)[key] = (dayjs as any)[key];\n});\n\ndayjsWithTimezone.setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\ndayjsWithTimezone.getTimezone = () => DEFAULT_TIMEZONE;\n\ndayjsWithTimezone.max = dayjs.max;\ndayjsWithTimezone.min = dayjs.min;\n\nexport const _setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\nexport type { Dayjs };\nexport default dayjsWithTimezone;\n"]}
1
+ {"version":3,"file":"dayjs.js","sourceRoot":"/","sources":["utilities/dayjs/dayjs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqC;AACrC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QAAQ,CAAC;AAErC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;IAChD,gBAAgB,GAAG,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAGF,kBAAe,iBAAiB,CAAC","sourcesContent":["import dayjs, { Dayjs } from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport minMax from 'dayjs/plugin/minMax';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport { _setLyxaTimezoneVariable } from '../time';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(minMax);\ndayjs.extend(duration);\n\nlet DEFAULT_TIMEZONE = 'Asia/Beirut';\n\ntype DayjsWithTimezone = {\n\t(date?: any, format?: any, tz?: string): Dayjs;\n\tsetTimezone(timezone: string): void;\n\tgetTimezone(): string;\n\tmax(...dates: (Dayjs | undefined)[]): Dayjs;\n\tmin(...dates: (Dayjs | undefined)[]): Dayjs;\n\tduration: typeof dayjs.duration;\n} & typeof dayjs;\n\nconst dayjsWithTimezone = ((date?: any, format?: any, tz?: string) => {\n\tconst targetTimezone = tz || DEFAULT_TIMEZONE;\n\n\t_setLyxaTimezoneVariable(targetTimezone);\n\n\tif (format) {\n\t\treturn dayjs(date, format).tz(targetTimezone);\n\t}\n\treturn dayjs(date).tz(targetTimezone);\n}) as DayjsWithTimezone;\n\nObject.keys(dayjs).forEach(key => {\n\t(dayjsWithTimezone as any)[key] = (dayjs as any)[key];\n});\n\ndayjsWithTimezone.setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\ndayjsWithTimezone.getTimezone = () => DEFAULT_TIMEZONE;\n\ndayjsWithTimezone.max = dayjs.max;\ndayjsWithTimezone.min = dayjs.min;\ndayjsWithTimezone.duration = dayjs.duration;\n\nexport const _setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\nexport type { Dayjs };\nexport default dayjsWithTimezone;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.3.166",
3
+ "version": "1.3.168",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -64,4 +64,4 @@
64
64
  "@types/ws": "^8.18.1",
65
65
  "prettier": "3.5.3"
66
66
  }
67
- }
67
+ }