@lyxa.ai/core 1.3.265 → 1.3.267
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.
- package/dist/libraries/mongo/models/providers/courier-order.model.d.ts +6 -2
- package/dist/libraries/mongo/models/providers/courier-order.model.js +23 -10
- package/dist/libraries/mongo/models/providers/courier-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-promotion.model.d.ts +1 -2
- package/dist/libraries/mongo/models/service-promotion.model.js +6 -11
- package/dist/libraries/mongo/models/service-promotion.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/package.json +1 -1
|
@@ -15,6 +15,11 @@ declare class CourierItem {
|
|
|
15
15
|
totalPrice?: number;
|
|
16
16
|
secondaryTotalPrice?: number;
|
|
17
17
|
}
|
|
18
|
+
export declare class PurchaseSummary {
|
|
19
|
+
receiptImage: string;
|
|
20
|
+
purchaseAmount: number;
|
|
21
|
+
secondaryPurchaseAmount: number;
|
|
22
|
+
}
|
|
18
23
|
export declare class CourierOrder extends Order {
|
|
19
24
|
orderType: OrderType.COURIER;
|
|
20
25
|
user: Ref<User>;
|
|
@@ -26,8 +31,7 @@ export declare class CourierOrder extends Order {
|
|
|
26
31
|
deliveryAddress: CourierAddress;
|
|
27
32
|
addressChangeHistory?: CourierOrderAddressChangeHistory[];
|
|
28
33
|
items?: CourierItem[];
|
|
29
|
-
|
|
30
|
-
receiptPrice?: number;
|
|
34
|
+
purchaseSummary?: PurchaseSummary;
|
|
31
35
|
finance: CourierOrderFinance;
|
|
32
36
|
adjustedFinance?: CourierOrderFinance;
|
|
33
37
|
}
|
|
@@ -9,7 +9,7 @@ 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.CourierOrder = void 0;
|
|
12
|
+
exports.CourierOrder = exports.PurchaseSummary = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const order_model_1 = require("../order.model");
|
|
15
15
|
const enum_1 = require("../../../../utilities/enum");
|
|
@@ -55,6 +55,24 @@ __decorate([
|
|
|
55
55
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
56
56
|
__metadata("design:type", Number)
|
|
57
57
|
], CourierItem.prototype, "secondaryTotalPrice", void 0);
|
|
58
|
+
class PurchaseSummary {
|
|
59
|
+
receiptImage;
|
|
60
|
+
purchaseAmount;
|
|
61
|
+
secondaryPurchaseAmount;
|
|
62
|
+
}
|
|
63
|
+
exports.PurchaseSummary = PurchaseSummary;
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], PurchaseSummary.prototype, "receiptImage", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], PurchaseSummary.prototype, "purchaseAmount", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], PurchaseSummary.prototype, "secondaryPurchaseAmount", void 0);
|
|
58
76
|
class CourierOrder extends order_model_1.Order {
|
|
59
77
|
orderType = enum_1.OrderType.COURIER;
|
|
60
78
|
user;
|
|
@@ -66,8 +84,7 @@ class CourierOrder extends order_model_1.Order {
|
|
|
66
84
|
deliveryAddress;
|
|
67
85
|
addressChangeHistory;
|
|
68
86
|
items;
|
|
69
|
-
|
|
70
|
-
receiptPrice;
|
|
87
|
+
purchaseSummary;
|
|
71
88
|
finance;
|
|
72
89
|
adjustedFinance;
|
|
73
90
|
}
|
|
@@ -109,13 +126,9 @@ __decorate([
|
|
|
109
126
|
__metadata("design:type", Array)
|
|
110
127
|
], CourierOrder.prototype, "items", void 0);
|
|
111
128
|
__decorate([
|
|
112
|
-
(0, typegoose_1.prop)({ type:
|
|
113
|
-
__metadata("design:type",
|
|
114
|
-
], CourierOrder.prototype, "
|
|
115
|
-
__decorate([
|
|
116
|
-
(0, typegoose_1.prop)({ type: Number }),
|
|
117
|
-
__metadata("design:type", Number)
|
|
118
|
-
], CourierOrder.prototype, "receiptPrice", void 0);
|
|
129
|
+
(0, typegoose_1.prop)({ type: PurchaseSummary }),
|
|
130
|
+
__metadata("design:type", PurchaseSummary)
|
|
131
|
+
], CourierOrder.prototype, "purchaseSummary", void 0);
|
|
119
132
|
__decorate([
|
|
120
133
|
(0, typegoose_1.prop)({ required: true, type: courier_order_finance_model_1.CourierOrderFinance }),
|
|
121
134
|
__metadata("design:type", courier_order_finance_model_1.CourierOrderFinance)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courier-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/courier-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAA+F;AAC/F,2DAAyD;AACzD,6EAA+E;AAC/E,yFAA8E;AAC9E,8CAAqC;AACrC,2FAA4F;AAE5F,MAAM,WAAW;IAET,WAAW,CAAU;IAGrB,YAAY,CAAU;IAGtB,QAAQ,CAAU;IAGlB,SAAS,CAAU;IAGnB,kBAAkB,CAAU;IAG5B,UAAU,CAAU;IAGpB,mBAAmB,CAAU;CACpC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACM;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;6CACtB;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8CACT;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACA;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CACR;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACC;AAGrC,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAa;IAGjB,MAAM,CAAsB;IAG5B,cAAc,CAAgC;IAG9C,WAAW,CAAU;IAGrB,WAAW,CAAsB;IAGjC,aAAa,CAAkB;IAG/B,eAAe,CAAkB;IAGjC,oBAAoB,CAAsC;IAG1D,KAAK,CAAiB;IAGtB,
|
|
1
|
+
{"version":3,"file":"courier-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/courier-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAA+F;AAC/F,2DAAyD;AACzD,6EAA+E;AAC/E,yFAA8E;AAC9E,8CAAqC;AACrC,2FAA4F;AAE5F,MAAM,WAAW;IAET,WAAW,CAAU;IAGrB,YAAY,CAAU;IAGtB,QAAQ,CAAU;IAGlB,SAAS,CAAU;IAGnB,kBAAkB,CAAU;IAG5B,UAAU,CAAU;IAGpB,mBAAmB,CAAU;CACpC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,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AE,iDAAmB,EAAE,CAAC;8BACnC,iDAAmB;6CAAC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACX,iDAAmB;qDAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { CourierOrderStatus, CourierServiceType, OrderType } from '../../../../utilities/enum';\nimport { CourierAddress } from '../shared/address.model';\nimport { CourierOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { CourierOrderFinance } from '../embedded/courier-order-finance.model';\nimport { User } from '../user.model';\nimport { CourierOrderAddressChangeHistory } from '../embedded/address-change-history.model';\n\nclass CourierItem {\n\t@prop({ required: true, type: String })\n\tpublic productName!: string;\n\n\t@prop({ type: String })\n\tpublic productImage?: string;\n\n\t@prop({ required: true, type: Number, min: 1 })\n\tpublic quantity!: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic unitPrice?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryUnitPrice?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalPrice?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryTotalPrice?: number;\n}\n\nexport class PurchaseSummary {\n\t@prop({ type: String })\n\tpublic receiptImage: string;\n\n\t@prop({ type: Number })\n\tpublic purchaseAmount: number;\n\n\t@prop({ type: Number })\n\tpublic secondaryPurchaseAmount: number;\n}\n\nexport class CourierOrder extends Order {\n\tpublic orderType = OrderType.COURIER as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ type: String, enum: CourierOrderStatus, default: CourierOrderStatus.PLACED })\n\tpublic status?: CourierOrderStatus;\n\n\t@prop({ type: () => [CourierOrderStatusTimeline], default: [] })\n\tpublic statusTimeline?: CourierOrderStatusTimeline[];\n\n\t@prop({ type: String })\n\tpublic description?: string;\n\n\t@prop({ required: true, type: String, enum: CourierServiceType })\n\tpublic courierType!: CourierServiceType;\n\n\t@prop({ required: true, type: () => CourierAddress })\n\tpublic pickupAddress!: CourierAddress;\n\n\t@prop({ required: true, type: CourierAddress })\n\tpublic deliveryAddress!: CourierAddress;\n\n\t@prop({ type: [CourierOrderAddressChangeHistory], default: [] })\n\tpublic addressChangeHistory?: CourierOrderAddressChangeHistory[];\n\n\t@prop({ type: () => [CourierItem], default: [] })\n\tpublic items?: CourierItem[];\n\n\t@prop({ type: PurchaseSummary })\n\tpublic purchaseSummary?: PurchaseSummary;\n\n\t@prop({ required: true, type: CourierOrderFinance })\n\tpublic finance!: CourierOrderFinance;\n\n\t@prop({ type: CourierOrderFinance })\n\tpublic adjustedFinance?: CourierOrderFinance;\n}\n"]}
|
|
@@ -18,11 +18,10 @@ export declare class ServicePromotion {
|
|
|
18
18
|
maxDiscountPerOrder?: number;
|
|
19
19
|
isSpendLimitEnabled?: boolean;
|
|
20
20
|
spendLimit?: number;
|
|
21
|
-
spendAmount?: number;
|
|
22
21
|
valueType?: ValueType;
|
|
23
22
|
value?: number;
|
|
24
23
|
status: MarketingStatus;
|
|
25
|
-
deactivationReason?: string;
|
|
26
24
|
pausedAt?: Date | null;
|
|
27
25
|
createdBy?: Ref<Admin>;
|
|
26
|
+
amountSpent?: number;
|
|
28
27
|
}
|
|
@@ -30,13 +30,12 @@ let ServicePromotion = class ServicePromotion {
|
|
|
30
30
|
maxDiscountPerOrder;
|
|
31
31
|
isSpendLimitEnabled;
|
|
32
32
|
spendLimit;
|
|
33
|
-
spendAmount;
|
|
34
33
|
valueType;
|
|
35
34
|
value;
|
|
36
35
|
status;
|
|
37
|
-
deactivationReason;
|
|
38
36
|
pausedAt;
|
|
39
37
|
createdBy;
|
|
38
|
+
amountSpent;
|
|
40
39
|
};
|
|
41
40
|
exports.ServicePromotion = ServicePromotion;
|
|
42
41
|
__decorate([
|
|
@@ -88,11 +87,7 @@ __decorate([
|
|
|
88
87
|
__metadata("design:type", Number)
|
|
89
88
|
], ServicePromotion.prototype, "spendLimit", void 0);
|
|
90
89
|
__decorate([
|
|
91
|
-
(0, typegoose_1.prop)({ type:
|
|
92
|
-
__metadata("design:type", Number)
|
|
93
|
-
], ServicePromotion.prototype, "spendAmount", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typegoose_1.prop)({ type: String, enum: enum_1.ValueType }),
|
|
90
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.ValueType, default: enum_1.ValueType.PERCENTAGE }),
|
|
96
91
|
__metadata("design:type", String)
|
|
97
92
|
], ServicePromotion.prototype, "valueType", void 0);
|
|
98
93
|
__decorate([
|
|
@@ -107,10 +102,6 @@ __decorate([
|
|
|
107
102
|
}),
|
|
108
103
|
__metadata("design:type", String)
|
|
109
104
|
], ServicePromotion.prototype, "status", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, typegoose_1.prop)({ type: String }),
|
|
112
|
-
__metadata("design:type", String)
|
|
113
|
-
], ServicePromotion.prototype, "deactivationReason", void 0);
|
|
114
105
|
__decorate([
|
|
115
106
|
(0, typegoose_1.prop)({ type: Date, default: null }),
|
|
116
107
|
__metadata("design:type", Object)
|
|
@@ -119,6 +110,10 @@ __decorate([
|
|
|
119
110
|
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
120
111
|
__metadata("design:type", Object)
|
|
121
112
|
], ServicePromotion.prototype, "createdBy", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
115
|
+
__metadata("design:type", Number)
|
|
116
|
+
], ServicePromotion.prototype, "amountSpent", void 0);
|
|
122
117
|
exports.ServicePromotion = ServicePromotion = __decorate([
|
|
123
118
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'servicePromotions' } })
|
|
124
119
|
], ServicePromotion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-promotion.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-promotion.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+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,MAAM,EAAE,CAAC;;+CACD;AAOf;IALN,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,sBAAe;QACrB,OAAO,EAAE,sBAAe,CAAC,MAAM;KAC/B,CAAC;;gDAC6B;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;mDACG;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACK;2BAzDhB,gBAAgB;IAD5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;GACxD,gBAAgB,CA0D5B","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { Vendor } from './vendor.model';\nimport { MarketingStatus, PromotionType, ValueType } from '../../../utilities/enum';\nimport { ServicePackage } from './service-package.model';\nimport { Admin } from './admin.model';\nimport { Duration, SlotRange } from './shared/duration.model';\nimport { ServiceAddon } from './service-addon.model';\n\n@modelOptions({ schemaOptions: { collection: 'servicePromotions' } })\nexport class ServicePromotion {\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ required: true, type: String, enum: PromotionType })\n\tpublic promotionType!: PromotionType;\n\n\t@prop({ required: true, type: Duration })\n\tpublic duration!: Duration;\n\n\t@prop({ required: true, type: Boolean })\n\tpublic isAppliedByCompany!: boolean;\n\n\t@prop({ ref: () => ServicePackage, default: [] })\n\tpublic servicePackages?: Ref<ServicePackage>[];\n\n\t@prop({ ref: () => ServiceAddon, default: [] })\n\tpublic addons?: Ref<ServiceAddon>[];\n\n\t@prop({ type: Boolean })\n\tpublic isEntireMenu?: boolean;\n\n\t@prop({ type: SlotRange, default: [] })\n\tpublic slotRanges?: SlotRange[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isMaxDiscountPerOrderEnabled?: boolean;\n\n\t@prop({ type: Number })\n\tpublic maxDiscountPerOrder?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSpendLimitEnabled?: boolean;\n\n\t@prop({ type: Number, min: 0 })\n\tpublic spendLimit?: number;\n\n\t@prop({ type: String, enum: ValueType, default: ValueType.PERCENTAGE })\n\tpublic valueType?: ValueType;\n\n\t@prop({ type: Number })\n\tpublic value?: number;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: MarketingStatus,\n\t\tdefault: MarketingStatus.ACTIVE,\n\t})\n\tpublic status: MarketingStatus;\n\n\t@prop({ type: Date, default: null })\n\tpublic pausedAt?: Date | null;\n\n\t@prop({ ref: () => Admin })\n\tpublic createdBy?: Ref<Admin>;\n\n\t@prop({ type: Number })\n\tpublic amountSpent?: number;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
26
26
|
searchFields?: string[] | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
sort?: Record<string, 1 | -1> | undefined;
|
|
29
|
-
populate?: any;
|
|
30
29
|
select?: Record<string, 0 | 1> | undefined;
|
|
30
|
+
populate?: any;
|
|
31
31
|
query?: Record<string, any> | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
search?: {
|
|
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
sort?: Record<string, 1 | -1> | undefined;
|
|
38
38
|
size?: number | undefined;
|
|
39
|
-
populate?: any;
|
|
40
39
|
select?: Record<string, 0 | 1> | undefined;
|
|
40
|
+
populate?: any;
|
|
41
41
|
query?: Record<string, any> | undefined;
|
|
42
42
|
page?: number | undefined;
|
|
43
43
|
}>>;
|
|
@@ -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
|
-
populate?: any;
|
|
737
736
|
select?: Record<string, 0 | 1> | undefined;
|
|
737
|
+
populate?: any;
|
|
738
738
|
}, {
|
|
739
739
|
_id: string | import("mongoose").Types.ObjectId;
|
|
740
|
-
populate?: any;
|
|
741
740
|
select?: Record<string, 0 | 1> | undefined;
|
|
741
|
+
populate?: any;
|
|
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
|
-
populate?: any;
|
|
755
754
|
select?: Record<string, 0 | 1> | undefined;
|
|
755
|
+
populate?: any;
|
|
756
756
|
}, {
|
|
757
757
|
_id: string | import("mongoose").Types.ObjectId;
|
|
758
|
-
populate?: any;
|
|
759
758
|
select?: Record<string, 0 | 1> | undefined;
|
|
759
|
+
populate?: any;
|
|
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
|
-
populate?: any;
|
|
772
771
|
select?: Record<string, 0 | 1> | undefined;
|
|
772
|
+
populate?: any;
|
|
773
773
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
774
774
|
}, {
|
|
775
775
|
_id: string | import("mongoose").Types.ObjectId;
|
|
776
|
-
populate?: any;
|
|
777
776
|
select?: Record<string, 0 | 1> | undefined;
|
|
777
|
+
populate?: any;
|
|
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
|
-
populate?: any;
|
|
786
785
|
select?: Record<string, 0 | 1> | undefined;
|
|
787
|
-
}, {
|
|
788
786
|
populate?: any;
|
|
787
|
+
}, {
|
|
789
788
|
select?: Record<string, 0 | 1> | undefined;
|
|
789
|
+
populate?: any;
|
|
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
|
-
populate?: any;
|
|
798
797
|
select?: Record<string, 0 | 1> | undefined;
|
|
798
|
+
populate?: any;
|
|
799
799
|
query?: Record<string, any> | undefined;
|
|
800
800
|
}, {
|
|
801
|
-
populate?: any;
|
|
802
801
|
select?: Record<string, 0 | 1> | undefined;
|
|
802
|
+
populate?: any;
|
|
803
803
|
query?: Record<string, any> | undefined;
|
|
804
804
|
}>;
|
|
805
805
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|