@medusajs/medusa 1.1.63-adminc.7 → 1.1.63
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/CHANGELOG.md +24 -25
- 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/collections/get-collection.js +6 -2
- package/dist/api/routes/admin/collections/get-collection.js.map +1 -1
- package/dist/api/routes/admin/collections/index.d.ts +1 -1
- package/dist/api/routes/admin/collections/index.js +2 -2
- package/dist/api/routes/admin/collections/index.js.map +1 -1
- package/dist/api/routes/admin/collections/list-collections.d.ts +1 -0
- package/dist/api/routes/admin/collections/list-collections.js +5 -0
- package/dist/api/routes/admin/collections/list-collections.js.map +1 -1
- package/dist/api/routes/admin/index.js +2 -0
- package/dist/api/routes/admin/index.js.map +1 -1
- package/dist/api/routes/admin/orders/create-swap.d.ts +2 -0
- package/dist/api/routes/admin/orders/create-swap.js +11 -0
- package/dist/api/routes/admin/orders/create-swap.js.map +1 -1
- package/dist/api/routes/admin/product-tags/create-collection.d.ts +41 -0
- package/dist/api/routes/admin/product-tags/create-collection.js +125 -0
- package/dist/api/routes/admin/product-tags/create-collection.js.map +1 -0
- package/dist/api/routes/admin/product-tags/delete-collection.d.ts +28 -0
- package/dist/api/routes/admin/product-tags/delete-collection.js +84 -0
- package/dist/api/routes/admin/product-tags/delete-collection.js.map +1 -0
- package/dist/api/routes/admin/product-tags/get-collection.d.ts +22 -0
- package/dist/api/routes/admin/product-tags/get-collection.js +74 -0
- package/dist/api/routes/admin/product-tags/get-collection.js.map +1 -0
- package/dist/api/routes/admin/product-tags/index.d.ts +15 -0
- package/dist/api/routes/admin/product-tags/index.js +40 -0
- package/dist/api/routes/admin/product-tags/index.js.map +1 -0
- package/dist/api/routes/admin/product-tags/list-collections.d.ts +40 -0
- package/dist/api/routes/admin/product-tags/list-collections.js +215 -0
- package/dist/api/routes/admin/product-tags/list-collections.js.map +1 -0
- package/dist/api/routes/admin/product-tags/list-product-tags.d.ts +39 -0
- package/dist/api/routes/admin/product-tags/list-product-tags.js +211 -0
- package/dist/api/routes/admin/product-tags/list-product-tags.js.map +1 -0
- package/dist/api/routes/admin/product-tags/update-collection.d.ts +41 -0
- package/dist/api/routes/admin/product-tags/update-collection.js +127 -0
- package/dist/api/routes/admin/product-tags/update-collection.js.map +1 -0
- package/dist/api/routes/admin/products/list-products.js +27 -28
- package/dist/api/routes/admin/products/list-products.js.map +1 -1
- package/dist/services/product-collection.js +22 -2
- package/dist/services/product-collection.js.map +1 -1
- package/dist/services/product-tag.d.ts +48 -0
- package/dist/services/product-tag.js +180 -0
- package/dist/services/product-tag.js.map +1 -0
- package/dist/services/store.js +28 -16
- package/dist/services/store.js.map +1 -1
- package/dist/types/common.d.ts +3 -1
- package/dist/types/product.d.ts +7 -0
- package/dist/types/product.js +37 -1
- package/dist/types/product.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,50 +3,49 @@
|
|
|
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.
|
|
7
|
-
|
|
6
|
+
## [1.1.63](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.62...@medusajs/medusa@1.1.63) (2022-02-06)
|
|
8
7
|
|
|
9
8
|
### Bug Fixes
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
- adds order by functionality to products ([#1021](https://github.com/medusajs/medusa/issues/1021)) ([3bf32e5](https://github.com/medusajs/medusa/commit/3bf32e5dc9ad3150762b9bb744b0453d3640e204))
|
|
11
|
+
- adds return reasons to swaps ([#1026](https://github.com/medusajs/medusa/issues/1026)) ([7d2b5b8](https://github.com/medusajs/medusa/commit/7d2b5b8babea1846503c5934c9d81ce4d3b2635d))
|
|
12
|
+
- admin collections default relations ([#1023](https://github.com/medusajs/medusa/issues/1023)) ([d2a7534](https://github.com/medusajs/medusa/commit/d2a7534615b8870b235be136c8e6425c51dee19b))
|
|
13
|
+
- Support array of payment status filters when listing orders ([#1013](https://github.com/medusajs/medusa/issues/1013)) ([fdc493d](https://github.com/medusajs/medusa/commit/fdc493df7fdcb6fda35894ec5a3cc7990dc8ea13))
|
|
14
|
+
- Updating store currencies ([#984](https://github.com/medusajs/medusa/issues/984)) ([59bb413](https://github.com/medusajs/medusa/commit/59bb413245d8aa31cc3070a372d6f0d04ebc9415))
|
|
15
15
|
|
|
16
16
|
### Features
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- medusa-react admin hooks ([#978](https://github.com/medusajs/medusa/issues/978)) ([2e38484](https://github.com/medusajs/medusa/commit/2e384842d5b2e9742a86b96f28a8f00357795b86)), closes [#1019](https://github.com/medusajs/medusa/issues/1019)
|
|
19
|
+
|
|
20
|
+
## [1.1.62](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.61...@medusajs/medusa@1.1.62) (2022-01-11)
|
|
19
21
|
|
|
22
|
+
### Bug Fixes
|
|
20
23
|
|
|
24
|
+
- Adds default currency to store currencies on create ([#982](https://github.com/medusajs/medusa/issues/982)) ([a0a21d1](https://github.com/medusajs/medusa/commit/a0a21d15efeda56d4245aa6937f4d67c673e5ab3))
|
|
25
|
+
- api claim types + tests ([#967](https://github.com/medusajs/medusa/issues/967)) ([d365839](https://github.com/medusajs/medusa/commit/d365839a086ba116f320b49880d621452ee4b301))
|
|
26
|
+
- Type in AdminProductListTagsRes to use tags instead of types ([#958](https://github.com/medusajs/medusa/issues/958)) ([0ac52b7](https://github.com/medusajs/medusa/commit/0ac52b70fa23d9aa3ba6b5e220943ed15db4e643))
|
|
21
27
|
|
|
28
|
+
### Features
|
|
22
29
|
|
|
30
|
+
- expand store product filtering ([#973](https://github.com/medusajs/medusa/issues/973)) ([f61eaee](https://github.com/medusajs/medusa/commit/f61eaeec12529919b74b64a35f26b6b42f24fa7b))
|
|
23
31
|
|
|
24
32
|
## [1.1.61](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.60...@medusajs/medusa@1.1.61) (2021-12-29)
|
|
25
33
|
|
|
26
34
|
**Note:** Version bump only for package @medusajs/medusa
|
|
27
35
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
36
|
## [1.1.60](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.59...@medusajs/medusa@1.1.60) (2021-12-17)
|
|
33
37
|
|
|
34
|
-
|
|
35
38
|
### Features
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
- Add Discount Admin endpoint to JS client ([#919](https://github.com/medusajs/medusa/issues/919)) ([2ca1a87](https://github.com/medusajs/medusa/commit/2ca1a8762da5bc30a246e2e77521071ed91e6c12))
|
|
41
|
+
- add medusa-react ([#913](https://github.com/medusajs/medusa/issues/913)) ([d0d8dd7](https://github.com/medusajs/medusa/commit/d0d8dd7bf62eaac71df8714c2dfb4f204d192f51))
|
|
42
|
+
- add returns admin endpoints to medusa-js ([#935](https://github.com/medusajs/medusa/issues/935)) ([b9d6f95](https://github.com/medusajs/medusa/commit/b9d6f95dbd32c096e59057797fd0cf479ff23c7b))
|
|
43
|
+
- add store admin endpoints to medusa-js ([#938](https://github.com/medusajs/medusa/issues/938)) ([31fad74](https://github.com/medusajs/medusa/commit/31fad7439cc4b95e269e7b6bc5d813cb2479329c))
|
|
44
|
+
- Adds Auth Admin API to `medusa-js` ([#917](https://github.com/medusajs/medusa/issues/917)) ([5c47184](https://github.com/medusajs/medusa/commit/5c47184b1035fc36440ff95750a4bb461904246d))
|
|
45
|
+
- Adds Customer Admin routes to JS client ([#918](https://github.com/medusajs/medusa/issues/918)) ([25fe224](https://github.com/medusajs/medusa/commit/25fe224a10842a7ac93ed496a6724ef113b41916))
|
|
46
|
+
- medusa js admin regions ([#939](https://github.com/medusajs/medusa/issues/939)) ([8532c96](https://github.com/medusajs/medusa/commit/8532c966b59082ac60d221bc3bb7f92d6f94e5e4))
|
|
47
|
+
- medusa js admin shipping options ([#934](https://github.com/medusajs/medusa/issues/934)) ([8b1b551](https://github.com/medusajs/medusa/commit/8b1b551260c8f3764135ed65bd099b8e9a0f23da))
|
|
48
|
+
- medusa-js admin return reasons ([#931](https://github.com/medusajs/medusa/issues/931)) ([0acc462](https://github.com/medusajs/medusa/commit/0acc462e1ebe51368ceedeea85d6f51c6fc3bfc4))
|
|
50
49
|
|
|
51
50
|
## [1.1.59](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.58...@medusajs/medusa@1.1.59) (2021-12-08)
|
|
52
51
|
|
package/dist/api/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from "./routes/admin/uploads";
|
|
|
21
21
|
export * from "./routes/admin/returns";
|
|
22
22
|
export * from "./routes/admin/shipping-options";
|
|
23
23
|
export * from "./routes/admin/regions";
|
|
24
|
+
export * from "./routes/admin/product-tags";
|
|
24
25
|
export * from "./routes/store/auth";
|
|
25
26
|
export * from "./routes/store/carts";
|
|
26
27
|
export * from "./routes/store/collections";
|
package/dist/api/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __exportStar(require("./routes/admin/uploads"), exports);
|
|
|
47
47
|
__exportStar(require("./routes/admin/returns"), exports);
|
|
48
48
|
__exportStar(require("./routes/admin/shipping-options"), exports);
|
|
49
49
|
__exportStar(require("./routes/admin/regions"), exports);
|
|
50
|
+
__exportStar(require("./routes/admin/product-tags"), exports);
|
|
50
51
|
// Store
|
|
51
52
|
__exportStar(require("./routes/store/auth"), exports);
|
|
52
53
|
__exportStar(require("./routes/store/carts"), 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,6DAA0C;AAC1C,sDAAmC;AACnC,2DAAwC;AACxC,2DAAwC;AACxC,8DAA2C;AAC3C,4DAAyC;AACzC,yDAAsC;AACtC,uDAAoC;AACpC,+DAA4C;AAC5C,mEAAgD;AAChD,uDAAoC;AACpC,0DAAuC;AACvC,uDAAoC;AACpC,wDAAqC;AACrC,0DAAuC;AACvC,gEAA6C;AAC7C,uDAAoC;AACpC,yDAAsC;AACtC,yDAAsC;AACtC,kEAA+C;AAC/C,yDAAsC;
|
|
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,6DAA0C;AAC1C,sDAAmC;AACnC,2DAAwC;AACxC,2DAAwC;AACxC,8DAA2C;AAC3C,4DAAyC;AACzC,yDAAsC;AACtC,uDAAoC;AACpC,+DAA4C;AAC5C,mEAAgD;AAChD,uDAAoC;AACpC,0DAAuC;AACvC,uDAAoC;AACpC,wDAAqC;AACrC,0DAAuC;AACvC,gEAA6C;AAC7C,uDAAoC;AACpC,yDAAsC;AACtC,yDAAsC;AACtC,kEAA+C;AAC/C,yDAAsC;AACtC,8DAA2C;AAE3C,QAAQ;AACR,sDAAmC;AACnC,uDAAoC;AACpC,6DAA0C;AAC1C,2DAAwC;AACxC,4DAAyC;AACzC,wDAAqC;AACrC,0DAAuC;AACvC,yDAAsC;AACtC,gEAA6C;AAC7C,yDAAsC;AACtC,kEAA+C;AAC/C,uDAAoC;AACpC,0DAAuC"}
|
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var _1 = require(".");
|
|
39
40
|
/**
|
|
40
41
|
* @oas [get] /collections/{id}
|
|
41
42
|
* operationId: "GetCollectionsCollection"
|
|
@@ -57,13 +58,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
57
58
|
* $ref: "#/components/schemas/product_collection"
|
|
58
59
|
*/
|
|
59
60
|
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
-
var id, productCollectionService, collection;
|
|
61
|
+
var id, retrieveConfig, productCollectionService, collection;
|
|
61
62
|
return __generator(this, function (_a) {
|
|
62
63
|
switch (_a.label) {
|
|
63
64
|
case 0:
|
|
64
65
|
id = req.params.id;
|
|
66
|
+
retrieveConfig = {
|
|
67
|
+
relations: _1.defaultAdminCollectionsRelations,
|
|
68
|
+
};
|
|
65
69
|
productCollectionService = req.scope.resolve("productCollectionService");
|
|
66
|
-
return [4 /*yield*/, productCollectionService.retrieve(id)];
|
|
70
|
+
return [4 /*yield*/, productCollectionService.retrieve(id, retrieveConfig)];
|
|
67
71
|
case 1:
|
|
68
72
|
collection = _a.sent();
|
|
69
73
|
res.status(200).json({ collection: collection });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-collection.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/collections/get-collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-collection.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/collections/get-collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAoD;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEnB,cAAc,GAAG;oBACrB,SAAS,EAAE,mCAAgC;iBAC5C,CAAA;gBAEK,wBAAwB,GAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAC1E,0BAA0B,CAC3B,CAAA;gBAEkB,qBAAM,wBAAwB,CAAC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC,EAAA;;gBAAxE,UAAU,GAAG,SAA2D;gBAC9E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,UAAU,YAAA,EAAE,CAAC,CAAA;;;;KACrC,EAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
1
2
|
import { ProductCollection } from "../../../..";
|
|
2
3
|
import { DeleteResponse, PaginatedResponse } from "../../../../types/common";
|
|
3
|
-
import "reflect-metadata";
|
|
4
4
|
declare const _default: (app: any) => any;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const defaultAdminCollectionsFields: string[];
|
|
@@ -15,8 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.defaultAdminCollectionsRelations = exports.defaultAdminCollectionsFields = void 0;
|
|
17
17
|
var express_1 = require("express");
|
|
18
|
-
var middlewares_1 = __importDefault(require("../../../middlewares"));
|
|
19
18
|
require("reflect-metadata");
|
|
19
|
+
var middlewares_1 = __importDefault(require("../../../middlewares"));
|
|
20
20
|
var route = (0, express_1.Router)();
|
|
21
21
|
exports.default = (function (app) {
|
|
22
22
|
app.use("/collections", route);
|
|
@@ -27,7 +27,7 @@ exports.default = (function (app) {
|
|
|
27
27
|
route.get("/", middlewares_1.default.wrap(require("./list-collections").default));
|
|
28
28
|
return app;
|
|
29
29
|
});
|
|
30
|
-
exports.defaultAdminCollectionsFields = ["id", "title", "handle"];
|
|
30
|
+
exports.defaultAdminCollectionsFields = ["id", "title", "handle", "created_at", "updated_at"];
|
|
31
31
|
exports.defaultAdminCollectionsRelations = ["products"];
|
|
32
32
|
__exportStar(require("./create-collection"), exports);
|
|
33
33
|
__exportStar(require("./delete-collection"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/collections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/collections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,4BAAyB;AAGzB,qEAA8C;AAE9C,IAAM,KAAK,GAAG,IAAA,gBAAM,GAAE,CAAA;AAEtB,mBAAe,UAAC,GAAG;IACjB,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;IAE9B,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IACzE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAE5E,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAE9E,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IACxE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAEvE,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA;AAEY,QAAA,6BAA6B,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,CAAA;AACrF,QAAA,gCAAgC,GAAG,CAAC,UAAU,CAAC,CAAA;AAY5D,sDAAmC;AACnC,sDAAmC;AACnC,mDAAgC;AAChC,qDAAkC;AAClC,sDAAmC"}
|
|
@@ -209,6 +209,11 @@ var AdminGetCollectionsParams = /** @class */ (function (_super) {
|
|
|
209
209
|
(0, class_transformer_1.Type)(function () { return common_1.DateComparisonOperator; }),
|
|
210
210
|
__metadata("design:type", common_1.DateComparisonOperator)
|
|
211
211
|
], AdminGetCollectionsParams.prototype, "deleted_at", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, class_validator_1.IsString)(),
|
|
214
|
+
(0, class_validator_1.IsOptional)(),
|
|
215
|
+
__metadata("design:type", String)
|
|
216
|
+
], AdminGetCollectionsParams.prototype, "q", void 0);
|
|
212
217
|
return AdminGetCollectionsParams;
|
|
213
218
|
}(AdminGetCollectionsPaginationParams));
|
|
214
219
|
exports.AdminGetCollectionsParams = AdminGetCollectionsParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-collections.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/collections/list-collections.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAAgF;AAChF,+CAAoC;AACpC,sBAGU;AAEV,mDAAiE;AACjE,yDAAuD;AACvD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;oBACV,qBAAM,IAAA,qBAAS,EAAC,yBAAyB,EAAE,GAAG,CAAC,KAAK,CAAC,EAAA;;gBAAjE,SAAS,GAAG,SAAqD;gBAEjE,wBAAwB,GAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAC1E,0BAA0B,CAC3B,CAAA;gBAEK,UAAU,GAAG;oBACjB,MAAM,EAAE,gCAA6B;oBACrC,SAAS,EAAE,mCAAgC;oBAC3C,IAAI,EAAE,SAAS,CAAC,MAAM;oBACtB,IAAI,EAAE,SAAS,CAAC,KAAK;iBACtB,CAAA;gBAEK,gBAAgB,GAAG,gBAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;gBAElC,qBAAM,wBAAwB,CAAC,YAAY,CACtE,gBAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,iBAAQ,CAAC,EACpC,UAAU,CACX,EAAA;;gBAHK,KAAA,sBAAuB,SAG5B,KAAA,EAHM,WAAW,QAAA,EAAE,KAAK,QAAA;gBAKzB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACnB,WAAW,aAAA;oBACX,KAAK,OAAA;oBACL,MAAM,EAAE,SAAS,CAAC,MAAM;oBACxB,KAAK,EAAE,SAAS,CAAC,KAAK;iBACvB,CAAC,CAAA;;;;KACH,EAAA;AAED;IAAA;QAIE,UAAK,GAAG,EAAE,CAAA;QAKV,WAAM,GAAG,CAAC,CAAA;IACZ,CAAC;IANC;QAHC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;QACZ,IAAA,wBAAI,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC;;sEACT;IAKV;QAHC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;QACZ,IAAA,wBAAI,EAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC;;uEACT;IACZ,0CAAC;CAAA,AAVD,IAUC;AAVY,kFAAmC;AAYhD;IAA+C,6CAAmC;IAAlF;;
|
|
1
|
+
{"version":3,"file":"list-collections.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/collections/list-collections.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAAgF;AAChF,+CAAoC;AACpC,sBAGU;AAEV,mDAAiE;AACjE,yDAAuD;AACvD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;oBACV,qBAAM,IAAA,qBAAS,EAAC,yBAAyB,EAAE,GAAG,CAAC,KAAK,CAAC,EAAA;;gBAAjE,SAAS,GAAG,SAAqD;gBAEjE,wBAAwB,GAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAC1E,0BAA0B,CAC3B,CAAA;gBAEK,UAAU,GAAG;oBACjB,MAAM,EAAE,gCAA6B;oBACrC,SAAS,EAAE,mCAAgC;oBAC3C,IAAI,EAAE,SAAS,CAAC,MAAM;oBACtB,IAAI,EAAE,SAAS,CAAC,KAAK;iBACtB,CAAA;gBA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IAAA,gCAAc,GAAE;QAChB,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;iEAAA;IAKnC;QAHC,IAAA,gCAAc,GAAE;QAChB,IAAA,4BAAU,GAAE;QACZ,IAAA,wBAAI,EAAC,cAAM,OAAA,+BAAsB,EAAtB,CAAsB,CAAC;kCACtB,+BAAsB;iEAAA;IAInC;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;wDACH;IACZ,gCAAC;CAAA,AA3BD,CAA+C,mCAAmC,GA2BjF;AA3BY,8DAAyB"}
|
|
@@ -45,6 +45,7 @@ var returns_1 = __importDefault(require("./returns"));
|
|
|
45
45
|
var variants_1 = __importDefault(require("./variants"));
|
|
46
46
|
var draft_orders_1 = __importDefault(require("./draft-orders"));
|
|
47
47
|
var collections_1 = __importDefault(require("./collections"));
|
|
48
|
+
var product_tags_1 = __importDefault(require("./product-tags"));
|
|
48
49
|
var notifications_1 = __importDefault(require("./notifications"));
|
|
49
50
|
var notes_1 = __importDefault(require("./notes"));
|
|
50
51
|
var route = (0, express_1.Router)();
|
|
@@ -87,6 +88,7 @@ exports.default = (function (app, container, config) {
|
|
|
87
88
|
(0, collections_1.default)(route);
|
|
88
89
|
(0, notifications_1.default)(route);
|
|
89
90
|
(0, return_reasons_1.default)(route);
|
|
91
|
+
(0, product_tags_1.default)(route);
|
|
90
92
|
(0, notes_1.default)(route);
|
|
91
93
|
(0, invites_1.default)(route);
|
|
92
94
|
return app;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/routes/admin/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,8CAAuB;AAEvB,kEAA2C;AAC3C,gDAA+B;AAC/B,wDAAsC;AACtC,+CAA+D;AAC/D,mDAAqE;AACrE,sDAAoC;AACpC,wEAAqD;AACrD,0EAAuD;AAC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IACrB,IAAA,gBAAW,EAAC,KAAK,CAAC,CAAA;IAClB,IAAA,eAAW,EAAC,KAAK,CAAC,CAAA;IAClB,IAAA,iBAAY,EAAC,KAAK,CAAC,CAAA;IACnB,IAAA,mBAAc,EAAC,KAAK,CAAC,CAAA;IACrB,IAAA,eAAU,EAAC,KAAK,CAAC,CAAA;IACjB,IAAA,iBAAY,EAAC,KAAK,CAAC,CAAA;IACnB,IAAA,kBAAa,EAAC,KAAK,CAAC,CAAA;IACpB,IAAA,sBAAgB,EAAC,KAAK,CAAC,CAAA;IACvB,IAAA,qBAAgB,EAAC,KAAK,CAAC,CAAA;IACvB,IAAA,uBAAkB,EAAC,KAAK,CAAC,CAAA;IACzB,IAAA,wBAAkB,EAAC,KAAK,CAAC,CAAA;IACzB,IAAA,sBAAgB,EAAC,KAAK,CAAC,CAAA;IACvB,IAAA,eAAU,EAAC,KAAK,CAAC,CAAA;IACjB,IAAA,iBAAY,EAAC,KAAK,CAAC,CAAA;IAEnB,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA"}
|
|
@@ -342,8 +342,19 @@ var ReturnItem = /** @class */ (function () {
|
|
|
342
342
|
__decorate([
|
|
343
343
|
(0, class_validator_1.IsNumber)(),
|
|
344
344
|
(0, class_validator_1.IsNotEmpty)(),
|
|
345
|
+
(0, class_validator_1.Min)(1),
|
|
345
346
|
__metadata("design:type", Number)
|
|
346
347
|
], ReturnItem.prototype, "quantity", void 0);
|
|
348
|
+
__decorate([
|
|
349
|
+
(0, class_validator_1.IsOptional)(),
|
|
350
|
+
(0, class_validator_1.IsString)(),
|
|
351
|
+
__metadata("design:type", String)
|
|
352
|
+
], ReturnItem.prototype, "reason_id", void 0);
|
|
353
|
+
__decorate([
|
|
354
|
+
(0, class_validator_1.IsOptional)(),
|
|
355
|
+
(0, class_validator_1.IsString)(),
|
|
356
|
+
__metadata("design:type", String)
|
|
357
|
+
], ReturnItem.prototype, "note", void 0);
|
|
347
358
|
return ReturnItem;
|
|
348
359
|
}());
|
|
349
360
|
var ReturnShipping = /** @class */ (function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-swap.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/orders/create-swap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"create-swap.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/orders/create-swap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAWwB;AACxB,uDAA+C;AAC/C,sBAAyE;AAOzE,yDAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEP,qBAAM,IAAA,qBAAS,EAAC,4BAA4B,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;gBAAnE,SAAS,GAAG,SAAuD;gBAEnE,qBAAqB,GAA0B,GAAG,CAAC,KAAK,CAAC,OAAO,CACpE,uBAAuB,CACxB,CAAA;gBAEK,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAA;;;;gBAI/B,qBAAM,qBAAqB,CAAC,iBAAiB,CAC5D,SAAS,EACT,GAAG,CAAC,MAAM,EACV,GAAG,CAAC,MAAM,EACV,GAAG,CAAC,IAAI,CACT,EAAA;;gBALD,cAAc,GAAG,SAKhB,CAAA;;;;gBAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;gBACxD,sBAAM;;gBAGR,GAAG,CAAC,SAAS,CAAC,+BAA+B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FC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;sDACK;IAIlB;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;oDACG;IAClB,qBAAC;CAAA,AARD,IAQC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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;
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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;
|