@medusajs/medusa 1.6.2-alpha.0 → 1.6.2

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.
Files changed (85) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/api/index.d.ts +1 -0
  4. package/dist/api/index.js +1 -0
  5. package/dist/api/index.js.map +1 -1
  6. package/dist/api/routes/admin/currencies/list-currencies.d.ts +26 -10
  7. package/dist/api/routes/admin/currencies/list-currencies.js +26 -10
  8. package/dist/api/routes/admin/currencies/list-currencies.js.map +1 -1
  9. package/dist/api/routes/admin/currencies/update-currency.d.ts +22 -0
  10. package/dist/api/routes/admin/currencies/update-currency.js +22 -0
  11. package/dist/api/routes/admin/currencies/update-currency.js.map +1 -1
  12. package/dist/api/routes/admin/order-edits/add-line-item.d.ts +27 -6
  13. package/dist/api/routes/admin/order-edits/add-line-item.js +27 -6
  14. package/dist/api/routes/admin/order-edits/add-line-item.js.map +1 -1
  15. package/dist/api/routes/admin/order-edits/cancel-order-edit.d.ts +2 -2
  16. package/dist/api/routes/admin/order-edits/cancel-order-edit.js +2 -2
  17. package/dist/api/routes/admin/order-edits/confirm-order-edit.d.ts +2 -2
  18. package/dist/api/routes/admin/order-edits/confirm-order-edit.js +2 -2
  19. package/dist/api/routes/admin/order-edits/create-order-edit.d.ts +17 -3
  20. package/dist/api/routes/admin/order-edits/create-order-edit.js +17 -3
  21. package/dist/api/routes/admin/order-edits/create-order-edit.js.map +1 -1
  22. package/dist/api/routes/admin/order-edits/delete-order-edit-item-change.d.ts +1 -1
  23. package/dist/api/routes/admin/order-edits/delete-order-edit-item-change.js +1 -1
  24. package/dist/api/routes/admin/order-edits/delete-order-edit.d.ts +1 -1
  25. package/dist/api/routes/admin/order-edits/delete-order-edit.js +1 -1
  26. package/dist/api/routes/admin/order-edits/get-order-edit.d.ts +1 -1
  27. package/dist/api/routes/admin/order-edits/get-order-edit.js +1 -1
  28. package/dist/api/routes/admin/order-edits/list-order-edit.d.ts +12 -3
  29. package/dist/api/routes/admin/order-edits/list-order-edit.js +12 -3
  30. package/dist/api/routes/admin/order-edits/list-order-edit.js.map +1 -1
  31. package/dist/api/routes/admin/order-edits/request-confirmation.d.ts +1 -1
  32. package/dist/api/routes/admin/order-edits/request-confirmation.js +1 -1
  33. package/dist/api/routes/admin/order-edits/update-order-edit-line-item.d.ts +16 -3
  34. package/dist/api/routes/admin/order-edits/update-order-edit-line-item.js +16 -3
  35. package/dist/api/routes/admin/order-edits/update-order-edit-line-item.js.map +1 -1
  36. package/dist/api/routes/admin/order-edits/update-order-edit.d.ts +12 -3
  37. package/dist/api/routes/admin/order-edits/update-order-edit.js +12 -3
  38. package/dist/api/routes/admin/order-edits/update-order-edit.js.map +1 -1
  39. package/dist/api/routes/admin/product-types/list-product-types.d.ts +3 -7
  40. package/dist/api/routes/admin/product-types/list-product-types.js +3 -24
  41. package/dist/api/routes/admin/product-types/list-product-types.js.map +1 -1
  42. package/dist/api/routes/admin/products/list-types.d.ts +1 -0
  43. package/dist/api/routes/admin/products/list-types.js +1 -0
  44. package/dist/api/routes/admin/products/list-types.js.map +1 -1
  45. package/dist/api/routes/admin/returns/receive-return.d.ts +2 -2
  46. package/dist/api/routes/admin/returns/receive-return.js +2 -2
  47. package/dist/api/routes/store/carts/create-payment-sessions.js +25 -30
  48. package/dist/api/routes/store/carts/create-payment-sessions.js.map +1 -1
  49. package/dist/api/routes/store/index.js +2 -0
  50. package/dist/api/routes/store/index.js.map +1 -1
  51. package/dist/api/routes/store/order-edits/complete-order-edit.d.ts +1 -1
  52. package/dist/api/routes/store/order-edits/complete-order-edit.js +1 -1
  53. package/dist/api/routes/store/order-edits/decline-order-edit.d.ts +1 -1
  54. package/dist/api/routes/store/order-edits/decline-order-edit.js +1 -1
  55. package/dist/api/routes/store/order-edits/get-order-edit.d.ts +1 -1
  56. package/dist/api/routes/store/order-edits/get-order-edit.js +1 -1
  57. package/dist/api/routes/store/product-types/index.d.ts +15 -0
  58. package/dist/api/routes/store/product-types/index.js +59 -0
  59. package/dist/api/routes/store/product-types/index.js.map +1 -0
  60. package/dist/api/routes/store/product-types/list-product-types.d.ts +138 -0
  61. package/dist/api/routes/store/product-types/list-product-types.js +274 -0
  62. package/dist/api/routes/store/product-types/list-product-types.js.map +1 -0
  63. package/dist/api/routes/store/products/list-products.d.ts +9 -0
  64. package/dist/api/routes/store/products/list-products.js +9 -0
  65. package/dist/api/routes/store/products/list-products.js.map +1 -1
  66. package/dist/api/routes/store/returns/create-return.d.ts +2 -2
  67. package/dist/api/routes/store/returns/create-return.js +2 -2
  68. package/dist/models/order-edit.d.ts +27 -3
  69. package/dist/models/order-edit.js +27 -3
  70. package/dist/models/order-edit.js.map +1 -1
  71. package/dist/models/order-item-change.d.ts +20 -4
  72. package/dist/models/order-item-change.js +20 -4
  73. package/dist/models/order-item-change.js.map +1 -1
  74. package/dist/models/payment-collection.d.ts +98 -0
  75. package/dist/models/payment-collection.js +98 -0
  76. package/dist/models/payment-collection.js.map +1 -1
  77. package/dist/models/region.d.ts +1 -1
  78. package/dist/models/region.js +1 -1
  79. package/dist/services/event-bus.d.ts +9 -3
  80. package/dist/services/event-bus.js +6 -0
  81. package/dist/services/event-bus.js.map +1 -1
  82. package/dist/services/product-type.d.ts +2 -2
  83. package/dist/services/product-type.js +3 -3
  84. package/dist/services/product-type.js.map +1 -1
  85. package/package.json +2 -2
@@ -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;;;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AAA;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"}
@@ -19,6 +19,15 @@ import { PriceSelectionParams } from "../../../../types/price-selection";
19
19
  * items:
20
20
  * type: string
21
21
  * - in: query
22
+ * name: sales_channel_id
23
+ * style: form
24
+ * explode: false
25
+ * description: an array of sales channel IDs to filter the retrieved products by.
26
+ * schema:
27
+ * type: array
28
+ * items:
29
+ * type: string
30
+ * - in: query
22
31
  * name: collection_id
23
32
  * style: form
24
33
  * explode: false
@@ -120,6 +120,15 @@ var is_type_1 = require("../../../../utils/validators/is-type");
120
120
  * items:
121
121
  * type: string
122
122
  * - in: query
123
+ * name: sales_channel_id
124
+ * style: form
125
+ * explode: false
126
+ * description: an array of sales channel IDs to filter the retrieved products by.
127
+ * schema:
128
+ * type: array
129
+ * items:
130
+ * type: string
131
+ * - in: query
123
132
  * name: collection_id
124
133
  * style: form
125
134
  * explode: false
@@ -1 +1 @@
1
- {"version":3,"file":"list-products.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/products/list-products.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAmD;AACnD,mDAOwB;AACxB,iCAAqC;AAOrC,sBAAiD;AACjD,oGAAsF;AAGtF,mDAAiE;AACjE,qEAAwE;AACxE,2CAA6C;AAC7C,qFAAiF;AACjF,yDAAuD;AACvD,sEAA+E;AAC/E,gEAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;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ACE;IAIf;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;yDACC;IAId;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;+DACO;IAIpB;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;0DACE;IAKf;QAHC,IAAA,2BAAS,GAAE;QACX,IAAA,4BAAU,GAAE;QACZ,IAAA,6BAAS,EAAC,UAAC,EAAS;gBAAP,KAAK,WAAA;YAAO,OAAA,kCAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAA9C,CAA8C,CAAC;;+DACpD;IAIrB;QAFC,IAAA,yBAAO,GAAE;QACT,IAAA,4BAAU,GAAE;;2DACK;IAGlB;QADC,IAAA,+CAAqB,EAAC,wBAAuB,CAAC,GAAG,EAAE,CAAC,IAAA,4BAAU,GAAE,EAAE,IAAA,yBAAO,GAAE,CAAC,CAAC;;oEACnD;IAK3B;QAHC,IAAA,4BAAU,GAAE;QACZ,IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;8DAAA;IAKnC;QAHC,IAAA,4BAAU,GAAE;QACZ,IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;8DAAA;IACrC,6BAAC;CAAA,AAlDD,CAA4C,gCAAgC,GAkD3E;AAlDY,wDAAsB"}
1
+ {"version":3,"file":"list-products.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/products/list-products.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAmD;AACnD,mDAOwB;AACxB,iCAAqC;AAOrC,sBAAiD;AACjD,oGAAsF;AAGtF,m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U,GAAE;;qDACH;IAIV;QAFC,IAAA,yBAAO,GAAE;QACT,IAAA,4BAAU,GAAE;;iEACW;IAIxB;QAFC,IAAA,yBAAO,GAAE;QACT,IAAA,4BAAU,GAAE;;wDACE;IAIf;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;yDACC;IAId;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;+DACO;IAIpB;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;0DACE;IAKf;QAHC,IAAA,2BAAS,GAAE;QACX,IAAA,4BAAU,GAAE;QACZ,IAAA,6BAAS,EAAC,UAAC,EAAS;gBAAP,KAAK,WAAA;YAAO,OAAA,kCAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAA9C,CAA8C,CAAC;;+DACpD;IAIrB;QAFC,IAAA,yBAAO,GAAE;QACT,IAAA,4BAAU,GAAE;;2DACK;IAGlB;QADC,IAAA,+CAAqB,EAAC,wBAAuB,CAAC,GAAG,EAAE,CAAC,IAAA,4BAAU,GAAE,EAAE,IAAA,yBAAO,GAAE,CAAC,CAAC;;oEACnD;IAK3B;QAHC,IAAA,4BAAU,GAAE;QACZ,IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;8DAAA;IAKnC;QAHC,IAAA,4BAAU,GAAE;QACZ,IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;8DAAA;IACrC,6BAAC;CAAA,AAlDD,CAA4C,gCAAgC,GAkD3E;AAlDY,wDAAsB"}
@@ -58,8 +58,8 @@
58
58
  * }
59
59
  * ]
60
60
  * })
61
- * .then(({ return }) => {
62
- * console.log(return.id);
61
+ * .then((data) => {
62
+ * console.log(data.return.id);
63
63
  * });
64
64
  * - lang: Shell
65
65
  * label: cURL
@@ -110,8 +110,8 @@ var validator_1 = require("../../../../utils/validator");
110
110
  * }
111
111
  * ]
112
112
  * })
113
- * .then(({ return }) => {
114
- * console.log(return.id);
113
+ * .then((data) => {
114
+ * console.log(data.return.id);
115
115
  * });
116
116
  * - lang: Shell
117
117
  * label: cURL
@@ -57,11 +57,11 @@ export declare class OrderEdit extends BaseEntity {
57
57
  * description: The ID of the order that is edited
58
58
  * example: order_01G2SG30J8C85S4A5CHM2S1NS2
59
59
  * order:
60
- * description: Order object
60
+ * description: Available if the relation `order` is expanded.
61
61
  * $ref: "#/components/schemas/order"
62
62
  * changes:
63
63
  * type: array
64
- * description: Line item changes array.
64
+ * description: Available if the relation `changes` is expanded.
65
65
  * items:
66
66
  * $ref: "#/components/schemas/order_item_change"
67
67
  * internal_note:
@@ -127,9 +127,33 @@ export declare class OrderEdit extends BaseEntity {
127
127
  * type: integer
128
128
  * description: The difference between the total amount of the order and total amount of edited order.
129
129
  * example: 8200
130
+ * status:
131
+ * type: string
132
+ * description: The status of the order edit.
133
+ * enum:
134
+ * - confirmed
135
+ * - declined
136
+ * - requested
137
+ * - created
138
+ * - canceled
130
139
  * items:
131
140
  * type: array
132
- * description: Computed line items from the changes.
141
+ * description: Available if the relation `items` is expanded.
133
142
  * items:
134
143
  * $ref: "#/components/schemas/line_item"
144
+ * payment_collection_id:
145
+ * type: string
146
+ * description: The ID of the payment collection
147
+ * example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
148
+ * payment_collection:
149
+ * description: Available if the relation `payment_collection` is expanded.
150
+ * $ref: "#/components/schemas/payment_collection"
151
+ * created_at:
152
+ * type: string
153
+ * description: "The date with timezone at which the resource was created."
154
+ * format: date-time
155
+ * updated_at:
156
+ * type: string
157
+ * description: "The date with timezone at which the resource was updated."
158
+ * format: date-time
135
159
  */
@@ -181,11 +181,11 @@ exports.OrderEdit = OrderEdit;
181
181
  * description: The ID of the order that is edited
182
182
  * example: order_01G2SG30J8C85S4A5CHM2S1NS2
183
183
  * order:
184
- * description: Order object
184
+ * description: Available if the relation `order` is expanded.
185
185
  * $ref: "#/components/schemas/order"
186
186
  * changes:
187
187
  * type: array
188
- * description: Line item changes array.
188
+ * description: Available if the relation `changes` is expanded.
189
189
  * items:
190
190
  * $ref: "#/components/schemas/order_item_change"
191
191
  * internal_note:
@@ -251,10 +251,34 @@ exports.OrderEdit = OrderEdit;
251
251
  * type: integer
252
252
  * description: The difference between the total amount of the order and total amount of edited order.
253
253
  * example: 8200
254
+ * status:
255
+ * type: string
256
+ * description: The status of the order edit.
257
+ * enum:
258
+ * - confirmed
259
+ * - declined
260
+ * - requested
261
+ * - created
262
+ * - canceled
254
263
  * items:
255
264
  * type: array
256
- * description: Computed line items from the changes.
265
+ * description: Available if the relation `items` is expanded.
257
266
  * items:
258
267
  * $ref: "#/components/schemas/line_item"
268
+ * payment_collection_id:
269
+ * type: string
270
+ * description: The ID of the payment collection
271
+ * example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
272
+ * payment_collection:
273
+ * description: Available if the relation `payment_collection` is expanded.
274
+ * $ref: "#/components/schemas/payment_collection"
275
+ * created_at:
276
+ * type: string
277
+ * description: "The date with timezone at which the resource was created."
278
+ * format: date-time
279
+ * updated_at:
280
+ * type: string
281
+ * description: "The date with timezone at which the resource was updated."
282
+ * format: date-time
259
283
  */
260
284
  //# sourceMappingURL=order-edit.js.map