@lyxa.ai/core 1.3.56 → 1.3.58
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/embedded/adjustment-information.model.d.ts +1 -0
- package/dist/libraries/mongo/models/embedded/adjustment-information.model.js +5 -0
- package/dist/libraries/mongo/models/embedded/adjustment-information.model.js.map +1 -1
- package/dist/libraries/mongo/models/line-item.model.d.ts +2 -0
- package/dist/libraries/mongo/models/line-item.model.js +13 -3
- package/dist/libraries/mongo/models/line-item.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.js +5 -5
- package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
- package/dist/libraries/socket/events/order-actions.socket.event.d.ts +6 -6
- package/dist/libraries/socket/events/order-actions.socket.event.js +2 -2
- package/dist/libraries/socket/events/order-actions.socket.event.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
|
@@ -82,6 +82,7 @@ class AdjustmentHistory {
|
|
|
82
82
|
addedLineItems;
|
|
83
83
|
timestamp;
|
|
84
84
|
adjustmentType;
|
|
85
|
+
adjustmentRef;
|
|
85
86
|
admin;
|
|
86
87
|
}
|
|
87
88
|
exports.AdjustmentHistory = AdjustmentHistory;
|
|
@@ -105,6 +106,10 @@ __decorate([
|
|
|
105
106
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.AdjustmentType }),
|
|
106
107
|
__metadata("design:type", String)
|
|
107
108
|
], AdjustmentHistory.prototype, "adjustmentType", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], AdjustmentHistory.prototype, "adjustmentRef", void 0);
|
|
108
113
|
__decorate([
|
|
109
114
|
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
110
115
|
__metadata("design:type", Object)
|
|
@@ -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,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;kDACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;8CAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;0DACJ;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0DACF;AAGlC,MAAa,qBAAqB;IAE1B,MAAM,CAAoB;IAG1B,gBAAgB,CAA+B;IAG/C,iBAAiB,CAAsB;IAGvC,WAAW,CAAQ;IAGnB,UAAU,CAAQ;IAGlB,KAAK,CAAc;IAGnB,eAAe,CAAW;CACjC;AArBD,sDAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;qDACd;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,oBAAQ,CAAC,GAAG,CAAC;8BAC3B,GAAG;+DAAyB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;gEACR;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC3B,IAAI;0DAAC;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;8BACP,IAAI;yDAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;oDACD;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACP;AAGlC,MAAa,iBAAiB;IAEtB,gBAAgB,CAA+B;IAG/C,iBAAiB,CAAmB;IAGpC,cAAc,CAAmB;IAGjC,SAAS,CAAQ;IAGjB,cAAc,CAAiB;IAG/B,KAAK,CAAc;CAC1B;
|
|
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,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;kDACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,C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P;AAGlC,MAAa,iBAAiB;IAEtB,gBAAgB,CAA+B;IAG/C,iBAAiB,CAAmB;IAGpC,cAAc,CAAmB;IAGjC,SAAS,CAAQ;IAGjB,cAAc,CAAiB;IAG/B,aAAa,CAAS;IAGtB,KAAK,CAAc;CAC1B;AArBD,8CAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,oBAAQ,CAAC,GAAG,CAAC;8BAC3B,GAAG;2DAAyB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4DACA;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yDACH;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BACvB,IAAI;oDAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAc,EAAE,CAAC;;yDACP;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACV;AAGtB;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({ 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"]}
|
|
@@ -50,6 +50,8 @@ let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
|
|
|
50
50
|
isB1G1;
|
|
51
51
|
adjustReason;
|
|
52
52
|
lineItemHash;
|
|
53
|
+
adjustmentRef;
|
|
54
|
+
isSkipped;
|
|
53
55
|
cartParticipant;
|
|
54
56
|
};
|
|
55
57
|
exports.LineItem = LineItem;
|
|
@@ -98,11 +100,11 @@ __decorate([
|
|
|
98
100
|
__metadata("design:type", Number)
|
|
99
101
|
], LineItem.prototype, "quantity", void 0);
|
|
100
102
|
__decorate([
|
|
101
|
-
(0, typegoose_1.prop)({ type: String, enum: enum_1.PriceOption, default: enum_1.PriceOption.SINGLE_PRICE }),
|
|
103
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.PriceOption, default: enum_1.PriceOption.SINGLE_PRICE, _id: false }),
|
|
102
104
|
__metadata("design:type", String)
|
|
103
105
|
], LineItem.prototype, "priceOption", void 0);
|
|
104
106
|
__decorate([
|
|
105
|
-
(0, typegoose_1.prop)({ required: true, type: price_breakdown_model_1.OrderPriceBreakdown }),
|
|
107
|
+
(0, typegoose_1.prop)({ required: true, type: price_breakdown_model_1.OrderPriceBreakdown, _id: false }),
|
|
106
108
|
__metadata("design:type", price_breakdown_model_1.OrderPriceBreakdown)
|
|
107
109
|
], LineItem.prototype, "priceBreakdown", void 0);
|
|
108
110
|
__decorate([
|
|
@@ -118,7 +120,7 @@ __decorate([
|
|
|
118
120
|
__metadata("design:type", String)
|
|
119
121
|
], LineItem.prototype, "specialInstructions", void 0);
|
|
120
122
|
__decorate([
|
|
121
|
-
(0, typegoose_1.prop)({ type: typegoose_1.mongoose.Schema.Types.Mixed }),
|
|
123
|
+
(0, typegoose_1.prop)({ type: typegoose_1.mongoose.Schema.Types.Mixed, _id: false }),
|
|
122
124
|
__metadata("design:type", Object)
|
|
123
125
|
], LineItem.prototype, "calculationSnap", void 0);
|
|
124
126
|
__decorate([
|
|
@@ -149,6 +151,14 @@ __decorate([
|
|
|
149
151
|
(0, typegoose_1.prop)({ type: String, select: false }),
|
|
150
152
|
__metadata("design:type", String)
|
|
151
153
|
], LineItem.prototype, "lineItemHash", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, typegoose_1.prop)({ type: String, select: false }),
|
|
156
|
+
__metadata("design:type", String)
|
|
157
|
+
], LineItem.prototype, "adjustmentRef", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
160
|
+
__metadata("design:type", Boolean)
|
|
161
|
+
], LineItem.prototype, "isSkipped", void 0);
|
|
152
162
|
__decorate([
|
|
153
163
|
(0, typegoose_1.prop)({
|
|
154
164
|
ref: () => cart_participant_model_1.CartParticipant,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0F;AAC1F,4EAAqE;AACrE,6CAAoC;AACpC,mDAA0C;AAC1C,4EAAuE;AACvE,kDAAgE;AAChE,oFAAyE;AACzE,6CAAoC;AACpC,6CAAoC;AACpC,iDAAwC;AACxC,qDAA4C;AAC5C,uDAA8C;AAC9C,sEAA4D;AAC5D,qEAA2D;AAC3D,uEAA6D;AAqBtD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAc;IAGpB,QAAQ,CAAY;IAGpB,QAAQ,CAAiB;IAGzB,OAAO,CAAgB;IAGvB,WAAW,CAAe;IAG1B,UAAU,CAAoB;IAG9B,iBAAiB,CAA2B;IAG5C,QAAQ,CAAS;IAGjB,WAAW,CAAe;IAG1B,cAAc,CAAsB;IAGpC,UAAU,CAAyB;IAGnC,kBAAkB,CAAY;IAG9B,mBAAmB,CAAU;IAG7B,eAAe,CAA2B;IAG1C,UAAU,CAAU;IAGpB,iBAAiB,CAAU;IAG3B,wBAAwB,CAAW;IAGnC,gBAAgB,CAAS;IAGzB,MAAM,CAAU;IAGhB,YAAY,CAAU;IAGtB,YAAY,CAAS;
|
|
1
|
+
{"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.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IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;2CACd;AASnB;IAPN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,wCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,CAAC,GAAa,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;KAC9C,CAAC;;iDAC4C;mBAtFlC,QAAQ;IAhBpB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,WAAW;YACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5B;QACD,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC3B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACrB,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC1B,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAChC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACpB,QAAQ,CAuFpB","sourcesContent":["import { prop, Ref, index, modelOptions, Severity, mongoose } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { Product } from './product.model';\nimport { OrderPriceBreakdown } from './embedded/price-breakdown.model';\nimport { ItemType, PriceOption } from '../../../utilities/enum';\nimport { LineItemAttribute } from './embedded/line-item-attribute.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Parent } from './parent.model';\nimport { Category } from './category.model';\nimport { Marketing } from './marketing.model';\nimport { ProductSnap } from './embedded/product-snap.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { ProductMarketing } from './product-marketing.model';\n\n/**\n * LineItem model - Represents individual items in a cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'lineItems',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1 })\n@index({ cart: 1, user: 1 })\n@index({ product: 1 })\n@index({ lineItemHash: 1 })\n@index({ shop: 1, deletedAt: 1 })\n@index({ shop: 1, createdAt: 1 })\nexport class LineItem extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent: Ref<Parent>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, ref: () => Category })\n\tpublic category!: Ref<Category>;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product!: Ref<Product>;\n\n\t@prop({ type: ProductSnap, _id: false })\n\tpublic productSnap?: ProductSnap;\n\n\t@prop({ ref: () => Marketing, default: [] })\n\tpublic marketings?: Ref<Marketing>[];\n\n\t@prop({ ref: () => ProductMarketing, default: [] })\n\tpublic productMarketings?: Ref<ProductMarketing>[];\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity: number;\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE, _id: false })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: OrderPriceBreakdown, _id: false })\n\tpublic priceBreakdown: OrderPriceBreakdown;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic removedIngredients?: string[];\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: mongoose.Schema.Types.Mixed, _id: false })\n\tpublic calculationSnap?: Record<string, unknown>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPartialAdjusted: boolean;\n\n\t@prop({ type: Boolean })\n\tpublic isCreatedAfterAdjustment?: boolean;\n\n\t@prop({ default: 0 })\n\tpublic adjustedQuantity: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isB1G1: boolean;\n\n\t@prop({ type: String })\n\tpublic adjustReason?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic lineItemHash: string;\n\n\t@prop({ type: String, select: false })\n\tpublic adjustmentRef: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSkipped: boolean;\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t\tjustOne: true,\n\t\tmatch: (doc: LineItem) => ({ user: doc.user }),\n\t})\n\tpublic cartParticipant?: Ref<CartParticipant>;\n}\n"]}
|
|
@@ -118,7 +118,7 @@ __decorate([
|
|
|
118
118
|
__metadata("design:type", Boolean)
|
|
119
119
|
], RegularOrder.prototype, "isReplacementOrder", void 0);
|
|
120
120
|
__decorate([
|
|
121
|
-
(0, typegoose_1.prop)({ type: () => replacement_order_model_1.ReplacementOrder }),
|
|
121
|
+
(0, typegoose_1.prop)({ type: () => replacement_order_model_1.ReplacementOrder, _id: false }),
|
|
122
122
|
__metadata("design:type", replacement_order_model_1.ReplacementOrder)
|
|
123
123
|
], RegularOrder.prototype, "replacementOrderInformation", void 0);
|
|
124
124
|
__decorate([
|
|
@@ -138,7 +138,7 @@ __decorate([
|
|
|
138
138
|
__metadata("design:type", Boolean)
|
|
139
139
|
], RegularOrder.prototype, "isEndorseLossApplied", void 0);
|
|
140
140
|
__decorate([
|
|
141
|
-
(0, typegoose_1.prop)({ type: () => order_cancel_model_1.EndorseLoss }),
|
|
141
|
+
(0, typegoose_1.prop)({ type: () => order_cancel_model_1.EndorseLoss, _id: false }),
|
|
142
142
|
__metadata("design:type", order_cancel_model_1.EndorseLoss)
|
|
143
143
|
], RegularOrder.prototype, "endorseLossInformation", void 0);
|
|
144
144
|
__decorate([
|
|
@@ -150,7 +150,7 @@ __decorate([
|
|
|
150
150
|
__metadata("design:type", String)
|
|
151
151
|
], RegularOrder.prototype, "adjustmentStatus", void 0);
|
|
152
152
|
__decorate([
|
|
153
|
-
(0, typegoose_1.prop)({ type: () => adjustment_information_model_1.AdjustmentInformation }),
|
|
153
|
+
(0, typegoose_1.prop)({ type: () => adjustment_information_model_1.AdjustmentInformation, _id: false }),
|
|
154
154
|
__metadata("design:type", adjustment_information_model_1.AdjustmentInformation)
|
|
155
155
|
], RegularOrder.prototype, "adjustmentInformation", void 0);
|
|
156
156
|
__decorate([
|
|
@@ -158,11 +158,11 @@ __decorate([
|
|
|
158
158
|
__metadata("design:type", Array)
|
|
159
159
|
], RegularOrder.prototype, "adjustmentHistory", void 0);
|
|
160
160
|
__decorate([
|
|
161
|
-
(0, typegoose_1.prop)({ required: true, type: regular_order_finance_model_1.RegularOrderFinance }),
|
|
161
|
+
(0, typegoose_1.prop)({ required: true, type: regular_order_finance_model_1.RegularOrderFinance, _id: false }),
|
|
162
162
|
__metadata("design:type", regular_order_finance_model_1.RegularOrderFinance)
|
|
163
163
|
], RegularOrder.prototype, "finance", void 0);
|
|
164
164
|
__decorate([
|
|
165
|
-
(0, typegoose_1.prop)({ type: regular_order_finance_model_1.RegularOrderFinance }),
|
|
165
|
+
(0, typegoose_1.prop)({ type: regular_order_finance_model_1.RegularOrderFinance, _id: false }),
|
|
166
166
|
__metadata("design:type", regular_order_finance_model_1.RegularOrderFinance)
|
|
167
167
|
], RegularOrder.prototype, "adjustedFinance", void 0);
|
|
168
168
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAuG;AACvG,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAuE;AACvE,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;AAC5D,2FAAoG;AACpG,2FAA4F;AAE5F,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAY;IAGhB,aAAa,CAAgB;IAG7B,MAAM,CAAqB;IAG3B,cAAc,CAA+B;IAG7C,QAAQ,CAAU;IAGlB,aAAa,CAAU;IAGvB,eAAe,CAAsB;IAGrC,oBAAoB,CAAsC;IAG1D,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,cAAc,CAAW;IAGzB,sBAAsB,CAAU;IAGhC,kBAAkB,CAAW;IAG7B,2BAA2B,CAAoB;IAG/C,gBAAgB,CAAc;IAG9B,UAAU,CAAW;IAGrB,iBAAiB,CAAe;IAGhC,oBAAoB,CAAW;IAG/B,sBAAsB,CAAe;IAGrC,UAAU,CAAW;IAGrB,gBAAgB,CAAmB;IAGnC,qBAAqB,CAAyB;IAG9C,iBAAiB,CAAuB;IAGxC,OAAO,CAAsB;IAG7B,eAAe,CAAuB;IAGtC,YAAY,CAAW;IAOvB,SAAS,CAAkB;IAO3B,gBAAgB,CA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A,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;0CAChC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACR;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4DACI;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDACJ;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,0CAAgB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAuG;AACvG,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAuE;AACvE,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;AAC5D,2FAAoG;AACpG,2FAA4F;AAE5F,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAY;IAGhB,aAAa,CAAgB;IAG7B,MAAM,CAAqB;IAG3B,cAAc,CAA+B;IAG7C,QAAQ,CAAU;IAGlB,aAAa,CAAU;IAGvB,eAAe,CAAsB;IAGrC,oBAAoB,CAAsC;IAG1D,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,cAAc,CAAW;IAGzB,sBAAsB,CAAU;I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AAG,EAAE,CAAC,wCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;sDAC8C","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { AdjustmentStatus, ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\nimport { Cart } from '../cart.model';\nimport { Address, RegularOrderAddress } from '../shared/address.model';\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { OrderRefund } from '../embedded/order-refund.model';\nimport { RegularOrderFinance } from '../embedded/regular-order-finance.model';\nimport { EndorseLoss } from '../embedded/order-cancel.model';\nimport { ReplacementOrder } from '../embedded/replacement-order.model';\nimport { LineItem } from '../line-item.model';\nimport { User } from '../user.model';\nimport { Rider } from '../rider.model';\nimport { CartParticipant } from '../cart-participant.model';\nimport { AdjustmentHistory, AdjustmentInformation } from '../embedded/adjustment-information.model';\nimport { RegularOrderAddressChangeHistory } from '../embedded/address-change-history.model';\n\nexport class RegularOrder extends Order {\n\tpublic orderType = OrderType.REGULAR as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Rider })\n\tpublic supportRiders?: Ref<Rider>[];\n\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\n\tpublic status: RegularOrderStatus;\n\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\n\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\n\tpublic itemType?: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic pickupAddress: Address;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic deliveryAddress: RegularOrderAddress;\n\n\t@prop({ type: [RegularOrderAddressChangeHistory] })\n\tpublic addressChangeHistory?: RegularOrderAddressChangeHistory[];\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Cart, unique: true })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopDelivery?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic preparingTimeInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacementOrder?: boolean;\n\n\t@prop({ type: () => ReplacementOrder, _id: false })\n\tpublic replacementOrderInformation?: ReplacementOrder;\n\n\t@prop({ ref: () => Order })\n\tpublic replacementOrder?: Ref<Order>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: OrderRefund })\n\tpublic refundInformation?: OrderRefund;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => EndorseLoss, _id: false })\n\tpublic endorseLossInformation?: EndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus: AdjustmentStatus;\n\n\t@prop({ type: () => AdjustmentInformation, _id: false })\n\tpublic adjustmentInformation?: AdjustmentInformation;\n\n\t@prop({ type: () => [AdjustmentHistory], default: [] })\n\tpublic adjustmentHistory?: AdjustmentHistory[];\n\n\t@prop({ required: true, type: RegularOrderFinance, _id: false })\n\tpublic finance: RegularOrderFinance;\n\n\t@prop({ type: RegularOrderFinance, _id: false })\n\tpublic adjustedFinance?: RegularOrderFinance;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isGroupOrder?: boolean;\n\n\t@prop({\n\t\tref: () => LineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic lineItems: Ref<LineItem>[];\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic cartParticipants: Ref<CartParticipant>[];\n}\n"]}
|
|
@@ -144,22 +144,22 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
144
144
|
preparationTimeMinutes: number;
|
|
145
145
|
}>;
|
|
146
146
|
export declare const OrderActionsInputSchema: z.ZodObject<{
|
|
147
|
-
shopId: z.
|
|
147
|
+
shopId: 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>]>;
|
|
148
148
|
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
shopId
|
|
149
|
+
shopId: import("mongoose").Types.ObjectId;
|
|
150
150
|
}, {
|
|
151
|
-
shopId
|
|
151
|
+
shopId: string | import("mongoose").Types.ObjectId;
|
|
152
152
|
}>;
|
|
153
153
|
export type OrderActionSocketInputDTO = DTO<typeof OrderActionsInputSchema>;
|
|
154
154
|
export type OrderActionSocketOutputDTO = DTO<typeof OrderActionsOutputSchema>;
|
|
155
155
|
export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof OrderActionsInputSchema, typeof OrderActionsOutputSchema> {
|
|
156
156
|
static readonly schemas: {
|
|
157
157
|
input: z.ZodObject<{
|
|
158
|
-
shopId: z.
|
|
158
|
+
shopId: 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>]>;
|
|
159
159
|
}, "strip", z.ZodTypeAny, {
|
|
160
|
-
shopId
|
|
160
|
+
shopId: import("mongoose").Types.ObjectId;
|
|
161
161
|
}, {
|
|
162
|
-
shopId
|
|
162
|
+
shopId: string | import("mongoose").Types.ObjectId;
|
|
163
163
|
}>;
|
|
164
164
|
output: z.ZodObject<{
|
|
165
165
|
_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>]>;
|
|
@@ -45,7 +45,7 @@ exports.OrderActionsOutputSchema = zod_1.z.object({
|
|
|
45
45
|
triggerAt: validation_1.ZodValidation.coerce.date('Order Trigger Date'),
|
|
46
46
|
});
|
|
47
47
|
exports.OrderActionsInputSchema = zod_1.z.object({
|
|
48
|
-
shopId: validation_1.ZodValidation.objectId('shopId')
|
|
48
|
+
shopId: validation_1.ZodValidation.objectId('shopId'),
|
|
49
49
|
});
|
|
50
50
|
class OrderActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
51
51
|
static schemas = {
|
|
@@ -57,7 +57,7 @@ class OrderActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
57
57
|
super(enum_1.SocketEventType.ORDER_ACTIONS, OrderActionsSocketEvent.schemas, payload);
|
|
58
58
|
}
|
|
59
59
|
static identifier(input) {
|
|
60
|
-
return input.shopId
|
|
60
|
+
return input.shopId.toString();
|
|
61
61
|
}
|
|
62
62
|
getIdentifier() {
|
|
63
63
|
console.log('this.data.shopId.toString(): ', this.data.shopId.toString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/order-actions.socket.event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+DAAoE;AACpE,kDAA6F;AAC7F,wDAAqD;AACrD,uEAAoE;AAEpE,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;AAC5B,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,0BAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACtC,IAAI,E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AuB;QAC9B,MAAM,EAAE,gCAAwB;QAChC,uBAAuB,EAAE,IAAI,iDAAuB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;KAC/E,CAAC;IAEF,YAAY,OAAmC;QAC9C,KAAK,CAAC,sBAAe,CAAC,aAAa,EAAE,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAA8C;QAC/D,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IAES,aAAa;QACtB,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;;AArBF,0DAsBC","sourcesContent":["import { z } from 'zod';\nimport { DTO, ZodValidation } from '../../../utilities/validation/';\nimport { PaymentMethod, RegularOrderStatus, SocketEventType } from '../../../utilities/enum';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { SocketNotificationEvent } from './socketNotificationEvent';\n\nexport enum OrderAction {\n\tPLACED = 'placed',\n\tADJUSTMENT = 'adjustment',\n\tREPLACEMENT = 'replacement',\n}\n\nconst OrderUserSchema = z.object({\n\t_id: ZodValidation.objectId('User ID'),\n\tname: ZodValidation.string('User Name'),\n});\n\nexport const OrderActionsOutputSchema = z.object({\n\t_id: ZodValidation.objectId('Order ID'),\n\tshopId: ZodValidation.objectId('shopId'),\n\torderId: ZodValidation.string('Readable Order ID'),\n\tuser: OrderUserSchema,\n\torderStatus: ZodValidation.enumType(RegularOrderStatus, 'status'),\n\torderAction: ZodValidation.enumType(OrderAction, 'orderAction'),\n\tpaymentMethod: ZodValidation.enumType(PaymentMethod, 'paymentMethod'),\n\tpreparationTimeMinutes: ZodValidation.number('Preparation Time (minutes)', {\n\t\tisNonnegative: true,\n\t}),\n\tadjustedFinance: z.object({\n\t\tpaymentMethod: ZodValidation.enumType(PaymentMethod, 'paymentMethod'),\n\t\tshopProfit: ZodValidation.number('shopProfit'),\n\t\tpricing: z.object({\n\t\t\ttotal: ZodValidation.number('total'),\n\t\t\tsecondaryTotal: ZodValidation.number('secondaryTotal'),\n\t\t\tpaidAmount: ZodValidation.number('paidAmount'),\n\t\t\tsecondaryPaidAmount: ZodValidation.number('secondaryPaidAmount'),\n\t\t\tdeliveryFee: ZodValidation.number('deliveryFee'),\n\t\t\tsecondaryDeliveryFee: ZodValidation.number('secondaryDeliveryFee'),\n\t\t\triderTips: ZodValidation.number('riderTip'),\n\t\t\tsecondaryRiderTips: ZodValidation.number('secondaryRiderTips'),\n\t\t}),\n\t}),\n\tcreatedAt: ZodValidation.coerce.date('Order Creation Date'),\n\ttriggerAt: ZodValidation.coerce.date('Order Trigger Date'),\n});\n\nexport const OrderActionsInputSchema = z.object({\n\tshopId: ZodValidation.objectId('shopId'),\n});\n\nexport type OrderActionSocketInputDTO = DTO<typeof OrderActionsInputSchema>;\nexport type OrderActionSocketOutputDTO = DTO<typeof OrderActionsOutputSchema>;\n\nexport class OrderActionsSocketEvent extends BaseSocketEvent<\n\ttypeof OrderActionsInputSchema,\n\ttypeof OrderActionsOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: OrderActionsInputSchema,\n\t\toutput: OrderActionsOutputSchema,\n\t\tsocketNotificationEvent: new SocketNotificationEvent({ message: 'New Order!' }),\n\t};\n\n\tconstructor(payload: OrderActionSocketOutputDTO) {\n\t\tsuper(SocketEventType.ORDER_ACTIONS, OrderActionsSocketEvent.schemas, payload);\n\t}\n\n\tstatic identifier(input: z.infer<typeof OrderActionsInputSchema>): string {\n\t\treturn input.shopId.toString();\n\t}\n\n\tprotected getIdentifier(): string {\n\t\tconsole.log('this.data.shopId.toString(): ', this.data.shopId.toString());\n\t\treturn this.data.shopId.toString();\n\t}\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
|
-
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>;
|