@salesforce/b2c-cli 1.21.4 → 1.22.1
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/commands/auth/client/index.d.ts +3 -4
- package/dist/commands/auth/client/index.js +12 -17
- package/dist/commands/auth/client/index.js.map +1 -1
- package/dist/commands/auth/client/token.d.ts +6 -3
- package/dist/commands/auth/client/token.js +39 -25
- package/dist/commands/auth/client/token.js.map +1 -1
- package/dist/commands/auth/login.d.ts +5 -3
- package/dist/commands/auth/login.js +41 -26
- package/dist/commands/auth/login.js.map +1 -1
- package/dist/commands/auth/logout.d.ts +3 -3
- package/dist/commands/auth/logout.js +5 -5
- package/dist/commands/auth/logout.js.map +1 -1
- package/dist/commands/cap/install.d.ts +5 -1
- package/dist/commands/cap/install.js +31 -7
- package/dist/commands/cap/install.js.map +1 -1
- package/dist/commands/content/export.js +14 -6
- package/dist/commands/content/export.js.map +1 -1
- package/dist/commands/content/list.js +42 -26
- package/dist/commands/content/list.js.map +1 -1
- package/dist/commands/job/import-set.d.ts +66 -0
- package/dist/commands/job/import-set.js +276 -0
- package/dist/commands/job/import-set.js.map +1 -0
- package/dist/commands/mrt/bundle/deploy.js +28 -3
- package/dist/commands/mrt/bundle/deploy.js.map +1 -1
- package/dist/commands/mrt/project/get.js +1 -1
- package/dist/commands/mrt/project/get.js.map +1 -1
- package/dist/commands/mrt/project/list.js +1 -1
- package/dist/commands/mrt/project/list.js.map +1 -1
- package/dist/commands/sandbox/clone/create.d.ts +9 -0
- package/dist/commands/sandbox/clone/create.js +130 -52
- package/dist/commands/sandbox/clone/create.js.map +1 -1
- package/dist/commands/sandbox/clone/get.js +2 -0
- package/dist/commands/sandbox/clone/get.js.map +1 -1
- package/dist/commands/sandbox/clone/list.d.ts +1 -0
- package/dist/commands/sandbox/clone/list.js +20 -2
- package/dist/commands/sandbox/clone/list.js.map +1 -1
- package/dist/commands/sandbox/create.js +10 -39
- package/dist/commands/sandbox/create.js.map +1 -1
- package/dist/commands/setup/inspect.d.ts +4 -0
- package/dist/commands/setup/inspect.js +51 -41
- package/dist/commands/setup/inspect.js.map +1 -1
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/package.json +1 -1
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/catalog/CatalogMgr.d.ts +6 -2
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/catalog/ProductSearchModel.d.ts +35 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/commerceapps/ConnectionHealthStatusCodes.d.ts +27 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/commerceapps/hooks/ConnectionHealthCheckHooks.d.ts +80 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/commerceapps/hooks/index.d.ts +5 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/commerceapps/index.d.ts +5 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/customer/ProductListMgr.d.ts +3 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/customer/consent/ShopperConsentErrorCodes.d.ts +20 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/customer/consent/ShopperConsentException.d.ts +18 -10
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/customer/consent/ShopperConsentMgr.d.ts +1 -1
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/order/LineItemTax.d.ts +2 -1
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/order/ShippingMgr.d.ts +33 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/order/hooks/ShippingHooks.d.ts +159 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/order/hooks/index.d.ts +2 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/sitemap/SitemapMgr.d.ts +9 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/suggest/SuggestModel.d.ts +35 -0
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/global.d.ts +16 -1
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/upstream-package.json +1 -1
- package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/upstream-tsconfig.json +5 -3
- package/dist/utils/bm/user-auth-command.d.ts +5 -4
- package/dist/utils/bm/user-auth-command.js +6 -5
- package/dist/utils/bm/user-auth-command.js.map +1 -1
- package/dist/utils/slas/client.d.ts +1 -1
- package/dist/utils/slas/client.js +5 -3
- package/dist/utils/slas/client.js.map +1 -1
- package/oclif.manifest.json +9999 -9448
- package/package.json +2 -2
- package/dist/commands/auth/client/renew.d.ts +0 -20
- package/dist/commands/auth/client/renew.js +0 -88
- package/dist/commands/auth/client/renew.js.map +0 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import Status = require('../../system/Status');
|
|
2
|
+
import Shipment = require('../Shipment');
|
|
3
|
+
import LineItemCtnr = require('../LineItemCtnr');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This interface represents shipping extension points for Commerce App shipping providers.
|
|
7
|
+
*
|
|
8
|
+
* These hooks provide integration points for external shipping rate / delivery-estimate services installed via the
|
|
9
|
+
* Commerce App framework.
|
|
10
|
+
*
|
|
11
|
+
* IMPORTANT: These hooks should only be implemented and registered by Commerce Apps
|
|
12
|
+
* (applications installed via the Commerce App framework with a CAP file). They are not intended for custom merchant
|
|
13
|
+
* cartridges or storefront implementations. Merchants who want custom shipping calculation logic should use the legacy
|
|
14
|
+
* `dw.order.calculateShipping` extension point instead.
|
|
15
|
+
*
|
|
16
|
+
* Hook Registration A function must be defined inside a JavaScript source and must be exported. The script
|
|
17
|
+
* with the exported hook function must be located inside a site cartridge. Inside the site cartridge a
|
|
18
|
+
* `package.json` file with a 'hooks' entry must exist:
|
|
19
|
+
*
|
|
20
|
+
* ```
|
|
21
|
+
* "hooks": "./hooks.json"
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The hooks entry links to a JSON file, relative to the `package.json` file. This file lists all registered
|
|
25
|
+
* hooks inside the hooks property:
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
* "hooks": [
|
|
29
|
+
* {"name": "sfcc.app.shipping.quote", "script": "./quote.js"},
|
|
30
|
+
* {"name": "sfcc.app.shipping.calculate", "script": "./calculate.js"}
|
|
31
|
+
* ]
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* A hook entry has a `name` and a `script` property:
|
|
35
|
+
*
|
|
36
|
+
* - The `name` contains the extension point name (the hook name).
|
|
37
|
+
* - The `script` contains the script path relative to the hooks file, with the exported hook
|
|
38
|
+
* function.
|
|
39
|
+
*
|
|
40
|
+
* Function Naming Convention: The exported JavaScript function name must match the last segment of the
|
|
41
|
+
* extension point name, for example, `quote` or `calculate`.
|
|
42
|
+
*
|
|
43
|
+
* Hook Lifecycle Each hook fires at a specific surface and lifecycle stage:
|
|
44
|
+
*
|
|
45
|
+
* - quote (checkout): Fires on every invocation of
|
|
46
|
+
* `GET /baskets/{basket_id}/shipments/{shipment_id}/shipping_methods`. Lets the Commerce App override native
|
|
47
|
+
* shipping prices and add delivery information for the methods it can quote.
|
|
48
|
+
* - calculate (basket calculation): Fires during basket calculation on every basket operation that
|
|
49
|
+
* recomputes shipping. Applies provider-supplied shipping rates to the selected `ShippingLineItem` and may
|
|
50
|
+
* persist provider metadata on the shipment.
|
|
51
|
+
*
|
|
52
|
+
* Hook Precedence
|
|
53
|
+
*
|
|
54
|
+
* - When `sfcc.app.shipping.calculate` is registered and the `ShippingAppHooksEnabled` toggle
|
|
55
|
+
* is on, it takes precedence over the legacy `dw.order.calculateShipping` hook.
|
|
56
|
+
* - If the Commerce App hook is not registered (or the toggle is off), the platform falls back to
|
|
57
|
+
* `dw.order.calculateShipping` (if registered).
|
|
58
|
+
* - If neither hook is available, the platform uses the native default
|
|
59
|
+
* (`ShippingMgr.applyShippingCost`).
|
|
60
|
+
*/
|
|
61
|
+
declare interface ShippingHooks {
|
|
62
|
+
/**
|
|
63
|
+
* The shipping app domain segment used to compose extension-point names under the shared
|
|
64
|
+
* `sfcc.app` prefix.
|
|
65
|
+
*/
|
|
66
|
+
readonly SHIPPING_DOMAIN: "shipping";
|
|
67
|
+
/**
|
|
68
|
+
* The extension point name extensionPointCalculate.
|
|
69
|
+
*/
|
|
70
|
+
readonly extensionPointCalculate: "sfcc.app.shipping.calculate";
|
|
71
|
+
/**
|
|
72
|
+
* The extension point name extensionPointQuote.
|
|
73
|
+
*/
|
|
74
|
+
readonly extensionPointQuote: "sfcc.app.shipping.quote";
|
|
75
|
+
/**
|
|
76
|
+
* The function is called by extension point extensionPointCalculate during basket calculation. It
|
|
77
|
+
* applies provider-supplied shipping rates to the selected `ShippingLineItem` and may persist
|
|
78
|
+
* provider metadata (for example, a rate id, carrier code, or delivery window) on the shipment via supported
|
|
79
|
+
* `custom.*` attributes. This hook fires on every basket operation that recomputes shipping, not only
|
|
80
|
+
* before order creation.
|
|
81
|
+
*
|
|
82
|
+
* The hook owns: native fallback (calling `ShippingMgr.applyShippingCost(lineItemCtnr)` if it wants to
|
|
83
|
+
* preserve product-level shipping, surcharges, cleanup, and tax-class setup), provider lookup / rate-cache reuse,
|
|
84
|
+
* selected-rate application onto the standard shipment shipping line item, and provider metadata persistence
|
|
85
|
+
* (custom attributes on the shipment, custom objects, etc.).
|
|
86
|
+
*
|
|
87
|
+
* Note: If the master `dw.order.calculate` hook (not the per-step
|
|
88
|
+
* `dw.order.calculateShipping`) is overridden, the entire basket calculation is replaced and the
|
|
89
|
+
* platform's automatic shipping hook selection is bypassed. You must manually invoke this hook from within your
|
|
90
|
+
* custom `dw.order.calculate` implementation if you want to use Commerce App shipping providers.
|
|
91
|
+
*
|
|
92
|
+
* Error Handling: Both returning a `Status.ERROR` and throwing an exception will
|
|
93
|
+
* prevent the basket calculation from completing successfully. The platform logs the error and halts the current
|
|
94
|
+
* basket operation. Since order creation requires a successful basket calculation, this also prevents orders from
|
|
95
|
+
* being created with incorrect shipping amounts.
|
|
96
|
+
*
|
|
97
|
+
* Sample Implementation:
|
|
98
|
+
* @example
|
|
99
|
+
* function calculate(lineItemCtnr) {
|
|
100
|
+
* var ShippingMgr = require('dw/order/ShippingMgr');
|
|
101
|
+
* var Status = require('dw/system/Status');
|
|
102
|
+
* var Transaction = require('dw/system/Transaction');
|
|
103
|
+
*
|
|
104
|
+
* // 1. Run native shipping defaults (product-level surcharges, tax classes)
|
|
105
|
+
* ShippingMgr.applyShippingCost(lineItemCtnr);
|
|
106
|
+
*
|
|
107
|
+
* // 2. Look up the provider rate that was selected on the shipment
|
|
108
|
+
* var shipment = lineItemCtnr.getDefaultShipment();
|
|
109
|
+
* var rateId = shipment.custom.providerRateId;
|
|
110
|
+
* if (!rateId) {
|
|
111
|
+
* return new Status(Status.OK);
|
|
112
|
+
* }
|
|
113
|
+
*
|
|
114
|
+
* // 3. Apply the provider rate to the shipping line item
|
|
115
|
+
* Transaction.wrap(function () {
|
|
116
|
+
* var sli = shipment.getStandardShippingLineItem();
|
|
117
|
+
* sli.setPriceValue(lookupRate(rateId).price);
|
|
118
|
+
* });
|
|
119
|
+
*
|
|
120
|
+
* return new Status(Status.OK);
|
|
121
|
+
* }
|
|
122
|
+
*
|
|
123
|
+
* exports.calculate = calculate;
|
|
124
|
+
*/
|
|
125
|
+
calculate(lineItemCtnr: LineItemCtnr<any>): Status | null;
|
|
126
|
+
/**
|
|
127
|
+
* The function is called by extension point extensionPointQuote on every invocation of
|
|
128
|
+
* `GET /baskets/{basket_id}/shipments/{shipment_id}/shipping_methods`. ECOM pre-populates a
|
|
129
|
+
* `ShippingMethodResultWO` with the applicable shipping methods, each carrying its native price. The
|
|
130
|
+
* hook implementation may override prices and delivery information on any methods it can quote. Methods the hook
|
|
131
|
+
* does not touch keep their native price.
|
|
132
|
+
*
|
|
133
|
+
* Error Handling: To signal a failure, return `new Status(Status.ERROR)`. The platform
|
|
134
|
+
* logs that an error status was returned for this hook and the `GET shipping-methods` request fails.
|
|
135
|
+
* Uncaught exceptions thrown from the hook are also treated as failures.
|
|
136
|
+
*
|
|
137
|
+
* SCAPI Behavior: When `ScapiHookExecutionEnabled` is disabled, SCAPI requests bypass
|
|
138
|
+
* this hook and use native shipping pricing.
|
|
139
|
+
*
|
|
140
|
+
* Sample Implementation:
|
|
141
|
+
* @example
|
|
142
|
+
* function quote(shipment, result) {
|
|
143
|
+
* var Status = require('dw/system/Status');
|
|
144
|
+
*
|
|
145
|
+
* var methods = result.applicableShippingMethods;
|
|
146
|
+
* for (var i = 0; i < methods.length; i++) {
|
|
147
|
+
* var method = methods[i];
|
|
148
|
+
* // ... call provider for this method, set price ...
|
|
149
|
+
* method.setPrice(providerPrice);
|
|
150
|
+
* }
|
|
151
|
+
* return new Status(Status.OK);
|
|
152
|
+
* }
|
|
153
|
+
*
|
|
154
|
+
* exports.quote = quote;
|
|
155
|
+
*/
|
|
156
|
+
quote(shipment: Shipment, result: any): Status | null;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export = ShippingHooks;
|
package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/order/hooks/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import CheckoutHooks = require('./CheckoutHooks');
|
|
|
4
4
|
import OrderHooks = require('./OrderHooks');
|
|
5
5
|
import PaymentHooks = require('./PaymentHooks');
|
|
6
6
|
import ReturnHooks = require('./ReturnHooks');
|
|
7
|
+
import ShippingHooks = require('./ShippingHooks');
|
|
7
8
|
import ShippingOrderHooks = require('./ShippingOrderHooks');
|
|
8
9
|
import TaxHooks = require('./TaxHooks');
|
|
9
10
|
|
|
@@ -14,6 +15,7 @@ export {
|
|
|
14
15
|
OrderHooks,
|
|
15
16
|
PaymentHooks,
|
|
16
17
|
ReturnHooks,
|
|
18
|
+
ShippingHooks,
|
|
17
19
|
ShippingOrderHooks,
|
|
18
20
|
TaxHooks
|
|
19
21
|
};
|
package/dist/script-types/node_modules/@salesforce/b2c-script-types/types/dw/sitemap/SitemapMgr.d.ts
CHANGED
|
@@ -65,6 +65,15 @@ declare class SitemapMgr {
|
|
|
65
65
|
* - Hostname 2 => [SitemapFile hostname2_sitemapfile1]
|
|
66
66
|
*/
|
|
67
67
|
static getCustomSitemapFiles(): utilMap<any, any>;
|
|
68
|
+
/**
|
|
69
|
+
* Reads the content of the specified sitemap file and returns it as a String.
|
|
70
|
+
*
|
|
71
|
+
* The file is looked up in the shared sitemap directory for the current site,
|
|
72
|
+
* using the hostname from the current storefront request. If the file is not found
|
|
73
|
+
* in the new framework location (../sitemaps/<hostname>/), the old
|
|
74
|
+
* location (../sitemaps/) is used as a fallback.
|
|
75
|
+
*/
|
|
76
|
+
static getSitemap(fileName: string): string | null;
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
export = SitemapMgr;
|
|
@@ -73,6 +73,12 @@ declare class SuggestModel {
|
|
|
73
73
|
* @see setSearchPhrase
|
|
74
74
|
*/
|
|
75
75
|
readonly customSuggestions: CustomSuggestions;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the effective search mode that was used for the last suggestion execution. This reflects the actual
|
|
78
|
+
* matching approach that ran, which may differ from the requested mode if a fallback occurred. Returns null
|
|
79
|
+
* if no suggestions have been executed yet.
|
|
80
|
+
*/
|
|
81
|
+
readonly effectiveSearchMode: string | null;
|
|
76
82
|
/**
|
|
77
83
|
* The method returns true, if the search suggestions are filtered by the folder. If this returns true it is not
|
|
78
84
|
* possible for search suggestions to contain Page Designer content as it belongs to no folder.
|
|
@@ -101,6 +107,14 @@ declare class SuggestModel {
|
|
|
101
107
|
* The user is being identified by the CQuotient tracking cookie.
|
|
102
108
|
*/
|
|
103
109
|
readonly recentSearchPhrases: utilIterator<any>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the search mode that was requested for the next suggestion execution via setSearchMode,
|
|
112
|
+
* or null if no mode was explicitly requested. This reflects the caller's requested preference, not the
|
|
113
|
+
* mode that actually ran — the requested mode is non-authoritative and "semantic" may still be demoted to
|
|
114
|
+
* "lexical" by the search router. Use getEffectiveSearchMode to obtain the mode that was
|
|
115
|
+
* actually used.
|
|
116
|
+
*/
|
|
117
|
+
searchMode: string | null;
|
|
104
118
|
/**
|
|
105
119
|
* Constructs a new SuggestModel.
|
|
106
120
|
*/
|
|
@@ -145,6 +159,12 @@ declare class SuggestModel {
|
|
|
145
159
|
* @see setSearchPhrase
|
|
146
160
|
*/
|
|
147
161
|
getCustomSuggestions(): CustomSuggestions;
|
|
162
|
+
/**
|
|
163
|
+
* Returns the effective search mode that was used for the last suggestion execution. This reflects the actual
|
|
164
|
+
* matching approach that ran, which may differ from the requested mode if a fallback occurred. Returns null
|
|
165
|
+
* if no suggestions have been executed yet.
|
|
166
|
+
*/
|
|
167
|
+
getEffectiveSearchMode(): string | null;
|
|
148
168
|
/**
|
|
149
169
|
* Use this method to obtain a list of search phrases
|
|
150
170
|
* that currently are very popular among all users across the Site.
|
|
@@ -168,6 +188,14 @@ declare class SuggestModel {
|
|
|
168
188
|
* The user is being identified by the CQuotient tracking cookie.
|
|
169
189
|
*/
|
|
170
190
|
getRecentSearchPhrases(): utilIterator<any>;
|
|
191
|
+
/**
|
|
192
|
+
* Returns the search mode that was requested for the next suggestion execution via setSearchMode,
|
|
193
|
+
* or null if no mode was explicitly requested. This reflects the caller's requested preference, not the
|
|
194
|
+
* mode that actually ran — the requested mode is non-authoritative and "semantic" may still be demoted to
|
|
195
|
+
* "lexical" by the search router. Use getEffectiveSearchMode to obtain the mode that was
|
|
196
|
+
* actually used.
|
|
197
|
+
*/
|
|
198
|
+
getSearchMode(): string | null;
|
|
171
199
|
/**
|
|
172
200
|
* The method returns true, if the search suggestions are filtered by the folder. If this returns true it is not
|
|
173
201
|
* possible for search suggestions to contain Page Designer content as it belongs to no folder.
|
|
@@ -211,6 +239,13 @@ declare class SuggestModel {
|
|
|
211
239
|
* Existing refinement values for the attribute will be removed.
|
|
212
240
|
*/
|
|
213
241
|
setRefinementValues(attributeID: string, values: string | null): void;
|
|
242
|
+
/**
|
|
243
|
+
* Sets the search mode for the next suggestion execution. The mode influences the routing decision made by the
|
|
244
|
+
* search router, but is non-authoritative — "semantic" still runs the full routing cascade and may be
|
|
245
|
+
* demoted to "lexical" based on availability and query characteristics.
|
|
246
|
+
* @throws IllegalArgumentException if the mode is not one of the allowed values
|
|
247
|
+
*/
|
|
248
|
+
setSearchMode(mode: string): void;
|
|
214
249
|
/**
|
|
215
250
|
* Sets the user input search phrase. This search phrase is being processed
|
|
216
251
|
* by applying auto completion, spell correction and enhancement with alternative
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for B2C Commerce Script API 26.
|
|
1
|
+
// Type definitions for B2C Commerce Script API 26.9
|
|
2
2
|
|
|
3
3
|
// TopLevel
|
|
4
4
|
import topLevelAPIException = require('./TopLevel/APIException');
|
|
@@ -106,6 +106,12 @@ import catalogStoreMgr = require('./dw/catalog/StoreMgr');
|
|
|
106
106
|
import catalogVariant = require('./dw/catalog/Variant');
|
|
107
107
|
import catalogVariationGroup = require('./dw/catalog/VariationGroup');
|
|
108
108
|
|
|
109
|
+
// dw.commerceapps
|
|
110
|
+
import commerceappsConnectionHealthStatusCodes = require('./dw/commerceapps/ConnectionHealthStatusCodes');
|
|
111
|
+
|
|
112
|
+
// dw.commerceapps.hooks
|
|
113
|
+
import commerceappshooksConnectionHealthCheckHooks = require('./dw/commerceapps/hooks/ConnectionHealthCheckHooks');
|
|
114
|
+
|
|
109
115
|
// dw.content
|
|
110
116
|
import contentContent = require('./dw/content/Content');
|
|
111
117
|
import contentContentMgr = require('./dw/content/ContentMgr');
|
|
@@ -372,6 +378,7 @@ import orderhooksCheckoutHooks = require('./dw/order/hooks/CheckoutHooks');
|
|
|
372
378
|
import orderhooksOrderHooks = require('./dw/order/hooks/OrderHooks');
|
|
373
379
|
import orderhooksPaymentHooks = require('./dw/order/hooks/PaymentHooks');
|
|
374
380
|
import orderhooksReturnHooks = require('./dw/order/hooks/ReturnHooks');
|
|
381
|
+
import orderhooksShippingHooks = require('./dw/order/hooks/ShippingHooks');
|
|
375
382
|
import orderhooksShippingOrderHooks = require('./dw/order/hooks/ShippingOrderHooks');
|
|
376
383
|
import orderhooksTaxHooks = require('./dw/order/hooks/TaxHooks');
|
|
377
384
|
|
|
@@ -539,6 +546,7 @@ declare global {
|
|
|
539
546
|
const request: systemRequest;
|
|
540
547
|
const response: systemResponse;
|
|
541
548
|
const customer: customerCustomer;
|
|
549
|
+
function parseInt(s: string): number;
|
|
542
550
|
function parseInt(s: string, radix: number): number;
|
|
543
551
|
function parseFloat(s: string): number;
|
|
544
552
|
function decodeURI(uri: string): string;
|
|
@@ -669,6 +677,12 @@ declare global {
|
|
|
669
677
|
export { catalogVariant as Variant };
|
|
670
678
|
export { catalogVariationGroup as VariationGroup };
|
|
671
679
|
}
|
|
680
|
+
module commerceapps {
|
|
681
|
+
export { commerceappsConnectionHealthStatusCodes as ConnectionHealthStatusCodes };
|
|
682
|
+
module hooks {
|
|
683
|
+
export { commerceappshooksConnectionHealthCheckHooks as ConnectionHealthCheckHooks };
|
|
684
|
+
}
|
|
685
|
+
}
|
|
672
686
|
module content {
|
|
673
687
|
export { contentContent as Content };
|
|
674
688
|
export { contentContentMgr as ContentMgr };
|
|
@@ -936,6 +950,7 @@ declare global {
|
|
|
936
950
|
export { orderhooksOrderHooks as OrderHooks };
|
|
937
951
|
export { orderhooksPaymentHooks as PaymentHooks };
|
|
938
952
|
export { orderhooksReturnHooks as ReturnHooks };
|
|
953
|
+
export { orderhooksShippingHooks as ShippingHooks };
|
|
939
954
|
export { orderhooksShippingOrderHooks as ShippingOrderHooks };
|
|
940
955
|
export { orderhooksTaxHooks as TaxHooks };
|
|
941
956
|
}
|
|
@@ -9,11 +9,12 @@ import type { ResolvedB2CConfig } from '@salesforce/b2c-tooling-sdk/config';
|
|
|
9
9
|
* (`/users/this`) and the access-key endpoints under
|
|
10
10
|
* `/users/{login}/access_key`.
|
|
11
11
|
*
|
|
12
|
-
* Defaults `authMethods` to `['
|
|
12
|
+
* Defaults `authMethods` to `['user']` so the underlying
|
|
13
13
|
* {@link InstanceCommand}'s `B2CInstance` chooses browser-based user-auth
|
|
14
|
-
* rather than client-credentials. The default is
|
|
15
|
-
* resolution and only when the user has not specified
|
|
16
|
-
* `--auth-methods`, `--user-auth`, dw.json, or
|
|
14
|
+
* (Authorization Code + PKCE) rather than client-credentials. The default is
|
|
15
|
+
* applied *after* config resolution and only when the user has not specified
|
|
16
|
+
* `authMethods` via `--auth-methods`, `--user-auth`, dw.json, or
|
|
17
|
+
* `SFCC_AUTH_METHODS`.
|
|
17
18
|
*/
|
|
18
19
|
export declare abstract class BmUserAuthCommand<T extends typeof Command> extends InstanceCommand<T> {
|
|
19
20
|
protected getDefaultAuthMethods(): AuthMethod[];
|
|
@@ -6,15 +6,16 @@ import { InstanceCommand } from '@salesforce/b2c-tooling-sdk/cli';
|
|
|
6
6
|
* (`/users/this`) and the access-key endpoints under
|
|
7
7
|
* `/users/{login}/access_key`.
|
|
8
8
|
*
|
|
9
|
-
* Defaults `authMethods` to `['
|
|
9
|
+
* Defaults `authMethods` to `['user']` so the underlying
|
|
10
10
|
* {@link InstanceCommand}'s `B2CInstance` chooses browser-based user-auth
|
|
11
|
-
* rather than client-credentials. The default is
|
|
12
|
-
* resolution and only when the user has not specified
|
|
13
|
-
* `--auth-methods`, `--user-auth`, dw.json, or
|
|
11
|
+
* (Authorization Code + PKCE) rather than client-credentials. The default is
|
|
12
|
+
* applied *after* config resolution and only when the user has not specified
|
|
13
|
+
* `authMethods` via `--auth-methods`, `--user-auth`, dw.json, or
|
|
14
|
+
* `SFCC_AUTH_METHODS`.
|
|
14
15
|
*/
|
|
15
16
|
export class BmUserAuthCommand extends InstanceCommand {
|
|
16
17
|
getDefaultAuthMethods() {
|
|
17
|
-
return ['
|
|
18
|
+
return ['user'];
|
|
18
19
|
}
|
|
19
20
|
async loadConfiguration() {
|
|
20
21
|
const resolved = await super.loadConfiguration();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-auth-command.js","sourceRoot":"","sources":["../../../src/utils/bm/user-auth-command.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAIhE
|
|
1
|
+
{"version":3,"file":"user-auth-command.js","sourceRoot":"","sources":["../../../src/utils/bm/user-auth-command.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAIhE;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAgB,iBAA4C,SAAQ,eAAkB;IACvE,qBAAqB;QACtC,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAEkB,KAAK,CAAC,iBAAiB;QACxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,iBAAiB,EAAE,CAAC;QACjD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACjC,sEAAsE;YACtE,0DAA0D;YAC1D,6DAA6D;YAC5D,QAAQ,CAAC,MAAuC,CAAC,WAAW,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC/F,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -58,7 +58,7 @@ export declare abstract class SlasClientCommand<T extends typeof Command> extend
|
|
|
58
58
|
* This is required before creating SLAS clients.
|
|
59
59
|
*/
|
|
60
60
|
protected ensureTenantExists(slasClient: SlasClient, tenantId: string): Promise<void>;
|
|
61
|
-
protected getDefaultClientId(): string;
|
|
61
|
+
protected getDefaultClientId(method?: 'implicit' | 'user'): string;
|
|
62
62
|
/**
|
|
63
63
|
* Get the SLAS client, ensuring short code is configured.
|
|
64
64
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { Command, ux } from '@oclif/core';
|
|
7
7
|
import cliui from 'cliui';
|
|
8
8
|
import { OAuthCommand } from '@salesforce/b2c-tooling-sdk/cli';
|
|
9
|
-
import { createSlasClient, getApiErrorMessage, getDefaultPublicClientId, } from '@salesforce/b2c-tooling-sdk';
|
|
9
|
+
import { createSlasClient, getApiErrorMessage, getDefaultPublicClientId, getLegacyImplicitPublicClientId, } from '@salesforce/b2c-tooling-sdk';
|
|
10
10
|
import { t } from '../../i18n/index.js';
|
|
11
11
|
/**
|
|
12
12
|
* Normalize a client response from the API.
|
|
@@ -164,8 +164,10 @@ export class SlasClientCommand extends OAuthCommand {
|
|
|
164
164
|
this.log(t('commands.slas.client.create.tenantCreated', 'SLAS tenant created successfully.'));
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
getDefaultClientId() {
|
|
168
|
-
return
|
|
167
|
+
getDefaultClientId(method = 'user') {
|
|
168
|
+
return method === 'implicit'
|
|
169
|
+
? getLegacyImplicitPublicClientId(this.accountManagerHost)
|
|
170
|
+
: getDefaultPublicClientId(this.accountManagerHost);
|
|
169
171
|
}
|
|
170
172
|
/**
|
|
171
173
|
* Get the SLAS client, ensuring short code is configured.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/utils/slas/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAE,EAAE,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/utils/slas/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAE,EAAE,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,wBA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