@medusajs/medusa 1.3.1-next.35 → 1.3.1-next.41
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/api/routes/admin/discounts/create-discount.d.ts +3 -2
- package/dist/api/routes/admin/discounts/create-discount.js +7 -4
- package/dist/api/routes/admin/discounts/create-discount.js.map +1 -1
- package/dist/api/routes/admin/discounts/get-discount-by-code.d.ts +4 -0
- package/dist/api/routes/admin/discounts/get-discount-by-code.js +40 -6
- package/dist/api/routes/admin/discounts/get-discount-by-code.js.map +1 -1
- package/dist/api/routes/admin/discounts/update-discount.d.ts +3 -7
- package/dist/api/routes/admin/discounts/update-discount.js +6 -15
- package/dist/api/routes/admin/discounts/update-discount.js.map +1 -1
- package/dist/api/routes/admin/price-lists/delete-product-prices.d.ts +32 -0
- package/dist/api/routes/admin/price-lists/delete-product-prices.js +105 -0
- package/dist/api/routes/admin/price-lists/delete-product-prices.js.map +1 -0
- package/dist/api/routes/admin/price-lists/delete-variant-prices.d.ts +32 -0
- package/dist/api/routes/admin/price-lists/delete-variant-prices.js +105 -0
- package/dist/api/routes/admin/price-lists/delete-variant-prices.js.map +1 -0
- package/dist/api/routes/admin/price-lists/index.d.ts +2 -0
- package/dist/api/routes/admin/price-lists/index.js +2 -0
- package/dist/api/routes/admin/price-lists/index.js.map +1 -1
- package/dist/api/routes/admin/price-lists/list-price-list-products.js.map +1 -1
- package/dist/api/routes/admin/price-lists/list-price-lists.js.map +1 -1
- package/dist/commands/start.js +6 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/repositories/money-amount.d.ts +1 -1
- package/dist/repositories/money-amount.js +13 -7
- package/dist/repositories/money-amount.js.map +1 -1
- package/dist/repositories/price-list.d.ts +5 -5
- package/dist/repositories/price-list.js.map +1 -1
- package/dist/services/cart.js +1 -1
- package/dist/services/cart.js.map +1 -1
- package/dist/services/discount-condition.js +15 -6
- package/dist/services/discount-condition.js.map +1 -1
- package/dist/services/discount.d.ts +7 -4
- package/dist/services/discount.js +35 -49
- package/dist/services/discount.js.map +1 -1
- package/dist/services/price-list.d.ts +24 -17
- package/dist/services/price-list.js +148 -38
- package/dist/services/price-list.js.map +1 -1
- package/dist/types/common.d.ts +4 -3
- package/dist/types/common.js.map +1 -1
- package/dist/types/discount.d.ts +4 -6
- package/package.json +8 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AllocationType, DiscountRuleType } from "../../../../models";
|
|
1
2
|
import { DiscountConditionOperator } from "../../../../models/discount-condition";
|
|
2
3
|
import { AdminUpsertConditionsReq } from "../../../../types/discount";
|
|
3
4
|
declare const _default: (req: any, res: any) => Promise<void>;
|
|
@@ -74,9 +75,9 @@ export declare class AdminPostDiscountsReq {
|
|
|
74
75
|
}
|
|
75
76
|
export declare class AdminPostDiscountsDiscountRule {
|
|
76
77
|
description?: string;
|
|
77
|
-
type:
|
|
78
|
+
type: DiscountRuleType;
|
|
78
79
|
value: number;
|
|
79
|
-
allocation:
|
|
80
|
+
allocation: AllocationType;
|
|
80
81
|
conditions?: AdminCreateCondition[];
|
|
81
82
|
}
|
|
82
83
|
export declare class AdminCreateCondition extends AdminUpsertConditionsReq {
|
|
@@ -64,6 +64,7 @@ exports.AdminPostDiscountsParams = exports.AdminCreateCondition = exports.AdminP
|
|
|
64
64
|
var class_transformer_1 = require("class-transformer");
|
|
65
65
|
var class_validator_1 = require("class-validator");
|
|
66
66
|
var _1 = require(".");
|
|
67
|
+
var models_1 = require("../../../../models");
|
|
67
68
|
var discount_condition_1 = require("../../../../models/discount-condition");
|
|
68
69
|
var discount_1 = require("../../../../types/discount");
|
|
69
70
|
var get_query_config_1 = require("../../../../utils/get-query-config");
|
|
@@ -226,8 +227,9 @@ var AdminPostDiscountsDiscountRule = /** @class */ (function () {
|
|
|
226
227
|
__metadata("design:type", String)
|
|
227
228
|
], AdminPostDiscountsDiscountRule.prototype, "description", void 0);
|
|
228
229
|
__decorate([
|
|
229
|
-
(0, class_validator_1.
|
|
230
|
-
|
|
230
|
+
(0, class_validator_1.IsEnum)(models_1.DiscountRuleType, {
|
|
231
|
+
message: "Invalid rule type, must be one of \"fixed\", \"percentage\" or \"free_shipping\"",
|
|
232
|
+
}),
|
|
231
233
|
__metadata("design:type", String)
|
|
232
234
|
], AdminPostDiscountsDiscountRule.prototype, "type", void 0);
|
|
233
235
|
__decorate([
|
|
@@ -235,8 +237,9 @@ var AdminPostDiscountsDiscountRule = /** @class */ (function () {
|
|
|
235
237
|
__metadata("design:type", Number)
|
|
236
238
|
], AdminPostDiscountsDiscountRule.prototype, "value", void 0);
|
|
237
239
|
__decorate([
|
|
238
|
-
(0, class_validator_1.
|
|
239
|
-
|
|
240
|
+
(0, class_validator_1.IsEnum)(models_1.AllocationType, {
|
|
241
|
+
message: "Invalid allocation type, must be one of \"total\" or \"item\"",
|
|
242
|
+
}),
|
|
240
243
|
__metadata("design:type", String)
|
|
241
244
|
], AdminPostDiscountsDiscountRule.prototype, "allocation", void 0);
|
|
242
245
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-discount.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/discounts/create-discount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"create-discount.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/discounts/create-discount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAYwB;AACxB,sBAA+E;AAC/E,6CAAqE;AAErE,4EAAiF;AAEjF,uDAAqE;AACrE,uEAAsE;AACtE,yDAAuD;AACvD,0EAAyE;AACzE,kFAAiF;AACjF,qDAAoE;AACpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,IAAI,EAAE,IAAI,EAAE,CAAC;QAC9B,IAAA,wBAAI,EAAC,cAAM,OAAA,oBAAoB,EAApB,CAAoB,CAAC;;sEACE;IACrC,qCAAC;CAAA,AAvBD,IAuBC;AAvBY,wEAA8B;AAyB3C;IAA0C,wCAAwB;IAAlE;;IAGA,CAAC;IADC;QADC,IAAA,0BAAQ,GAAE;;0DACwB;IACrC,2BAAC;CAAA,AAHD,CAA0C,mCAAwB,GAGjE;AAHY,oDAAoB;AAKjC;IAAA;IAQA,CAAC;IALC;QAFC,IAAA,yBAAO,GAAE;QACT,IAAA,4BAAU,GAAE;;4DACI;IAIjB;QAFC,IAAA,yBAAO,GAAE;QACT,IAAA,4BAAU,GAAE;;4DACI;IACnB,+BAAC;CAAA,AARD,IAQC;AARY,4DAAwB"}
|
|
@@ -1,4 +1,13 @@
|
|
|
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
|
+
};
|
|
2
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
13
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -36,7 +45,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
45
|
}
|
|
37
46
|
};
|
|
38
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.AdminGetDiscountsDiscountCodeParams = void 0;
|
|
49
|
+
var class_validator_1 = require("class-validator");
|
|
39
50
|
var _1 = require(".");
|
|
51
|
+
var get_query_config_1 = require("../../../../utils/get-query-config");
|
|
52
|
+
var validator_1 = require("../../../../utils/validator");
|
|
40
53
|
/**
|
|
41
54
|
* @oas [get] /discounts/code/{code}
|
|
42
55
|
* operationId: "GetDiscountsDiscountCode"
|
|
@@ -58,18 +71,39 @@ var _1 = require(".");
|
|
|
58
71
|
* $ref: "#/components/schemas/discount"
|
|
59
72
|
*/
|
|
60
73
|
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
61
|
-
var code, discountService, discount;
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
var code, validated, config, discountService, discount;
|
|
75
|
+
var _a, _b;
|
|
76
|
+
return __generator(this, function (_c) {
|
|
77
|
+
switch (_c.label) {
|
|
64
78
|
case 0:
|
|
65
79
|
code = req.params.code;
|
|
66
|
-
|
|
67
|
-
return [4 /*yield*/, discountService.retrieveByCode(code, _1.defaultAdminDiscountsRelations)];
|
|
80
|
+
return [4 /*yield*/, (0, validator_1.validator)(AdminGetDiscountsDiscountCodeParams, req.query)];
|
|
68
81
|
case 1:
|
|
69
|
-
|
|
82
|
+
validated = _c.sent();
|
|
83
|
+
config = (0, get_query_config_1.getRetrieveConfig)(_1.defaultAdminDiscountsFields, _1.defaultAdminDiscountsRelations, (_a = validated === null || validated === void 0 ? void 0 : validated.fields) === null || _a === void 0 ? void 0 : _a.split(","), (_b = validated === null || validated === void 0 ? void 0 : validated.expand) === null || _b === void 0 ? void 0 : _b.split(","));
|
|
84
|
+
discountService = req.scope.resolve("discountService");
|
|
85
|
+
return [4 /*yield*/, discountService.retrieveByCode(code, config)];
|
|
86
|
+
case 2:
|
|
87
|
+
discount = _c.sent();
|
|
70
88
|
res.status(200).json({ discount: discount });
|
|
71
89
|
return [2 /*return*/];
|
|
72
90
|
}
|
|
73
91
|
});
|
|
74
92
|
}); });
|
|
93
|
+
var AdminGetDiscountsDiscountCodeParams = /** @class */ (function () {
|
|
94
|
+
function AdminGetDiscountsDiscountCodeParams() {
|
|
95
|
+
}
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, class_validator_1.IsOptional)(),
|
|
98
|
+
(0, class_validator_1.IsString)(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], AdminGetDiscountsDiscountCodeParams.prototype, "expand", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, class_validator_1.IsOptional)(),
|
|
103
|
+
(0, class_validator_1.IsString)(),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], AdminGetDiscountsDiscountCodeParams.prototype, "fields", void 0);
|
|
106
|
+
return AdminGetDiscountsDiscountCodeParams;
|
|
107
|
+
}());
|
|
108
|
+
exports.AdminGetDiscountsDiscountCodeParams = AdminGetDiscountsDiscountCodeParams;
|
|
75
109
|
//# sourceMappingURL=get-discount-by-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-discount-by-code.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/discounts/get-discount-by-code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-discount-by-code.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/discounts/get-discount-by-code.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsD;AACtD,sBAA+E;AAG/E,uEAAsE;AACtE,yDAAuD;AACvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;;gBACpB,IAAI,GAAK,GAAG,CAAC,MAAM,KAAf,CAAe;gBAET,qBAAM,IAAA,qBAAS,EAC/B,mCAAmC,EACnC,GAAG,CAAC,KAAK,CACV,EAAA;;gBAHK,SAAS,GAAG,SAGjB;gBAEK,MAAM,GAAG,IAAA,oCAAiB,EAC9B,8BAA2B,EAC3B,iCAA8B,EAC9B,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,0CAAE,KAAK,CAAC,GAAG,CAAuB,EACnD,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,0CAAE,KAAK,CAAC,GAAG,CAAC,CAC9B,CAAA;gBAEK,eAAe,GAAoB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBAC5D,qBAAM,eAAe,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,EAAA;;gBAA7D,QAAQ,GAAG,SAAkD;gBAEnE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,UAAA,EAAE,CAAC,CAAA;;;;KACnC,EAAA;AAED;IAAA;IAQA,CAAC;IALC;QAFC,IAAA,4BAAU,GAAE;QACZ,IAAA,0BAAQ,GAAE;;uEACI;IAIf;QAFC,IAAA,4BAAU,GAAE;QACZ,IAAA,0BAAQ,GAAE;;uEACI;IACjB,0CAAC;CAAA,AARD,IAQC;AARY,kFAAmC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AllocationType } from "../../../../models";
|
|
1
2
|
import { DiscountConditionOperator } from "../../../../models/discount-condition";
|
|
2
3
|
import { AdminUpsertConditionsReq } from "../../../../types/discount";
|
|
3
4
|
declare const _default: (req: any, res: any) => Promise<void>;
|
|
@@ -17,9 +18,6 @@ declare const _default: (req: any, res: any) => Promise<void>;
|
|
|
17
18
|
* code:
|
|
18
19
|
* type: string
|
|
19
20
|
* description: A unique code that will be used to redeem the Discount
|
|
20
|
-
* is_dynamic:
|
|
21
|
-
* type: string
|
|
22
|
-
* description: Whether the Discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated codes that all have to follow a common set of rules.
|
|
23
21
|
* rule:
|
|
24
22
|
* description: The Discount Rule that defines how Discounts are calculated
|
|
25
23
|
* oneOf:
|
|
@@ -57,7 +55,6 @@ export default _default;
|
|
|
57
55
|
export declare class AdminPostDiscountsDiscountReq {
|
|
58
56
|
code?: string;
|
|
59
57
|
rule?: AdminUpdateDiscountRule;
|
|
60
|
-
is_dynamic?: boolean;
|
|
61
58
|
is_disabled?: boolean;
|
|
62
59
|
starts_at?: Date;
|
|
63
60
|
ends_at?: Date | null;
|
|
@@ -69,9 +66,8 @@ export declare class AdminPostDiscountsDiscountReq {
|
|
|
69
66
|
export declare class AdminUpdateDiscountRule {
|
|
70
67
|
id: string;
|
|
71
68
|
description?: string;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
allocation: string;
|
|
69
|
+
value?: number;
|
|
70
|
+
allocation?: AllocationType;
|
|
75
71
|
conditions?: AdminUpsertCondition[];
|
|
76
72
|
}
|
|
77
73
|
export declare class AdminUpsertCondition extends AdminUpsertConditionsReq {
|
|
@@ -64,6 +64,7 @@ exports.AdminPostDiscountsDiscountParams = exports.AdminUpsertCondition = export
|
|
|
64
64
|
var class_transformer_1 = require("class-transformer");
|
|
65
65
|
var class_validator_1 = require("class-validator");
|
|
66
66
|
var _1 = require(".");
|
|
67
|
+
var models_1 = require("../../../../models");
|
|
67
68
|
var discount_condition_1 = require("../../../../models/discount-condition");
|
|
68
69
|
var discount_1 = require("../../../../types/discount");
|
|
69
70
|
var get_query_config_1 = require("../../../../utils/get-query-config");
|
|
@@ -86,9 +87,6 @@ var iso8601_duration_1 = require("../../../../utils/validators/iso8601-duration"
|
|
|
86
87
|
* code:
|
|
87
88
|
* type: string
|
|
88
89
|
* description: A unique code that will be used to redeem the Discount
|
|
89
|
-
* is_dynamic:
|
|
90
|
-
* type: string
|
|
91
|
-
* description: Whether the Discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated codes that all have to follow a common set of rules.
|
|
92
90
|
* rule:
|
|
93
91
|
* description: The Discount Rule that defines how Discounts are calculated
|
|
94
92
|
* oneOf:
|
|
@@ -162,11 +160,6 @@ var AdminPostDiscountsDiscountReq = /** @class */ (function () {
|
|
|
162
160
|
(0, class_transformer_1.Type)(function () { return AdminUpdateDiscountRule; }),
|
|
163
161
|
__metadata("design:type", AdminUpdateDiscountRule)
|
|
164
162
|
], AdminPostDiscountsDiscountReq.prototype, "rule", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
(0, class_validator_1.IsBoolean)(),
|
|
167
|
-
(0, class_validator_1.IsOptional)(),
|
|
168
|
-
__metadata("design:type", Boolean)
|
|
169
|
-
], AdminPostDiscountsDiscountReq.prototype, "is_dynamic", void 0);
|
|
170
163
|
__decorate([
|
|
171
164
|
(0, class_validator_1.IsBoolean)(),
|
|
172
165
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -223,18 +216,16 @@ var AdminUpdateDiscountRule = /** @class */ (function () {
|
|
|
223
216
|
(0, class_validator_1.IsOptional)(),
|
|
224
217
|
__metadata("design:type", String)
|
|
225
218
|
], AdminUpdateDiscountRule.prototype, "description", void 0);
|
|
226
|
-
__decorate([
|
|
227
|
-
(0, class_validator_1.IsString)(),
|
|
228
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
229
|
-
__metadata("design:type", String)
|
|
230
|
-
], AdminUpdateDiscountRule.prototype, "type", void 0);
|
|
231
219
|
__decorate([
|
|
232
220
|
(0, class_validator_1.IsNumber)(),
|
|
221
|
+
(0, class_validator_1.IsOptional)(),
|
|
233
222
|
__metadata("design:type", Number)
|
|
234
223
|
], AdminUpdateDiscountRule.prototype, "value", void 0);
|
|
235
224
|
__decorate([
|
|
236
|
-
(0, class_validator_1.
|
|
237
|
-
(0, class_validator_1.
|
|
225
|
+
(0, class_validator_1.IsOptional)(),
|
|
226
|
+
(0, class_validator_1.IsEnum)(models_1.AllocationType, {
|
|
227
|
+
message: "Invalid allocation type, must be one of \"total\" or \"item\"",
|
|
228
|
+
}),
|
|
238
229
|
__metadata("design:type", String)
|
|
239
230
|
], AdminUpdateDiscountRule.prototype, "allocation", void 0);
|
|
240
231
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-discount.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/discounts/update-discount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"update-discount.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/discounts/update-discount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAYwB;AACxB,sBAA+E;AAC/E,6CAAmD;AAEnD,4EAAiF;AAEjF,uDAAqE;AACrE,uEAAsE;AACtE,yDAAuD;AACvD,0EAAyE;AACzE,kFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;;gBACpB,WAAW,GAAK,GAAG,CAAC,MAAM,YAAf,CAAe;gBAEhB,qBAAM,IAAA,qBAAS,EAAC,6BAA6B,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;gBAApE,SAAS,GAAG,SAAwD;gBAElD,qBAAM,IAAA,qBAAS,EACrC,gCAAgC,EAChC,GAAG,CAAC,KAAK,CACV,EAAA;;gBAHK,eAAe,GAAG,SAGvB;gBAEK,eAAe,GAAoB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBAE7E,qBAAM,eAAe,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,EAAA;;gBAApD,SAAoD,CAAA;gBAE9C,MAAM,GAAG,IAAA,oCAAiB,EAC9B,8BAA2B,EAC3B,iCAA8B,EAC9B,MAAA,eAAe,aAAf,eAAe,u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
|
|
3
|
+
* @oas [delete] /price-lists/{id}/products/{product_id}/prices
|
|
4
|
+
* operationId: "DeletePriceListsPriceListProductsProductPrices"
|
|
5
|
+
* summary: "Delete all the prices related to a specific product in a price list"
|
|
6
|
+
* description: "Delete all the prices related to a specific product in a price list"
|
|
7
|
+
* x-authenticated: true
|
|
8
|
+
* parameters:
|
|
9
|
+
* - (path) id=* {string} The id of the Price List that the Money Amounts that will be deleted belongs to.
|
|
10
|
+
* - (path) product_id=* {string} The id of the product from which the money amount will be deleted.
|
|
11
|
+
* tags:
|
|
12
|
+
* - Price List
|
|
13
|
+
* responses:
|
|
14
|
+
* 200:
|
|
15
|
+
* description: OK
|
|
16
|
+
* content:
|
|
17
|
+
* application/json:
|
|
18
|
+
* schema:
|
|
19
|
+
* properties:
|
|
20
|
+
* ids:
|
|
21
|
+
* type: number
|
|
22
|
+
* description: The price ids that have been deleted.
|
|
23
|
+
* count:
|
|
24
|
+
* type: number
|
|
25
|
+
* description: The number of prices that have been deleted.
|
|
26
|
+
* object:
|
|
27
|
+
* type: string
|
|
28
|
+
* description: The type of the object that was deleted.
|
|
29
|
+
* deleted:
|
|
30
|
+
* type: boolean
|
|
31
|
+
*/
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
+
if (!m) return o;
|
|
41
|
+
var i = m.call(o), r, ar = [], e;
|
|
42
|
+
try {
|
|
43
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
+
}
|
|
45
|
+
catch (error) { e = { error: error }; }
|
|
46
|
+
finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
}
|
|
50
|
+
finally { if (e) throw e.error; }
|
|
51
|
+
}
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
+
/**
|
|
56
|
+
* @oas [delete] /price-lists/{id}/products/{product_id}/prices
|
|
57
|
+
* operationId: "DeletePriceListsPriceListProductsProductPrices"
|
|
58
|
+
* summary: "Delete all the prices related to a specific product in a price list"
|
|
59
|
+
* description: "Delete all the prices related to a specific product in a price list"
|
|
60
|
+
* x-authenticated: true
|
|
61
|
+
* parameters:
|
|
62
|
+
* - (path) id=* {string} The id of the Price List that the Money Amounts that will be deleted belongs to.
|
|
63
|
+
* - (path) product_id=* {string} The id of the product from which the money amount will be deleted.
|
|
64
|
+
* tags:
|
|
65
|
+
* - Price List
|
|
66
|
+
* responses:
|
|
67
|
+
* 200:
|
|
68
|
+
* description: OK
|
|
69
|
+
* content:
|
|
70
|
+
* application/json:
|
|
71
|
+
* schema:
|
|
72
|
+
* properties:
|
|
73
|
+
* ids:
|
|
74
|
+
* type: number
|
|
75
|
+
* description: The price ids that have been deleted.
|
|
76
|
+
* count:
|
|
77
|
+
* type: number
|
|
78
|
+
* description: The number of prices that have been deleted.
|
|
79
|
+
* object:
|
|
80
|
+
* type: string
|
|
81
|
+
* description: The type of the object that was deleted.
|
|
82
|
+
* deleted:
|
|
83
|
+
* type: boolean
|
|
84
|
+
*/
|
|
85
|
+
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
86
|
+
var _a, id, product_id, priceListService, _b, deletedPriceIds;
|
|
87
|
+
return __generator(this, function (_c) {
|
|
88
|
+
switch (_c.label) {
|
|
89
|
+
case 0:
|
|
90
|
+
_a = req.params, id = _a.id, product_id = _a.product_id;
|
|
91
|
+
priceListService = req.scope.resolve("priceListService");
|
|
92
|
+
return [4 /*yield*/, priceListService.deleteProductPrices(id, [
|
|
93
|
+
product_id,
|
|
94
|
+
])];
|
|
95
|
+
case 1:
|
|
96
|
+
_b = __read.apply(void 0, [_c.sent(), 1]), deletedPriceIds = _b[0];
|
|
97
|
+
return [2 /*return*/, res.json({
|
|
98
|
+
ids: deletedPriceIds,
|
|
99
|
+
object: "money-amount",
|
|
100
|
+
deleted: true,
|
|
101
|
+
})];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}); });
|
|
105
|
+
//# sourceMappingURL=delete-product-prices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-product-prices.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/delete-product-prices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACtB,KAAqB,GAAG,CAAC,MAAM,EAA7B,EAAE,QAAA,EAAE,UAAU,gBAAA,CAAe;gBAE/B,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEb,qBAAM,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,EAAE;wBACvE,UAAU;qBACX,CAAC,EAAA;;gBAFI,KAAA,sBAAoB,SAExB,KAAA,EAFK,eAAe,QAAA;gBAItB,sBAAO,GAAG,CAAC,IAAI,CAAC;wBACd,GAAG,EAAE,eAAe;wBACpB,MAAM,EAAE,cAAc;wBACtB,OAAO,EAAE,IAAI;qBACd,CAAC,EAAA;;;KACH,EAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const _default: (req: any, res: any) => Promise<any>;
|
|
2
|
+
/**
|
|
3
|
+
* @oas [delete] /price-lists/{id}/variants/{variant_id}/prices
|
|
4
|
+
* operationId: "DeletePriceListsPriceListVariantsVariantPrices"
|
|
5
|
+
* summary: "Delete all the prices related to a specific variant in a price list"
|
|
6
|
+
* description: "Delete all the prices related to a specific variant in a price list"
|
|
7
|
+
* x-authenticated: true
|
|
8
|
+
* parameters:
|
|
9
|
+
* - (path) id=* {string} The id of the Price List that the Money Amounts that will be deleted belongs to.
|
|
10
|
+
* - (path) variant_id=* {string} The id of the variant from which the money amount will be deleted.
|
|
11
|
+
* tags:
|
|
12
|
+
* - Price List
|
|
13
|
+
* responses:
|
|
14
|
+
* 200:
|
|
15
|
+
* description: OK
|
|
16
|
+
* content:
|
|
17
|
+
* application/json:
|
|
18
|
+
* schema:
|
|
19
|
+
* properties:
|
|
20
|
+
* ids:
|
|
21
|
+
* type: number
|
|
22
|
+
* description: The price ids that have been deleted.
|
|
23
|
+
* count:
|
|
24
|
+
* type: number
|
|
25
|
+
* description: The number of prices that have been deleted.
|
|
26
|
+
* object:
|
|
27
|
+
* type: string
|
|
28
|
+
* description: The type of the object that was deleted.
|
|
29
|
+
* deleted:
|
|
30
|
+
* type: boolean
|
|
31
|
+
*/
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
+
if (!m) return o;
|
|
41
|
+
var i = m.call(o), r, ar = [], e;
|
|
42
|
+
try {
|
|
43
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
+
}
|
|
45
|
+
catch (error) { e = { error: error }; }
|
|
46
|
+
finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
}
|
|
50
|
+
finally { if (e) throw e.error; }
|
|
51
|
+
}
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
+
/**
|
|
56
|
+
* @oas [delete] /price-lists/{id}/variants/{variant_id}/prices
|
|
57
|
+
* operationId: "DeletePriceListsPriceListVariantsVariantPrices"
|
|
58
|
+
* summary: "Delete all the prices related to a specific variant in a price list"
|
|
59
|
+
* description: "Delete all the prices related to a specific variant in a price list"
|
|
60
|
+
* x-authenticated: true
|
|
61
|
+
* parameters:
|
|
62
|
+
* - (path) id=* {string} The id of the Price List that the Money Amounts that will be deleted belongs to.
|
|
63
|
+
* - (path) variant_id=* {string} The id of the variant from which the money amount will be deleted.
|
|
64
|
+
* tags:
|
|
65
|
+
* - Price List
|
|
66
|
+
* responses:
|
|
67
|
+
* 200:
|
|
68
|
+
* description: OK
|
|
69
|
+
* content:
|
|
70
|
+
* application/json:
|
|
71
|
+
* schema:
|
|
72
|
+
* properties:
|
|
73
|
+
* ids:
|
|
74
|
+
* type: number
|
|
75
|
+
* description: The price ids that have been deleted.
|
|
76
|
+
* count:
|
|
77
|
+
* type: number
|
|
78
|
+
* description: The number of prices that have been deleted.
|
|
79
|
+
* object:
|
|
80
|
+
* type: string
|
|
81
|
+
* description: The type of the object that was deleted.
|
|
82
|
+
* deleted:
|
|
83
|
+
* type: boolean
|
|
84
|
+
*/
|
|
85
|
+
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
86
|
+
var _a, id, variant_id, priceListService, _b, deletedPriceIds;
|
|
87
|
+
return __generator(this, function (_c) {
|
|
88
|
+
switch (_c.label) {
|
|
89
|
+
case 0:
|
|
90
|
+
_a = req.params, id = _a.id, variant_id = _a.variant_id;
|
|
91
|
+
priceListService = req.scope.resolve("priceListService");
|
|
92
|
+
return [4 /*yield*/, priceListService.deleteVariantPrices(id, [
|
|
93
|
+
variant_id,
|
|
94
|
+
])];
|
|
95
|
+
case 1:
|
|
96
|
+
_b = __read.apply(void 0, [_c.sent(), 1]), deletedPriceIds = _b[0];
|
|
97
|
+
return [2 /*return*/, res.json({
|
|
98
|
+
ids: deletedPriceIds,
|
|
99
|
+
object: "money-amount",
|
|
100
|
+
deleted: true,
|
|
101
|
+
})];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}); });
|
|
105
|
+
//# sourceMappingURL=delete-variant-prices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-variant-prices.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/delete-variant-prices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACtB,KAAqB,GAAG,CAAC,MAAM,EAA7B,EAAE,QAAA,EAAE,UAAU,gBAAA,CAAe;gBAE/B,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEb,qBAAM,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,EAAE;wBACvE,UAAU;qBACX,CAAC,EAAA;;gBAFI,KAAA,sBAAoB,SAExB,KAAA,EAFK,eAAe,QAAA;gBAItB,sBAAO,GAAG,CAAC,IAAI,CAAC;wBACd,GAAG,EAAE,eAAe;wBACpB,MAAM,EAAE,cAAc;wBACtB,OAAO,EAAE,IAAI;qBACd,CAAC,EAAA;;;KACH,EAAA"}
|
|
@@ -14,6 +14,8 @@ export declare type AdminPriceListDeleteBatchRes = {
|
|
|
14
14
|
deleted: boolean;
|
|
15
15
|
object: string;
|
|
16
16
|
};
|
|
17
|
+
export declare type AdminPriceListDeleteProductPricesRes = AdminPriceListDeleteBatchRes;
|
|
18
|
+
export declare type AdminPriceListDeleteVariantPricesRes = AdminPriceListDeleteBatchRes;
|
|
17
19
|
export declare type AdminPriceListDeleteRes = DeleteResponse;
|
|
18
20
|
export declare type AdminPriceListsListRes = PaginatedResponse & {
|
|
19
21
|
price_lists: PriceList[];
|
|
@@ -23,6 +23,8 @@ exports.default = (function (app) {
|
|
|
23
23
|
route.get("/:id", middlewares_1.default.wrap(require("./get-price-list").default));
|
|
24
24
|
route.get("/", middlewares_1.default.normalizeQuery(), middlewares_1.default.wrap(require("./list-price-lists").default));
|
|
25
25
|
route.get("/:id/products", middlewares_1.default.wrap(require("./list-price-list-products").default));
|
|
26
|
+
route.delete("/:id/products/:product_id/prices", middlewares_1.default.wrap(require("./delete-product-prices").default));
|
|
27
|
+
route.delete("/:id/variants/:variant_id/prices", middlewares_1.default.wrap(require("./delete-variant-prices").default));
|
|
26
28
|
route.post("/", middlewares_1.default.wrap(require("./create-price-list").default));
|
|
27
29
|
route.post("/:id", middlewares_1.default.wrap(require("./update-price-list").default));
|
|
28
30
|
route.delete("/:id", middlewares_1.default.wrap(require("./delete-price-list").default));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAA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AA;IAED,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAEzE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAE5E,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAE9E,KAAK,CAAC,MAAM,CACV,mBAAmB,EACnB,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAC3D,CAAA;IAED,KAAK,CAAC,IAAI,CACR,mBAAmB,EACnB,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CACxD,CAAA;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA;AAEY,QAAA,2BAA2B,GAAG;IACzC,IAAI;IACJ,MAAM;IACN,aAAa;IACb,MAAM;IACN,QAAQ;IACR,WAAW;IACX,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,YAAY;CACb,CAAA;AAEY,QAAA,8BAA8B,GAAG,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAA;AAE9D,QAAA,2BAA2B,GAAG,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAA;AAqBxE,qDAAkC;AAClC,sDAAmC;AACnC,sDAAmC;AACnC,mDAAgC;AAChC,qDAAkC;AAClC,sDAAmC;AACnC,wDAAqC;AACrC,6DAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-price-list-products.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/list-price-list-products.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,iCAAqC;AACrC,mDAOwB;AAExB,mDAAiE;AACjE,yDAAuD;AAEvD,wCAKoB;
|
|
1
|
+
{"version":3,"file":"list-price-list-products.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/list-price-list-products.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,iCAAqC;AACrC,mDAOwB;AAExB,mDAAiE;AACjE,yDAAuD;AAEvD,wCAKoB;AACpB,uDAA+C;AAC/C,uEAAkE;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAED,qBAAM,IAAA,qBAAS,EACrC,yCAAyC,EACzC,GAAG,CAAC,KAAK,CACV,EAAA;;gBAHK,eAAe,GAAG,SAGvB;gBAED,GAAG,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC,EAAE,CAAC,CAAA;gBAExB,KAAK,GAA2B,IAAA,aAAI,EAAC,GAAG,CAAC,KAAK,EAAE;oBACpD,OAAO;oBACP,QAAQ;oBACR,QAAQ;oBACR,QAAQ;oBACR,OAAO;iBACR,CAAC,CAAA;gBAEI,KAAK,GAAG,MAAA,eAAe,CAAC,KAAK,mCAAI,EAAE,CAAA;gBACnC,MAAM,GAAG,MAAA,eAAe,CAAC,MAAM,mCAAI,CAAC,CAAA;gBACpC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAA;gBAC/B,MAAM,GAAG,eAAe,CAAC,MAAM,CAAA;gBAC/B,KAAK,GAAG,eAAe,CAAC,KAAK,CAAA;gBAC7B,aAAa,GAAG,oCAAyB,CA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CAAC;;kFACA;IAIpB;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;2EACA;IAIb;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;4EACC;IAKd;QAHC,IAAA,4BAAU,GAAE;QACZ,IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;iFAAA;IAKnC;QAHC,IAAA,4BAAU,GAAE;QACZ,IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;iFAAA;IAKnC;QAHC,IAAA,gCAAc,GAAE;QAChB,IAAA,4BAAU,GAAE;QACZ,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;iFAAA;IACrC,gDAAC;CAAA,AA5DD,CAA+D,2CAAgC,GA4D9F;AA5DY,8FAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-price-lists.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/list-price-lists.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAAgE;AAChE,qDAA8B;AAI9B,2DAAuE;AACvE,yDAAuD;AACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;oBACV,qBAAM,IAAA,qBAAS,EAC/B,iCAAiC,EACjC,GAAG,CAAC,KAAK,CACV,EAAA;;gBAHK,SAAS,GAAG,SAGjB;gBAEK,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEnC,YAAY,GAAa,EAAE,CAAA;gBAC/B,IAAI,SAAS,CAAC,MAAM,EAAE;oBACpB,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;iBAC3C;gBAEK,UAAU,
|
|
1
|
+
{"version":3,"file":"list-price-lists.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/price-lists/list-price-lists.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAAgE;AAChE,qDAA8B;AAI9B,2DAAuE;AACvE,yDAAuD;AACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;oBACV,qBAAM,IAAA,qBAAS,EAC/B,iCAAiC,EACjC,GAAG,CAAC,KAAK,CACV,EAAA;;gBAHK,SAAS,GAAG,SAGjB;gBAEK,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEnC,YAAY,GAAa,EAAE,CAAA;gBAC/B,IAAI,SAAS,CAAC,MAAM,EAAE;oBACpB,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;iBAC3C;gBAEK,UAAU,GAAyC;oBACvD,SAAS,EAAE,YAAY;oBACvB,IAAI,EAAE,SAAS,CAAC,MAAM;oBACtB,IAAI,EAAE,SAAS,CAAC,KAAK;oBACrB,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAA6B;iBACzD,CAAA;gBAED,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,WAAW,EAAE;oBAC1C,IAAI,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;wBAC7B,KAAA,OAAY,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAA,EAAnC,K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