@medusajs/medusa 1.1.63 → 1.1.64

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 (149) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +3 -3
  3. package/dist/api/routes/admin/product-tags/create-collection.d.ts +0 -41
  4. package/dist/api/routes/admin/product-tags/create-collection.js +0 -125
  5. package/dist/api/routes/admin/product-tags/create-collection.js.map +0 -1
  6. package/dist/api/routes/admin/product-tags/delete-collection.d.ts +0 -28
  7. package/dist/api/routes/admin/product-tags/delete-collection.js +0 -84
  8. package/dist/api/routes/admin/product-tags/delete-collection.js.map +0 -1
  9. package/dist/api/routes/admin/product-tags/get-collection.d.ts +0 -22
  10. package/dist/api/routes/admin/product-tags/get-collection.js +0 -74
  11. package/dist/api/routes/admin/product-tags/get-collection.js.map +0 -1
  12. package/dist/api/routes/admin/product-tags/list-collections.d.ts +0 -40
  13. package/dist/api/routes/admin/product-tags/list-collections.js +0 -215
  14. package/dist/api/routes/admin/product-tags/list-collections.js.map +0 -1
  15. package/dist/api/routes/admin/product-tags/update-collection.d.ts +0 -41
  16. package/dist/api/routes/admin/product-tags/update-collection.js +0 -127
  17. package/dist/api/routes/admin/product-tags/update-collection.js.map +0 -1
  18. package/dist/api/routes/admin/tax-rates/add-to-product-types.d.ts +0 -29
  19. package/dist/api/routes/admin/tax-rates/add-to-product-types.js +0 -177
  20. package/dist/api/routes/admin/tax-rates/add-to-product-types.js.map +0 -1
  21. package/dist/api/routes/admin/tax-rates/add-to-products.d.ts +0 -29
  22. package/dist/api/routes/admin/tax-rates/add-to-products.js +0 -173
  23. package/dist/api/routes/admin/tax-rates/add-to-products.js.map +0 -1
  24. package/dist/api/routes/admin/tax-rates/add-to-shipping-options.d.ts +0 -29
  25. package/dist/api/routes/admin/tax-rates/add-to-shipping-options.js +0 -177
  26. package/dist/api/routes/admin/tax-rates/add-to-shipping-options.js.map +0 -1
  27. package/dist/api/routes/admin/tax-rates/create-tax-rate.d.ts +0 -35
  28. package/dist/api/routes/admin/tax-rates/create-tax-rate.js +0 -286
  29. package/dist/api/routes/admin/tax-rates/create-tax-rate.js.map +0 -1
  30. package/dist/api/routes/admin/tax-rates/delete-tax-rate.d.ts +0 -28
  31. package/dist/api/routes/admin/tax-rates/delete-tax-rate.js +0 -84
  32. package/dist/api/routes/admin/tax-rates/delete-tax-rate.js.map +0 -1
  33. package/dist/api/routes/admin/tax-rates/get-tax-rate.d.ts +0 -26
  34. package/dist/api/routes/admin/tax-rates/get-tax-rate.js +0 -106
  35. package/dist/api/routes/admin/tax-rates/get-tax-rate.js.map +0 -1
  36. package/dist/api/routes/admin/tax-rates/index.d.ts +0 -21
  37. package/dist/api/routes/admin/tax-rates/index.js +0 -74
  38. package/dist/api/routes/admin/tax-rates/index.js.map +0 -1
  39. package/dist/api/routes/admin/tax-rates/list-tax-rates.d.ts +0 -44
  40. package/dist/api/routes/admin/tax-rates/list-tax-rates.js +0 -178
  41. package/dist/api/routes/admin/tax-rates/list-tax-rates.js.map +0 -1
  42. package/dist/api/routes/admin/tax-rates/update-tax-rate.d.ts +0 -35
  43. package/dist/api/routes/admin/tax-rates/update-tax-rate.js +0 -286
  44. package/dist/api/routes/admin/tax-rates/update-tax-rate.js.map +0 -1
  45. package/dist/api/routes/admin/tax-rates/utils/get-query-config.d.ts +0 -7
  46. package/dist/api/routes/admin/tax-rates/utils/get-query-config.js +0 -91
  47. package/dist/api/routes/admin/tax-rates/utils/get-query-config.js.map +0 -1
  48. package/dist/api/routes/store/carts/calculate-taxes.d.ts +0 -24
  49. package/dist/api/routes/store/carts/calculate-taxes.js +0 -153
  50. package/dist/api/routes/store/carts/calculate-taxes.js.map +0 -1
  51. package/dist/interfaces/cart-completion-strategy.d.ts +0 -20
  52. package/dist/interfaces/cart-completion-strategy.js +0 -10
  53. package/dist/interfaces/cart-completion-strategy.js.map +0 -1
  54. package/dist/interfaces/index.d.ts +0 -3
  55. package/dist/interfaces/index.js +0 -16
  56. package/dist/interfaces/index.js.map +0 -1
  57. package/dist/interfaces/tax-calculation-strategy.d.ts +0 -16
  58. package/dist/interfaces/tax-calculation-strategy.js +0 -10
  59. package/dist/interfaces/tax-calculation-strategy.js.map +0 -1
  60. package/dist/interfaces/tax-service.d.ts +0 -51
  61. package/dist/interfaces/tax-service.js +0 -3
  62. package/dist/interfaces/tax-service.js.map +0 -1
  63. package/dist/loaders/strategies.d.ts +0 -12
  64. package/dist/loaders/strategies.js +0 -32
  65. package/dist/loaders/strategies.js.map +0 -1
  66. package/dist/migrations/1641636508055-new_tax_system.d.ts +0 -6
  67. package/dist/migrations/1641636508055-new_tax_system.js +0 -248
  68. package/dist/migrations/1641636508055-new_tax_system.js.map +0 -1
  69. package/dist/models/line-item-tax-line.d.ts +0 -7
  70. package/dist/models/line-item-tax-line.js +0 -65
  71. package/dist/models/line-item-tax-line.js.map +0 -1
  72. package/dist/models/product-tax-rate.d.ts +0 -40
  73. package/dist/models/product-tax-rate.js +0 -88
  74. package/dist/models/product-tax-rate.js.map +0 -1
  75. package/dist/models/product-type-tax-rate.d.ts +0 -40
  76. package/dist/models/product-type-tax-rate.js +0 -88
  77. package/dist/models/product-type-tax-rate.js.map +0 -1
  78. package/dist/models/shipping-method-tax-line.d.ts +0 -7
  79. package/dist/models/shipping-method-tax-line.js +0 -65
  80. package/dist/models/shipping-method-tax-line.js.map +0 -1
  81. package/dist/models/shipping-tax-rate.d.ts +0 -40
  82. package/dist/models/shipping-tax-rate.js +0 -88
  83. package/dist/models/shipping-tax-rate.js.map +0 -1
  84. package/dist/models/tax-line.d.ts +0 -39
  85. package/dist/models/tax-line.js +0 -79
  86. package/dist/models/tax-line.js.map +0 -1
  87. package/dist/models/tax-provider.d.ts +0 -17
  88. package/dist/models/tax-provider.js +0 -44
  89. package/dist/models/tax-provider.js.map +0 -1
  90. package/dist/models/tax-rate.d.ts +0 -58
  91. package/dist/models/tax-rate.js +0 -159
  92. package/dist/models/tax-rate.js.map +0 -1
  93. package/dist/repositories/line-item-tax-line.d.ts +0 -4
  94. package/dist/repositories/line-item-tax-line.js +0 -38
  95. package/dist/repositories/line-item-tax-line.js.map +0 -1
  96. package/dist/repositories/product-tax-rate.d.ts +0 -4
  97. package/dist/repositories/product-tax-rate.js +0 -38
  98. package/dist/repositories/product-tax-rate.js.map +0 -1
  99. package/dist/repositories/shipping-method-tax-line.d.ts +0 -4
  100. package/dist/repositories/shipping-method-tax-line.js +0 -38
  101. package/dist/repositories/shipping-method-tax-line.js.map +0 -1
  102. package/dist/repositories/shipping-tax-rate.d.ts +0 -4
  103. package/dist/repositories/shipping-tax-rate.js +0 -38
  104. package/dist/repositories/shipping-tax-rate.js.map +0 -1
  105. package/dist/repositories/tax-rate.d.ts +0 -18
  106. package/dist/repositories/tax-rate.js +0 -359
  107. package/dist/repositories/tax-rate.js.map +0 -1
  108. package/dist/services/product-tax-rate.d.ts +0 -25
  109. package/dist/services/product-tax-rate.js +0 -104
  110. package/dist/services/product-tax-rate.js.map +0 -1
  111. package/dist/services/product-type.d.ts +0 -27
  112. package/dist/services/product-type.js +0 -112
  113. package/dist/services/product-type.js.map +0 -1
  114. package/dist/services/shipping-tax-rate.d.ts +0 -26
  115. package/dist/services/shipping-tax-rate.js +0 -105
  116. package/dist/services/shipping-tax-rate.js.map +0 -1
  117. package/dist/services/system-tax.d.ts +0 -9
  118. package/dist/services/system-tax.js +0 -89
  119. package/dist/services/system-tax.js.map +0 -1
  120. package/dist/services/tax-provider.d.ts +0 -105
  121. package/dist/services/tax-provider.js +0 -455
  122. package/dist/services/tax-provider.js.map +0 -1
  123. package/dist/services/tax-rate.d.ts +0 -31
  124. package/dist/services/tax-rate.js +0 -405
  125. package/dist/services/tax-rate.js.map +0 -1
  126. package/dist/strategies/cart-completion.d.ts +0 -17
  127. package/dist/strategies/cart-completion.js +0 -336
  128. package/dist/strategies/cart-completion.js.map +0 -1
  129. package/dist/strategies/tax-calculation.d.ts +0 -11
  130. package/dist/strategies/tax-calculation.js +0 -147
  131. package/dist/strategies/tax-calculation.js.map +0 -1
  132. package/dist/types/product-tax-rate.d.ts +0 -10
  133. package/dist/types/product-tax-rate.js +0 -13
  134. package/dist/types/product-tax-rate.js.map +0 -1
  135. package/dist/types/request.d.ts +0 -3
  136. package/dist/types/request.js +0 -3
  137. package/dist/types/request.js.map +0 -1
  138. package/dist/types/shipping-tax-rate.d.ts +0 -10
  139. package/dist/types/shipping-tax-rate.js +0 -13
  140. package/dist/types/shipping-tax-rate.js.map +0 -1
  141. package/dist/types/tax-rate.d.ts +0 -25
  142. package/dist/types/tax-rate.js +0 -3
  143. package/dist/types/tax-rate.js.map +0 -1
  144. package/dist/types/tax-service.d.ts +0 -34
  145. package/dist/types/tax-service.js +0 -3
  146. package/dist/types/tax-service.js.map +0 -1
  147. package/dist/types/totals.d.ts +0 -42
  148. package/dist/types/totals.js +0 -3
  149. package/dist/types/totals.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.64](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.63...@medusajs/medusa@1.1.64) (2022-02-06)
7
+
8
+ ### Bug Fixes
9
+
10
+ - release ([fc3fbc8](https://github.com/medusajs/medusa/commit/fc3fbc897fad5c8a5d3eea828ac7277fba9d70af))
11
+
6
12
  ## [1.1.63](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.62...@medusajs/medusa@1.1.63) (2022-02-06)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/medusa",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "description": "E-commerce for JAMstack",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "cross-env": "^5.2.1",
27
27
  "eslint": "^7.32.0",
28
28
  "jest": "^25.5.2",
29
- "medusa-interfaces": "^1.1.33",
29
+ "medusa-interfaces": "^1.1.34",
30
30
  "nodemon": "^2.0.1",
31
31
  "prettier": "^1.19.1",
32
32
  "sqlite3": "^5.0.2",
@@ -92,5 +92,5 @@
92
92
  "uuid": "^8.3.1",
93
93
  "winston": "^3.2.1"
94
94
  },
95
- "gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e"
95
+ "gitHead": "38762961e6d23955c297986edb01a9c5dbe21373"
96
96
  }
@@ -1,41 +0,0 @@
1
- declare const _default: (req: any, res: any) => Promise<void>;
2
- /**
3
- * @oas [post] /collections
4
- * operationId: "PostCollections"
5
- * summary: "Create a Product Collection"
6
- * description: "Creates a Product Collection."
7
- * x-authenticated: true
8
- * requestBody:
9
- * content:
10
- * application/json:
11
- * schema:
12
- * required:
13
- * - title
14
- * properties:
15
- * title:
16
- * type: string
17
- * description: The title to identify the Collection by.
18
- * handle:
19
- * type: string
20
- * description: An optional handle to be used in slugs, if none is provided we will kebab-case the title.
21
- * metadata:
22
- * description: An optional set of key-value pairs to hold additional information.
23
- * type: object
24
- * tags:
25
- * - Collection
26
- * responses:
27
- * "200":
28
- * description: OK
29
- * content:
30
- * application/json:
31
- * schema:
32
- * properties:
33
- * collection:
34
- * $ref: "#/components/schemas/product_collection"
35
- */
36
- export default _default;
37
- export declare class AdminPostCollectionsReq {
38
- title: string;
39
- handle?: string;
40
- metadata?: object;
41
- }
@@ -1,125 +0,0 @@
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
- };
11
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
- var __generator = (this && this.__generator) || function (thisArg, body) {
21
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
22
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23
- function verb(n) { return function (v) { return step([n, v]); }; }
24
- function step(op) {
25
- if (f) throw new TypeError("Generator is already executing.");
26
- while (_) try {
27
- 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;
28
- if (y = 0, t) op = [op[0] & 2, t.value];
29
- switch (op[0]) {
30
- case 0: case 1: t = op; break;
31
- case 4: _.label++; return { value: op[1], done: false };
32
- case 5: _.label++; y = op[1]; op = [0]; continue;
33
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
34
- default:
35
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
36
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
37
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
38
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
39
- if (t[2]) _.ops.pop();
40
- _.trys.pop(); continue;
41
- }
42
- op = body.call(thisArg, _);
43
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
44
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
45
- }
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.AdminPostCollectionsReq = void 0;
49
- var class_validator_1 = require("class-validator");
50
- var validator_1 = require("../../../../utils/validator");
51
- /**
52
- * @oas [post] /collections
53
- * operationId: "PostCollections"
54
- * summary: "Create a Product Collection"
55
- * description: "Creates a Product Collection."
56
- * x-authenticated: true
57
- * requestBody:
58
- * content:
59
- * application/json:
60
- * schema:
61
- * required:
62
- * - title
63
- * properties:
64
- * title:
65
- * type: string
66
- * description: The title to identify the Collection by.
67
- * handle:
68
- * type: string
69
- * description: An optional handle to be used in slugs, if none is provided we will kebab-case the title.
70
- * metadata:
71
- * description: An optional set of key-value pairs to hold additional information.
72
- * type: object
73
- * tags:
74
- * - Collection
75
- * responses:
76
- * "200":
77
- * description: OK
78
- * content:
79
- * application/json:
80
- * schema:
81
- * properties:
82
- * collection:
83
- * $ref: "#/components/schemas/product_collection"
84
- */
85
- exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
86
- var validated, productCollectionService, created, collection;
87
- return __generator(this, function (_a) {
88
- switch (_a.label) {
89
- case 0: return [4 /*yield*/, (0, validator_1.validator)(AdminPostCollectionsReq, req.body)];
90
- case 1:
91
- validated = _a.sent();
92
- productCollectionService = req.scope.resolve("productCollectionService");
93
- return [4 /*yield*/, productCollectionService.create(validated)];
94
- case 2:
95
- created = _a.sent();
96
- return [4 /*yield*/, productCollectionService.retrieve(created.id)];
97
- case 3:
98
- collection = _a.sent();
99
- res.status(200).json({ collection: collection });
100
- return [2 /*return*/];
101
- }
102
- });
103
- }); });
104
- var AdminPostCollectionsReq = /** @class */ (function () {
105
- function AdminPostCollectionsReq() {
106
- }
107
- __decorate([
108
- (0, class_validator_1.IsString)(),
109
- (0, class_validator_1.IsNotEmpty)(),
110
- __metadata("design:type", String)
111
- ], AdminPostCollectionsReq.prototype, "title", void 0);
112
- __decorate([
113
- (0, class_validator_1.IsString)(),
114
- (0, class_validator_1.IsOptional)(),
115
- __metadata("design:type", String)
116
- ], AdminPostCollectionsReq.prototype, "handle", void 0);
117
- __decorate([
118
- (0, class_validator_1.IsObject)(),
119
- (0, class_validator_1.IsOptional)(),
120
- __metadata("design:type", Object)
121
- ], AdminPostCollectionsReq.prototype, "metadata", void 0);
122
- return AdminPostCollectionsReq;
123
- }());
124
- exports.AdminPostCollectionsReq = AdminPostCollectionsReq;
125
- //# sourceMappingURL=create-collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-collection.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-tags/create-collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA4E;AAE5E,yDAAuD;AACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;oBACV,qBAAM,IAAA,qBAAS,EAAC,uBAAuB,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;gBAA9D,SAAS,GAAG,SAAkD;gBAE9D,wBAAwB,GAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAC1E,0BAA0B,CAC3B,CAAA;gBAEe,qBAAM,wBAAwB,CAAC,MAAM,CAAC,SAAS,CAAC,EAAA;;gBAA1D,OAAO,GAAG,SAAgD;gBAC7C,qBAAM,wBAAwB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA;;gBAAhE,UAAU,GAAG,SAAmD;gBAEtE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,UAAU,YAAA,EAAE,CAAC,CAAA;;;;KACrC,EAAA;AAED;IAAA;IAYA,CAAC;IATC;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;0DACA;IAIb;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;2DACE;IAIf;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;6DACI;IACnB,8BAAC;CAAA,AAZD,IAYC;AAZY,0DAAuB"}
@@ -1,28 +0,0 @@
1
- declare const _default: (req: any, res: any) => Promise<void>;
2
- /**
3
- * @oas [delete] /collections/{id}
4
- * operationId: "DeleteCollectionsCollection"
5
- * summary: "Delete a Product Collection"
6
- * description: "Deletes a Product Collection."
7
- * x-authenticated: true
8
- * parameters:
9
- * - (path) id=* {string} The id of the Collection.
10
- * tags:
11
- * - Collection
12
- * responses:
13
- * "200":
14
- * description: OK
15
- * content:
16
- * application/json:
17
- * schema:
18
- * properties:
19
- * id:
20
- * type: string
21
- * description: The id of the deleted Collection
22
- * object:
23
- * type: string
24
- * description: The type of the object that was deleted.
25
- * deleted:
26
- * type: boolean
27
- */
28
- export default _default;
@@ -1,84 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- /**
40
- * @oas [delete] /collections/{id}
41
- * operationId: "DeleteCollectionsCollection"
42
- * summary: "Delete a Product Collection"
43
- * description: "Deletes a Product Collection."
44
- * x-authenticated: true
45
- * parameters:
46
- * - (path) id=* {string} The id of the Collection.
47
- * tags:
48
- * - Collection
49
- * responses:
50
- * "200":
51
- * description: OK
52
- * content:
53
- * application/json:
54
- * schema:
55
- * properties:
56
- * id:
57
- * type: string
58
- * description: The id of the deleted Collection
59
- * object:
60
- * type: string
61
- * description: The type of the object that was deleted.
62
- * deleted:
63
- * type: boolean
64
- */
65
- exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
66
- var id, productCollectionService;
67
- return __generator(this, function (_a) {
68
- switch (_a.label) {
69
- case 0:
70
- id = req.params.id;
71
- productCollectionService = req.scope.resolve("productCollectionService");
72
- return [4 /*yield*/, productCollectionService.delete(id)];
73
- case 1:
74
- _a.sent();
75
- res.json({
76
- id: id,
77
- object: "product-collection",
78
- deleted: true,
79
- });
80
- return [2 /*return*/];
81
- }
82
- });
83
- }); });
84
- //# sourceMappingURL=delete-collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-collection.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-tags/delete-collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEnB,wBAAwB,GAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAC1E,0BAA0B,CAC3B,CAAA;gBACD,qBAAM,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAA;;gBAAzC,SAAyC,CAAA;gBAEzC,GAAG,CAAC,IAAI,CAAC;oBACP,EAAE,IAAA;oBACF,MAAM,EAAE,oBAAoB;oBAC5B,OAAO,EAAE,IAAI;iBACd,CAAC,CAAA;;;;KACH,EAAA"}
@@ -1,22 +0,0 @@
1
- declare const _default: (req: any, res: any) => Promise<void>;
2
- /**
3
- * @oas [get] /collections/{id}
4
- * operationId: "GetCollectionsCollection"
5
- * summary: "Retrieve a Product Collection"
6
- * description: "Retrieves a Product Collection."
7
- * x-authenticated: true
8
- * parameters:
9
- * - (path) id=* {string} The id of the Product Collection
10
- * tags:
11
- * - Collection
12
- * responses:
13
- * "200":
14
- * description: OK
15
- * content:
16
- * application/json:
17
- * schema:
18
- * properties:
19
- * collection:
20
- * $ref: "#/components/schemas/product_collection"
21
- */
22
- export default _default;
@@ -1,74 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
39
- /**
40
- * @oas [get] /collections/{id}
41
- * operationId: "GetCollectionsCollection"
42
- * summary: "Retrieve a Product Collection"
43
- * description: "Retrieves a Product Collection."
44
- * x-authenticated: true
45
- * parameters:
46
- * - (path) id=* {string} The id of the Product Collection
47
- * tags:
48
- * - Collection
49
- * responses:
50
- * "200":
51
- * description: OK
52
- * content:
53
- * application/json:
54
- * schema:
55
- * properties:
56
- * collection:
57
- * $ref: "#/components/schemas/product_collection"
58
- */
59
- exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
60
- var id, productCollectionService, collection;
61
- return __generator(this, function (_a) {
62
- switch (_a.label) {
63
- case 0:
64
- id = req.params.id;
65
- productCollectionService = req.scope.resolve("productCollectionService");
66
- return [4 /*yield*/, productCollectionService.retrieve(id)];
67
- case 1:
68
- collection = _a.sent();
69
- res.status(200).json({ collection: collection });
70
- return [2 /*return*/];
71
- }
72
- });
73
- }); });
74
- //# sourceMappingURL=get-collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-collection.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-tags/get-collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEnB,wBAAwB,GAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAC1E,0BAA0B,CAC3B,CAAA;gBAEkB,qBAAM,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAA;;gBAAxD,UAAU,GAAG,SAA2C;gBAC9D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,UAAU,YAAA,EAAE,CAAC,CAAA;;;;KACrC,EAAA"}
@@ -1,40 +0,0 @@
1
- import { DateComparisonOperator } from "../../../../types/common";
2
- declare const _default: (req: any, res: any) => Promise<void>;
3
- /**
4
- * @oas [get] /collections
5
- * operationId: "GetCollections"
6
- * summary: "List Product Collections"
7
- * description: "Retrieve a list of Product Collection."
8
- * x-authenticated: true
9
- * parameters:
10
- * - (query) limit {string} The number of collections to return.
11
- * - (query) offset {string} The offset of collections to return.
12
- * - (query) title {string} The title of collections to return.
13
- * - (query) handle {string} The handle of collections to return.
14
- * - (query) deleted_at {DateComparisonOperator} Date comparison for when resulting collections was deleted, i.e. less than, greater than etc.
15
- * - (query) created_at {DateComparisonOperator} Date comparison for when resulting collections was created, i.e. less than, greater than etc.
16
- * - (query) updated_at {DateComparisonOperator} Date comparison for when resulting collections was updated, i.e. less than, greater than etc.
17
- * tags:
18
- * - Collection
19
- * responses:
20
- * "200":
21
- * description: OK
22
- * content:
23
- * application/json:
24
- * schema:
25
- * properties:
26
- * collection:
27
- * $ref: "#/components/schemas/product_collection"
28
- */
29
- export default _default;
30
- export declare class AdminGetCollectionsPaginationParams {
31
- limit: number;
32
- offset: number;
33
- }
34
- export declare class AdminGetCollectionsParams extends AdminGetCollectionsPaginationParams {
35
- title?: string;
36
- handle?: string;
37
- created_at?: DateComparisonOperator;
38
- updated_at?: DateComparisonOperator;
39
- deleted_at?: DateComparisonOperator;
40
- }