@medusajs/medusa 1.1.65-tax-api.48 → 1.2.0
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 +25 -0
- package/dist/api/routes/admin/customer-groups/create-customer-group.d.ts +2 -2
- package/dist/api/routes/admin/customer-groups/create-customer-group.js +3 -3
- package/dist/api/routes/admin/customer-groups/create-customer-group.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customer-group.d.ts +28 -0
- package/dist/api/routes/admin/customer-groups/delete-customer-group.js +84 -0
- package/dist/api/routes/admin/customer-groups/delete-customer-group.js.map +1 -0
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.d.ts +27 -0
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.js +106 -0
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.js.map +1 -0
- package/dist/api/routes/admin/customer-groups/get-customer-group.d.ts +25 -0
- package/dist/api/routes/admin/customer-groups/get-customer-group.js +113 -0
- package/dist/api/routes/admin/customer-groups/get-customer-group.js.map +1 -0
- package/dist/api/routes/admin/customer-groups/index.d.ts +1 -0
- package/dist/api/routes/admin/customer-groups/index.js +6 -0
- package/dist/api/routes/admin/customer-groups/index.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/update-customer-group.d.ts +28 -0
- package/dist/api/routes/admin/customer-groups/update-customer-group.js +124 -0
- package/dist/api/routes/admin/customer-groups/update-customer-group.js.map +1 -0
- package/dist/api/routes/admin/customers/update-customer.d.ts +14 -0
- package/dist/api/routes/admin/customers/update-customer.js +49 -10
- package/dist/api/routes/admin/customers/update-customer.js.map +1 -1
- package/dist/api/routes/admin/orders/receive-swap.d.ts +46 -0
- package/dist/api/routes/admin/orders/receive-swap.js +159 -0
- package/dist/api/routes/admin/orders/receive-swap.js.map +1 -0
- package/dist/api/routes/admin/tax-rates/add-to-product-types.js +3 -58
- package/dist/api/routes/admin/tax-rates/add-to-product-types.js.map +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-products.js +3 -54
- package/dist/api/routes/admin/tax-rates/add-to-products.js.map +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-shipping-options.js +3 -58
- package/dist/api/routes/admin/tax-rates/add-to-shipping-options.js.map +1 -1
- package/dist/api/routes/admin/tax-rates/create-tax-rate.js +14 -113
- package/dist/api/routes/admin/tax-rates/create-tax-rate.js.map +1 -1
- package/dist/db-subscribers/region.d.ts +6 -0
- package/dist/db-subscribers/region.js +84 -0
- package/dist/db-subscribers/region.js.map +1 -0
- package/dist/entity-subscribers/region.d.ts +6 -0
- package/dist/entity-subscribers/region.js +27 -0
- package/dist/entity-subscribers/region.js.map +1 -0
- package/dist/loaders/db-subscribers.d.ts +6 -0
- package/dist/loaders/db-subscribers.js +53 -0
- package/dist/loaders/db-subscribers.js.map +1 -0
- package/dist/migrations/1644943746861-customer_groups.js +2 -2
- package/dist/migrations/1644943746861-customer_groups.js.map +1 -1
- package/dist/models/customer-group.js +3 -1
- package/dist/models/customer-group.js.map +1 -1
- package/dist/models/customer.js +12 -1
- package/dist/models/customer.js.map +1 -1
- package/dist/repositories/customer-group.d.ts +2 -1
- package/dist/repositories/customer-group.js +53 -0
- package/dist/repositories/customer-group.js.map +1 -1
- package/dist/repositories/money-amount.d.ts +6 -0
- package/dist/repositories/money-amount.js +97 -0
- package/dist/repositories/money-amount.js.map +1 -1
- package/dist/services/customer-group.d.ts +33 -0
- package/dist/services/customer-group.js +152 -0
- package/dist/services/customer-group.js.map +1 -1
- package/dist/services/customer.d.ts +3 -1
- package/dist/services/customer.js +28 -17
- package/dist/services/customer.js.map +1 -1
- package/dist/services/invite.d.ts +3 -3
- package/dist/services/invite.js +4 -2
- package/dist/services/invite.js.map +1 -1
- package/dist/services/product-variant.d.ts +1 -0
- package/dist/services/product-variant.js +96 -85
- package/dist/services/product-variant.js.map +1 -1
- package/dist/services/swap.js +2 -1
- package/dist/services/swap.js.map +1 -1
- package/dist/services/tax-rate.js +164 -156
- package/dist/services/tax-rate.js.map +1 -1
- package/dist/subscribers/region.d.ts +14 -0
- package/dist/subscribers/region.js +65 -0
- package/dist/subscribers/region.js.map +1 -0
- package/dist/types/customer-groups.d.ts +11 -0
- package/dist/types/customer-groups.js +43 -0
- package/dist/types/customer-groups.js.map +1 -0
- package/package.json +4 -4
- package/yarn-error.log +5 -79
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
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.2.0](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.64...@medusajs/medusa@1.2.0) (2022-02-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* allow offset and limit in products free text search ([#1082](https://github.com/medusajs/medusa/issues/1082)) ([c2241d1](https://github.com/medusajs/medusa/commit/c2241d110178d9ed992793d582ef652c4a23b729))
|
|
12
|
+
* export params type ([4ee2af2](https://github.com/medusajs/medusa/commit/4ee2af2582d6c6420e7faf238447b77499e5d32d))
|
|
13
|
+
* export request types from add and remove product endpoints ([#1078](https://github.com/medusajs/medusa/issues/1078)) ([449e666](https://github.com/medusajs/medusa/commit/449e6664283edc2bce42b97b9d52def1841a9a18))
|
|
14
|
+
* unit test case for `CustomerGroupServiceMock.retrieve` ([def8763](https://github.com/medusajs/medusa/commit/def8763ee203c60728815ef3d36e57b5533b97c8))
|
|
15
|
+
* variant price update ([#1093](https://github.com/medusajs/medusa/issues/1093)) ([cb7b211](https://github.com/medusajs/medusa/commit/cb7b211c9bb3188ecf072fa1734055a4ddfe7f86))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add `extend` param for customer groups ([ecd6ed8](https://github.com/medusajs/medusa/commit/ecd6ed820e77904fe59ff6fcc9195533968dd9f3))
|
|
21
|
+
* add and remove products to/from collection in bulk endpoints ([#1032](https://github.com/medusajs/medusa/issues/1032)) ([6629403](https://github.com/medusajs/medusa/commit/66294038f0ccf0b81bcf099b590379acffb647ba))
|
|
22
|
+
* customer group update ([#1098](https://github.com/medusajs/medusa/issues/1098)) ([694e2df](https://github.com/medusajs/medusa/commit/694e2df20f8c1b125c51f7d24b1e3abdc4b3cff6))
|
|
23
|
+
* GET customer group endpoint ([21d99a4](https://github.com/medusajs/medusa/commit/21d99a44a9fb2bd0f52c8bc8b5c75d200ef6d539))
|
|
24
|
+
* new tax api ([#979](https://github.com/medusajs/medusa/issues/979)) ([c56660f](https://github.com/medusajs/medusa/commit/c56660fca9921a3f3637bc137d9794781c5b090f)), closes [#885](https://github.com/medusajs/medusa/issues/885) [#896](https://github.com/medusajs/medusa/issues/896) [#911](https://github.com/medusajs/medusa/issues/911) [#945](https://github.com/medusajs/medusa/issues/945) [#950](https://github.com/medusajs/medusa/issues/950) [#951](https://github.com/medusajs/medusa/issues/951) [#954](https://github.com/medusajs/medusa/issues/954) [#969](https://github.com/medusajs/medusa/issues/969) [#998](https://github.com/medusajs/medusa/issues/998) [#1017](https://github.com/medusajs/medusa/issues/1017) [#1110](https://github.com/medusajs/medusa/issues/1110)
|
|
25
|
+
* update customer groups ([#1075](https://github.com/medusajs/medusa/issues/1075)) ([75fb2ce](https://github.com/medusajs/medusa/commit/75fb2ce9c3a206a9d43cdbd80a356d9ba4d28f3f))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
## [1.1.64](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.63...@medusajs/medusa@1.1.64) (2022-02-06)
|
|
7
32
|
|
|
8
33
|
### Bug Fixes
|
|
@@ -17,8 +17,8 @@ declare const _default: (req: any, res: any) => Promise<void>;
|
|
|
17
17
|
* application/json:
|
|
18
18
|
* schema:
|
|
19
19
|
* properties:
|
|
20
|
-
*
|
|
21
|
-
* $ref: "#/components/schemas/
|
|
20
|
+
* customer_group:
|
|
21
|
+
* $ref: "#/components/schemas/customer_group"
|
|
22
22
|
*/
|
|
23
23
|
export default _default;
|
|
24
24
|
export declare class AdminPostCustomerGroupsReq {
|
|
@@ -66,8 +66,8 @@ var validator_1 = require("../../../../utils/validator");
|
|
|
66
66
|
* application/json:
|
|
67
67
|
* schema:
|
|
68
68
|
* properties:
|
|
69
|
-
*
|
|
70
|
-
* $ref: "#/components/schemas/
|
|
69
|
+
* customer_group:
|
|
70
|
+
* $ref: "#/components/schemas/customer_group"
|
|
71
71
|
*/
|
|
72
72
|
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
73
|
var validated, customerGroupService, customerGroup;
|
|
@@ -80,7 +80,7 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
80
80
|
return [4 /*yield*/, customerGroupService.create(validated)];
|
|
81
81
|
case 2:
|
|
82
82
|
customerGroup = _a.sent();
|
|
83
|
-
res.status(200).json({
|
|
83
|
+
res.status(200).json({ customer_group: customerGroup });
|
|
84
84
|
return [2 /*return*/];
|
|
85
85
|
}
|
|
86
86
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer-group.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/create-customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAgE;AAEhE,yDAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;oBACV,qBAAM,IAAA,qBAAS,EAAC,0BAA0B,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;gBAAjE,SAAS,GAAG,SAAqD;gBAEjE,oBAAoB,GAAyB,GAAG,CAAC,KAAK,CAAC,OAAO,CAClE,sBAAsB,CACvB,CAAA;gBAEqB,qBAAM,oBAAoB,CAAC,MAAM,CAAC,SAAS,CAAC,EAAA;;gBAA5D,aAAa,GAAG,SAA4C;gBAClE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"create-customer-group.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/create-customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAgE;AAEhE,yDAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;oBACV,qBAAM,IAAA,qBAAS,EAAC,0BAA0B,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;gBAAjE,SAAS,GAAG,SAAqD;gBAEjE,oBAAoB,GAAyB,GAAG,CAAC,KAAK,CAAC,OAAO,CAClE,sBAAsB,CACvB,CAAA;gBAEqB,qBAAM,oBAAoB,CAAC,MAAM,CAAC,SAAS,CAAC,EAAA;;gBAA5D,aAAa,GAAG,SAA4C;gBAClE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,CAAA;;;;KACxD,EAAA;AAED;IAAA;IAOA,CAAC;IALC;QADC,IAAA,0BAAQ,GAAE;;4DACC;IAIZ;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;gEACI;IACnB,iCAAC;CAAA,AAPD,IAOC;AAPY,gEAA0B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: (req: any, res: any) => Promise<void>;
|
|
2
|
+
/**
|
|
3
|
+
* @oas [delete] /customer-groups/{id}
|
|
4
|
+
* operationId: "DeleteCustomerGroupsCustomerGroup"
|
|
5
|
+
* summary: "Delete a CustomerGroup"
|
|
6
|
+
* description: "Deletes a CustomerGroup."
|
|
7
|
+
* x-authenticated: true
|
|
8
|
+
* parameters:
|
|
9
|
+
* - (path) id=* {string} The id of the Customer Group
|
|
10
|
+
* tags:
|
|
11
|
+
* - CustomerGroup
|
|
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 customer group.
|
|
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] /customer-groups/{id}
|
|
41
|
+
* operationId: "DeleteCustomerGroupsCustomerGroup"
|
|
42
|
+
* summary: "Delete a CustomerGroup"
|
|
43
|
+
* description: "Deletes a CustomerGroup."
|
|
44
|
+
* x-authenticated: true
|
|
45
|
+
* parameters:
|
|
46
|
+
* - (path) id=* {string} The id of the Customer Group
|
|
47
|
+
* tags:
|
|
48
|
+
* - CustomerGroup
|
|
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 customer group.
|
|
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, customerGroupService;
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0:
|
|
70
|
+
id = req.params.id;
|
|
71
|
+
customerGroupService = req.scope.resolve("customerGroupService");
|
|
72
|
+
return [4 /*yield*/, customerGroupService.delete(id)];
|
|
73
|
+
case 1:
|
|
74
|
+
_a.sent();
|
|
75
|
+
res.json({
|
|
76
|
+
id: id,
|
|
77
|
+
object: "customer_group",
|
|
78
|
+
deleted: true,
|
|
79
|
+
});
|
|
80
|
+
return [2 /*return*/];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}); });
|
|
84
|
+
//# sourceMappingURL=delete-customer-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-customer-group.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/delete-customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEnB,oBAAoB,GAAyB,GAAG,CAAC,KAAK,CAAC,OAAO,CAClE,sBAAsB,CACvB,CAAA;gBAED,qBAAM,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAA;;gBAArC,SAAqC,CAAA;gBAErC,GAAG,CAAC,IAAI,CAAC;oBACP,EAAE,EAAE,EAAE;oBACN,MAAM,EAAE,gBAAgB;oBACxB,OAAO,EAAE,IAAI;iBACd,CAAC,CAAA;;;;KACH,EAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CustomerGroupsBatchCustomer } from "../../../../types/customer-groups";
|
|
2
|
+
declare const _default: (req: any, res: any) => Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* @oas [delete] /customer-groups/{id}/customers/batch
|
|
5
|
+
* operationId: "DeleteCustomerGroupsGroupCustomerBatch"
|
|
6
|
+
* summary: "Remove a list of customers from a customer group "
|
|
7
|
+
* description: "Removes a list of customers, represented by id's, from a customer group."
|
|
8
|
+
* x-authenticated: true
|
|
9
|
+
* parameters:
|
|
10
|
+
* - (path) id=* {string} The id of the customer group.
|
|
11
|
+
* - (body) customers=* {{id: string }[]} ids of the customers to remove
|
|
12
|
+
* tags:
|
|
13
|
+
* - CustomerGroup
|
|
14
|
+
* responses:
|
|
15
|
+
* 200:
|
|
16
|
+
* description: OK
|
|
17
|
+
* content:
|
|
18
|
+
* application/json:
|
|
19
|
+
* schema:
|
|
20
|
+
* properties:
|
|
21
|
+
* customerGroup:
|
|
22
|
+
* $ref: "#/components/schemas/customergroup"
|
|
23
|
+
*/
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare class AdminDeleteCustomerGroupsGroupCustomerBatchReq {
|
|
26
|
+
customer_ids: CustomerGroupsBatchCustomer[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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.AdminDeleteCustomerGroupsGroupCustomerBatchReq = void 0;
|
|
49
|
+
var class_transformer_1 = require("class-transformer");
|
|
50
|
+
var class_validator_1 = require("class-validator");
|
|
51
|
+
var customer_groups_1 = require("../../../../types/customer-groups");
|
|
52
|
+
var validator_1 = require("../../../../utils/validator");
|
|
53
|
+
/**
|
|
54
|
+
* @oas [delete] /customer-groups/{id}/customers/batch
|
|
55
|
+
* operationId: "DeleteCustomerGroupsGroupCustomerBatch"
|
|
56
|
+
* summary: "Remove a list of customers from a customer group "
|
|
57
|
+
* description: "Removes a list of customers, represented by id's, from a customer group."
|
|
58
|
+
* x-authenticated: true
|
|
59
|
+
* parameters:
|
|
60
|
+
* - (path) id=* {string} The id of the customer group.
|
|
61
|
+
* - (body) customers=* {{id: string }[]} ids of the customers to remove
|
|
62
|
+
* tags:
|
|
63
|
+
* - CustomerGroup
|
|
64
|
+
* responses:
|
|
65
|
+
* 200:
|
|
66
|
+
* description: OK
|
|
67
|
+
* content:
|
|
68
|
+
* application/json:
|
|
69
|
+
* schema:
|
|
70
|
+
* properties:
|
|
71
|
+
* customerGroup:
|
|
72
|
+
* $ref: "#/components/schemas/customergroup"
|
|
73
|
+
*/
|
|
74
|
+
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
+
var id, validated, customerGroupService, customer_group;
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
id = req.params.id;
|
|
80
|
+
return [4 /*yield*/, (0, validator_1.validator)(AdminDeleteCustomerGroupsGroupCustomerBatchReq, req.body)];
|
|
81
|
+
case 1:
|
|
82
|
+
validated = _a.sent();
|
|
83
|
+
customerGroupService = req.scope.resolve("customerGroupService");
|
|
84
|
+
return [4 /*yield*/, customerGroupService.removeCustomer(id, validated.customer_ids.map(function (_a) {
|
|
85
|
+
var id = _a.id;
|
|
86
|
+
return id;
|
|
87
|
+
}))];
|
|
88
|
+
case 2:
|
|
89
|
+
customer_group = _a.sent();
|
|
90
|
+
res.status(200).json({ customer_group: customer_group });
|
|
91
|
+
return [2 /*return*/];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}); });
|
|
95
|
+
var AdminDeleteCustomerGroupsGroupCustomerBatchReq = /** @class */ (function () {
|
|
96
|
+
function AdminDeleteCustomerGroupsGroupCustomerBatchReq() {
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
100
|
+
(0, class_transformer_1.Type)(function () { return customer_groups_1.CustomerGroupsBatchCustomer; }),
|
|
101
|
+
__metadata("design:type", Array)
|
|
102
|
+
], AdminDeleteCustomerGroupsGroupCustomerBatchReq.prototype, "customer_ids", void 0);
|
|
103
|
+
return AdminDeleteCustomerGroupsGroupCustomerBatchReq;
|
|
104
|
+
}());
|
|
105
|
+
exports.AdminDeleteCustomerGroupsGroupCustomerBatchReq = AdminDeleteCustomerGroupsGroupCustomerBatchReq;
|
|
106
|
+
//# sourceMappingURL=delete-customers-batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-customers-batch.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/delete-customers-batch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,mDAAgD;AAEhD,qEAA+E;AAC/E,yDAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBACP,qBAAM,IAAA,qBAAS,EAC/B,8CAA8C,EAC9C,GAAG,CAAC,IAAI,CACT,EAAA;;gBAHK,SAAS,GAAG,SAGjB;gBAEK,oBAAoB,GAAyB,GAAG,CAAC,KAAK,CAAC,OAAO,CAClE,sBAAsB,CACvB,CAAA;gBAEsB,qBAAM,oBAAoB,CAAC,cAAc,CAC9D,EAAE,EACF,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,UAAC,EAAM;4BAAJ,EAAE,QAAA;wBAAO,OAAA,EAAE;oBAAF,CAAE,CAAC,CAC3C,EAAA;;gBAHK,cAAc,GAAG,SAGtB;gBACD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,cAAc,gBAAA,EAAE,CAAC,CAAA;;;;KACzC,EAAA;AAED;IAAA;IAIA,CAAC;IADC;QAFC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC9B,IAAA,wBAAI,EAAC,cAAM,OAAA,6CAA2B,EAA3B,CAA2B,CAAC;;wFACG;IAC7C,qDAAC;CAAA,AAJD,IAIC;AAJY,wGAA8C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FindParams } from "../../../../types/common";
|
|
2
|
+
declare const _default: (req: any, res: any) => Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* @oas [get] /customer-group/{id}
|
|
5
|
+
* operationId: "GetCustomerGroupsGroup"
|
|
6
|
+
* summary: "Retrieve a CustomerGroup"
|
|
7
|
+
* description: "Retrieves a Customer Group."
|
|
8
|
+
* x-authenticated: true
|
|
9
|
+
* parameters:
|
|
10
|
+
* - (path) id=* {string} The id of the Customer Group.
|
|
11
|
+
* tags:
|
|
12
|
+
* - CustomerGroup
|
|
13
|
+
* responses:
|
|
14
|
+
* 200:
|
|
15
|
+
* description: OK
|
|
16
|
+
* content:
|
|
17
|
+
* application/json:
|
|
18
|
+
* schema:
|
|
19
|
+
* properties:
|
|
20
|
+
* customer_group:
|
|
21
|
+
* $ref: "#/components/schemas/customer_group"
|
|
22
|
+
*/
|
|
23
|
+
export default _default;
|
|
24
|
+
export declare class AdminGetCustomerGroupsGroupParams extends FindParams {
|
|
25
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
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;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.AdminGetCustomerGroupsGroupParams = void 0;
|
|
55
|
+
var common_1 = require("../../../../types/common");
|
|
56
|
+
var validator_1 = require("../../../../utils/validator");
|
|
57
|
+
var _1 = require(".");
|
|
58
|
+
/**
|
|
59
|
+
* @oas [get] /customer-group/{id}
|
|
60
|
+
* operationId: "GetCustomerGroupsGroup"
|
|
61
|
+
* summary: "Retrieve a CustomerGroup"
|
|
62
|
+
* description: "Retrieves a Customer Group."
|
|
63
|
+
* x-authenticated: true
|
|
64
|
+
* parameters:
|
|
65
|
+
* - (path) id=* {string} The id of the Customer Group.
|
|
66
|
+
* tags:
|
|
67
|
+
* - CustomerGroup
|
|
68
|
+
* responses:
|
|
69
|
+
* 200:
|
|
70
|
+
* description: OK
|
|
71
|
+
* content:
|
|
72
|
+
* application/json:
|
|
73
|
+
* schema:
|
|
74
|
+
* properties:
|
|
75
|
+
* customer_group:
|
|
76
|
+
* $ref: "#/components/schemas/customer_group"
|
|
77
|
+
*/
|
|
78
|
+
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
+
var id, validated, customerGroupService, expandFields, findConfig, customerGroup;
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
switch (_a.label) {
|
|
82
|
+
case 0:
|
|
83
|
+
id = req.params.id;
|
|
84
|
+
return [4 /*yield*/, (0, validator_1.validator)(AdminGetCustomerGroupsGroupParams, req.query)];
|
|
85
|
+
case 1:
|
|
86
|
+
validated = _a.sent();
|
|
87
|
+
customerGroupService = req.scope.resolve("customerGroupService");
|
|
88
|
+
expandFields = [];
|
|
89
|
+
if (validated.expand) {
|
|
90
|
+
expandFields = validated.expand.split(",");
|
|
91
|
+
}
|
|
92
|
+
findConfig = {
|
|
93
|
+
relations: expandFields.length
|
|
94
|
+
? expandFields
|
|
95
|
+
: _1.defaultAdminCustomerGroupsRelations,
|
|
96
|
+
};
|
|
97
|
+
return [4 /*yield*/, customerGroupService.retrieve(id, findConfig)];
|
|
98
|
+
case 2:
|
|
99
|
+
customerGroup = _a.sent();
|
|
100
|
+
res.json({ customer_group: customerGroup });
|
|
101
|
+
return [2 /*return*/];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}); });
|
|
105
|
+
var AdminGetCustomerGroupsGroupParams = /** @class */ (function (_super) {
|
|
106
|
+
__extends(AdminGetCustomerGroupsGroupParams, _super);
|
|
107
|
+
function AdminGetCustomerGroupsGroupParams() {
|
|
108
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
109
|
+
}
|
|
110
|
+
return AdminGetCustomerGroupsGroupParams;
|
|
111
|
+
}(common_1.FindParams));
|
|
112
|
+
exports.AdminGetCustomerGroupsGroupParams = AdminGetCustomerGroupsGroupParams;
|
|
113
|
+
//# sourceMappingURL=get-customer-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-customer-group.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/get-customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mDAAqD;AACrD,yDAAuD;AACvD,sBAAuD;AAEvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEP,qBAAM,IAAA,qBAAS,EAC/B,iCAAiC,EACjC,GAAG,CAAC,KAAK,CACV,EAAA;;gBAHK,SAAS,GAAG,SAGjB;gBAEK,oBAAoB,GAAyB,GAAG,CAAC,KAAK,CAAC,OAAO,CAClE,sBAAsB,CACvB,CAAA;gBAEG,YAAY,GAAa,EAAE,CAAA;gBAC/B,IAAI,SAAS,CAAC,MAAM,EAAE;oBACpB,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;iBAC3C;gBAEK,UAAU,GAAG;oBACjB,SAAS,EAAE,YAAY,CAAC,MAAM;wBAC5B,CAAC,CAAC,YAAY;wBACd,CAAC,CAAC,sCAAmC;iBACxC,CAAA;gBAEqB,qBAAM,oBAAoB,CAAC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC,EAAA;;gBAAnE,aAAa,GAAG,SAAmD;gBAEzE,GAAG,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,CAAA;;;;KAC5C,EAAA;AAED;IAAuD,qDAAU;IAAjE;;IAAmE,CAAC;IAAD,wCAAC;AAAD,CAAC,AAApE,CAAuD,mBAAU,GAAG;AAAvD,8EAAiC"}
|
|
@@ -9,4 +9,5 @@ export declare type AdminCustomerGroupsDeleteRes = DeleteResponse;
|
|
|
9
9
|
export declare type AdminCustomerGroupsListRes = PaginatedResponse & {
|
|
10
10
|
customer_groups: CustomerGroup[];
|
|
11
11
|
};
|
|
12
|
+
export declare const defaultAdminCustomerGroupsRelations: never[];
|
|
12
13
|
export * from "./create-customer-group";
|
|
@@ -13,13 +13,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.defaultAdminCustomerGroupsRelations = void 0;
|
|
16
17
|
var express_1 = require("express");
|
|
17
18
|
var middlewares_1 = __importDefault(require("../../../middlewares"));
|
|
18
19
|
var route = (0, express_1.Router)();
|
|
19
20
|
exports.default = (function (app) {
|
|
20
21
|
app.use("/customer-groups", route);
|
|
22
|
+
route.get("/:id", middlewares_1.default.wrap(require("./get-customer-group").default));
|
|
21
23
|
route.post("/", middlewares_1.default.wrap(require("./create-customer-group").default));
|
|
24
|
+
route.delete("/:id/customers/batch", middlewares_1.default.wrap(require("./delete-customers-batch").default));
|
|
25
|
+
route.delete("/:id", middlewares_1.default.wrap(require("./delete-customer-group").default));
|
|
26
|
+
route.post("/:id", middlewares_1.default.wrap(require("./update-customer-group").default));
|
|
22
27
|
return app;
|
|
23
28
|
});
|
|
29
|
+
exports.defaultAdminCustomerGroupsRelations = [];
|
|
24
30
|
__exportStar(require("./create-customer-group"), exports);
|
|
25
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/customer-groups/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAAgC;AAGhC,qEAA8C;AAE9C,IAAM,KAAK,GAAG,IAAA,gBAAM,GAAE,CAAA;AAEtB,mBAAe,UAAC,GAAG;IACjB,GAAG,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAA;IAElC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAC5E,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAC7E,KAAK,CAAC,MAAM,CACV,sBAAsB,EACtB,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC,CAC9D,CAAA;IAED,KAAK,CAAC,MAAM,CACV,MAAM,EACN,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAC7D,CAAA;IACD,KAAK,CAAC,IAAI,CACR,MAAM,EACN,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAC7D,CAAA;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA;AAYY,QAAA,mCAAmC,GAAG,EAAE,CAAA;AAErD,0DAAuC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: (req: any, res: any) => Promise<void>;
|
|
2
|
+
/**
|
|
3
|
+
* @oas [post] /customer-groups/{id}
|
|
4
|
+
* operationId: "PostCustomerGroupsGroup"
|
|
5
|
+
* summary: "Update a CustomerGroup"
|
|
6
|
+
* description: "Update a CustomerGroup."
|
|
7
|
+
* x-authenticated: true
|
|
8
|
+
* parameters:
|
|
9
|
+
* - (path) id=* {string} The id of the customer group.
|
|
10
|
+
* - (body) name=* {string} Name of the customer group
|
|
11
|
+
* - (body) metadata {object} Metadata for the customer.
|
|
12
|
+
* tags:
|
|
13
|
+
* - CustomerGroup
|
|
14
|
+
* responses:
|
|
15
|
+
* 200:
|
|
16
|
+
* description: OK
|
|
17
|
+
* content:
|
|
18
|
+
* application/json:
|
|
19
|
+
* schema:
|
|
20
|
+
* properties:
|
|
21
|
+
* customer_group:
|
|
22
|
+
* $ref: "#/components/schemas/customer_group"
|
|
23
|
+
*/
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare class AdminPostCustomerGroupsGroupReq {
|
|
26
|
+
name?: string;
|
|
27
|
+
metadata?: object;
|
|
28
|
+
}
|