@lyxa.ai/core 1.4.322-alpha.2 → 1.4.323

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 (30) hide show
  1. package/dist/libraries/google-location/google-location.service.js +0 -10
  2. package/dist/libraries/google-location/google-location.service.js.map +1 -1
  3. package/dist/libraries/llm/providers/openai-provider.js +5 -15
  4. package/dist/libraries/llm/providers/openai-provider.js.map +1 -1
  5. package/dist/libraries/mongo/models/index.d.ts +0 -3
  6. package/dist/libraries/mongo/models/index.js +3 -6
  7. package/dist/libraries/mongo/models/index.js.map +1 -1
  8. package/dist/libraries/mongo/models/providers/global-coupon.model.d.ts +0 -2
  9. package/dist/libraries/mongo/models/providers/global-coupon.model.js +0 -20
  10. package/dist/libraries/mongo/models/providers/global-coupon.model.js.map +1 -1
  11. package/dist/libraries/mongo/models/user-shop-history.model.d.ts +1 -6
  12. package/dist/libraries/mongo/models/user-shop-history.model.js +3 -22
  13. package/dist/libraries/mongo/models/user-shop-history.model.js.map +1 -1
  14. package/dist/libraries/mongo/models/user.model.d.ts +1 -2
  15. package/dist/libraries/mongo/models/user.model.js +1 -6
  16. package/dist/libraries/mongo/models/user.model.js.map +1 -1
  17. package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +25 -25
  18. package/dist/libraries/socket/events/order-actions.socket.event.d.ts +32 -32
  19. package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
  20. package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +8 -8
  21. package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +28 -28
  22. package/dist/types/README.md +1 -1
  23. package/dist/types/package.json +1 -1
  24. package/dist/types/utilities/validation/common-validation.d.ts +12 -12
  25. package/dist/utilities/pagination.d.ts +3 -3
  26. package/dist/utilities/validation/common-validation.d.ts +72 -72
  27. package/package.json +1 -1
  28. package/dist/libraries/mongo/models/user-coupon.model.d.ts +0 -11
  29. package/dist/libraries/mongo/models/user-coupon.model.js +0 -52
  30. package/dist/libraries/mongo/models/user-coupon.model.js.map +0 -1
@@ -1,30 +1,10 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.GlobalCoupon = void 0;
13
- const typegoose_1 = require("@typegoose/typegoose");
14
4
  const enum_1 = require("../../../../utilities/enum");
15
5
  const base_coupon_model_1 = require("../base/base-coupon.model");
16
6
  class GlobalCoupon extends base_coupon_model_1.BaseCoupon {
17
7
  couponType = enum_1.CouponType.GLOBAL;
18
- isCouponDurationInDaysEnabled;
19
- couponDurationInDays;
20
8
  }
21
9
  exports.GlobalCoupon = GlobalCoupon;
22
- __decorate([
23
- (0, typegoose_1.prop)({ type: Boolean, default: false }),
24
- __metadata("design:type", Boolean)
25
- ], GlobalCoupon.prototype, "isCouponDurationInDaysEnabled", void 0);
26
- __decorate([
27
- (0, typegoose_1.prop)({ type: Number, default: null }),
28
- __metadata("design:type", Object)
29
- ], GlobalCoupon.prototype, "couponDurationInDays", void 0);
30
10
  //# sourceMappingURL=global-coupon.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/global-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAwD;AACxD,iEAAuD;AAEvD,MAAa,YAAa,SAAQ,8BAAU;IACpC,UAAU,GAAG,iBAAU,CAAC,MAAe,CAAC;IAGxC,6BAA6B,CAAW;IAGxC,oBAAoB,CAAiB;CAC5C;AARD,oCAQC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mEACO;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;0DACM","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { CouponType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\n\nexport class GlobalCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.GLOBAL as const;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCouponDurationInDaysEnabled?: boolean;\n\n\t@prop({ type: Number, default: null })\n\tpublic couponDurationInDays?: number | null;\n}\n"]}
1
+ {"version":3,"file":"global-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/global-coupon.model.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AACxD,iEAAuD;AAEvD,MAAa,YAAa,SAAQ,8BAAU;IACpC,UAAU,GAAG,iBAAU,CAAC,MAAe,CAAC;CAC/C;AAFD,oCAEC","sourcesContent":["import { CouponType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\n\nexport class GlobalCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.GLOBAL as const;\n}\n"]}
@@ -2,12 +2,7 @@ import { Ref } from '@typegoose/typegoose';
2
2
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
3
  import { User } from './user.model';
4
4
  import { Shop } from './shop.model';
5
- export declare class ShopOrderCount {
6
- shop: Ref<Shop>;
7
- count: number;
8
- lastOrderedAt: Date;
9
- }
10
5
  export declare class UserShopHistory extends TimeStamps {
11
6
  user: Ref<User>;
12
- shops: ShopOrderCount[];
7
+ shops?: Ref<Shop>[];
13
8
  }
@@ -9,29 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UserShopHistory = exports.ShopOrderCount = void 0;
12
+ exports.UserShopHistory = void 0;
13
13
  const typegoose_1 = require("@typegoose/typegoose");
14
14
  const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
15
  const user_model_1 = require("./user.model");
16
16
  const shop_model_1 = require("./shop.model");
17
- class ShopOrderCount {
18
- shop;
19
- count;
20
- lastOrderedAt;
21
- }
22
- exports.ShopOrderCount = ShopOrderCount;
23
- __decorate([
24
- (0, typegoose_1.prop)({ required: true, ref: () => shop_model_1.Shop }),
25
- __metadata("design:type", Object)
26
- ], ShopOrderCount.prototype, "shop", void 0);
27
- __decorate([
28
- (0, typegoose_1.prop)({ required: true, type: Number, default: 1 }),
29
- __metadata("design:type", Number)
30
- ], ShopOrderCount.prototype, "count", void 0);
31
- __decorate([
32
- (0, typegoose_1.prop)({ required: true, type: Date, default: Date.now }),
33
- __metadata("design:type", Date)
34
- ], ShopOrderCount.prototype, "lastOrderedAt", void 0);
35
17
  let UserShopHistory = class UserShopHistory extends defaultClasses_1.TimeStamps {
36
18
  user;
37
19
  shops;
@@ -42,12 +24,11 @@ __decorate([
42
24
  __metadata("design:type", Object)
43
25
  ], UserShopHistory.prototype, "user", void 0);
44
26
  __decorate([
45
- (0, typegoose_1.prop)({ type: () => [ShopOrderCount], default: [] }),
27
+ (0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
46
28
  __metadata("design:type", Array)
47
29
  ], UserShopHistory.prototype, "shops", void 0);
48
30
  exports.UserShopHistory = UserShopHistory = __decorate([
49
31
  (0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'userShopHistories' } }),
50
- (0, typegoose_1.index)({ user: 1 }, { unique: true }),
51
- (0, typegoose_1.index)({ 'shops.shop': 1 })
32
+ (0, typegoose_1.index)({ user: 1 }, { unique: true })
52
33
  ], UserShopHistory);
53
34
  //# sourceMappingURL=user-shop-history.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-shop-history.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user-shop-history.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,6CAAoC;AAEpC,MAAa,cAAc;IAEnB,IAAI,CAAa;IAGjB,KAAK,CAAU;IAGf,aAAa,CAAQ;CAC5B;AATD,wCASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;4CAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;6CAC7B;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;8BACjC,IAAI;qDAAC;AAStB,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAa;IAGjB,KAAK,CAAoB;CAChC,CAAA;AANY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;6CAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;8CACpB;0BALpB,eAAe;IAH3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;IACpE,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpC,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;GACd,eAAe,CAM3B","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\n\nexport class ShopOrderCount {\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: Number, default: 1 })\n\tpublic count!: number;\n\n\t@prop({ required: true, type: Date, default: Date.now })\n\tpublic lastOrderedAt!: Date;\n}\n\n/**\n * UserShopHistory model - Tracks the shops a user is associated with (eligible/ordered-from shops)\n */\n@modelOptions({ schemaOptions: { collection: 'userShopHistories' } })\n@index({ user: 1 }, { unique: true })\n@index({ 'shops.shop': 1 })\nexport class UserShopHistory extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ type: () => [ShopOrderCount], default: [] })\n\tpublic shops!: ShopOrderCount[];\n}\n"]}
1
+ {"version":3,"file":"user-shop-history.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user-shop-history.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,6CAAoC;AAO7B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAa;IAGjB,KAAK,CAAe;CAC3B,CAAA;AANY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;6CAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;8CACC;0BALf,eAAe;IAF3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;IACpE,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACxB,eAAe,CAM3B","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\n\n/**\n * UserShopHistory model - Tracks the shops a user is associated with (eligible/ordered-from shops)\n */\n@modelOptions({ schemaOptions: { collection: 'userShopHistories' } })\n@index({ user: 1 }, { unique: true })\nexport class UserShopHistory extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ ref: () => Shop })\n\tpublic shops?: Ref<Shop>[];\n}\n"]}
@@ -8,7 +8,6 @@ import { OnlineStatus } from '../../../utilities/enum';
8
8
  import { OTPFields } from './embedded/otp-fields.model';
9
9
  import { GeoLocation } from './shared/geo-location.model';
10
10
  import { Wallet } from './embedded/wallet.model';
11
- import { UserCoupon } from './user-coupon.model';
12
11
  export declare class User extends TimeStamps {
13
12
  coreUser: Ref<CoreUser>;
14
13
  deviceId?: string;
@@ -16,7 +15,7 @@ export declare class User extends TimeStamps {
16
15
  location?: GeoLocation;
17
16
  orderCompleted?: number;
18
17
  repeatedOrderAt?: Date;
19
- coupons?: Ref<UserCoupon>[];
18
+ coupons?: Ref<Coupon>[];
20
19
  newUserCouponDiscountType?: string;
21
20
  newUserCouponValue?: number;
22
21
  newUserCouponMaximumDiscountLimit?: number;
@@ -21,7 +21,6 @@ const enum_1 = require("../../../utilities/enum");
21
21
  const otp_fields_model_1 = require("./embedded/otp-fields.model");
22
22
  const geo_location_model_1 = require("./shared/geo-location.model");
23
23
  const wallet_model_1 = require("./embedded/wallet.model");
24
- const user_coupon_model_1 = require("./user-coupon.model");
25
24
  let User = User_1 = class User extends defaultClasses_1.TimeStamps {
26
25
  coreUser;
27
26
  deviceId;
@@ -76,11 +75,7 @@ __decorate([
76
75
  __metadata("design:type", Date)
77
76
  ], User.prototype, "repeatedOrderAt", void 0);
78
77
  __decorate([
79
- (0, typegoose_1.prop)({
80
- ref: () => user_coupon_model_1.UserCoupon,
81
- foreignField: 'user',
82
- localField: '_id',
83
- }),
78
+ (0, typegoose_1.prop)({ ref: () => coupon_model_1.Coupon }),
84
79
  __metadata("design:type", Array)
85
80
  ], User.prototype, "coupons", void 0);
86
81
  __decorate([
@@ -1 +1 @@
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;AACjD,2DAAiD;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;IAOvB,OAAO,CAAqB;IAG5B,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,YAAY,CAAgB;IAG5B,8BAA8B,CAAW;IAGzC,6BAA6B,CAAW;IAGxC,SAAS,CAAY;IAGrB,MAAM,CAAU;IAEhB,MAAM,CAAC,K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,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;eA5EX,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,CA0FhB","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';\nimport { UserCoupon } from './user-coupon.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({\n\t\tref: () => UserCoupon,\n\t\tforeignField: 'user',\n\t\tlocalField: '_id',\n\t})\n\tpublic coupons?: Ref<UserCoupon>[]; // Virtual reference to UserCoupons\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"]}
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,YAAY,CAAgB;IAG5B,8BAA8B,CAAW;IAGzC,6BAA6B,CAAW;IAGxC,SAAS,CAAY;IAGrB,MAAM,CAAU;IAEhB,MAAM,CAAC,KAAK,CAAC,YAAY,CAE/B,MAAc,EACd,IAAI,GAAG,CAAC,EACR,OAAO,GAAG,CAAC;QAEX,OAAO,IAAI,CAAC,iBAAiB,CAC5B,MAAM,EACN,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,cAAc,EAAE,I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E,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"]}
@@ -20,13 +20,13 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
20
20
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
21
21
  type: z.ZodNativeEnum<typeof UserRef>;
22
22
  }, "strip", z.ZodTypeAny, {
23
+ type: UserRef;
23
24
  name: string;
24
25
  id: import("mongoose").Types.ObjectId;
25
- type: UserRef;
26
26
  }, {
27
+ type: UserRef;
27
28
  name: string;
28
29
  id: import("mongoose").Types.ObjectId;
29
- type: UserRef;
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,14 +36,14 @@ 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
- mediaType: MediaType;
40
39
  mediaUrl: string;
40
+ mediaType: MediaType;
41
41
  mimeType: string;
42
42
  name?: string | undefined;
43
43
  thumbnailUrl?: string | undefined;
44
44
  }, {
45
- mediaType: MediaType;
46
45
  mediaUrl: string;
46
+ mediaType: MediaType;
47
47
  mimeType: string;
48
48
  name?: string | undefined;
49
49
  thumbnailUrl?: string | undefined;
@@ -63,17 +63,17 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
63
63
  orderId: 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
64
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
65
65
  }, "strip", z.ZodTypeAny, {
66
- createdAt: Date;
67
66
  _id: import("mongoose").Types.ObjectId;
67
+ createdAt: Date;
68
68
  sender: {
69
+ type: UserRef;
69
70
  name: string;
70
71
  id: import("mongoose").Types.ObjectId;
71
- type: UserRef;
72
72
  };
73
73
  senderType: UserRef;
74
74
  media: {
75
- mediaType: MediaType;
76
75
  mediaUrl: string;
76
+ mediaType: MediaType;
77
77
  mimeType: string;
78
78
  name?: string | undefined;
79
79
  thumbnailUrl?: string | undefined;
@@ -89,17 +89,17 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
89
89
  content?: string | undefined;
90
90
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
91
91
  }, {
92
- createdAt: Date;
93
92
  _id: import("mongoose").Types.ObjectId;
93
+ createdAt: Date;
94
94
  sender: {
95
+ type: UserRef;
95
96
  name: string;
96
97
  id: import("mongoose").Types.ObjectId;
97
- type: UserRef;
98
98
  };
99
99
  senderType: UserRef;
100
100
  media: {
101
- mediaType: MediaType;
102
101
  mediaUrl: string;
102
+ mediaType: MediaType;
103
103
  mimeType: string;
104
104
  name?: string | undefined;
105
105
  thumbnailUrl?: string | undefined;
@@ -124,14 +124,14 @@ export declare const ChatroomMessageSendPushOutputSchema: z.ZodObject<{
124
124
  }, "strip", z.ZodTypeAny, {
125
125
  type: ChatroomType;
126
126
  orderId?: import("mongoose").Types.ObjectId | undefined;
127
- lastMessage?: string | undefined;
128
127
  ticketId?: import("mongoose").Types.ObjectId | undefined;
128
+ lastMessage?: string | undefined;
129
129
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
130
130
  }, {
131
131
  type: ChatroomType;
132
132
  orderId?: import("mongoose").Types.ObjectId | undefined;
133
- lastMessage?: string | undefined;
134
133
  ticketId?: import("mongoose").Types.ObjectId | undefined;
134
+ lastMessage?: string | undefined;
135
135
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
136
136
  }>;
137
137
  export type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;
@@ -156,13 +156,13 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
156
156
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
157
157
  type: z.ZodNativeEnum<typeof UserRef>;
158
158
  }, "strip", z.ZodTypeAny, {
159
+ type: UserRef;
159
160
  name: string;
160
161
  id: import("mongoose").Types.ObjectId;
161
- type: UserRef;
162
162
  }, {
163
+ type: UserRef;
163
164
  name: string;
164
165
  id: import("mongoose").Types.ObjectId;
165
- type: UserRef;
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,14 +172,14 @@ 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
- mediaType: MediaType;
176
175
  mediaUrl: string;
176
+ mediaType: MediaType;
177
177
  mimeType: string;
178
178
  name?: string | undefined;
179
179
  thumbnailUrl?: string | undefined;
180
180
  }, {
181
- mediaType: MediaType;
182
181
  mediaUrl: string;
182
+ mediaType: MediaType;
183
183
  mimeType: string;
184
184
  name?: string | undefined;
185
185
  thumbnailUrl?: string | undefined;
@@ -199,17 +199,17 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
199
199
  orderId: 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
200
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
201
201
  }, "strip", z.ZodTypeAny, {
202
- createdAt: Date;
203
202
  _id: import("mongoose").Types.ObjectId;
203
+ createdAt: Date;
204
204
  sender: {
205
+ type: UserRef;
205
206
  name: string;
206
207
  id: import("mongoose").Types.ObjectId;
207
- type: UserRef;
208
208
  };
209
209
  senderType: UserRef;
210
210
  media: {
211
- mediaType: MediaType;
212
211
  mediaUrl: string;
212
+ mediaType: MediaType;
213
213
  mimeType: string;
214
214
  name?: string | undefined;
215
215
  thumbnailUrl?: string | undefined;
@@ -225,17 +225,17 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
225
225
  content?: string | undefined;
226
226
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
227
227
  }, {
228
- createdAt: Date;
229
228
  _id: import("mongoose").Types.ObjectId;
229
+ createdAt: Date;
230
230
  sender: {
231
+ type: UserRef;
231
232
  name: string;
232
233
  id: import("mongoose").Types.ObjectId;
233
- type: UserRef;
234
234
  };
235
235
  senderType: UserRef;
236
236
  media: {
237
- mediaType: MediaType;
238
237
  mediaUrl: string;
238
+ mediaType: MediaType;
239
239
  mimeType: string;
240
240
  name?: string | undefined;
241
241
  thumbnailUrl?: string | undefined;
@@ -260,14 +260,14 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
260
260
  }, "strip", z.ZodTypeAny, {
261
261
  type: ChatroomType;
262
262
  orderId?: import("mongoose").Types.ObjectId | undefined;
263
- lastMessage?: string | undefined;
264
263
  ticketId?: import("mongoose").Types.ObjectId | undefined;
264
+ lastMessage?: string | undefined;
265
265
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
266
266
  }, {
267
267
  type: ChatroomType;
268
268
  orderId?: import("mongoose").Types.ObjectId | undefined;
269
- lastMessage?: string | undefined;
270
269
  ticketId?: import("mongoose").Types.ObjectId | undefined;
270
+ lastMessage?: string | undefined;
271
271
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
272
272
  }>;
273
273
  };
@@ -278,8 +278,8 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
278
278
  getPushNotificationPayload(): {
279
279
  type: ChatroomType;
280
280
  orderId?: import("mongoose").Types.ObjectId | undefined;
281
- lastMessage?: string | undefined;
282
281
  ticketId?: import("mongoose").Types.ObjectId | undefined;
282
+ lastMessage?: string | undefined;
283
283
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
284
284
  } | undefined;
285
285
  protected getIdentifier(): string;
@@ -16,11 +16,11 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
16
16
  _id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
17
17
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
18
18
  }, "strip", z.ZodTypeAny, {
19
- name: string;
20
19
  _id: import("mongoose").Types.ObjectId;
21
- }, {
22
20
  name: string;
21
+ }, {
23
22
  _id: string | import("mongoose").Types.ObjectId;
23
+ name: string;
24
24
  }>;
25
25
  orderStatus: z.ZodNativeEnum<typeof RegularOrderStatus>;
26
26
  orderAction: z.ZodNativeEnum<typeof OrderAction>;
@@ -39,20 +39,20 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
39
39
  riderTips: z.ZodNumber;
40
40
  secondaryRiderTips: z.ZodNumber;
41
41
  }, "strip", z.ZodTypeAny, {
42
+ total: number;
42
43
  deliveryFee: number;
43
44
  secondaryDeliveryFee: number;
44
45
  riderTips: number;
45
46
  secondaryRiderTips: number;
46
- total: number;
47
47
  secondaryTotal: number;
48
48
  paidAmount: number;
49
49
  secondaryPaidAmount: number;
50
50
  }, {
51
+ total: number;
51
52
  deliveryFee: number;
52
53
  secondaryDeliveryFee: number;
53
54
  riderTips: number;
54
55
  secondaryRiderTips: number;
55
- total: number;
56
56
  secondaryTotal: number;
57
57
  paidAmount: number;
58
58
  secondaryPaidAmount: number;
@@ -60,11 +60,11 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
60
60
  }, "strip", z.ZodTypeAny, {
61
61
  paymentMethod: PaymentMethod;
62
62
  pricing: {
63
+ total: number;
63
64
  deliveryFee: number;
64
65
  secondaryDeliveryFee: number;
65
66
  riderTips: number;
66
67
  secondaryRiderTips: number;
67
- total: number;
68
68
  secondaryTotal: number;
69
69
  paidAmount: number;
70
70
  secondaryPaidAmount: number;
@@ -73,11 +73,11 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
73
73
  }, {
74
74
  paymentMethod: PaymentMethod;
75
75
  pricing: {
76
+ total: number;
76
77
  deliveryFee: number;
77
78
  secondaryDeliveryFee: number;
78
79
  riderTips: number;
79
80
  secondaryRiderTips: number;
80
- total: number;
81
81
  secondaryTotal: number;
82
82
  paidAmount: number;
83
83
  secondaryPaidAmount: number;
@@ -88,59 +88,59 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
88
88
  triggerAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
89
89
  orderActionType: z.ZodNativeEnum<typeof OrderAction>;
90
90
  }, "strip", z.ZodTypeAny, {
91
- createdAt: Date;
92
91
  _id: import("mongoose").Types.ObjectId;
92
+ createdAt: Date;
93
93
  user: {
94
- name: string;
95
94
  _id: import("mongoose").Types.ObjectId;
95
+ name: string;
96
96
  };
97
- shopId: import("mongoose").Types.ObjectId;
98
97
  orderId: string;
98
+ shopId: import("mongoose").Types.ObjectId;
99
+ paymentMethod: PaymentMethod;
99
100
  triggerAt: Date;
100
101
  adjustedFinance: {
101
102
  paymentMethod: PaymentMethod;
102
103
  pricing: {
104
+ total: number;
103
105
  deliveryFee: number;
104
106
  secondaryDeliveryFee: number;
105
107
  riderTips: number;
106
108
  secondaryRiderTips: number;
107
- total: number;
108
109
  secondaryTotal: number;
109
110
  paidAmount: number;
110
111
  secondaryPaidAmount: number;
111
112
  };
112
113
  shopProfit: number;
113
114
  };
114
- paymentMethod: PaymentMethod;
115
115
  orderActionType: OrderAction;
116
116
  orderStatus: RegularOrderStatus;
117
117
  orderAction: OrderAction;
118
118
  preparationTimeMinutes: number;
119
119
  }, {
120
- createdAt: Date;
121
120
  _id: string | import("mongoose").Types.ObjectId;
121
+ createdAt: Date;
122
122
  user: {
123
- name: string;
124
123
  _id: string | import("mongoose").Types.ObjectId;
124
+ name: string;
125
125
  };
126
- shopId: string | import("mongoose").Types.ObjectId;
127
126
  orderId: string;
127
+ shopId: string | import("mongoose").Types.ObjectId;
128
+ paymentMethod: PaymentMethod;
128
129
  triggerAt: Date;
129
130
  adjustedFinance: {
130
131
  paymentMethod: PaymentMethod;
131
132
  pricing: {
133
+ total: number;
132
134
  deliveryFee: number;
133
135
  secondaryDeliveryFee: number;
134
136
  riderTips: number;
135
137
  secondaryRiderTips: number;
136
- total: number;
137
138
  secondaryTotal: number;
138
139
  paidAmount: number;
139
140
  secondaryPaidAmount: number;
140
141
  };
141
142
  shopProfit: number;
142
143
  };
143
- paymentMethod: PaymentMethod;
144
144
  orderActionType: OrderAction;
145
145
  orderStatus: RegularOrderStatus;
146
146
  orderAction: OrderAction;
@@ -160,11 +160,11 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
160
160
  _id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
161
161
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
162
162
  }, "strip", z.ZodTypeAny, {
163
- name: string;
164
163
  _id: import("mongoose").Types.ObjectId;
165
- }, {
166
164
  name: string;
165
+ }, {
167
166
  _id: string | import("mongoose").Types.ObjectId;
167
+ name: string;
168
168
  }>;
169
169
  orderStatus: z.ZodNativeEnum<typeof RegularOrderStatus>;
170
170
  orderAction: z.ZodNativeEnum<typeof OrderAction>;
@@ -183,20 +183,20 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
183
183
  riderTips: z.ZodNumber;
184
184
  secondaryRiderTips: z.ZodNumber;
185
185
  }, "strip", z.ZodTypeAny, {
186
+ total: number;
186
187
  deliveryFee: number;
187
188
  secondaryDeliveryFee: number;
188
189
  riderTips: number;
189
190
  secondaryRiderTips: number;
190
- total: number;
191
191
  secondaryTotal: number;
192
192
  paidAmount: number;
193
193
  secondaryPaidAmount: number;
194
194
  }, {
195
+ total: number;
195
196
  deliveryFee: number;
196
197
  secondaryDeliveryFee: number;
197
198
  riderTips: number;
198
199
  secondaryRiderTips: number;
199
- total: number;
200
200
  secondaryTotal: number;
201
201
  paidAmount: number;
202
202
  secondaryPaidAmount: number;
@@ -204,11 +204,11 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
204
204
  }, "strip", z.ZodTypeAny, {
205
205
  paymentMethod: PaymentMethod;
206
206
  pricing: {
207
+ total: number;
207
208
  deliveryFee: number;
208
209
  secondaryDeliveryFee: number;
209
210
  riderTips: number;
210
211
  secondaryRiderTips: number;
211
- total: number;
212
212
  secondaryTotal: number;
213
213
  paidAmount: number;
214
214
  secondaryPaidAmount: number;
@@ -217,11 +217,11 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
217
217
  }, {
218
218
  paymentMethod: PaymentMethod;
219
219
  pricing: {
220
+ total: number;
220
221
  deliveryFee: number;
221
222
  secondaryDeliveryFee: number;
222
223
  riderTips: number;
223
224
  secondaryRiderTips: number;
224
- total: number;
225
225
  secondaryTotal: number;
226
226
  paidAmount: number;
227
227
  secondaryPaidAmount: number;
@@ -232,59 +232,59 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
232
232
  triggerAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
233
233
  orderActionType: z.ZodNativeEnum<typeof OrderAction>;
234
234
  }, "strip", z.ZodTypeAny, {
235
- createdAt: Date;
236
235
  _id: import("mongoose").Types.ObjectId;
236
+ createdAt: Date;
237
237
  user: {
238
- name: string;
239
238
  _id: import("mongoose").Types.ObjectId;
239
+ name: string;
240
240
  };
241
- shopId: import("mongoose").Types.ObjectId;
242
241
  orderId: string;
242
+ shopId: import("mongoose").Types.ObjectId;
243
+ paymentMethod: PaymentMethod;
243
244
  triggerAt: Date;
244
245
  adjustedFinance: {
245
246
  paymentMethod: PaymentMethod;
246
247
  pricing: {
248
+ total: number;
247
249
  deliveryFee: number;
248
250
  secondaryDeliveryFee: number;
249
251
  riderTips: number;
250
252
  secondaryRiderTips: number;
251
- total: number;
252
253
  secondaryTotal: number;
253
254
  paidAmount: number;
254
255
  secondaryPaidAmount: number;
255
256
  };
256
257
  shopProfit: number;
257
258
  };
258
- paymentMethod: PaymentMethod;
259
259
  orderActionType: OrderAction;
260
260
  orderStatus: RegularOrderStatus;
261
261
  orderAction: OrderAction;
262
262
  preparationTimeMinutes: number;
263
263
  }, {
264
- createdAt: Date;
265
264
  _id: string | import("mongoose").Types.ObjectId;
265
+ createdAt: Date;
266
266
  user: {
267
- name: string;
268
267
  _id: string | import("mongoose").Types.ObjectId;
268
+ name: string;
269
269
  };
270
- shopId: string | import("mongoose").Types.ObjectId;
271
270
  orderId: string;
271
+ shopId: string | import("mongoose").Types.ObjectId;
272
+ paymentMethod: PaymentMethod;
272
273
  triggerAt: Date;
273
274
  adjustedFinance: {
274
275
  paymentMethod: PaymentMethod;
275
276
  pricing: {
277
+ total: number;
276
278
  deliveryFee: number;
277
279
  secondaryDeliveryFee: number;
278
280
  riderTips: number;
279
281
  secondaryRiderTips: number;
280
- total: number;
281
282
  secondaryTotal: number;
282
283
  paidAmount: number;
283
284
  secondaryPaidAmount: number;
284
285
  };
285
286
  shopProfit: number;
286
287
  };
287
- paymentMethod: PaymentMethod;
288
288
  orderActionType: OrderAction;
289
289
  orderStatus: RegularOrderStatus;
290
290
  orderAction: OrderAction;