@acmekit/core-flows 2.13.14 → 2.13.15
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/dist/api-key/steps/create-api-keys.d.ts +2 -2
- package/dist/api-key/steps/create-api-keys.js +2 -2
- package/dist/api-key/workflows/create-api-keys.d.ts +5 -15
- package/dist/api-key/workflows/create-api-keys.d.ts.map +1 -1
- package/dist/api-key/workflows/create-api-keys.js +5 -15
- package/dist/api-key/workflows/create-api-keys.js.map +1 -1
- package/dist/api-key/workflows/delete-api-keys.d.ts +2 -2
- package/dist/api-key/workflows/delete-api-keys.d.ts.map +1 -1
- package/dist/api-key/workflows/delete-api-keys.js +2 -3
- package/dist/api-key/workflows/delete-api-keys.js.map +1 -1
- package/dist/api-key/workflows/revoke-api-keys.d.ts +2 -2
- package/dist/api-key/workflows/revoke-api-keys.js +2 -2
- package/dist/api-key/workflows/update-api-keys.d.ts +2 -2
- package/dist/api-key/workflows/update-api-keys.js +2 -2
- package/dist/defaults/steps/index.d.ts +1 -1
- package/dist/defaults/steps/index.d.ts.map +1 -1
- package/dist/defaults/steps/index.js +1 -15
- package/dist/defaults/steps/index.js.map +1 -1
- package/dist/defaults/workflows/create-defaults.d.ts +7 -11
- package/dist/defaults/workflows/create-defaults.d.ts.map +1 -1
- package/dist/defaults/workflows/create-defaults.js +12 -20
- package/dist/defaults/workflows/create-defaults.js.map +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/customer/index.d.ts +0 -3
- package/dist/customer/index.d.ts.map +0 -1
- package/dist/customer/index.js +0 -19
- package/dist/customer/index.js.map +0 -1
- package/dist/customer/steps/create-addresses.d.ts +0 -25
- package/dist/customer/steps/create-addresses.d.ts.map +0 -1
- package/dist/customer/steps/create-addresses.js +0 -35
- package/dist/customer/steps/create-addresses.js.map +0 -1
- package/dist/customer/steps/create-customers.d.ts +0 -20
- package/dist/customer/steps/create-customers.d.ts.map +0 -1
- package/dist/customer/steps/create-customers.js +0 -30
- package/dist/customer/steps/create-customers.js.map +0 -1
- package/dist/customer/steps/delete-addresses.d.ts +0 -10
- package/dist/customer/steps/delete-addresses.d.ts.map +0 -1
- package/dist/customer/steps/delete-addresses.js +0 -24
- package/dist/customer/steps/delete-addresses.js.map +0 -1
- package/dist/customer/steps/delete-customers.d.ts +0 -10
- package/dist/customer/steps/delete-customers.d.ts.map +0 -1
- package/dist/customer/steps/delete-customers.js +0 -21
- package/dist/customer/steps/delete-customers.js.map +0 -1
- package/dist/customer/steps/index.d.ts +0 -10
- package/dist/customer/steps/index.d.ts.map +0 -1
- package/dist/customer/steps/index.js +0 -26
- package/dist/customer/steps/index.js.map +0 -1
- package/dist/customer/steps/maybe-unset-default-billing-addresses.d.ts +0 -57
- package/dist/customer/steps/maybe-unset-default-billing-addresses.d.ts.map +0 -1
- package/dist/customer/steps/maybe-unset-default-billing-addresses.js +0 -51
- package/dist/customer/steps/maybe-unset-default-billing-addresses.js.map +0 -1
- package/dist/customer/steps/maybe-unset-default-shipping-addresses.d.ts +0 -57
- package/dist/customer/steps/maybe-unset-default-shipping-addresses.d.ts.map +0 -1
- package/dist/customer/steps/maybe-unset-default-shipping-addresses.js +0 -51
- package/dist/customer/steps/maybe-unset-default-shipping-addresses.js.map +0 -1
- package/dist/customer/steps/update-addresses.d.ts +0 -30
- package/dist/customer/steps/update-addresses.d.ts.map +0 -1
- package/dist/customer/steps/update-addresses.js +0 -38
- package/dist/customer/steps/update-addresses.js.map +0 -1
- package/dist/customer/steps/update-customers.d.ts +0 -30
- package/dist/customer/steps/update-customers.d.ts.map +0 -1
- package/dist/customer/steps/update-customers.js +0 -44
- package/dist/customer/steps/update-customers.js.map +0 -1
- package/dist/customer/steps/utils/index.d.ts +0 -3
- package/dist/customer/steps/utils/index.d.ts.map +0 -1
- package/dist/customer/steps/utils/index.js +0 -19
- package/dist/customer/steps/utils/index.js.map +0 -1
- package/dist/customer/steps/utils/unset-address-for-create.d.ts +0 -4
- package/dist/customer/steps/utils/unset-address-for-create.d.ts.map +0 -1
- package/dist/customer/steps/utils/unset-address-for-create.js +0 -20
- package/dist/customer/steps/utils/unset-address-for-create.js.map +0 -1
- package/dist/customer/steps/utils/unset-address-for-update.d.ts +0 -7
- package/dist/customer/steps/utils/unset-address-for-update.d.ts.map +0 -1
- package/dist/customer/steps/utils/unset-address-for-update.js +0 -21
- package/dist/customer/steps/utils/unset-address-for-update.js.map +0 -1
- package/dist/customer/steps/validate-customer-account-creation.d.ts +0 -22
- package/dist/customer/steps/validate-customer-account-creation.d.ts.map +0 -1
- package/dist/customer/steps/validate-customer-account-creation.js +0 -43
- package/dist/customer/steps/validate-customer-account-creation.js.map +0 -1
- package/dist/customer/workflows/create-addresses.d.ts +0 -66
- package/dist/customer/workflows/create-addresses.d.ts.map +0 -1
- package/dist/customer/workflows/create-addresses.js +0 -66
- package/dist/customer/workflows/create-addresses.js.map +0 -1
- package/dist/customer/workflows/create-customer-account.d.ts +0 -44
- package/dist/customer/workflows/create-customer-account.d.ts.map +0 -1
- package/dist/customer/workflows/create-customer-account.js +0 -57
- package/dist/customer/workflows/create-customer-account.js.map +0 -1
- package/dist/customer/workflows/create-customers.d.ts +0 -51
- package/dist/customer/workflows/create-customers.d.ts.map +0 -1
- package/dist/customer/workflows/create-customers.js +0 -58
- package/dist/customer/workflows/create-customers.js.map +0 -1
- package/dist/customer/workflows/delete-addresses.d.ts +0 -47
- package/dist/customer/workflows/delete-addresses.d.ts.map +0 -1
- package/dist/customer/workflows/delete-addresses.js +0 -48
- package/dist/customer/workflows/delete-addresses.js.map +0 -1
- package/dist/customer/workflows/delete-customers.d.ts +0 -38
- package/dist/customer/workflows/delete-customers.d.ts.map +0 -1
- package/dist/customer/workflows/delete-customers.js +0 -50
- package/dist/customer/workflows/delete-customers.js.map +0 -1
- package/dist/customer/workflows/index.d.ts +0 -9
- package/dist/customer/workflows/index.d.ts.map +0 -1
- package/dist/customer/workflows/index.js +0 -25
- package/dist/customer/workflows/index.js.map +0 -1
- package/dist/customer/workflows/remove-customer-account.d.ts +0 -32
- package/dist/customer/workflows/remove-customer-account.d.ts.map +0 -1
- package/dist/customer/workflows/remove-customer-account.js +0 -78
- package/dist/customer/workflows/remove-customer-account.js.map +0 -1
- package/dist/customer/workflows/update-addresses.d.ts +0 -56
- package/dist/customer/workflows/update-addresses.d.ts.map +0 -1
- package/dist/customer/workflows/update-addresses.js +0 -52
- package/dist/customer/workflows/update-addresses.js.map +0 -1
- package/dist/customer/workflows/update-customers.d.ts +0 -53
- package/dist/customer/workflows/update-customers.d.ts.map +0 -1
- package/dist/customer/workflows/update-customers.js +0 -59
- package/dist/customer/workflows/update-customers.js.map +0 -1
- package/dist/customer-group/index.d.ts +0 -3
- package/dist/customer-group/index.d.ts.map +0 -1
- package/dist/customer-group/index.js +0 -19
- package/dist/customer-group/index.js.map +0 -1
- package/dist/customer-group/steps/create-customer-groups.d.ts +0 -11
- package/dist/customer-group/steps/create-customer-groups.d.ts.map +0 -1
- package/dist/customer-group/steps/create-customer-groups.js +0 -21
- package/dist/customer-group/steps/create-customer-groups.js.map +0 -1
- package/dist/customer-group/steps/delete-customer-group-customers.d.ts +0 -7
- package/dist/customer-group/steps/delete-customer-group-customers.d.ts.map +0 -1
- package/dist/customer-group/steps/delete-customer-group-customers.js +0 -21
- package/dist/customer-group/steps/delete-customer-group-customers.js.map +0 -1
- package/dist/customer-group/steps/delete-customer-groups.d.ts +0 -10
- package/dist/customer-group/steps/delete-customer-groups.d.ts.map +0 -1
- package/dist/customer-group/steps/delete-customer-groups.js +0 -21
- package/dist/customer-group/steps/delete-customer-groups.js.map +0 -1
- package/dist/customer-group/steps/index.d.ts +0 -6
- package/dist/customer-group/steps/index.d.ts.map +0 -1
- package/dist/customer-group/steps/index.js +0 -22
- package/dist/customer-group/steps/index.js.map +0 -1
- package/dist/customer-group/steps/link-customer-groups-customer.d.ts +0 -14
- package/dist/customer-group/steps/link-customer-groups-customer.d.ts.map +0 -1
- package/dist/customer-group/steps/link-customer-groups-customer.js +0 -52
- package/dist/customer-group/steps/link-customer-groups-customer.js.map +0 -1
- package/dist/customer-group/steps/link-customers-customer-group.d.ts +0 -14
- package/dist/customer-group/steps/link-customers-customer-group.d.ts.map +0 -1
- package/dist/customer-group/steps/link-customers-customer-group.js +0 -52
- package/dist/customer-group/steps/link-customers-customer-group.js.map +0 -1
- package/dist/customer-group/steps/update-customer-groups.d.ts +0 -30
- package/dist/customer-group/steps/update-customer-groups.d.ts.map +0 -1
- package/dist/customer-group/steps/update-customer-groups.js +0 -41
- package/dist/customer-group/steps/update-customer-groups.js.map +0 -1
- package/dist/customer-group/workflows/create-customer-groups.d.ts +0 -41
- package/dist/customer-group/workflows/create-customer-groups.d.ts.map +0 -1
- package/dist/customer-group/workflows/create-customer-groups.js +0 -34
- package/dist/customer-group/workflows/create-customer-groups.js.map +0 -1
- package/dist/customer-group/workflows/delete-customer-groups.d.ts +0 -31
- package/dist/customer-group/workflows/delete-customer-groups.d.ts.map +0 -1
- package/dist/customer-group/workflows/delete-customer-groups.js +0 -29
- package/dist/customer-group/workflows/delete-customer-groups.js.map +0 -1
- package/dist/customer-group/workflows/index.d.ts +0 -6
- package/dist/customer-group/workflows/index.d.ts.map +0 -1
- package/dist/customer-group/workflows/index.js +0 -22
- package/dist/customer-group/workflows/index.js.map +0 -1
- package/dist/customer-group/workflows/link-customer-groups-customer.d.ts +0 -33
- package/dist/customer-group/workflows/link-customer-groups-customer.d.ts.map +0 -1
- package/dist/customer-group/workflows/link-customer-groups-customer.js +0 -31
- package/dist/customer-group/workflows/link-customer-groups-customer.js.map +0 -1
- package/dist/customer-group/workflows/link-customers-customer-group.d.ts +0 -33
- package/dist/customer-group/workflows/link-customers-customer-group.d.ts.map +0 -1
- package/dist/customer-group/workflows/link-customers-customer-group.js +0 -31
- package/dist/customer-group/workflows/link-customers-customer-group.js.map +0 -1
- package/dist/customer-group/workflows/update-customer-groups.d.ts +0 -45
- package/dist/customer-group/workflows/update-customer-groups.d.ts.map +0 -1
- package/dist/customer-group/workflows/update-customer-groups.js +0 -34
- package/dist/customer-group/workflows/update-customer-groups.js.map +0 -1
- package/dist/defaults/steps/create-default-store.d.ts +0 -31
- package/dist/defaults/steps/create-default-store.d.ts.map +0 -1
- package/dist/defaults/steps/create-default-store.js +0 -67
- package/dist/defaults/steps/create-default-store.js.map +0 -1
- package/dist/store/index.d.ts +0 -3
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js +0 -19
- package/dist/store/index.js.map +0 -1
- package/dist/store/steps/create-stores.d.ts +0 -12
- package/dist/store/steps/create-stores.d.ts.map +0 -1
- package/dist/store/steps/create-stores.js +0 -26
- package/dist/store/steps/create-stores.js.map +0 -1
- package/dist/store/steps/delete-stores.d.ts +0 -10
- package/dist/store/steps/delete-stores.d.ts.map +0 -1
- package/dist/store/steps/delete-stores.js +0 -21
- package/dist/store/steps/delete-stores.js.map +0 -1
- package/dist/store/steps/index.d.ts +0 -4
- package/dist/store/steps/index.d.ts.map +0 -1
- package/dist/store/steps/index.js +0 -20
- package/dist/store/steps/index.js.map +0 -1
- package/dist/store/steps/update-stores.d.ts +0 -30
- package/dist/store/steps/update-stores.d.ts.map +0 -1
- package/dist/store/steps/update-stores.js +0 -41
- package/dist/store/steps/update-stores.js.map +0 -1
- package/dist/store/workflows/create-stores.d.ts +0 -53
- package/dist/store/workflows/create-stores.d.ts.map +0 -1
- package/dist/store/workflows/create-stores.js +0 -51
- package/dist/store/workflows/create-stores.js.map +0 -1
- package/dist/store/workflows/delete-stores.d.ts +0 -38
- package/dist/store/workflows/delete-stores.d.ts.map +0 -1
- package/dist/store/workflows/delete-stores.js +0 -44
- package/dist/store/workflows/delete-stores.js.map +0 -1
- package/dist/store/workflows/index.d.ts +0 -4
- package/dist/store/workflows/index.d.ts.map +0 -1
- package/dist/store/workflows/index.js +0 -20
- package/dist/store/workflows/index.js.map +0 -1
- package/dist/store/workflows/update-stores.d.ts +0 -32
- package/dist/store/workflows/update-stores.d.ts.map +0 -1
- package/dist/store/workflows/update-stores.js +0 -52
- package/dist/store/workflows/update-stores.js.map +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteCustomerGroupStep = exports.deleteCustomerGroupStepId = void 0;
|
|
4
|
-
const utils_1 = require("@acmekit/framework/utils");
|
|
5
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
6
|
-
exports.deleteCustomerGroupStepId = "delete-customer-groups";
|
|
7
|
-
/**
|
|
8
|
-
* This step deletes one or more customer groups.
|
|
9
|
-
*/
|
|
10
|
-
exports.deleteCustomerGroupStep = (0, workflows_sdk_1.createStep)(exports.deleteCustomerGroupStepId, async (ids, { container }) => {
|
|
11
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
12
|
-
await service.softDeleteCustomerGroups(ids);
|
|
13
|
-
return new workflows_sdk_1.StepResponse(void 0, ids);
|
|
14
|
-
}, async (prevCustomerGroups, { container }) => {
|
|
15
|
-
if (!prevCustomerGroups) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
19
|
-
await service.restoreCustomerGroups(prevCustomerGroups);
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=delete-customer-groups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-customer-groups.js","sourceRoot":"","sources":["../../../src/customer-group/steps/delete-customer-groups.ts"],"names":[],"mappings":";;;AACA,oDAAkD;AAClD,oEAA2E;AAO9D,QAAA,yBAAyB,GAAG,wBAAwB,CAAA;AACjE;;GAEG;AACU,QAAA,uBAAuB,GAAG,IAAA,0BAAU,EAC/C,iCAAyB,EACzB,KAAK,EAAE,GAAkC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1D,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,MAAM,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAA;IAE3C,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC,EACD,KAAK,EAAE,kBAAkB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1C,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,OAAM;IACR,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,MAAM,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAA;AACzD,CAAC,CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/customer-group/steps/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./update-customer-groups"), exports);
|
|
18
|
-
__exportStar(require("./delete-customer-groups"), exports);
|
|
19
|
-
__exportStar(require("./create-customer-groups"), exports);
|
|
20
|
-
__exportStar(require("./link-customers-customer-group"), exports);
|
|
21
|
-
__exportStar(require("./link-customer-groups-customer"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/customer-group/steps/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,2DAAwC;AACxC,2DAAwC;AACxC,kEAA+C;AAC/C,kEAA+C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LinkWorkflowInput } from "@acmekit/framework/types";
|
|
2
|
-
export declare const linkCustomerGroupsToCustomerStepId = "link-customers-to-customer-group";
|
|
3
|
-
/**
|
|
4
|
-
* This step manages the customer groups of a customer.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* const data = linkCustomerGroupsToCustomerStep({
|
|
8
|
-
* id: "cus_123",
|
|
9
|
-
* add: ["cusgrp_123"],
|
|
10
|
-
* remove: ["cusgrp_456"]
|
|
11
|
-
* })
|
|
12
|
-
*/
|
|
13
|
-
export declare const linkCustomerGroupsToCustomerStep: import("@acmekit/framework/workflows-sdk").StepFunction<LinkWorkflowInput, undefined>;
|
|
14
|
-
//# sourceMappingURL=link-customer-groups-customer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customer-groups-customer.d.ts","sourceRoot":"","sources":["../../../src/customer-group/steps/link-customer-groups-customer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AAIjC,eAAO,MAAM,kCAAkC,qCACX,CAAA;AACpC;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,uFA2C5C,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.linkCustomerGroupsToCustomerStep = exports.linkCustomerGroupsToCustomerStepId = void 0;
|
|
4
|
-
const utils_1 = require("@acmekit/framework/utils");
|
|
5
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
6
|
-
exports.linkCustomerGroupsToCustomerStepId = "link-customers-to-customer-group";
|
|
7
|
-
/**
|
|
8
|
-
* This step manages the customer groups of a customer.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const data = linkCustomerGroupsToCustomerStep({
|
|
12
|
-
* id: "cus_123",
|
|
13
|
-
* add: ["cusgrp_123"],
|
|
14
|
-
* remove: ["cusgrp_456"]
|
|
15
|
-
* })
|
|
16
|
-
*/
|
|
17
|
-
exports.linkCustomerGroupsToCustomerStep = (0, workflows_sdk_1.createStep)(exports.linkCustomerGroupsToCustomerStepId, async (data, { container }) => {
|
|
18
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
19
|
-
const toAdd = (data.add ?? []).map((customerGroupId) => {
|
|
20
|
-
return {
|
|
21
|
-
customer_group_id: customerGroupId,
|
|
22
|
-
customer_id: data.id,
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
const toRemove = (data.remove ?? []).map((customerGroupId) => {
|
|
26
|
-
return {
|
|
27
|
-
customer_group_id: customerGroupId,
|
|
28
|
-
customer_id: data.id,
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
const promises = [];
|
|
32
|
-
if (toAdd.length) {
|
|
33
|
-
promises.push(service.addCustomerToGroup(toAdd));
|
|
34
|
-
}
|
|
35
|
-
if (toRemove.length) {
|
|
36
|
-
promises.push(service.removeCustomerFromGroup(toRemove));
|
|
37
|
-
}
|
|
38
|
-
await (0, utils_1.promiseAll)(promises);
|
|
39
|
-
return new workflows_sdk_1.StepResponse(void 0, { toAdd, toRemove });
|
|
40
|
-
}, async (prevData, { container }) => {
|
|
41
|
-
if (!prevData) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
45
|
-
if (prevData.toAdd.length) {
|
|
46
|
-
await service.removeCustomerFromGroup(prevData.toAdd);
|
|
47
|
-
}
|
|
48
|
-
if (prevData.toRemove.length) {
|
|
49
|
-
await service.addCustomerToGroup(prevData.toRemove);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=link-customer-groups-customer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customer-groups-customer.js","sourceRoot":"","sources":["../../../src/customer-group/steps/link-customer-groups-customer.ts"],"names":[],"mappings":";;;AAIA,oDAA8D;AAC9D,oEAA2E;AAE9D,QAAA,kCAAkC,GAC7C,kCAAkC,CAAA;AACpC;;;;;;;;;GASG;AACU,QAAA,gCAAgC,GAAG,IAAA,0BAAU,EACxD,0CAAkC,EAClC,KAAK,EAAE,IAAuB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE;QACrD,OAAO;YACL,iBAAiB,EAAE,eAAe;YAClC,WAAW,EAAE,IAAI,CAAC,EAAE;SACrB,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE;QAC3D,OAAO;YACL,iBAAiB,EAAE,eAAe;YAClC,WAAW,EAAE,IAAI,CAAC,EAAE;SACrB,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAmB,EAAE,CAAA;IACnC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAA;IAClD,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC1D,CAAC;IACD,MAAM,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAA;IAE1B,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;AACtD,CAAC,EACD,KAAK,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAM;IACR,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,OAAO,CAAC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvD,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACrD,CAAC;AACH,CAAC,CACF,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LinkWorkflowInput } from "@acmekit/framework/types";
|
|
2
|
-
export declare const linkCustomersToCustomerGroupStepId = "link-customers-to-customer-group";
|
|
3
|
-
/**
|
|
4
|
-
* This step manages the customers in a customer group.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* const data = linkCustomersToCustomerGroupStep({
|
|
8
|
-
* id: "cusgrp_123",
|
|
9
|
-
* add: ["cus_123"],
|
|
10
|
-
* remove: ["cus_456"]
|
|
11
|
-
* })
|
|
12
|
-
*/
|
|
13
|
-
export declare const linkCustomersToCustomerGroupStep: import("@acmekit/framework/workflows-sdk").StepFunction<LinkWorkflowInput, undefined>;
|
|
14
|
-
//# sourceMappingURL=link-customers-customer-group.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customers-customer-group.d.ts","sourceRoot":"","sources":["../../../src/customer-group/steps/link-customers-customer-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AAIjC,eAAO,MAAM,kCAAkC,qCACX,CAAA;AACpC;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,uFA2C5C,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.linkCustomersToCustomerGroupStep = exports.linkCustomersToCustomerGroupStepId = void 0;
|
|
4
|
-
const utils_1 = require("@acmekit/framework/utils");
|
|
5
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
6
|
-
exports.linkCustomersToCustomerGroupStepId = "link-customers-to-customer-group";
|
|
7
|
-
/**
|
|
8
|
-
* This step manages the customers in a customer group.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const data = linkCustomersToCustomerGroupStep({
|
|
12
|
-
* id: "cusgrp_123",
|
|
13
|
-
* add: ["cus_123"],
|
|
14
|
-
* remove: ["cus_456"]
|
|
15
|
-
* })
|
|
16
|
-
*/
|
|
17
|
-
exports.linkCustomersToCustomerGroupStep = (0, workflows_sdk_1.createStep)(exports.linkCustomersToCustomerGroupStepId, async (data, { container }) => {
|
|
18
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
19
|
-
const toAdd = (data.add ?? []).map((customerId) => {
|
|
20
|
-
return {
|
|
21
|
-
customer_id: customerId,
|
|
22
|
-
customer_group_id: data.id,
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
const toRemove = (data.remove ?? []).map((customerId) => {
|
|
26
|
-
return {
|
|
27
|
-
customer_id: customerId,
|
|
28
|
-
customer_group_id: data.id,
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
const promises = [];
|
|
32
|
-
if (toAdd.length) {
|
|
33
|
-
promises.push(service.addCustomerToGroup(toAdd));
|
|
34
|
-
}
|
|
35
|
-
if (toRemove.length) {
|
|
36
|
-
promises.push(service.removeCustomerFromGroup(toRemove));
|
|
37
|
-
}
|
|
38
|
-
await (0, utils_1.promiseAll)(promises);
|
|
39
|
-
return new workflows_sdk_1.StepResponse(void 0, { toAdd, toRemove });
|
|
40
|
-
}, async (prevData, { container }) => {
|
|
41
|
-
if (!prevData) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
45
|
-
if (prevData.toAdd.length) {
|
|
46
|
-
await service.removeCustomerFromGroup(prevData.toAdd);
|
|
47
|
-
}
|
|
48
|
-
if (prevData.toRemove.length) {
|
|
49
|
-
await service.addCustomerToGroup(prevData.toRemove);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=link-customers-customer-group.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customers-customer-group.js","sourceRoot":"","sources":["../../../src/customer-group/steps/link-customers-customer-group.ts"],"names":[],"mappings":";;;AAIA,oDAA8D;AAC9D,oEAA2E;AAE9D,QAAA,kCAAkC,GAC7C,kCAAkC,CAAA;AACpC;;;;;;;;;GASG;AACU,QAAA,gCAAgC,GAAG,IAAA,0BAAU,EACxD,0CAAkC,EAClC,KAAK,EAAE,IAAuB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;QAChD,OAAO;YACL,WAAW,EAAE,UAAU;YACvB,iBAAiB,EAAE,IAAI,CAAC,EAAE;SAC3B,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;QACtD,OAAO;YACL,WAAW,EAAE,UAAU;YACvB,iBAAiB,EAAE,IAAI,CAAC,EAAE;SAC3B,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAmB,EAAE,CAAA;IACnC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAA;IAClD,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC1D,CAAC;IACD,MAAM,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAA;IAE1B,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;AACtD,CAAC,EACD,KAAK,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAM;IACR,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,OAAO,CAAC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvD,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACrD,CAAC;AACH,CAAC,CACF,CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { CustomerGroupUpdatableFields, FilterableCustomerGroupProps } from "@acmekit/framework/types";
|
|
2
|
-
/**
|
|
3
|
-
* The data to update customer groups.
|
|
4
|
-
*/
|
|
5
|
-
export type UpdateCustomerGroupStepInput = {
|
|
6
|
-
/**
|
|
7
|
-
* The filters to select the customer groups to update.
|
|
8
|
-
*/
|
|
9
|
-
selector: FilterableCustomerGroupProps;
|
|
10
|
-
/**
|
|
11
|
-
* The data to update in the customer groups.
|
|
12
|
-
*/
|
|
13
|
-
update: CustomerGroupUpdatableFields;
|
|
14
|
-
};
|
|
15
|
-
export declare const updateCustomerGroupStepId = "update-customer-groups";
|
|
16
|
-
/**
|
|
17
|
-
* This step updates one or more customer groups.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* const data = updateCustomerGroupsStep({
|
|
21
|
-
* selector: {
|
|
22
|
-
* id: "cusgrp_123"
|
|
23
|
-
* },
|
|
24
|
-
* update: {
|
|
25
|
-
* name: "VIP"
|
|
26
|
-
* }
|
|
27
|
-
* })
|
|
28
|
-
*/
|
|
29
|
-
export declare const updateCustomerGroupsStep: import("@acmekit/framework/workflows-sdk").StepFunction<UpdateCustomerGroupStepInput, import("@acmekit/framework/types").CustomerGroupDTO[]>;
|
|
30
|
-
//# sourceMappingURL=update-customer-groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-customer-groups.d.ts","sourceRoot":"","sources":["../../../src/customer-group/steps/update-customer-groups.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAE7B,MAAM,0BAA0B,CAAA;AAQjC;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,QAAQ,EAAE,4BAA4B,CAAA;IACtC;;OAEG;IACH,MAAM,EAAE,4BAA4B,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,yBAAyB,2BAA2B,CAAA;AACjE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,8IAoCpC,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateCustomerGroupsStep = exports.updateCustomerGroupStepId = void 0;
|
|
4
|
-
const utils_1 = require("@acmekit/framework/utils");
|
|
5
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
6
|
-
exports.updateCustomerGroupStepId = "update-customer-groups";
|
|
7
|
-
/**
|
|
8
|
-
* This step updates one or more customer groups.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const data = updateCustomerGroupsStep({
|
|
12
|
-
* selector: {
|
|
13
|
-
* id: "cusgrp_123"
|
|
14
|
-
* },
|
|
15
|
-
* update: {
|
|
16
|
-
* name: "VIP"
|
|
17
|
-
* }
|
|
18
|
-
* })
|
|
19
|
-
*/
|
|
20
|
-
exports.updateCustomerGroupsStep = (0, workflows_sdk_1.createStep)(exports.updateCustomerGroupStepId, async (data, { container }) => {
|
|
21
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
22
|
-
const { selects, relations } = (0, utils_1.getSelectsAndRelationsFromObjectArray)([
|
|
23
|
-
data.update,
|
|
24
|
-
]);
|
|
25
|
-
const prevCustomerGroups = await service.listCustomerGroups(data.selector, {
|
|
26
|
-
select: selects,
|
|
27
|
-
relations,
|
|
28
|
-
});
|
|
29
|
-
const customers = await service.updateCustomerGroups(data.selector, data.update);
|
|
30
|
-
return new workflows_sdk_1.StepResponse(customers, prevCustomerGroups);
|
|
31
|
-
}, async (prevCustomerGroups, { container }) => {
|
|
32
|
-
if (!prevCustomerGroups) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const service = container.resolve(utils_1.Modules.CUSTOMER);
|
|
36
|
-
await (0, utils_1.promiseAll)(prevCustomerGroups.map((c) => service.updateCustomerGroups(c.id, {
|
|
37
|
-
name: c.name,
|
|
38
|
-
metadata: c.metadata,
|
|
39
|
-
})));
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=update-customer-groups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-customer-groups.js","sourceRoot":"","sources":["../../../src/customer-group/steps/update-customer-groups.ts"],"names":[],"mappings":";;;AAKA,oDAIiC;AACjC,oEAA2E;AAgB9D,QAAA,yBAAyB,GAAG,wBAAwB,CAAA;AACjE;;;;;;;;;;;;GAYG;AACU,QAAA,wBAAwB,GAAG,IAAA,0BAAU,EAChD,iCAAyB,EACzB,KAAK,EAAE,IAAkC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1D,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,6CAAqC,EAAC;QACnE,IAAI,CAAC,MAAM;KACZ,CAAC,CAAA;IACF,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE;QACzE,MAAM,EAAE,OAAO;QACf,SAAS;KACV,CAAC,CAAA;IAEF,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAClD,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,MAAM,CACZ,CAAA;IAED,OAAO,IAAI,4BAAY,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAA;AACxD,CAAC,EACD,KAAK,EAAE,kBAAkB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1C,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,OAAM;IACR,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAyB,eAAO,CAAC,QAAQ,CAAC,CAAA;IAE3E,MAAM,IAAA,kBAAU,EACd,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,EAAE;QACjC,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC,CACH,CACF,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { CustomerGroupDTO, CreateCustomerGroupDTO } from "@acmekit/framework/types";
|
|
2
|
-
/**
|
|
3
|
-
* The data to create customer groups.
|
|
4
|
-
*/
|
|
5
|
-
export type CreateCustomerGroupsWorkflowInput = {
|
|
6
|
-
/**
|
|
7
|
-
* The customer groups to create.
|
|
8
|
-
*/
|
|
9
|
-
customersData: CreateCustomerGroupDTO[];
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* The created customer groups.
|
|
13
|
-
*/
|
|
14
|
-
export type CreateCustomerGroupsWorkflowOutput = CustomerGroupDTO[];
|
|
15
|
-
export declare const createCustomerGroupsWorkflowId = "create-customer-groups";
|
|
16
|
-
/**
|
|
17
|
-
* This workflow creates one or more customer groups. It's used by the
|
|
18
|
-
* [Create Customer Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_postcustomergroups).
|
|
19
|
-
*
|
|
20
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
21
|
-
* create customer groups within your custom flows. For example, you can create customer groups to segregate
|
|
22
|
-
* customers by age group or purchase habits.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* const { result } = await createCustomerGroupsWorkflow(container)
|
|
26
|
-
* .run({
|
|
27
|
-
* input: {
|
|
28
|
-
* customersData: [
|
|
29
|
-
* {
|
|
30
|
-
* name: "VIP"
|
|
31
|
-
* }
|
|
32
|
-
* ]
|
|
33
|
-
* }
|
|
34
|
-
* })
|
|
35
|
-
*
|
|
36
|
-
* @summary
|
|
37
|
-
*
|
|
38
|
-
* Create one or more customer groups.
|
|
39
|
-
*/
|
|
40
|
-
export declare const createCustomerGroupsWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<CreateCustomerGroupsWorkflowInput, CreateCustomerGroupsWorkflowOutput, []>;
|
|
41
|
-
//# sourceMappingURL=create-customer-groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer-groups.d.ts","sourceRoot":"","sources":["../../../src/customer-group/workflows/create-customer-groups.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AAQjC;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,aAAa,EAAE,sBAAsB,EAAE,CAAA;CACxC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,gBAAgB,EAAE,CAAA;AAEnE,eAAO,MAAM,8BAA8B,2BAA2B,CAAA;AACtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,4BAA4B,sIAOxC,CAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCustomerGroupsWorkflow = exports.createCustomerGroupsWorkflowId = void 0;
|
|
4
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
5
|
-
const steps_1 = require("../steps");
|
|
6
|
-
exports.createCustomerGroupsWorkflowId = "create-customer-groups";
|
|
7
|
-
/**
|
|
8
|
-
* This workflow creates one or more customer groups. It's used by the
|
|
9
|
-
* [Create Customer Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_postcustomergroups).
|
|
10
|
-
*
|
|
11
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
|
-
* create customer groups within your custom flows. For example, you can create customer groups to segregate
|
|
13
|
-
* customers by age group or purchase habits.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* const { result } = await createCustomerGroupsWorkflow(container)
|
|
17
|
-
* .run({
|
|
18
|
-
* input: {
|
|
19
|
-
* customersData: [
|
|
20
|
-
* {
|
|
21
|
-
* name: "VIP"
|
|
22
|
-
* }
|
|
23
|
-
* ]
|
|
24
|
-
* }
|
|
25
|
-
* })
|
|
26
|
-
*
|
|
27
|
-
* @summary
|
|
28
|
-
*
|
|
29
|
-
* Create one or more customer groups.
|
|
30
|
-
*/
|
|
31
|
-
exports.createCustomerGroupsWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.createCustomerGroupsWorkflowId, (input) => {
|
|
32
|
-
return new workflows_sdk_1.WorkflowResponse((0, steps_1.createCustomerGroupsStep)(input.customersData));
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=create-customer-groups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer-groups.js","sourceRoot":"","sources":["../../../src/customer-group/workflows/create-customer-groups.ts"],"names":[],"mappings":";;;AAIA,oEAIyC;AACzC,oCAAmD;AAiBtC,QAAA,8BAA8B,GAAG,wBAAwB,CAAA;AACtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,4BAA4B,GAAG,IAAA,8BAAc,EACxD,sCAA8B,EAC9B,CACE,KAAsD,EACA,EAAE;IACxD,OAAO,IAAI,gCAAgB,CAAC,IAAA,gCAAwB,EAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAA;AAC5E,CAAC,CACF,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The data to delete customer groups.
|
|
3
|
-
*/
|
|
4
|
-
export type DeleteCustomerGroupsWorkflowInput = {
|
|
5
|
-
/**
|
|
6
|
-
* The IDs of the customer groups to delete.
|
|
7
|
-
*/
|
|
8
|
-
ids: string[];
|
|
9
|
-
};
|
|
10
|
-
export declare const deleteCustomerGroupsWorkflowId = "delete-customer-groups";
|
|
11
|
-
/**
|
|
12
|
-
* This workflow deletes one or more customer groups. It's used by the
|
|
13
|
-
* [Delete Customer Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_deletecustomergroupsid).
|
|
14
|
-
*
|
|
15
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
16
|
-
* delete customer groups within your custom flows.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const { result } = await deleteCustomerGroupsWorkflow(container)
|
|
20
|
-
* .run({
|
|
21
|
-
* input: {
|
|
22
|
-
* ids: ["cusgrp_123"]
|
|
23
|
-
* }
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* @summary
|
|
27
|
-
*
|
|
28
|
-
* Delete one or more customer groups.
|
|
29
|
-
*/
|
|
30
|
-
export declare const deleteCustomerGroupsWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<DeleteCustomerGroupsWorkflowInput, unknown, any[]>;
|
|
31
|
-
//# sourceMappingURL=delete-customer-groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-customer-groups.d.ts","sourceRoot":"","sources":["../../../src/customer-group/workflows/delete-customer-groups.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,GAAG,EAAE,MAAM,EAAE,CAAA;CACd,CAAA;AAED,eAAO,MAAM,8BAA8B,2BAA2B,CAAA;AACtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,4BAA4B,8GAOxC,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteCustomerGroupsWorkflow = exports.deleteCustomerGroupsWorkflowId = void 0;
|
|
4
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
5
|
-
const steps_1 = require("../steps");
|
|
6
|
-
exports.deleteCustomerGroupsWorkflowId = "delete-customer-groups";
|
|
7
|
-
/**
|
|
8
|
-
* This workflow deletes one or more customer groups. It's used by the
|
|
9
|
-
* [Delete Customer Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_deletecustomergroupsid).
|
|
10
|
-
*
|
|
11
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
|
-
* delete customer groups within your custom flows.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const { result } = await deleteCustomerGroupsWorkflow(container)
|
|
16
|
-
* .run({
|
|
17
|
-
* input: {
|
|
18
|
-
* ids: ["cusgrp_123"]
|
|
19
|
-
* }
|
|
20
|
-
* })
|
|
21
|
-
*
|
|
22
|
-
* @summary
|
|
23
|
-
*
|
|
24
|
-
* Delete one or more customer groups.
|
|
25
|
-
*/
|
|
26
|
-
exports.deleteCustomerGroupsWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.deleteCustomerGroupsWorkflowId, (input) => {
|
|
27
|
-
return (0, steps_1.deleteCustomerGroupStep)(input.ids);
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=delete-customer-groups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-customer-groups.js","sourceRoot":"","sources":["../../../src/customer-group/workflows/delete-customer-groups.ts"],"names":[],"mappings":";;;AAAA,oEAA+E;AAC/E,oCAAkD;AAYrC,QAAA,8BAA8B,GAAG,wBAAwB,CAAA;AACtE;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,4BAA4B,GAAG,IAAA,8BAAc,EACxD,sCAA8B,EAC9B,CACE,KAAsD,EAClC,EAAE;IACtB,OAAO,IAAA,+BAAuB,EAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAC3C,CAAC,CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/customer-group/workflows/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./update-customer-groups"), exports);
|
|
18
|
-
__exportStar(require("./delete-customer-groups"), exports);
|
|
19
|
-
__exportStar(require("./create-customer-groups"), exports);
|
|
20
|
-
__exportStar(require("./link-customers-customer-group"), exports);
|
|
21
|
-
__exportStar(require("./link-customer-groups-customer"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/customer-group/workflows/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,2DAAwC;AACxC,2DAAwC;AACxC,kEAA+C;AAC/C,kEAA+C"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { LinkWorkflowInput } from "@acmekit/framework/types";
|
|
2
|
-
/**
|
|
3
|
-
* The data to manage the customer groups of a customer.
|
|
4
|
-
*
|
|
5
|
-
* @property id - The ID of the customer to manage its groups.
|
|
6
|
-
* @property add - The IDs of the customer groups to add the customer to.
|
|
7
|
-
* @property remove - The IDs of the customer groups to remove the customer from.
|
|
8
|
-
*/
|
|
9
|
-
export type LinkCustomerGroupsToCustomerWorkflowInput = LinkWorkflowInput;
|
|
10
|
-
export declare const linkCustomerGroupsToCustomerWorkflowId = "link-customer-groups-to-customer";
|
|
11
|
-
/**
|
|
12
|
-
* This workflow manages the customer groups a customer is in. It's used by the
|
|
13
|
-
* [Manage Groups of Customer Admin API Route](https://docs.acmekit.com/api/admin#customers_postcustomersidcustomergroups).
|
|
14
|
-
*
|
|
15
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
16
|
-
* manage the customer groups of a customer in your custom flow.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const { result } = await linkCustomerGroupsToCustomerWorkflow(container)
|
|
20
|
-
* .run({
|
|
21
|
-
* input: {
|
|
22
|
-
* id: "cus_123",
|
|
23
|
-
* add: ["cusgrp_123"],
|
|
24
|
-
* remove: ["cusgrp_456"]
|
|
25
|
-
* }
|
|
26
|
-
* })
|
|
27
|
-
*
|
|
28
|
-
* @summary
|
|
29
|
-
*
|
|
30
|
-
* Manage groups of a customer.
|
|
31
|
-
*/
|
|
32
|
-
export declare const linkCustomerGroupsToCustomerWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<LinkWorkflowInput, unknown, any[]>;
|
|
33
|
-
//# sourceMappingURL=link-customer-groups-customer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customer-groups-customer.d.ts","sourceRoot":"","sources":["../../../src/customer-group/workflows/link-customer-groups-customer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAIjE;;;;;;GAMG;AACH,MAAM,MAAM,yCAAyC,GAAG,iBAAiB,CAAA;AAEzE,eAAO,MAAM,sCAAsC,qCACf,CAAA;AACpC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oCAAoC,8FAOhD,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.linkCustomerGroupsToCustomerWorkflow = exports.linkCustomerGroupsToCustomerWorkflowId = void 0;
|
|
4
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
5
|
-
const steps_1 = require("../steps");
|
|
6
|
-
exports.linkCustomerGroupsToCustomerWorkflowId = "link-customer-groups-to-customer";
|
|
7
|
-
/**
|
|
8
|
-
* This workflow manages the customer groups a customer is in. It's used by the
|
|
9
|
-
* [Manage Groups of Customer Admin API Route](https://docs.acmekit.com/api/admin#customers_postcustomersidcustomergroups).
|
|
10
|
-
*
|
|
11
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
|
-
* manage the customer groups of a customer in your custom flow.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const { result } = await linkCustomerGroupsToCustomerWorkflow(container)
|
|
16
|
-
* .run({
|
|
17
|
-
* input: {
|
|
18
|
-
* id: "cus_123",
|
|
19
|
-
* add: ["cusgrp_123"],
|
|
20
|
-
* remove: ["cusgrp_456"]
|
|
21
|
-
* }
|
|
22
|
-
* })
|
|
23
|
-
*
|
|
24
|
-
* @summary
|
|
25
|
-
*
|
|
26
|
-
* Manage groups of a customer.
|
|
27
|
-
*/
|
|
28
|
-
exports.linkCustomerGroupsToCustomerWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.linkCustomerGroupsToCustomerWorkflowId, (input) => {
|
|
29
|
-
return (0, steps_1.linkCustomerGroupsToCustomerStep)(input);
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=link-customer-groups-customer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customer-groups-customer.js","sourceRoot":"","sources":["../../../src/customer-group/workflows/link-customer-groups-customer.ts"],"names":[],"mappings":";;;AACA,oEAA+E;AAC/E,oCAA2D;AAW9C,QAAA,sCAAsC,GACjD,kCAAkC,CAAA;AACpC;;;;;;;;;;;;;;;;;;;;GAoBG;AACU,QAAA,oCAAoC,GAAG,IAAA,8BAAc,EAChE,8CAAsC,EACtC,CACE,KAA8D,EAC1C,EAAE;IACtB,OAAO,IAAA,wCAAgC,EAAC,KAAK,CAAC,CAAA;AAChD,CAAC,CACF,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { LinkWorkflowInput } from "@acmekit/framework/types";
|
|
2
|
-
/**
|
|
3
|
-
* The data to manage the customers of a group.
|
|
4
|
-
*
|
|
5
|
-
* @property id - The ID of the customer group to manage its customers.
|
|
6
|
-
* @property add - The IDs of the customers to add to the customer group.
|
|
7
|
-
* @property remove - The IDs of the customers to remove from the customer group.
|
|
8
|
-
*/
|
|
9
|
-
export type LinkCustomersToCustomerGroupWorkflow = LinkWorkflowInput;
|
|
10
|
-
export declare const linkCustomersToCustomerGroupWorkflowId = "link-customers-to-customer-group";
|
|
11
|
-
/**
|
|
12
|
-
* This workflow manages the customers of a customer group. It's used by the
|
|
13
|
-
* [Manage Customers of Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_postcustomergroupsidcustomers).
|
|
14
|
-
*
|
|
15
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
16
|
-
* manage the customers of a customer group within your custom flows.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const { result } = await linkCustomersToCustomerGroupWorkflow(container)
|
|
20
|
-
* .run({
|
|
21
|
-
* input: {
|
|
22
|
-
* id: "cusgrp_123",
|
|
23
|
-
* add: ["cus_123"],
|
|
24
|
-
* remove: ["cus_456"]
|
|
25
|
-
* }
|
|
26
|
-
* })
|
|
27
|
-
*
|
|
28
|
-
* @summary
|
|
29
|
-
*
|
|
30
|
-
* Manage the customers of a customer group.
|
|
31
|
-
*/
|
|
32
|
-
export declare const linkCustomersToCustomerGroupWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<LinkWorkflowInput, unknown, any[]>;
|
|
33
|
-
//# sourceMappingURL=link-customers-customer-group.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-customers-customer-group.d.ts","sourceRoot":"","sources":["../../../src/customer-group/workflows/link-customers-customer-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAIjE;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAA;AAEpE,eAAO,MAAM,sCAAsC,qCACf,CAAA;AACpC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oCAAoC,8FAOhD,CAAA"}
|