@medusajs/medusa 1.6.2-alpha.0 → 1.6.2-alpha.1
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/routes/admin/product-types/list-product-types.d.ts +3 -7
- package/dist/api/routes/admin/product-types/list-product-types.js +3 -24
- package/dist/api/routes/admin/product-types/list-product-types.js.map +1 -1
- package/dist/api/routes/admin/products/list-types.d.ts +1 -0
- package/dist/api/routes/admin/products/list-types.js +1 -0
- package/dist/api/routes/admin/products/list-types.js.map +1 -1
- package/dist/api/routes/store/carts/create-payment-sessions.js +25 -30
- package/dist/api/routes/store/carts/create-payment-sessions.js.map +1 -1
- package/dist/api/routes/store/index.js +2 -0
- package/dist/api/routes/store/index.js.map +1 -1
- package/dist/api/routes/store/product-types/index.d.ts +15 -0
- package/dist/api/routes/store/product-types/index.js +59 -0
- package/dist/api/routes/store/product-types/index.js.map +1 -0
- package/dist/api/routes/store/product-types/list-product-types.d.ts +138 -0
- package/dist/api/routes/store/product-types/list-product-types.js +274 -0
- package/dist/api/routes/store/product-types/list-product-types.js.map +1 -0
- package/dist/services/event-bus.d.ts +9 -3
- package/dist/services/event-bus.js +6 -0
- package/dist/services/event-bus.js.map +1 -1
- package/dist/services/product-type.d.ts +2 -2
- package/dist/services/product-type.js +3 -3
- package/dist/services/product-type.js.map +1 -1
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[
|
|
1
|
+
[34m@medusajs/medusa:build[0m: cache hit, replaying output [2m05f7c346279e2831[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.6.2-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2568](https://github.com/medusajs/medusa/pull/2568) [`2d095a0ce`](https://github.com/medusajs/medusa/commit/2d095a0ce14ab7f24b4e6856cb4850cea18af21c) Thanks [@adrien2p](https://github.com/adrien2p)! - fix(medusa): fix missing throw in the store cart create-payment-sessions
|
|
8
|
+
|
|
9
|
+
* [#2566](https://github.com/medusajs/medusa/pull/2566) [`8069ed5e9`](https://github.com/medusajs/medusa/commit/8069ed5e99dc53a912df9bb860114d2258044108) Thanks [@srindom](https://github.com/srindom)! - fix(medusa): add support for retrying failed event bus jobs
|
|
10
|
+
|
|
11
|
+
- [#2552](https://github.com/medusajs/medusa/pull/2552) [`7b0ceeffb`](https://github.com/medusajs/medusa/commit/7b0ceeffb4616c3f4e0cf51aba2ab381c61ea5d7) Thanks [@patrick-medusajs](https://github.com/patrick-medusajs)! - feat(medusa, medusa-js, medusa-react): /store api product types
|
|
12
|
+
|
|
13
|
+
- Updated dependencies []:
|
|
14
|
+
- @medusajs/medusa-cli@1.3.4-alpha.0
|
|
15
|
+
|
|
3
16
|
## 1.6.2-alpha.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/api/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export * from "./routes/store/gift-cards";
|
|
|
39
39
|
export * from "./routes/store/order-edits";
|
|
40
40
|
export * from "./routes/store/orders";
|
|
41
41
|
export * from "./routes/store/products";
|
|
42
|
+
export * from "./routes/store/product-types";
|
|
42
43
|
export * from "./routes/store/regions";
|
|
43
44
|
export * from "./routes/store/return-reasons";
|
|
44
45
|
export * from "./routes/store/returns";
|
package/dist/api/index.js
CHANGED
|
@@ -70,6 +70,7 @@ __exportStar(require("./routes/store/gift-cards"), exports);
|
|
|
70
70
|
__exportStar(require("./routes/store/order-edits"), exports);
|
|
71
71
|
__exportStar(require("./routes/store/orders"), exports);
|
|
72
72
|
__exportStar(require("./routes/store/products"), exports);
|
|
73
|
+
__exportStar(require("./routes/store/product-types"), exports);
|
|
73
74
|
__exportStar(require("./routes/store/regions"), exports);
|
|
74
75
|
__exportStar(require("./routes/store/return-reasons"), exports);
|
|
75
76
|
__exportStar(require("./routes/store/returns"), exports);
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,8EAAsD;AACtD,yDAAkC;AAClC,yDAAkC;AAElC,iCAAiC;AACjC,mBAAe,UAAC,SAAS,EAAE,MAAM;IAC/B,IAAM,GAAG,GAAG,IAAA,gBAAM,GAAE,CAAA;IAEpB,IAAA,eAAK,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;IAC7B,IAAA,eAAK,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;IAE7B,GAAG,CAAC,GAAG,CAAC,IAAA,uBAAY,GAAE,CAAC,CAAA;IAEvB,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA;AAED,QAAQ;AACR,mEAAgD;AAChD,sDAAmC;AACnC,uDAAoC;AACpC,6DAA0C;AAC1C,4DAAyC;AACzC,iEAA8C;AAC9C,2DAAwC;AACxC,2DAAwC;AACxC,8DAA2C;AAC3C,4DAAyC;AACzC,yDAAsC;AACtC,uDAAoC;AACpC,+DAA4C;AAC5C,6DAA0C;AAC1C,wDAAqC;AACrC,6DAA0C;AAC1C,8DAA2C;AAC3C,+DAA4C;AAC5C,0DAAuC;AACvC,yDAAsC;AACtC,gEAA6C;AAC7C,yDAAsC;AACtC,gEAA6C;AAC7C,kEAA+C;AAC/C,mEAAgD;AAChD,uDAAoC;AACpC,uDAAoC;AACpC,2DAAwC;AACxC,yDAAsC;AACtC,uDAAoC;AACpC,0DAAuC;AACvC,QAAQ;AACR,sDAAmC;AACnC,uDAAoC;AACpC,6DAA0C;AAC1C,2DAAwC;AACxC,4DAAyC;AACzC,6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AA4C;AAC5C,yDAAsC;AACtC,gEAA6C;AAC7C,yDAAsC;AACtC,kEAA+C;AAC/C,uDAAoC;AACpC,0DAAuC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateComparisonOperator, StringComparisonOperator } from "../../../../types/common";
|
|
1
|
+
import { DateComparisonOperator, FindPaginationParams, StringComparisonOperator } from "../../../../types/common";
|
|
2
2
|
/**
|
|
3
3
|
* @oas [get] /product-types
|
|
4
4
|
* operationId: "GetProductTypes"
|
|
@@ -6,7 +6,7 @@ import { DateComparisonOperator, StringComparisonOperator } from "../../../../ty
|
|
|
6
6
|
* description: "Retrieve a list of Product Types."
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
9
|
-
* - (query) limit=
|
|
9
|
+
* - (query) limit=20 {integer} The number of types to return.
|
|
10
10
|
* - (query) offset=0 {integer} The number of items to skip before the results.
|
|
11
11
|
* - (query) order {string} The field to sort items by.
|
|
12
12
|
* - (query) discount_condition_id {string} The discount condition id on which to filter the product types.
|
|
@@ -127,11 +127,7 @@ import { DateComparisonOperator, StringComparisonOperator } from "../../../../ty
|
|
|
127
127
|
*/
|
|
128
128
|
declare const _default: (req: any, res: any) => Promise<void>;
|
|
129
129
|
export default _default;
|
|
130
|
-
export declare class
|
|
131
|
-
limit?: number | undefined;
|
|
132
|
-
offset?: number | undefined;
|
|
133
|
-
}
|
|
134
|
-
export declare class AdminGetProductTypesParams extends AdminGetProductTypesPaginationParams {
|
|
130
|
+
export declare class AdminGetProductTypesParams extends FindPaginationParams {
|
|
135
131
|
id?: string | string[] | StringComparisonOperator;
|
|
136
132
|
q?: string;
|
|
137
133
|
value?: string | string[] | StringComparisonOperator;
|
|
@@ -76,11 +76,10 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
76
76
|
return ar;
|
|
77
77
|
};
|
|
78
78
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
-
exports.AdminGetProductTypesParams =
|
|
79
|
+
exports.AdminGetProductTypesParams = void 0;
|
|
80
80
|
var common_1 = require("../../../../types/common");
|
|
81
81
|
var class_validator_1 = require("class-validator");
|
|
82
82
|
var is_type_1 = require("../../../../utils/validators/is-type");
|
|
83
|
-
var class_transformer_1 = require("class-transformer");
|
|
84
83
|
/**
|
|
85
84
|
* @oas [get] /product-types
|
|
86
85
|
* operationId: "GetProductTypes"
|
|
@@ -88,7 +87,7 @@ var class_transformer_1 = require("class-transformer");
|
|
|
88
87
|
* description: "Retrieve a list of Product Types."
|
|
89
88
|
* x-authenticated: true
|
|
90
89
|
* parameters:
|
|
91
|
-
* - (query) limit=
|
|
90
|
+
* - (query) limit=20 {integer} The number of types to return.
|
|
92
91
|
* - (query) offset=0 {integer} The number of items to skip before the results.
|
|
93
92
|
* - (query) order {string} The field to sort items by.
|
|
94
93
|
* - (query) discount_condition_id {string} The discount condition id on which to filter the product types.
|
|
@@ -228,26 +227,6 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
228
227
|
}
|
|
229
228
|
});
|
|
230
229
|
}); });
|
|
231
|
-
var AdminGetProductTypesPaginationParams = /** @class */ (function () {
|
|
232
|
-
function AdminGetProductTypesPaginationParams() {
|
|
233
|
-
this.limit = 10;
|
|
234
|
-
this.offset = 0;
|
|
235
|
-
}
|
|
236
|
-
__decorate([
|
|
237
|
-
(0, class_validator_1.IsNumber)(),
|
|
238
|
-
(0, class_validator_1.IsOptional)(),
|
|
239
|
-
(0, class_transformer_1.Type)(function () { return Number; }),
|
|
240
|
-
__metadata("design:type", Object)
|
|
241
|
-
], AdminGetProductTypesPaginationParams.prototype, "limit", void 0);
|
|
242
|
-
__decorate([
|
|
243
|
-
(0, class_validator_1.IsNumber)(),
|
|
244
|
-
(0, class_validator_1.IsOptional)(),
|
|
245
|
-
(0, class_transformer_1.Type)(function () { return Number; }),
|
|
246
|
-
__metadata("design:type", Object)
|
|
247
|
-
], AdminGetProductTypesPaginationParams.prototype, "offset", void 0);
|
|
248
|
-
return AdminGetProductTypesPaginationParams;
|
|
249
|
-
}());
|
|
250
|
-
exports.AdminGetProductTypesPaginationParams = AdminGetProductTypesPaginationParams;
|
|
251
230
|
// eslint-disable-next-line max-len
|
|
252
231
|
var AdminGetProductTypesParams = /** @class */ (function (_super) {
|
|
253
232
|
__extends(AdminGetProductTypesParams, _super);
|
|
@@ -290,6 +269,6 @@ var AdminGetProductTypesParams = /** @class */ (function (_super) {
|
|
|
290
269
|
__metadata("design:type", String)
|
|
291
270
|
], AdminGetProductTypesParams.prototype, "discount_condition_id", void 0);
|
|
292
271
|
return AdminGetProductTypesParams;
|
|
293
|
-
}(
|
|
272
|
+
}(common_1.FindPaginationParams));
|
|
294
273
|
exports.AdminGetProductTypesParams = AdminGetProductTypesParams;
|
|
295
274
|
//# sourceMappingURL=list-product-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-product-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-types/list-product-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"list-product-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-types/list-product-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAIiC;AACjC,mDAAsD;AAEtD,gEAA6D;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6HG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACtB,WAAW,GACf,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAA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D,CAAgD,6BAAoB,GA4BnE;AA5BY,gEAA0B"}
|
|
@@ -38,6 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
/**
|
|
40
40
|
* @oas [get] /products/types
|
|
41
|
+
* deprecated: true
|
|
41
42
|
* operationId: "GetProductsTypes"
|
|
42
43
|
* summary: "List Product Types"
|
|
43
44
|
* description: "Retrieves a list of Product Types."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/products/list-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"list-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/products/list-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACtB,cAAc,GAAmB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;gBAE5D,qBAAM,cAAc,CAAC,SAAS,EAAE,EAAA;;gBAAxC,KAAK,GAAG,SAAgC;gBAE9C,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,OAAA,EAAE,CAAC,CAAA;;;;KACpB,EAAA"}
|
|
@@ -81,7 +81,7 @@ var _1 = require(".");
|
|
|
81
81
|
* $ref: "#/components/responses/500_error"
|
|
82
82
|
*/
|
|
83
83
|
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
-
var id, cartService, idempotencyKeyService, manager, headerKey, idempotencyKey, error_1,
|
|
84
|
+
var id, cartService, idempotencyKeyService, manager, headerKey, idempotencyKey, error_1, inProgress, err, _a;
|
|
85
85
|
return __generator(this, function (_b) {
|
|
86
86
|
switch (_b.label) {
|
|
87
87
|
case 0:
|
|
@@ -115,21 +115,18 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
115
115
|
case 4:
|
|
116
116
|
res.setHeader("Access-Control-Expose-Headers", "Idempotency-Key");
|
|
117
117
|
res.setHeader("Idempotency-Key", idempotencyKey.idempotency_key);
|
|
118
|
+
inProgress = true;
|
|
119
|
+
err = false;
|
|
118
120
|
_b.label = 5;
|
|
119
121
|
case 5:
|
|
120
|
-
|
|
121
|
-
inProgress_1 = true;
|
|
122
|
-
err_1 = false;
|
|
123
|
-
_b.label = 6;
|
|
124
|
-
case 6:
|
|
125
|
-
if (!inProgress_1) return [3 /*break*/, 13];
|
|
122
|
+
if (!inProgress) return [3 /*break*/, 12];
|
|
126
123
|
_a = idempotencyKey.recovery_point;
|
|
127
124
|
switch (_a) {
|
|
128
|
-
case "started": return [3 /*break*/,
|
|
129
|
-
case "finished": return [3 /*break*/,
|
|
125
|
+
case "started": return [3 /*break*/, 6];
|
|
126
|
+
case "finished": return [3 /*break*/, 8];
|
|
130
127
|
}
|
|
131
|
-
return [3 /*break*/,
|
|
132
|
-
case
|
|
128
|
+
return [3 /*break*/, 9];
|
|
129
|
+
case 6: return [4 /*yield*/, manager
|
|
133
130
|
.transaction("SERIALIZABLE", function (transactionManager) { return __awaiter(void 0, void 0, void 0, function () {
|
|
134
131
|
return __generator(this, function (_a) {
|
|
135
132
|
switch (_a.label) {
|
|
@@ -166,19 +163,19 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
166
163
|
});
|
|
167
164
|
}); })
|
|
168
165
|
.catch(function (e) {
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
inProgress = false;
|
|
167
|
+
err = e;
|
|
171
168
|
})];
|
|
172
|
-
case
|
|
169
|
+
case 7:
|
|
173
170
|
_b.sent();
|
|
174
|
-
return [3 /*break*/,
|
|
175
|
-
case
|
|
171
|
+
return [3 /*break*/, 11];
|
|
172
|
+
case 8:
|
|
176
173
|
{
|
|
177
|
-
|
|
178
|
-
return [3 /*break*/,
|
|
174
|
+
inProgress = false;
|
|
175
|
+
return [3 /*break*/, 11];
|
|
179
176
|
}
|
|
180
|
-
_b.label =
|
|
181
|
-
case
|
|
177
|
+
_b.label = 9;
|
|
178
|
+
case 9: return [4 /*yield*/, manager.transaction(function (transactionManager) { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
179
|
return __generator(this, function (_a) {
|
|
183
180
|
switch (_a.label) {
|
|
184
181
|
case 0: return [4 /*yield*/, idempotencyKeyService
|
|
@@ -194,18 +191,16 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
194
191
|
}
|
|
195
192
|
});
|
|
196
193
|
}); })];
|
|
197
|
-
case
|
|
194
|
+
case 10:
|
|
198
195
|
_b.sent();
|
|
199
|
-
return [3 /*break*/,
|
|
200
|
-
case
|
|
201
|
-
case
|
|
196
|
+
return [3 /*break*/, 11];
|
|
197
|
+
case 11: return [3 /*break*/, 5];
|
|
198
|
+
case 12:
|
|
199
|
+
if (err) {
|
|
200
|
+
throw err;
|
|
201
|
+
}
|
|
202
202
|
res.status(idempotencyKey.response_code).json(idempotencyKey.response_body);
|
|
203
|
-
return [
|
|
204
|
-
case 14:
|
|
205
|
-
e_1 = _b.sent();
|
|
206
|
-
console.log(e_1);
|
|
207
|
-
throw e_1;
|
|
208
|
-
case 15: return [2 /*return*/];
|
|
203
|
+
return [2 /*return*/];
|
|
209
204
|
}
|
|
210
205
|
});
|
|
211
206
|
}); });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-payment-sessions.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/carts/create-payment-sessions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAqE;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEnB,WAAW,GAAgB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;gBAC3D,qBAAqB,GAA0B,GAAG,CAAC,KAAK,CAAC,OAAO,CACpE,uBAAuB,CACxB,CAAA;gBACK,OAAO,GAAkB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;gBAErD,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAA;;;;gBAIhD,qBAAM,OAAO,CAAC,WAAW,CAAC,UAAO,kBAAkB;;;wCAChC,qBAAM,qBAAqB;yCACzC,eAAe,CAAC,kBAAkB,CAAC;yCACnC,iBAAiB,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;oCAFjE,cAAc,GAAG,SAEgD,CAAA;;;;yBAClE,CAAC,EAAA;;gBAJF,SAIE,CAAA;;;;gBAEF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;gBACxD,sBAAM;;gBAGR,GAAG,CAAC,SAAS,CAAC,+BAA+B,EAAE,iBAAiB,CAAC,CAAA;gBACjE,GAAG,CAAC,SAAS,CAAC,iBAAiB,EAAE,cAAc,CAAC,eAAe,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"create-payment-sessions.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/carts/create-payment-sessions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAqE;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAA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;;KAC5E,EAAA"}
|
|
@@ -14,6 +14,7 @@ var gift_cards_1 = __importDefault(require("./gift-cards"));
|
|
|
14
14
|
var orders_1 = __importDefault(require("./orders"));
|
|
15
15
|
var order_edits_1 = __importDefault(require("./order-edits"));
|
|
16
16
|
var products_1 = __importDefault(require("./products"));
|
|
17
|
+
var product_types_1 = __importDefault(require("../admin/product-types"));
|
|
17
18
|
var regions_1 = __importDefault(require("./regions"));
|
|
18
19
|
var return_reasons_1 = __importDefault(require("./return-reasons"));
|
|
19
20
|
var returns_1 = __importDefault(require("./returns"));
|
|
@@ -33,6 +34,7 @@ exports.default = (function (app, container, config) {
|
|
|
33
34
|
(0, collections_1.default)(route);
|
|
34
35
|
(0, customers_1.default)(route, container);
|
|
35
36
|
(0, products_1.default)(route);
|
|
37
|
+
(0, product_types_1.default)(route);
|
|
36
38
|
(0, orders_1.default)(route);
|
|
37
39
|
(0, order_edits_1.default)(route);
|
|
38
40
|
(0, carts_1.default)(route, container);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/routes/store/index.js"],"names":[],"mappings":";;;;;AAAA,8CAAuB;AACvB,mCAAgC;AAChC,kEAA2C;AAC3C,gDAA+B;AAC/B,kDAAgC;AAChC,8DAA4C;AAC5C,0DAAwC;AACxC,4DAAyC;AACzC,oDAAkC;AAClC,8DAA2C;AAC3C,wDAAsC;AACtC,sDAAoC;AACpC,oEAAiD;AACjD,sDAAoC;AACpC,wEAAqD;AACrD,kDAAgC;AAChC,wDAAsC;AAEtC,IAAM,KAAK,GAAG,IAAA,gBAAM,GAAE,CAAA;AAEtB,mBAAe,UAAC,GAAG,EAAE,SAAS,EAAE,MAAM;IACpC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAExB,IAAM,SAAS,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAA;IACzC,KAAK,CAAC,GAAG,CACP,IAAA,cAAI,EAA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3
|
+
import "reflect-metadata";
|
|
4
|
+
declare const _default: (app: any) => any;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const allowedStoreProductTypeFields: string[];
|
|
7
|
+
export declare const defaultStoreProductTypeFields: string[];
|
|
8
|
+
export declare const defaultStoreProductTypeRelations: never[];
|
|
9
|
+
export declare type StoreProductTypesListRes = PaginatedResponse & {
|
|
10
|
+
product_types: ProductType[];
|
|
11
|
+
};
|
|
12
|
+
export declare type StoreProductTypesRes = {
|
|
13
|
+
product_type: ProductType;
|
|
14
|
+
};
|
|
15
|
+
export * from "./list-product-types";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.defaultStoreProductTypeRelations = exports.defaultStoreProductTypeFields = exports.allowedStoreProductTypeFields = void 0;
|
|
30
|
+
var express_1 = require("express");
|
|
31
|
+
var middlewares_1 = __importStar(require("../../../middlewares"));
|
|
32
|
+
require("reflect-metadata");
|
|
33
|
+
var list_product_types_1 = require("./list-product-types");
|
|
34
|
+
var route = (0, express_1.Router)();
|
|
35
|
+
exports.default = (function (app) {
|
|
36
|
+
app.use("/product-types", route);
|
|
37
|
+
route.get("/", (0, middlewares_1.transformQuery)(list_product_types_1.StoreGetProductTypesParams, {
|
|
38
|
+
defaultFields: exports.defaultStoreProductTypeFields,
|
|
39
|
+
defaultRelations: exports.defaultStoreProductTypeRelations,
|
|
40
|
+
allowedFields: exports.allowedStoreProductTypeFields,
|
|
41
|
+
isList: true,
|
|
42
|
+
}), middlewares_1.default.wrap(require("./list-product-types").default));
|
|
43
|
+
return app;
|
|
44
|
+
});
|
|
45
|
+
exports.allowedStoreProductTypeFields = [
|
|
46
|
+
"id",
|
|
47
|
+
"value",
|
|
48
|
+
"created_at",
|
|
49
|
+
"updated_at",
|
|
50
|
+
];
|
|
51
|
+
exports.defaultStoreProductTypeFields = [
|
|
52
|
+
"id",
|
|
53
|
+
"value",
|
|
54
|
+
"created_at",
|
|
55
|
+
"updated_at",
|
|
56
|
+
];
|
|
57
|
+
exports.defaultStoreProductTypeRelations = [];
|
|
58
|
+
__exportStar(require("./list-product-types"), exports);
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/product-types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAGhC,kEAAkE;AAClE,4BAAyB;AACzB,2DAAiE;AAEjE,IAAM,KAAK,GAAG,IAAA,gBAAM,GAAE,CAAA;AAEtB,mBAAe,UAAC,GAAG;IACjB,GAAG,CAAC,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAA;IAEhC,KAAK,CAAC,GAAG,CACP,GAAG,EACH,IAAA,4BAAc,EAAC,+CAA0B,EAAE;QACzC,aAAa,EAAE,qCAA6B;QAC5C,gBAAgB,EAAE,wCAAgC;QAClD,aAAa,EAAE,qCAA6B;QAC5C,MAAM,EAAE,IAAI;KACb,CAAC,EACF,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,CAC1D,CAAA;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA;AAEY,QAAA,6BAA6B,GAAG;IAC3C,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,YAAY;CACb,CAAA;AAEY,QAAA,6BAA6B,GAAG;IAC3C,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,YAAY;CACb,CAAA;AACY,QAAA,gCAAgC,GAAG,EAAE,CAAA;AAUlD,uDAAoC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { DateComparisonOperator, FindPaginationParams, StringComparisonOperator } from "../../../../types/common";
|
|
2
|
+
/**
|
|
3
|
+
* @oas [get] /product-types
|
|
4
|
+
* operationId: "GetProductTypes"
|
|
5
|
+
* summary: "List Product Types"
|
|
6
|
+
* description: "Retrieve a list of Product Types."
|
|
7
|
+
* x-authenticated: true
|
|
8
|
+
* parameters:
|
|
9
|
+
* - (query) limit=20 {integer} The number of types to return.
|
|
10
|
+
* - (query) offset=0 {integer} The number of items to skip before the results.
|
|
11
|
+
* - (query) order {string} The field to sort items by.
|
|
12
|
+
* - (query) discount_condition_id {string} The discount condition id on which to filter the product types.
|
|
13
|
+
* - in: query
|
|
14
|
+
* name: value
|
|
15
|
+
* style: form
|
|
16
|
+
* explode: false
|
|
17
|
+
* description: The type values to search for
|
|
18
|
+
* schema:
|
|
19
|
+
* type: array
|
|
20
|
+
* items:
|
|
21
|
+
* type: string
|
|
22
|
+
* - in: query
|
|
23
|
+
* name: id
|
|
24
|
+
* style: form
|
|
25
|
+
* explode: false
|
|
26
|
+
* description: The type IDs to search for
|
|
27
|
+
* schema:
|
|
28
|
+
* type: array
|
|
29
|
+
* items:
|
|
30
|
+
* type: string
|
|
31
|
+
* - (query) q {string} A query string to search values for
|
|
32
|
+
* - in: query
|
|
33
|
+
* name: created_at
|
|
34
|
+
* description: Date comparison for when resulting product types were created.
|
|
35
|
+
* schema:
|
|
36
|
+
* type: object
|
|
37
|
+
* properties:
|
|
38
|
+
* lt:
|
|
39
|
+
* type: string
|
|
40
|
+
* description: filter by dates less than this date
|
|
41
|
+
* format: date
|
|
42
|
+
* gt:
|
|
43
|
+
* type: string
|
|
44
|
+
* description: filter by dates greater than this date
|
|
45
|
+
* format: date
|
|
46
|
+
* lte:
|
|
47
|
+
* type: string
|
|
48
|
+
* description: filter by dates less than or equal to this date
|
|
49
|
+
* format: date
|
|
50
|
+
* gte:
|
|
51
|
+
* type: string
|
|
52
|
+
* description: filter by dates greater than or equal to this date
|
|
53
|
+
* format: date
|
|
54
|
+
* - in: query
|
|
55
|
+
* name: updated_at
|
|
56
|
+
* description: Date comparison for when resulting product types were updated.
|
|
57
|
+
* schema:
|
|
58
|
+
* type: object
|
|
59
|
+
* properties:
|
|
60
|
+
* lt:
|
|
61
|
+
* type: string
|
|
62
|
+
* description: filter by dates less than this date
|
|
63
|
+
* format: date
|
|
64
|
+
* gt:
|
|
65
|
+
* type: string
|
|
66
|
+
* description: filter by dates greater than this date
|
|
67
|
+
* format: date
|
|
68
|
+
* lte:
|
|
69
|
+
* type: string
|
|
70
|
+
* description: filter by dates less than or equal to this date
|
|
71
|
+
* format: date
|
|
72
|
+
* gte:
|
|
73
|
+
* type: string
|
|
74
|
+
* description: filter by dates greater than or equal to this date
|
|
75
|
+
* format: date
|
|
76
|
+
* x-codeSamples:
|
|
77
|
+
* - lang: JavaScript
|
|
78
|
+
* label: JS Client
|
|
79
|
+
* source: |
|
|
80
|
+
* import Medusa from "@medusajs/medusa-js"
|
|
81
|
+
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
82
|
+
* // must be previously logged in or use api token
|
|
83
|
+
* medusa.store.productTypes.list()
|
|
84
|
+
* .then(({ product_types }) => {
|
|
85
|
+
* console.log(product_types.length);
|
|
86
|
+
* });
|
|
87
|
+
* - lang: Shell
|
|
88
|
+
* label: cURL
|
|
89
|
+
* source: |
|
|
90
|
+
* curl --location --request GET 'https://medusa-url.com/store/product-types' \
|
|
91
|
+
* --header 'Authorization: Bearer {api_token}'
|
|
92
|
+
* security:
|
|
93
|
+
* - api_token: []
|
|
94
|
+
* - cookie_auth: []
|
|
95
|
+
* tags:
|
|
96
|
+
* - Product Type
|
|
97
|
+
* responses:
|
|
98
|
+
* "200":
|
|
99
|
+
* description: OK
|
|
100
|
+
* content:
|
|
101
|
+
* application/json:
|
|
102
|
+
* schema:
|
|
103
|
+
* properties:
|
|
104
|
+
* product_types:
|
|
105
|
+
* $ref: "#/components/schemas/product_type"
|
|
106
|
+
* count:
|
|
107
|
+
* type: integer
|
|
108
|
+
* description: The total number of items available
|
|
109
|
+
* offset:
|
|
110
|
+
* type: integer
|
|
111
|
+
* description: The number of items skipped before these items
|
|
112
|
+
* limit:
|
|
113
|
+
* type: integer
|
|
114
|
+
* description: The number of items per page
|
|
115
|
+
* "400":
|
|
116
|
+
* $ref: "#/components/responses/400_error"
|
|
117
|
+
* "401":
|
|
118
|
+
* $ref: "#/components/responses/unauthorized"
|
|
119
|
+
* "404":
|
|
120
|
+
* $ref: "#/components/responses/not_found_error"
|
|
121
|
+
* "409":
|
|
122
|
+
* $ref: "#/components/responses/invalid_state_error"
|
|
123
|
+
* "422":
|
|
124
|
+
* $ref: "#/components/responses/invalid_request_error"
|
|
125
|
+
* "500":
|
|
126
|
+
* $ref: "#/components/responses/500_error"
|
|
127
|
+
*/
|
|
128
|
+
declare const _default: (req: any, res: any) => Promise<void>;
|
|
129
|
+
export default _default;
|
|
130
|
+
export declare class StoreGetProductTypesParams extends FindPaginationParams {
|
|
131
|
+
id?: string | string[] | StringComparisonOperator;
|
|
132
|
+
q?: string;
|
|
133
|
+
value?: string | string[] | StringComparisonOperator;
|
|
134
|
+
created_at?: DateComparisonOperator;
|
|
135
|
+
updated_at?: DateComparisonOperator;
|
|
136
|
+
order?: string;
|
|
137
|
+
discount_condition_id?: string;
|
|
138
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
30
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
32
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
37
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
38
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
|
+
function step(op) {
|
|
40
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
41
|
+
while (_) try {
|
|
42
|
+
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;
|
|
43
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
44
|
+
switch (op[0]) {
|
|
45
|
+
case 0: case 1: t = op; break;
|
|
46
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
47
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
48
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
49
|
+
default:
|
|
50
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
51
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
52
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
53
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
54
|
+
if (t[2]) _.ops.pop();
|
|
55
|
+
_.trys.pop(); continue;
|
|
56
|
+
}
|
|
57
|
+
op = body.call(thisArg, _);
|
|
58
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
59
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
63
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64
|
+
if (!m) return o;
|
|
65
|
+
var i = m.call(o), r, ar = [], e;
|
|
66
|
+
try {
|
|
67
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
68
|
+
}
|
|
69
|
+
catch (error) { e = { error: error }; }
|
|
70
|
+
finally {
|
|
71
|
+
try {
|
|
72
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
73
|
+
}
|
|
74
|
+
finally { if (e) throw e.error; }
|
|
75
|
+
}
|
|
76
|
+
return ar;
|
|
77
|
+
};
|
|
78
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
+
exports.StoreGetProductTypesParams = void 0;
|
|
80
|
+
var common_1 = require("../../../../types/common");
|
|
81
|
+
var class_validator_1 = require("class-validator");
|
|
82
|
+
var is_type_1 = require("../../../../utils/validators/is-type");
|
|
83
|
+
/**
|
|
84
|
+
* @oas [get] /product-types
|
|
85
|
+
* operationId: "GetProductTypes"
|
|
86
|
+
* summary: "List Product Types"
|
|
87
|
+
* description: "Retrieve a list of Product Types."
|
|
88
|
+
* x-authenticated: true
|
|
89
|
+
* parameters:
|
|
90
|
+
* - (query) limit=20 {integer} The number of types to return.
|
|
91
|
+
* - (query) offset=0 {integer} The number of items to skip before the results.
|
|
92
|
+
* - (query) order {string} The field to sort items by.
|
|
93
|
+
* - (query) discount_condition_id {string} The discount condition id on which to filter the product types.
|
|
94
|
+
* - in: query
|
|
95
|
+
* name: value
|
|
96
|
+
* style: form
|
|
97
|
+
* explode: false
|
|
98
|
+
* description: The type values to search for
|
|
99
|
+
* schema:
|
|
100
|
+
* type: array
|
|
101
|
+
* items:
|
|
102
|
+
* type: string
|
|
103
|
+
* - in: query
|
|
104
|
+
* name: id
|
|
105
|
+
* style: form
|
|
106
|
+
* explode: false
|
|
107
|
+
* description: The type IDs to search for
|
|
108
|
+
* schema:
|
|
109
|
+
* type: array
|
|
110
|
+
* items:
|
|
111
|
+
* type: string
|
|
112
|
+
* - (query) q {string} A query string to search values for
|
|
113
|
+
* - in: query
|
|
114
|
+
* name: created_at
|
|
115
|
+
* description: Date comparison for when resulting product types were created.
|
|
116
|
+
* schema:
|
|
117
|
+
* type: object
|
|
118
|
+
* properties:
|
|
119
|
+
* lt:
|
|
120
|
+
* type: string
|
|
121
|
+
* description: filter by dates less than this date
|
|
122
|
+
* format: date
|
|
123
|
+
* gt:
|
|
124
|
+
* type: string
|
|
125
|
+
* description: filter by dates greater than this date
|
|
126
|
+
* format: date
|
|
127
|
+
* lte:
|
|
128
|
+
* type: string
|
|
129
|
+
* description: filter by dates less than or equal to this date
|
|
130
|
+
* format: date
|
|
131
|
+
* gte:
|
|
132
|
+
* type: string
|
|
133
|
+
* description: filter by dates greater than or equal to this date
|
|
134
|
+
* format: date
|
|
135
|
+
* - in: query
|
|
136
|
+
* name: updated_at
|
|
137
|
+
* description: Date comparison for when resulting product types were updated.
|
|
138
|
+
* schema:
|
|
139
|
+
* type: object
|
|
140
|
+
* properties:
|
|
141
|
+
* lt:
|
|
142
|
+
* type: string
|
|
143
|
+
* description: filter by dates less than this date
|
|
144
|
+
* format: date
|
|
145
|
+
* gt:
|
|
146
|
+
* type: string
|
|
147
|
+
* description: filter by dates greater than this date
|
|
148
|
+
* format: date
|
|
149
|
+
* lte:
|
|
150
|
+
* type: string
|
|
151
|
+
* description: filter by dates less than or equal to this date
|
|
152
|
+
* format: date
|
|
153
|
+
* gte:
|
|
154
|
+
* type: string
|
|
155
|
+
* description: filter by dates greater than or equal to this date
|
|
156
|
+
* format: date
|
|
157
|
+
* x-codeSamples:
|
|
158
|
+
* - lang: JavaScript
|
|
159
|
+
* label: JS Client
|
|
160
|
+
* source: |
|
|
161
|
+
* import Medusa from "@medusajs/medusa-js"
|
|
162
|
+
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
163
|
+
* // must be previously logged in or use api token
|
|
164
|
+
* medusa.store.productTypes.list()
|
|
165
|
+
* .then(({ product_types }) => {
|
|
166
|
+
* console.log(product_types.length);
|
|
167
|
+
* });
|
|
168
|
+
* - lang: Shell
|
|
169
|
+
* label: cURL
|
|
170
|
+
* source: |
|
|
171
|
+
* curl --location --request GET 'https://medusa-url.com/store/product-types' \
|
|
172
|
+
* --header 'Authorization: Bearer {api_token}'
|
|
173
|
+
* security:
|
|
174
|
+
* - api_token: []
|
|
175
|
+
* - cookie_auth: []
|
|
176
|
+
* tags:
|
|
177
|
+
* - Product Type
|
|
178
|
+
* responses:
|
|
179
|
+
* "200":
|
|
180
|
+
* description: OK
|
|
181
|
+
* content:
|
|
182
|
+
* application/json:
|
|
183
|
+
* schema:
|
|
184
|
+
* properties:
|
|
185
|
+
* product_types:
|
|
186
|
+
* $ref: "#/components/schemas/product_type"
|
|
187
|
+
* count:
|
|
188
|
+
* type: integer
|
|
189
|
+
* description: The total number of items available
|
|
190
|
+
* offset:
|
|
191
|
+
* type: integer
|
|
192
|
+
* description: The number of items skipped before these items
|
|
193
|
+
* limit:
|
|
194
|
+
* type: integer
|
|
195
|
+
* description: The number of items per page
|
|
196
|
+
* "400":
|
|
197
|
+
* $ref: "#/components/responses/400_error"
|
|
198
|
+
* "401":
|
|
199
|
+
* $ref: "#/components/responses/unauthorized"
|
|
200
|
+
* "404":
|
|
201
|
+
* $ref: "#/components/responses/not_found_error"
|
|
202
|
+
* "409":
|
|
203
|
+
* $ref: "#/components/responses/invalid_state_error"
|
|
204
|
+
* "422":
|
|
205
|
+
* $ref: "#/components/responses/invalid_request_error"
|
|
206
|
+
* "500":
|
|
207
|
+
* $ref: "#/components/responses/500_error"
|
|
208
|
+
*/
|
|
209
|
+
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
210
|
+
var typeService, listConfig, filterableFields, _a, skip, take, _b, types, count;
|
|
211
|
+
return __generator(this, function (_c) {
|
|
212
|
+
switch (_c.label) {
|
|
213
|
+
case 0:
|
|
214
|
+
typeService = req.scope.resolve("productTypeService");
|
|
215
|
+
listConfig = req.listConfig, filterableFields = req.filterableFields;
|
|
216
|
+
_a = req.listConfig, skip = _a.skip, take = _a.take;
|
|
217
|
+
return [4 /*yield*/, typeService.listAndCount(filterableFields, listConfig)];
|
|
218
|
+
case 1:
|
|
219
|
+
_b = __read.apply(void 0, [_c.sent(), 2]), types = _b[0], count = _b[1];
|
|
220
|
+
res.status(200).json({
|
|
221
|
+
product_types: types,
|
|
222
|
+
count: count,
|
|
223
|
+
offset: skip,
|
|
224
|
+
limit: take,
|
|
225
|
+
});
|
|
226
|
+
return [2 /*return*/];
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}); });
|
|
230
|
+
// eslint-disable-next-line max-len
|
|
231
|
+
var StoreGetProductTypesParams = /** @class */ (function (_super) {
|
|
232
|
+
__extends(StoreGetProductTypesParams, _super);
|
|
233
|
+
function StoreGetProductTypesParams() {
|
|
234
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
235
|
+
}
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, is_type_1.IsType)([String, [String], common_1.StringComparisonOperator]),
|
|
238
|
+
(0, class_validator_1.IsOptional)(),
|
|
239
|
+
__metadata("design:type", Object)
|
|
240
|
+
], StoreGetProductTypesParams.prototype, "id", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
(0, class_validator_1.IsString)(),
|
|
243
|
+
(0, class_validator_1.IsOptional)(),
|
|
244
|
+
__metadata("design:type", String)
|
|
245
|
+
], StoreGetProductTypesParams.prototype, "q", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, is_type_1.IsType)([String, [String], common_1.StringComparisonOperator]),
|
|
248
|
+
(0, class_validator_1.IsOptional)(),
|
|
249
|
+
__metadata("design:type", Object)
|
|
250
|
+
], StoreGetProductTypesParams.prototype, "value", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
(0, is_type_1.IsType)([common_1.DateComparisonOperator]),
|
|
253
|
+
(0, class_validator_1.IsOptional)(),
|
|
254
|
+
__metadata("design:type", common_1.DateComparisonOperator)
|
|
255
|
+
], StoreGetProductTypesParams.prototype, "created_at", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
(0, is_type_1.IsType)([common_1.DateComparisonOperator]),
|
|
258
|
+
(0, class_validator_1.IsOptional)(),
|
|
259
|
+
__metadata("design:type", common_1.DateComparisonOperator)
|
|
260
|
+
], StoreGetProductTypesParams.prototype, "updated_at", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
(0, class_validator_1.IsString)(),
|
|
263
|
+
(0, class_validator_1.IsOptional)(),
|
|
264
|
+
__metadata("design:type", String)
|
|
265
|
+
], StoreGetProductTypesParams.prototype, "order", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
(0, class_validator_1.IsString)(),
|
|
268
|
+
(0, class_validator_1.IsOptional)(),
|
|
269
|
+
__metadata("design:type", String)
|
|
270
|
+
], StoreGetProductTypesParams.prototype, "discount_condition_id", void 0);
|
|
271
|
+
return StoreGetProductTypesParams;
|
|
272
|
+
}(common_1.FindPaginationParams));
|
|
273
|
+
exports.StoreGetProductTypesParams = StoreGetProductTypesParams;
|
|
274
|
+
//# sourceMappingURL=list-product-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-product-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/product-types/list-product-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAIiC;AACjC,mDAAsD;AAEtD,gEAA6D;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6HG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACtB,WAAW,GACf,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;gBAEjC,UAAU,GAAuB,GAAG,WAA1B,EAAE,gBAAgB,GAAK,GAAG,iBAAR,CAAQ;gBACtC,KAAiB,GAAG,CAAC,UAAU,EAA7B,IAAI,UAAA,EAAE,IAAI,UAAA,CAAmB;gBAEd,qBAAM,WAAW,CAAC,YAAY,CACnD,gBAAgB,EAChB,UAAU,CACX,EAAA;;gBAHK,KAAA,sBAAiB,SAGtB,KAAA,EAHM,KAAK,QAAA,EAAE,KAAK,QAAA;gBAKnB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACnB,aAAa,EAAE,KAAK;oBACpB,KAAK,OAAA;oBACL,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,IAAI;iBACZ,CAAC,CAAA;;;;KACH,EAAA;AAED,mCAAmC;AACnC;IAAgD,8CAAoB;IAApE;;IA4BA,CAAC;IAzBC;QAFC,IAAA,gBAAM,EAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,iCAAwB,CAAC,CAAC;QACpD,IAAA,4BAAU,GAAE;;0DACoC;IAIjD;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;yDACH;IAIV;QAFC,IAAA,gBAAM,EAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,iCAAwB,CAAC,CAAC;QACpD,IAAA,4BAAU,GAAE;;6DACuC;IAIpD;QAFC,IAAA,gBAAM,EAAC,CAAC,+BAAsB,CAAC,CAAC;QAChC,IAAA,4BAAU,GAAE;kCACA,+BAAsB;kEAAA;IAInC;QAFC,IAAA,gBAAM,EAAC,CAAC,+BAAsB,CAAC,CAAC;QAChC,IAAA,4BAAU,GAAE;kCACA,+BAAsB;kEAAA;IAInC;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;6DACC;IAId;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;6EACiB;IAChC,iCAAC;CAAA,AA5BD,CAAgD,6BAAoB,GA4BnE;AA5BY,gEAA0B"}
|
|
@@ -12,6 +12,14 @@ declare type InjectedDependencies = {
|
|
|
12
12
|
redisSubscriber: Redis.Redis;
|
|
13
13
|
};
|
|
14
14
|
declare type Subscriber<T = unknown> = (data: T, eventName: string) => Promise<void>;
|
|
15
|
+
declare type EmitOptions = {
|
|
16
|
+
delay?: number;
|
|
17
|
+
attempts?: number;
|
|
18
|
+
backoff?: {
|
|
19
|
+
type: "fixed" | "exponential";
|
|
20
|
+
delay: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
/**
|
|
16
24
|
* Can keep track of multiple subscribers to different events and run the
|
|
17
25
|
* subscribers when events happen. Events will run asynchronously.
|
|
@@ -63,9 +71,7 @@ export default class EventBusService {
|
|
|
63
71
|
* @param options - options to add the job with
|
|
64
72
|
* @return the job from our queue
|
|
65
73
|
*/
|
|
66
|
-
emit<T>(eventName: string, data: T, options?:
|
|
67
|
-
delay?: number;
|
|
68
|
-
}): Promise<StagedJob | void>;
|
|
74
|
+
emit<T>(eventName: string, data: T, options?: EmitOptions): Promise<StagedJob | void>;
|
|
69
75
|
startEnqueuer(): void;
|
|
70
76
|
stopEnqueuer(): Promise<void>;
|
|
71
77
|
enqueuer_(): Promise<void>;
|
|
@@ -261,6 +261,12 @@ var EventBusService = /** @class */ (function () {
|
|
|
261
261
|
opts = {
|
|
262
262
|
removeOnComplete: true,
|
|
263
263
|
};
|
|
264
|
+
if (typeof options.attempts === "number") {
|
|
265
|
+
opts.attempts = options.attempts;
|
|
266
|
+
if (typeof options.backoff !== "undefined") {
|
|
267
|
+
opts.backoff = options.backoff;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
264
270
|
if (typeof options.delay === "number") {
|
|
265
271
|
opts.delay = options.delay;
|
|
266
272
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../src/services/event-bus.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,oDAA2B;AAK3B,wCAAsC;
|
|
1
|
+
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../src/services/event-bus.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,oDAA2B;AAK3B,wCAAsC;AAqBtC;;;GAGG;AACH;IAeE,yBACE,EAMuB,EACvB,MAAoB,EACpB,SAAgB;YAPd,OAAO,aAAA,EACP,MAAM,YAAA,EACN,mBAAmB,yBAAA,EACnB,WAAW,iBAAA,EACX,eAAe,qBAAA;QAGjB,0BAAA,EAAA,gBAAgB;QATlB,iBAgD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AAG,SAAoC;wCAEjD,qBAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG;gDACX,KAAI,CAAC,MAAM;qDACR,GAAG,CACF,EAAE,SAAS,EAAE,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAC7C,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAC3B;qDACA,IAAI,CAAC;;;oEACJ,qBAAM,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;;gEAA/B,SAA+B,CAAA;;;;qDAChC,CAAC,CAAA;4CACN,CAAC,CAAC,CACH,EAAA;;wCAXD,SAWC,CAAA;wCAED,qBAAM,IAAA,aAAK,EAAC,IAAI,CAAC,EAAA;;wCAAjB,SAAiB,CAAA;;;;;;;;6BAzBZ,IAAI,CAAC,iBAAiB;;;;;;;;;KA2B9B;IAyDD;;;;;;;OAOG;IACH,uCAAa,GAAb,UACE,SAAiB,EACjB,IAAO,EACP,IAAY,EACZ,OAAmB;QAEnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAe,SAAS,CAAE,CAAC,CAAA;QAC7C,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QAC7C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CACxB;YACE,SAAS,WAAA;YACT,IAAI,MAAA;SACL,EACD,EAAE,MAAM,EAAE,EAAE,IAAI,MAAA,EAAE,EAAE,CACrB,CAAA;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAnTD,IAmTC"}
|
|
@@ -12,7 +12,7 @@ declare class ProductTypeService extends TransactionBaseService {
|
|
|
12
12
|
productTypeRepository: any;
|
|
13
13
|
});
|
|
14
14
|
/**
|
|
15
|
-
* Gets a product by id.
|
|
15
|
+
* Gets a product type by id.
|
|
16
16
|
* Throws in case of DB Error and if product was not found.
|
|
17
17
|
* @param id - id of the product to get.
|
|
18
18
|
* @param config - object that defines what should be included in the
|
|
@@ -31,7 +31,7 @@ declare class ProductTypeService extends TransactionBaseService {
|
|
|
31
31
|
discount_condition_id?: string;
|
|
32
32
|
}, config?: FindConfig<ProductType>): Promise<ProductType[]>;
|
|
33
33
|
/**
|
|
34
|
-
* Lists product
|
|
34
|
+
* Lists product types and adds count.
|
|
35
35
|
* @param selector - the query object for find
|
|
36
36
|
* @param config - the config to be used for find
|
|
37
37
|
* @return the result of the find operation
|
|
@@ -81,7 +81,7 @@ var ProductTypeService = /** @class */ (function (_super) {
|
|
|
81
81
|
return _this;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Gets a product by id.
|
|
84
|
+
* Gets a product type by id.
|
|
85
85
|
* Throws in case of DB Error and if product was not found.
|
|
86
86
|
* @param id - id of the product to get.
|
|
87
87
|
* @param config - object that defines what should be included in the
|
|
@@ -101,7 +101,7 @@ var ProductTypeService = /** @class */ (function (_super) {
|
|
|
101
101
|
case 1:
|
|
102
102
|
type = _a.sent();
|
|
103
103
|
if (!type) {
|
|
104
|
-
throw new medusa_core_utils_1.MedusaError(medusa_core_utils_1.MedusaError.Types.NOT_FOUND, "Product with id: ".concat(id, " was not found"));
|
|
104
|
+
throw new medusa_core_utils_1.MedusaError(medusa_core_utils_1.MedusaError.Types.NOT_FOUND, "Product type with id: ".concat(id, " was not found"));
|
|
105
105
|
}
|
|
106
106
|
return [2 /*return*/, type];
|
|
107
107
|
}
|
|
@@ -130,7 +130,7 @@ var ProductTypeService = /** @class */ (function (_super) {
|
|
|
130
130
|
});
|
|
131
131
|
};
|
|
132
132
|
/**
|
|
133
|
-
* Lists product
|
|
133
|
+
* Lists product types and adds count.
|
|
134
134
|
* @param selector - the query object for find
|
|
135
135
|
* @param config - the config to be used for find
|
|
136
136
|
* @return the result of the find operation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-type.js","sourceRoot":"","sources":["../../src/services/product-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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BACxB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAA;4BACd,OAAO,QAAQ,CAAC,CAAC,CAAA;yBAClB;wBAEK,KAAK,GAAG,IAAA,kBAAU,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;wBAE1C,IAAI,CAAC,EAAE;4BACL,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,IAAA,eAAK,EAAC,WAAI,CAAC,MAAG,CAAC,CAAA;yBACpC;6BAEG,KAAK,CAAC,KAAK,CAAC,qBAAqB,EAAjC,wBAAiC;wBAC7B,mBAAmB,GAAG,KAAK,CAAC,KAAK,CAAC,qBAA+B,CAAA;wBACvE,OAAO,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAA;wBACjC,qBAAM,QAAQ,CAAC,iCAAiC,CACrD,mBAAmB,EACnB,KAAK,CACN,EAAA;4BAHD,sBAAO,SAGN,EAAA;4BAGI,qBAAM,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,EAAA;4BAAzC,sBAAO,SAAkC,EAAA;;;;KAC1C;IACH,yBAAC;AAAD,CAAC,AA/FD,CAAiC,mCAAsB,GA+FtD;AAED,kBAAe,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/medusa",
|
|
3
|
-
"version": "1.6.2-alpha.
|
|
3
|
+
"version": "1.6.2-alpha.1",
|
|
4
4
|
"description": "E-commerce for JAMstack",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": "./cli.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"typeorm": "0.2.x"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@medusajs/medusa-cli": "^1.3.
|
|
48
|
+
"@medusajs/medusa-cli": "^1.3.4-alpha.0",
|
|
49
49
|
"@types/ioredis": "^4.28.10",
|
|
50
50
|
"@types/lodash": "^4.14.168",
|
|
51
51
|
"awilix": "^4.2.3",
|