@lyxa.ai/core 1.3.142 → 1.3.144
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/event/events/sync-single-shop-sections-in-cache-event.d.ts +4 -0
- package/dist/libraries/event/events/sync-single-shop-sections-in-cache-event.js +2 -0
- package/dist/libraries/event/events/sync-single-shop-sections-in-cache-event.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/order-refund.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/order-refund.model.js +18 -1
- package/dist/libraries/mongo/models/embedded/order-refund.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/replacement-order.model.d.ts +4 -0
- package/dist/libraries/mongo/models/embedded/replacement-order.model.js +13 -1
- package/dist/libraries/mongo/models/embedded/replacement-order.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
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { BaseEvent } from '../BaseEvent';
|
|
2
|
+
import { ChangeStreamOperationTypes } from './mongo-stream-changes-batch-process-shops-event';
|
|
2
3
|
import { DTO } from '../../../utilities/validation/global-validation';
|
|
3
4
|
declare const SyncSingleShopSectionsInCacheValidationSchema: import("zod").ZodObject<{
|
|
4
5
|
shopId: import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
6
|
+
operation: import("zod").ZodNativeEnum<typeof ChangeStreamOperationTypes>;
|
|
5
7
|
}, "strict", import("zod").ZodTypeAny, {
|
|
6
8
|
shopId: import("mongoose").Types.ObjectId;
|
|
9
|
+
operation: ChangeStreamOperationTypes;
|
|
7
10
|
}, {
|
|
8
11
|
shopId: string | import("mongoose").Types.ObjectId;
|
|
12
|
+
operation: ChangeStreamOperationTypes;
|
|
9
13
|
}>;
|
|
10
14
|
export type SyncSingleShopSectionsInCacheDTO = DTO<typeof SyncSingleShopSectionsInCacheValidationSchema>;
|
|
11
15
|
export declare class SyncSingleShopSectionsInCacheEvent extends BaseEvent<Record<string, unknown>> {
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SyncSingleShopSectionsInCacheEvent = void 0;
|
|
4
4
|
const BaseEvent_1 = require("../BaseEvent");
|
|
5
5
|
const EventEnums_1 = require("../EventEnums");
|
|
6
|
+
const mongo_stream_changes_batch_process_shops_event_1 = require("./mongo-stream-changes-batch-process-shops-event");
|
|
6
7
|
const global_validation_1 = require("../../../utilities/validation/global-validation");
|
|
7
8
|
const baseFields = {
|
|
8
9
|
shopId: global_validation_1.ZodValidation.objectId(),
|
|
10
|
+
operation: global_validation_1.ZodValidation.enumType(mongo_stream_changes_batch_process_shops_event_1.ChangeStreamOperationTypes)
|
|
9
11
|
};
|
|
10
12
|
const schemaBuilder = (0, global_validation_1.createSchemaBuilder)(baseFields);
|
|
11
13
|
const { BaseSchema: SyncSingleShopSectionsInCacheValidationSchema } = schemaBuilder.getAllSchemas({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-single-shop-sections-in-cache-event.js","sourceRoot":"/","sources":["libraries/event/events/sync-single-shop-sections-in-cache-event.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AACzC,8CAAkD;AAClD,uFAA0G;AAE1G,MAAM,UAAU,GAAG;IAClB,MAAM,EAAE,iCAAa,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"sync-single-shop-sections-in-cache-event.js","sourceRoot":"/","sources":["libraries/event/events/sync-single-shop-sections-in-cache-event.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AACzC,8CAAkD;AAClD,qHAA8F;AAC9F,uFAA0G;AAE1G,MAAM,UAAU,GAAG;IAClB,MAAM,EAAE,iCAAa,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,iCAAa,CAAC,QAAQ,CAAC,2EAA0B,CAAC;CAC7D,CAAC;AACF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AACtD,MAAM,EAAE,UAAU,EAAE,6CAA6C,EAAE,GAAG,aAAa,CAAC,aAAa,CAAC;IACjG,SAAS,EAAE,IAAI;CACf,CAAC,CAAC;AAIH,MAAa,kCAAmC,SAAQ,qBAAkC;IACzF,YAAY,OAAyC;QACpD,KAAK,CAAC,8BAAiB,CAAC,qCAAqC,EAAE,OAAkC,CAAC,CAAC;IACpG,CAAC;CACD;AAJD,gFAIC","sourcesContent":["import { BaseEvent } from '../BaseEvent';\nimport { PublishEventEnums } from '../EventEnums';\nimport { ChangeStreamOperationTypes } from './mongo-stream-changes-batch-process-shops-event';\nimport { createSchemaBuilder, DTO, ZodValidation } from '../../../utilities/validation/global-validation';\n\nconst baseFields = {\n\tshopId: ZodValidation.objectId(),\n\toperation: ZodValidation.enumType(ChangeStreamOperationTypes)\n};\nconst schemaBuilder = createSchemaBuilder(baseFields);\nconst { BaseSchema: SyncSingleShopSectionsInCacheValidationSchema } = schemaBuilder.getAllSchemas({\n\tcreatedAt: true,\n});\n\nexport type SyncSingleShopSectionsInCacheDTO = DTO<typeof SyncSingleShopSectionsInCacheValidationSchema>;\n\nexport class SyncSingleShopSectionsInCacheEvent extends BaseEvent<Record<string, unknown>> {\n\tconstructor(payload: SyncSingleShopSectionsInCacheDTO) {\n\t\tsuper(PublishEventEnums.SYNC_SINGLE_SHOP_SECTIONS_CACHE_EVENT, payload as Record<string, unknown>);\n\t}\n}\n"]}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Ref } from '@typegoose/typegoose';
|
|
2
2
|
import { LineItem } from '../line-item.model';
|
|
3
|
+
import { LineItemAttribute } from './line-item-attribute.model';
|
|
4
|
+
import { Product } from '../product.model';
|
|
3
5
|
declare class SelectedLineItemsInfo {
|
|
4
6
|
lineItemId: Ref<LineItem>;
|
|
5
7
|
quantity?: number;
|
|
8
|
+
product?: Ref<Product>;
|
|
9
|
+
attributes?: LineItemAttribute[][];
|
|
10
|
+
isOnlyAttributeRefunded?: boolean;
|
|
6
11
|
}
|
|
7
12
|
export declare class OrderRefund {
|
|
8
13
|
isFullRefund?: boolean;
|
|
@@ -12,9 +12,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.OrderRefund = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const line_item_model_1 = require("../line-item.model");
|
|
15
|
+
const line_item_attribute_model_1 = require("./line-item-attribute.model");
|
|
16
|
+
const product_model_1 = require("../product.model");
|
|
15
17
|
class SelectedLineItemsInfo {
|
|
16
18
|
lineItemId;
|
|
17
19
|
quantity;
|
|
20
|
+
product;
|
|
21
|
+
attributes;
|
|
22
|
+
isOnlyAttributeRefunded;
|
|
18
23
|
}
|
|
19
24
|
__decorate([
|
|
20
25
|
(0, typegoose_1.prop)({ required: true, ref: () => line_item_model_1.LineItem }),
|
|
@@ -24,6 +29,18 @@ __decorate([
|
|
|
24
29
|
(0, typegoose_1.prop)({ type: Number, default: 1 }),
|
|
25
30
|
__metadata("design:type", Number)
|
|
26
31
|
], SelectedLineItemsInfo.prototype, "quantity", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typegoose_1.prop)({ required: true, ref: () => product_model_1.Product }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], SelectedLineItemsInfo.prototype, "product", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typegoose_1.prop)({ type: () => [[line_item_attribute_model_1.LineItemAttribute]], default: [] }),
|
|
38
|
+
__metadata("design:type", Array)
|
|
39
|
+
], SelectedLineItemsInfo.prototype, "attributes", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typegoose_1.prop)({ type: Boolean }),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], SelectedLineItemsInfo.prototype, "isOnlyAttributeRefunded", void 0);
|
|
27
44
|
class OrderRefund {
|
|
28
45
|
isFullRefund;
|
|
29
46
|
selectedLineItems;
|
|
@@ -44,7 +61,7 @@ __decorate([
|
|
|
44
61
|
__metadata("design:type", Boolean)
|
|
45
62
|
], OrderRefund.prototype, "isFullRefund", void 0);
|
|
46
63
|
__decorate([
|
|
47
|
-
(0, typegoose_1.prop)({ type: () => [SelectedLineItemsInfo], default: [] }),
|
|
64
|
+
(0, typegoose_1.prop)({ type: () => [SelectedLineItemsInfo], default: [], _id: false }),
|
|
48
65
|
__metadata("design:type", Array)
|
|
49
66
|
], OrderRefund.prototype, "selectedLineItems", void 0);
|
|
50
67
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-refund.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-refund.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,wDAA8C;
|
|
1
|
+
{"version":3,"file":"order-refund.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-refund.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,wDAA8C;AAC9C,2EAAgE;AAChE,oDAA2C;AAE3C,MAAM,qBAAqB;IAEnB,UAAU,CAAiB;IAG3B,QAAQ,CAAU;IAGlB,OAAO,CAAgB;IAGvB,UAAU,CAAyB;IAGnC,uBAAuB,CAAW;CACzC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;yDACZ;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACV;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,G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AI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oEACa;AAGzC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;6EACsB;AAGlD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uEACgB;AAG5C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gFACyB;AAGrD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACP;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yDACE","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { LineItem } from '../line-item.model';\nimport { LineItemAttribute } from './line-item-attribute.model';\nimport { Product } from '../product.model';\n\nclass SelectedLineItemsInfo {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItemId!: Ref<LineItem>;\n\n\t@prop({ type: Number, default: 1 })\n\tpublic quantity?: number;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product?: Ref<Product>;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: Boolean })\n\tpublic isOnlyAttributeRefunded?: boolean;\n}\n\nexport class OrderRefund {\n\t@prop({ type: Boolean, default: false })\n\tpublic isFullRefund?: boolean;\n\n\t@prop({ type: () => [SelectedLineItemsInfo], default: [], _id: false })\n\tpublic selectedLineItems?: SelectedLineItemsInfo[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByShopForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByShopForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalRefund?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryTotalRefund?: number;\n}\n"]}
|
|
@@ -2,9 +2,13 @@ import { Ref } from '@typegoose/typegoose';
|
|
|
2
2
|
import { ReplacementType } from '../../../../utilities/enum';
|
|
3
3
|
import { Order } from '../order.model';
|
|
4
4
|
import { LineItem } from '../line-item.model';
|
|
5
|
+
import { LineItemAttribute } from './line-item-attribute.model';
|
|
6
|
+
import { Product } from '../product.model';
|
|
5
7
|
declare class SelectedLineItemsInfo {
|
|
6
8
|
lineItemId: Ref<LineItem>;
|
|
7
9
|
quantity?: number;
|
|
10
|
+
product?: Ref<Product>;
|
|
11
|
+
attributes?: LineItemAttribute[][];
|
|
8
12
|
}
|
|
9
13
|
export declare class ReplacementOrder {
|
|
10
14
|
originalOrder: Ref<Order>;
|
|
@@ -14,9 +14,13 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
14
14
|
const enum_1 = require("../../../../utilities/enum");
|
|
15
15
|
const order_model_1 = require("../order.model");
|
|
16
16
|
const line_item_model_1 = require("../line-item.model");
|
|
17
|
+
const line_item_attribute_model_1 = require("./line-item-attribute.model");
|
|
18
|
+
const product_model_1 = require("../product.model");
|
|
17
19
|
class SelectedLineItemsInfo {
|
|
18
20
|
lineItemId;
|
|
19
21
|
quantity;
|
|
22
|
+
product;
|
|
23
|
+
attributes;
|
|
20
24
|
}
|
|
21
25
|
__decorate([
|
|
22
26
|
(0, typegoose_1.prop)({ required: true, ref: () => line_item_model_1.LineItem }),
|
|
@@ -26,6 +30,14 @@ __decorate([
|
|
|
26
30
|
(0, typegoose_1.prop)({ type: Number, default: 1 }),
|
|
27
31
|
__metadata("design:type", Number)
|
|
28
32
|
], SelectedLineItemsInfo.prototype, "quantity", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typegoose_1.prop)({ required: true, ref: () => product_model_1.Product }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], SelectedLineItemsInfo.prototype, "product", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typegoose_1.prop)({ type: () => [[line_item_attribute_model_1.LineItemAttribute]], default: [] }),
|
|
39
|
+
__metadata("design:type", Array)
|
|
40
|
+
], SelectedLineItemsInfo.prototype, "attributes", void 0);
|
|
29
41
|
class ReplacementOrder {
|
|
30
42
|
originalOrder;
|
|
31
43
|
selectedLineItems;
|
|
@@ -46,7 +58,7 @@ __decorate([
|
|
|
46
58
|
__metadata("design:type", Object)
|
|
47
59
|
], ReplacementOrder.prototype, "originalOrder", void 0);
|
|
48
60
|
__decorate([
|
|
49
|
-
(0, typegoose_1.prop)({ type: () => [SelectedLineItemsInfo], default: [] }),
|
|
61
|
+
(0, typegoose_1.prop)({ type: () => [SelectedLineItemsInfo], default: [], _id: false }),
|
|
50
62
|
__metadata("design:type", Array)
|
|
51
63
|
], ReplacementOrder.prototype, "selectedLineItems", void 0);
|
|
52
64
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replacement-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/replacement-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA6D;AAC7D,gDAAuC;AACvC,wDAA8C;
|
|
1
|
+
{"version":3,"file":"replacement-order.model.js","sourceRoot":"/","sources":["libra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B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;;2DACpB;AAG5C;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAe,EAAE,CAAC;;yDACrB;AAGlC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mEACO;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4EACgB;AAG5C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sEACU;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+EACmB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sEACU;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+EACmB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yEACa;AAGzC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kFACsB;AAGlD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACG","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { ReplacementType } from '../../../../utilities/enum';\nimport { Order } from '../order.model';\nimport { LineItem } from '../line-item.model';\nimport { LineItemAttribute } from './line-item-attribute.model';\nimport { Product } from '../product.model';\n\nclass SelectedLineItemsInfo {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItemId!: Ref<LineItem>;\n\n\t@prop({ type: Number, default: 1 })\n\tpublic quantity?: number;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product?: Ref<Product>;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n}\n\nexport class ReplacementOrder {\n\t@prop({ required: true, ref: () => Order })\n\tpublic originalOrder!: Ref<Order>;\n\n\t@prop({ type: () => [SelectedLineItemsInfo], default: [], _id: false })\n\tpublic selectedLineItems?: SelectedLineItemsInfo[];\n\n\t@prop({ required: true, type: String, enum: ReplacementType })\n\tpublic replacementType!: ReplacementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByShopForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByShopForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByShopForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByCompanyForItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByCompanyForDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByCompanyForDelivery?: number;\n\n\t@prop({ type: String })\n\tpublic bringItem?: string;\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>;
|