@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,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteStoresWorkflow = exports.deleteStoresWorkflowId = void 0;
|
|
4
|
-
const utils_1 = require("@acmekit/framework/utils");
|
|
5
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
6
|
-
const remove_remote_links_1 = require("../../common/steps/remove-remote-links");
|
|
7
|
-
const steps_1 = require("../steps");
|
|
8
|
-
exports.deleteStoresWorkflowId = "delete-stores";
|
|
9
|
-
/**
|
|
10
|
-
* This workflow deletes one or more stores.
|
|
11
|
-
*
|
|
12
|
-
* :::note
|
|
13
|
-
*
|
|
14
|
-
* By default, AcmeKit uses a single store. This is useful
|
|
15
|
-
* if you're building a multi-tenant application or a marketplace where each tenant has its own store.
|
|
16
|
-
* If you delete the only store in your application, the AcmeKit application will re-create it on application start-up.
|
|
17
|
-
*
|
|
18
|
-
* :::
|
|
19
|
-
*
|
|
20
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
21
|
-
* delete stores within your custom flows.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* const { result } = await deleteStoresWorkflow(container)
|
|
25
|
-
* .run({
|
|
26
|
-
* input: {
|
|
27
|
-
* ids: ["store_123"]
|
|
28
|
-
* }
|
|
29
|
-
* })
|
|
30
|
-
*
|
|
31
|
-
* @summary
|
|
32
|
-
*
|
|
33
|
-
* Delete one or more stores.
|
|
34
|
-
*/
|
|
35
|
-
exports.deleteStoresWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.deleteStoresWorkflowId, (input) => {
|
|
36
|
-
const deletedStores = (0, steps_1.deleteStoresStep)(input.ids);
|
|
37
|
-
(0, remove_remote_links_1.removeRemoteLinkStep)({
|
|
38
|
-
[utils_1.Modules.STORE]: {
|
|
39
|
-
store_id: input.ids,
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
return deletedStores;
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=delete-stores.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-stores.js","sourceRoot":"","sources":["../../../src/store/workflows/delete-stores.ts"],"names":[],"mappings":";;;AAAA,oDAAkD;AAClD,oEAA+E;AAC/E,gFAA6E;AAC7E,oCAA2C;AAY9B,QAAA,sBAAsB,GAAG,eAAe,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,oBAAoB,GAAG,IAAA,8BAAc,EAChD,8BAAsB,EACtB,CAAC,KAA8C,EAAsB,EAAE;IACrE,MAAM,aAAa,GAAG,IAAA,wBAAgB,EAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAEjD,IAAA,0CAAoB,EAAC;QACnB,CAAC,eAAO,CAAC,KAAK,CAAC,EAAE;YACf,QAAQ,EAAE,KAAK,CAAC,GAAG;SACpB;KACF,CAAC,CAAA;IAEF,OAAO,aAAa,CAAA;AACtB,CAAC,CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/workflows/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,20 +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("./create-stores"), exports);
|
|
18
|
-
__exportStar(require("./delete-stores"), exports);
|
|
19
|
-
__exportStar(require("./update-stores"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/workflows/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,kDAA+B;AAC/B,kDAA+B"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { StoreDTO, StoreWorkflow } from "@acmekit/framework/types";
|
|
2
|
-
/**
|
|
3
|
-
* The updated stores.
|
|
4
|
-
*/
|
|
5
|
-
export type UpdateStoresWorkflowOutput = StoreDTO[];
|
|
6
|
-
export declare const updateStoresWorkflowId = "update-stores";
|
|
7
|
-
/**
|
|
8
|
-
* This workflow updates stores matching the specified filters. It's used by the
|
|
9
|
-
* [Update Store Admin API Route](https://docs.acmekit.com/api/admin#stores_poststoresid).
|
|
10
|
-
*
|
|
11
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
|
-
* update stores within your custom flows.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const { result } = await updateStoresWorkflow(container)
|
|
16
|
-
* .run({
|
|
17
|
-
* input: {
|
|
18
|
-
* selector: {
|
|
19
|
-
* id: "store_123"
|
|
20
|
-
* },
|
|
21
|
-
* update: {
|
|
22
|
-
* name: "Acme"
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
25
|
-
* })
|
|
26
|
-
*
|
|
27
|
-
* @summary
|
|
28
|
-
*
|
|
29
|
-
* Update stores.
|
|
30
|
-
*/
|
|
31
|
-
export declare const updateStoresWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<StoreWorkflow.UpdateStoreWorkflowInput, UpdateStoresWorkflowOutput, []>;
|
|
32
|
-
//# sourceMappingURL=update-stores.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-stores.d.ts","sourceRoot":"","sources":["../../../src/store/workflows/update-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AASvE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,EAAE,CAAA;AAEnD,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,oBAAoB,mIA6BhC,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateStoresWorkflow = exports.updateStoresWorkflowId = void 0;
|
|
4
|
-
const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
|
|
5
|
-
const steps_1 = require("../steps");
|
|
6
|
-
exports.updateStoresWorkflowId = "update-stores";
|
|
7
|
-
/**
|
|
8
|
-
* This workflow updates stores matching the specified filters. It's used by the
|
|
9
|
-
* [Update Store Admin API Route](https://docs.acmekit.com/api/admin#stores_poststoresid).
|
|
10
|
-
*
|
|
11
|
-
* You can use this workflow within your customizations or your own custom workflows, allowing you to
|
|
12
|
-
* update stores within your custom flows.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const { result } = await updateStoresWorkflow(container)
|
|
16
|
-
* .run({
|
|
17
|
-
* input: {
|
|
18
|
-
* selector: {
|
|
19
|
-
* id: "store_123"
|
|
20
|
-
* },
|
|
21
|
-
* update: {
|
|
22
|
-
* name: "Acme"
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
25
|
-
* })
|
|
26
|
-
*
|
|
27
|
-
* @summary
|
|
28
|
-
*
|
|
29
|
-
* Update stores.
|
|
30
|
-
*/
|
|
31
|
-
exports.updateStoresWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.updateStoresWorkflowId, (input) => {
|
|
32
|
-
const normalizedInput = (0, workflows_sdk_1.transform)({ input }, (data) => {
|
|
33
|
-
if (!data.input.update.supported_currencies?.length) {
|
|
34
|
-
return data.input;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
selector: data.input.selector,
|
|
38
|
-
update: {
|
|
39
|
-
...data.input.update,
|
|
40
|
-
supported_currencies: data.input.update.supported_currencies.map((currency) => {
|
|
41
|
-
return {
|
|
42
|
-
currency_code: currency.currency_code,
|
|
43
|
-
is_default: currency.is_default,
|
|
44
|
-
};
|
|
45
|
-
}),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
const stores = (0, steps_1.updateStoresStep)(normalizedInput);
|
|
50
|
-
return new workflows_sdk_1.WorkflowResponse(stores);
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=update-stores.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-stores.js","sourceRoot":"","sources":["../../../src/store/workflows/update-stores.ts"],"names":[],"mappings":";;;AACA,oEAKyC;AACzC,oCAA2C;AAO9B,QAAA,sBAAsB,GAAG,eAAe,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,oBAAoB,GAAG,IAAA,8BAAc,EAChD,8BAAsB,EACtB,CACE,KAA2D,EACb,EAAE;IAChD,MAAM,eAAe,GAAG,IAAA,yBAAS,EAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;QACpD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,KAAK,CAAA;QACnB,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;YAC7B,MAAM,EAAE;gBACN,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;gBACpB,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB,CAAC,GAAG,CAC9D,CAAC,QAAQ,EAAE,EAAE;oBACX,OAAO;wBACL,aAAa,EAAE,QAAQ,CAAC,aAAa;wBACrC,UAAU,EAAE,QAAQ,CAAC,UAAU;qBAChC,CAAA;gBACH,CAAC,CACF;aACF;SACF,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,IAAA,wBAAgB,EAAC,eAAe,CAAC,CAAA;IAChD,OAAO,IAAI,gCAAgB,CAAC,MAAM,CAAC,CAAA;AACrC,CAAC,CACF,CAAA"}
|