platform-types 1.10.750 → 1.10.751
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/auth.d.ts +15 -4
- package/dist/auth.js +18 -2
- package/dist/cjs/auth.js +18 -2
- package/dist/cjs/order.js +5 -0
- package/dist/customer.d.ts +27 -0
- package/dist/order.d.ts +4 -1
- package/dist/order.js +5 -0
- package/dist/pricing.d.ts +9 -0
- package/dist/store.d.ts +12 -1
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -1464,7 +1464,9 @@ declare global {
|
|
|
1464
1464
|
* not supply. Naming it on sign-in would enumerate the customer table.
|
|
1465
1465
|
* - `SIGN_IN_IDENTITY_UNVERIFIED` (link, `social`, `social-bridge-mint`,
|
|
1466
1466
|
* `register-social`) — the provider asserts an identity it has not itself
|
|
1467
|
-
* verified. Never the disabled-account answer: that
|
|
1467
|
+
* verified. Never the disabled-account answer: that is `USER_NOT_ENABLED` —
|
|
1468
|
+
* `400` at these sign-in doors, and `401` at the storefront `refresh`, which
|
|
1469
|
+
* answers it for a disabled OR missing customer row so the session ends.
|
|
1468
1470
|
* - `INVALID_ID_TOKEN` — the token failed verification outright: malformed,
|
|
1469
1471
|
* expired, or signed by the wrong issuer. Retryable by re-authenticating.
|
|
1470
1472
|
* - `SIGN_IN_PROVIDER_UNSUPPORTED` — the provider is not one this store accepts.
|
|
@@ -1622,8 +1624,13 @@ export type CustomerSocialRegisterErrorCode = (typeof CUSTOMER_SOCIAL_REGISTER_E
|
|
|
1622
1624
|
* than deactivated.
|
|
1623
1625
|
* - `ROLE_NOT_ALLOWED` · 401 — the role no longer permits this surface. The
|
|
1624
1626
|
* session was legitimate when minted and is not any more.
|
|
1627
|
+
* - `USER_NOT_ENABLED` · 401 — storefront only: the customer row is disabled or
|
|
1628
|
+
* gone (one code for both there). Fatal like the members above.
|
|
1629
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 401 — storefront
|
|
1630
|
+
* only: the customer's access is awaiting approval or was rejected
|
|
1631
|
+
* (`Customer.accessState`). Fatal like the members above: end the session.
|
|
1625
1632
|
*
|
|
1626
|
-
* ⚠️ These
|
|
1633
|
+
* ⚠️ These are FATAL and must not be retried. A consumer that classifies
|
|
1627
1634
|
* fatality by matching a code list, WITHOUT also reading the status, silently
|
|
1628
1635
|
* omits them the moment they are added here — and a disabled client then
|
|
1629
1636
|
* refreshes forever against an account that will never be re-enabled by
|
|
@@ -1633,7 +1640,7 @@ export type CustomerSocialRegisterErrorCode = (typeof CUSTOMER_SOCIAL_REGISTER_E
|
|
|
1633
1640
|
* retryable produces an infinite refresh loop against a token that will never
|
|
1634
1641
|
* verify again.
|
|
1635
1642
|
*/
|
|
1636
|
-
export declare const REFRESH_ERROR_CODES: readonly ["MISSING_REFRESH_TOKEN", "INVALID_REFRESH_TOKEN", "NOT_A_REFRESH_TOKEN", "LEGACY_STATELESS_TOKEN", "CSRF_ORIGIN_REJECTED", "REFRESH_TOKEN_UNKNOWN", "FAMILY_REVOKED", "SESSION_EXPIRED_ABSOLUTE", "CONCURRENT_ROTATION", "ACCOUNT_DISABLED", "USER_NOT_FOUND", "ROLE_NOT_ALLOWED"];
|
|
1643
|
+
export declare const REFRESH_ERROR_CODES: readonly ["MISSING_REFRESH_TOKEN", "INVALID_REFRESH_TOKEN", "NOT_A_REFRESH_TOKEN", "LEGACY_STATELESS_TOKEN", "CSRF_ORIGIN_REJECTED", "REFRESH_TOKEN_UNKNOWN", "FAMILY_REVOKED", "SESSION_EXPIRED_ABSOLUTE", "CONCURRENT_ROTATION", "ACCOUNT_DISABLED", "USER_NOT_FOUND", "ROLE_NOT_ALLOWED", "USER_NOT_ENABLED", "CUSTOMER_ACCESS_PENDING", "CUSTOMER_ACCESS_REJECTED"];
|
|
1637
1644
|
export type RefreshErrorCode = (typeof REFRESH_ERROR_CODES)[number];
|
|
1638
1645
|
/**
|
|
1639
1646
|
* Login-leg discriminators that are a CHALLENGE rather than a refusal — the
|
|
@@ -1688,6 +1695,10 @@ export type StepUpErrorCode = (typeof STEP_UP_ERROR_CODES)[number];
|
|
|
1688
1695
|
* - `ACCOUNT_LOCKED` · 403 — brute-force lockout; the response carries
|
|
1689
1696
|
* `retryAfterSeconds` (see `AccountLockedResponse`).
|
|
1690
1697
|
* - `ACCOUNT_DISABLED` · 400 — the user row is disabled.
|
|
1698
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 403 — storefront
|
|
1699
|
+
* only: the customer's credentials are right but the store has not approved
|
|
1700
|
+
* the account (`Customer.accessState`), or rejected it. Terminal for the
|
|
1701
|
+
* attempt; retrying or resetting the password cannot change it.
|
|
1691
1702
|
* - `CAPTCHA_REQUIRED` / `CAPTCHA_INVALID` — the browser captcha tier.
|
|
1692
1703
|
* - `ATTESTATION_REQUIRED` / `ATTESTATION_INVALID` — the mobile
|
|
1693
1704
|
* (body-transport) equivalents of the two above.
|
|
@@ -1702,7 +1713,7 @@ export type StepUpErrorCode = (typeof STEP_UP_ERROR_CODES)[number];
|
|
|
1702
1713
|
* the wire from four emitters all along and every client was silently falling
|
|
1703
1714
|
* through to a generic "login failed".
|
|
1704
1715
|
*/
|
|
1705
|
-
export declare const LOGIN_ERROR_CODES: readonly ["ACCOUNT_VERIFICATION_FAILED", "WRONG_CREDENTIALS", "ACCOUNT_LOCKED", "ACCOUNT_DISABLED", "CAPTCHA_REQUIRED", "CAPTCHA_INVALID", "ATTESTATION_REQUIRED", "ATTESTATION_INVALID", "ROLE_NOT_ALLOWED"];
|
|
1716
|
+
export declare const LOGIN_ERROR_CODES: readonly ["ACCOUNT_VERIFICATION_FAILED", "WRONG_CREDENTIALS", "ACCOUNT_LOCKED", "ACCOUNT_DISABLED", "CUSTOMER_ACCESS_PENDING", "CUSTOMER_ACCESS_REJECTED", "CAPTCHA_REQUIRED", "CAPTCHA_INVALID", "ATTESTATION_REQUIRED", "ATTESTATION_INVALID", "ROLE_NOT_ALLOWED"];
|
|
1706
1717
|
/**
|
|
1707
1718
|
* Second-factor FAILURES on the login step-up — the siblings of
|
|
1708
1719
|
* `STEP_UP_ERROR_CODES`' single success-path discriminator.
|
package/dist/auth.js
CHANGED
|
@@ -48,7 +48,9 @@
|
|
|
48
48
|
* not supply. Naming it on sign-in would enumerate the customer table.
|
|
49
49
|
* - `SIGN_IN_IDENTITY_UNVERIFIED` (link, `social`, `social-bridge-mint`,
|
|
50
50
|
* `register-social`) — the provider asserts an identity it has not itself
|
|
51
|
-
* verified. Never the disabled-account answer: that
|
|
51
|
+
* verified. Never the disabled-account answer: that is `USER_NOT_ENABLED` —
|
|
52
|
+
* `400` at these sign-in doors, and `401` at the storefront `refresh`, which
|
|
53
|
+
* answers it for a disabled OR missing customer row so the session ends.
|
|
52
54
|
* - `INVALID_ID_TOKEN` — the token failed verification outright: malformed,
|
|
53
55
|
* expired, or signed by the wrong issuer. Retryable by re-authenticating.
|
|
54
56
|
* - `SIGN_IN_PROVIDER_UNSUPPORTED` — the provider is not one this store accepts.
|
|
@@ -221,8 +223,13 @@ export const CUSTOMER_SOCIAL_REGISTER_ERROR_CODES = [
|
|
|
221
223
|
* than deactivated.
|
|
222
224
|
* - `ROLE_NOT_ALLOWED` · 401 — the role no longer permits this surface. The
|
|
223
225
|
* session was legitimate when minted and is not any more.
|
|
226
|
+
* - `USER_NOT_ENABLED` · 401 — storefront only: the customer row is disabled or
|
|
227
|
+
* gone (one code for both there). Fatal like the members above.
|
|
228
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 401 — storefront
|
|
229
|
+
* only: the customer's access is awaiting approval or was rejected
|
|
230
|
+
* (`Customer.accessState`). Fatal like the members above: end the session.
|
|
224
231
|
*
|
|
225
|
-
* ⚠️ These
|
|
232
|
+
* ⚠️ These are FATAL and must not be retried. A consumer that classifies
|
|
226
233
|
* fatality by matching a code list, WITHOUT also reading the status, silently
|
|
227
234
|
* omits them the moment they are added here — and a disabled client then
|
|
228
235
|
* refreshes forever against an account that will never be re-enabled by
|
|
@@ -245,6 +252,9 @@ export const REFRESH_ERROR_CODES = [
|
|
|
245
252
|
'ACCOUNT_DISABLED',
|
|
246
253
|
'USER_NOT_FOUND',
|
|
247
254
|
'ROLE_NOT_ALLOWED',
|
|
255
|
+
'USER_NOT_ENABLED',
|
|
256
|
+
'CUSTOMER_ACCESS_PENDING',
|
|
257
|
+
'CUSTOMER_ACCESS_REJECTED',
|
|
248
258
|
];
|
|
249
259
|
/**
|
|
250
260
|
* Login-leg discriminators that are a CHALLENGE rather than a refusal — the
|
|
@@ -298,6 +308,10 @@ export const STEP_UP_ERROR_CODES = ['REQUIRES_2FA', 'ENROLLMENT_REQUIRED'];
|
|
|
298
308
|
* - `ACCOUNT_LOCKED` · 403 — brute-force lockout; the response carries
|
|
299
309
|
* `retryAfterSeconds` (see `AccountLockedResponse`).
|
|
300
310
|
* - `ACCOUNT_DISABLED` · 400 — the user row is disabled.
|
|
311
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 403 — storefront
|
|
312
|
+
* only: the customer's credentials are right but the store has not approved
|
|
313
|
+
* the account (`Customer.accessState`), or rejected it. Terminal for the
|
|
314
|
+
* attempt; retrying or resetting the password cannot change it.
|
|
301
315
|
* - `CAPTCHA_REQUIRED` / `CAPTCHA_INVALID` — the browser captcha tier.
|
|
302
316
|
* - `ATTESTATION_REQUIRED` / `ATTESTATION_INVALID` — the mobile
|
|
303
317
|
* (body-transport) equivalents of the two above.
|
|
@@ -317,6 +331,8 @@ export const LOGIN_ERROR_CODES = [
|
|
|
317
331
|
'WRONG_CREDENTIALS',
|
|
318
332
|
'ACCOUNT_LOCKED',
|
|
319
333
|
'ACCOUNT_DISABLED',
|
|
334
|
+
'CUSTOMER_ACCESS_PENDING',
|
|
335
|
+
'CUSTOMER_ACCESS_REJECTED',
|
|
320
336
|
'CAPTCHA_REQUIRED',
|
|
321
337
|
'CAPTCHA_INVALID',
|
|
322
338
|
'ATTESTATION_REQUIRED',
|
package/dist/cjs/auth.js
CHANGED
|
@@ -51,7 +51,9 @@ exports.SESSION_ACTION_ERROR_CODES = exports.PASSKEY_ERROR_CODES = exports.TWO_F
|
|
|
51
51
|
* not supply. Naming it on sign-in would enumerate the customer table.
|
|
52
52
|
* - `SIGN_IN_IDENTITY_UNVERIFIED` (link, `social`, `social-bridge-mint`,
|
|
53
53
|
* `register-social`) — the provider asserts an identity it has not itself
|
|
54
|
-
* verified. Never the disabled-account answer: that
|
|
54
|
+
* verified. Never the disabled-account answer: that is `USER_NOT_ENABLED` —
|
|
55
|
+
* `400` at these sign-in doors, and `401` at the storefront `refresh`, which
|
|
56
|
+
* answers it for a disabled OR missing customer row so the session ends.
|
|
55
57
|
* - `INVALID_ID_TOKEN` — the token failed verification outright: malformed,
|
|
56
58
|
* expired, or signed by the wrong issuer. Retryable by re-authenticating.
|
|
57
59
|
* - `SIGN_IN_PROVIDER_UNSUPPORTED` — the provider is not one this store accepts.
|
|
@@ -224,8 +226,13 @@ exports.CUSTOMER_SOCIAL_REGISTER_ERROR_CODES = [
|
|
|
224
226
|
* than deactivated.
|
|
225
227
|
* - `ROLE_NOT_ALLOWED` · 401 — the role no longer permits this surface. The
|
|
226
228
|
* session was legitimate when minted and is not any more.
|
|
229
|
+
* - `USER_NOT_ENABLED` · 401 — storefront only: the customer row is disabled or
|
|
230
|
+
* gone (one code for both there). Fatal like the members above.
|
|
231
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 401 — storefront
|
|
232
|
+
* only: the customer's access is awaiting approval or was rejected
|
|
233
|
+
* (`Customer.accessState`). Fatal like the members above: end the session.
|
|
227
234
|
*
|
|
228
|
-
* ⚠️ These
|
|
235
|
+
* ⚠️ These are FATAL and must not be retried. A consumer that classifies
|
|
229
236
|
* fatality by matching a code list, WITHOUT also reading the status, silently
|
|
230
237
|
* omits them the moment they are added here — and a disabled client then
|
|
231
238
|
* refreshes forever against an account that will never be re-enabled by
|
|
@@ -248,6 +255,9 @@ exports.REFRESH_ERROR_CODES = [
|
|
|
248
255
|
'ACCOUNT_DISABLED',
|
|
249
256
|
'USER_NOT_FOUND',
|
|
250
257
|
'ROLE_NOT_ALLOWED',
|
|
258
|
+
'USER_NOT_ENABLED',
|
|
259
|
+
'CUSTOMER_ACCESS_PENDING',
|
|
260
|
+
'CUSTOMER_ACCESS_REJECTED',
|
|
251
261
|
];
|
|
252
262
|
/**
|
|
253
263
|
* Login-leg discriminators that are a CHALLENGE rather than a refusal — the
|
|
@@ -301,6 +311,10 @@ exports.STEP_UP_ERROR_CODES = ['REQUIRES_2FA', 'ENROLLMENT_REQUIRED'];
|
|
|
301
311
|
* - `ACCOUNT_LOCKED` · 403 — brute-force lockout; the response carries
|
|
302
312
|
* `retryAfterSeconds` (see `AccountLockedResponse`).
|
|
303
313
|
* - `ACCOUNT_DISABLED` · 400 — the user row is disabled.
|
|
314
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 403 — storefront
|
|
315
|
+
* only: the customer's credentials are right but the store has not approved
|
|
316
|
+
* the account (`Customer.accessState`), or rejected it. Terminal for the
|
|
317
|
+
* attempt; retrying or resetting the password cannot change it.
|
|
304
318
|
* - `CAPTCHA_REQUIRED` / `CAPTCHA_INVALID` — the browser captcha tier.
|
|
305
319
|
* - `ATTESTATION_REQUIRED` / `ATTESTATION_INVALID` — the mobile
|
|
306
320
|
* (body-transport) equivalents of the two above.
|
|
@@ -320,6 +334,8 @@ exports.LOGIN_ERROR_CODES = [
|
|
|
320
334
|
'WRONG_CREDENTIALS',
|
|
321
335
|
'ACCOUNT_LOCKED',
|
|
322
336
|
'ACCOUNT_DISABLED',
|
|
337
|
+
'CUSTOMER_ACCESS_PENDING',
|
|
338
|
+
'CUSTOMER_ACCESS_REJECTED',
|
|
323
339
|
'CAPTCHA_REQUIRED',
|
|
324
340
|
'CAPTCHA_INVALID',
|
|
325
341
|
'ATTESTATION_REQUIRED',
|
package/dist/cjs/order.js
CHANGED
|
@@ -386,6 +386,9 @@ exports.orderFulfilmentProgress = orderFulfilmentProgress;
|
|
|
386
386
|
* and the live customer has not verified. No data payload; before cart read.
|
|
387
387
|
* - `ACCOUNT_DISABLED` · 403 — the live customer is disabled. No data payload;
|
|
388
388
|
* before cart read. This is distinct from the staff `CUSTOMER_DISABLED` code.
|
|
389
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 403 — the live
|
|
390
|
+
* customer's storefront access awaits approval or was rejected
|
|
391
|
+
* (`Customer.accessState`). No data payload; checked beside `ACCOUNT_DISABLED`.
|
|
389
392
|
*
|
|
390
393
|
* Commit-time drawer refusals, on a create whose cash tender books into a
|
|
391
394
|
* drawer shift. No order committed, but a coupon redeemed before the commit
|
|
@@ -630,6 +633,8 @@ exports.ORDER_ERROR_CODES = [
|
|
|
630
633
|
'ORDER_INVALID_CART',
|
|
631
634
|
'EMAIL_VERIFICATION_REQUIRED',
|
|
632
635
|
'ACCOUNT_DISABLED',
|
|
636
|
+
'CUSTOMER_ACCESS_PENDING',
|
|
637
|
+
'CUSTOMER_ACCESS_REJECTED',
|
|
633
638
|
// Commit-time drawer refusals; `CURRENCY_MISMATCH` carries its fields at the body's top level.
|
|
634
639
|
'CURRENCY_MISMATCH',
|
|
635
640
|
'SHIFT_NOT_OPEN',
|
package/dist/customer.d.ts
CHANGED
|
@@ -130,6 +130,12 @@ declare global {
|
|
|
130
130
|
* `'all'`: both.
|
|
131
131
|
*/
|
|
132
132
|
disabled?: 'true' | 'false' | 'all';
|
|
133
|
+
/**
|
|
134
|
+
* `'pending'`: only customers waiting for storefront access approval
|
|
135
|
+
* (`Customer.accessState === 'pending'`). Absent: no access filter. ANDs with
|
|
136
|
+
* every other parameter, `disabled` included.
|
|
137
|
+
*/
|
|
138
|
+
accessState?: 'pending';
|
|
133
139
|
/** `'true'`: customers who have bought at least once. `'false'`: never bought. */
|
|
134
140
|
withBuy?: 'true' | 'false';
|
|
135
141
|
/**
|
|
@@ -258,6 +264,27 @@ declare global {
|
|
|
258
264
|
*/
|
|
259
265
|
zoneIds?: string[];
|
|
260
266
|
disabled: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Storefront ACCESS approval. ABSENT MEANS APPROVED — every row that
|
|
269
|
+
* predates approval mode, and every row created in `open` mode, carries no
|
|
270
|
+
* attribute and signs in as before.
|
|
271
|
+
*
|
|
272
|
+
* - `'pending'` — written by the storefront `register` / `register-social`
|
|
273
|
+
* when the store's `ecommerce.config.registrationMode` is `'approval'`.
|
|
274
|
+
* The account exists, but sign-in and refresh are refused
|
|
275
|
+
* (`CUSTOMER_ACCESS_PENDING`), checkout refuses, and the catalogue prices
|
|
276
|
+
* the shopper as a guest.
|
|
277
|
+
* - `'rejected'` — written by an admin-tier operator edit
|
|
278
|
+
* (`POST /customers { accessState: 'rejected' }`), which also revokes every
|
|
279
|
+
* session of the customer. Refused the same way with
|
|
280
|
+
* `CUSTOMER_ACCESS_REJECTED`.
|
|
281
|
+
*
|
|
282
|
+
* The operator approves with `POST /customers { accessState: 'approved' }`,
|
|
283
|
+
* which REMOVES the attribute — `'approved'` is a request value only and is
|
|
284
|
+
* never stored. Independent of `disabled`: a disabled row is refused for
|
|
285
|
+
* that reason whatever this says.
|
|
286
|
+
*/
|
|
287
|
+
accessState?: 'pending' | 'rejected';
|
|
261
288
|
discount: number;
|
|
262
289
|
/** Absent after erasure or the final merge flip; registration still requires an address. */
|
|
263
290
|
email?: string;
|
package/dist/order.d.ts
CHANGED
|
@@ -2694,6 +2694,9 @@ export declare const orderFulfilmentProgress: (order: OrderFulfilmentProgressInp
|
|
|
2694
2694
|
* and the live customer has not verified. No data payload; before cart read.
|
|
2695
2695
|
* - `ACCOUNT_DISABLED` · 403 — the live customer is disabled. No data payload;
|
|
2696
2696
|
* before cart read. This is distinct from the staff `CUSTOMER_DISABLED` code.
|
|
2697
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 403 — the live
|
|
2698
|
+
* customer's storefront access awaits approval or was rejected
|
|
2699
|
+
* (`Customer.accessState`). No data payload; checked beside `ACCOUNT_DISABLED`.
|
|
2697
2700
|
*
|
|
2698
2701
|
* Commit-time drawer refusals, on a create whose cash tender books into a
|
|
2699
2702
|
* drawer shift. No order committed, but a coupon redeemed before the commit
|
|
@@ -2820,6 +2823,6 @@ export declare const orderFulfilmentProgress: (order: OrderFulfilmentProgressInp
|
|
|
2820
2823
|
* `SUBSCRIPTION_READONLY`) sit on the order CREATE leg only: an edit is not a new
|
|
2821
2824
|
* order, so `bareOrderPostHandler` routes past `requireMetered` entirely.
|
|
2822
2825
|
*/
|
|
2823
|
-
export declare const ORDER_ERROR_CODES: readonly ["ORDER_COST_DENOMINATION_UNKNOWN", "SERVICE_ORDER_DELIVERY_MANAGED", "ORDER_NOT_FOUND", "ORDER_LOCKED", "ORDER_NOT_READY", "ORDER_DELIVERED_ANOTHER_DAY", "ORDER_DELIVERY_STATE_UNCHANGED", "ORDER_ILLEGAL_TRANSITION", "ORDER_VERSION_CONFLICT", "CUSTOMER_NOT_FOUND", "CUSTOMER_MERGED", "ORDER_HAS_NO_CUSTOMER", "CUSTOMER_ANONYMIZED", "FX_CONVERSION_UNAVAILABLE", "ROLE_FORBIDDEN", "ORDER_CANCELLED", "PAYMENT_SETTLED_ON_ANOTHER_ORDER", "ORDER_HAS_SHIPMENTS", "ORDER_HAS_RETURNS", "SHIPMENT_QUANTITY_EXCEEDED", "SHIPMENT_LINE_MISMATCH", "SHIPMENT_NOT_FOUND", "SHIPMENT_LIMIT_REACHED", "SHIPMENT_TOO_LARGE", "ORDER_FULFILMENT_EXTERNAL", "SHIPMENT_FAILED", "ADMIN_REQUIRED", "IDEMPOTENCY_KEY_REQUIRED", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSE", "IDEMPOTENCY_IN_PROGRESS", "IDEMPOTENCY_LOCK_CONTENTION", "IDEMPOTENCY_KEY_FAILED", "IDEMPOTENT_RESPONSE_NOT_CACHED", "ORDER_CANCELLATION_NOT_PROTECTED", "ORDER_CANCELLATION_COMMITTED", "ORDER_CANCELLATION_LOCKED", "ORDER_CANCELLATION_TOO_LARGE", "ORDER_CANCELLATION_FAILED", "SALE_LEDGER_RETRACTION_REFUSED", "SALE_LEDGER_ROW_NOT_OWNED", "PRODUCT_NOT_FOUND", "PRODUCT_SALE_LIMIT_EXCEEDED", "PRODUCT_SALE_LIMIT_INVALID", "DEPOSIT_SOURCE_NOT_ALLOWED", "DEPOSIT_CURRENCY_MISMATCH", "DEPOSIT_EXCEEDS_TOTAL", "DEPOSIT_FREEZE_REQUIRES_INVOICE", "DEPOSIT_FREEZE_INVOICE_PENDING", "DEPOSIT_CHARACTERIZATION_CONFLICT", "DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING", "DEPOSIT_INVOICED_ORDER_MUST_FREEZE", "DEPOSIT_FROZEN_ORDER_MUST_FREEZE", "DEPOSIT_REFERENCE_IS_LINKED_PAYMENT", "DEPOSIT_DUPLICATE_REFERENCE", "TILL_TENDER_REQUIRES_DEPOSIT", "PAYMENT_REFERENCED_BY_DEPOSIT", "ORDER_HAS_UNREFUNDED_DEPOSIT", "ORDER_PRICE_FROZEN", "DEPOSIT_NOT_FOUND", "DEPOSIT_ALREADY_REFUNDED", "UNIT_QUANTITY_NOT_WHOLE", "UNIT_REVISION_STALE", "UNIT_QUANTITY_UNREPRESENTABLE", "KIT_RECIPE_CHANGED", "CART_PROMOTION_UNAVAILABLE", "ORDER_HAS_KIT_LINES", "ORDER_TARGET_REQUIRED", "ORDER_SOURCE_CONFLICT", "ORDER_CUSTOMER_REQUIRED", "BASKET_EMPTY", "BASKET_CHANGED_DURING_CHECKOUT", "CART_VERSION_CREATE_ONLY", "CART_VERSION_REQUIRES_CART_ID", "CART_REVISION_STALE", "CART_CUSTOMER_MISMATCH", "COUNTER_SALE_CREATE_ONLY", "SOLD_AT_CREATE_ONLY", "SOLD_AT_IN_FUTURE", "ORDER_TENDER_CREATE_ONLY", "CREDIT_OVERRIDE_CREATE_ONLY", "ON_ACCOUNT_CREATE_ONLY", "ON_ACCOUNT_WITH_TENDERS", "TENDERS_REQUIRE_COUNTER_SALE", "LINES_REQUIRE_COUNTER_SALE", "PRODUCT_COST_UNKNOWN", "PRICE_CHANGE_DISABLED", "LINE_DISCOUNT_EXCEEDS_MAX", "CUSTOMER_DISABLED", "SHIFT_NOT_AVAILABLE", "SOLD_AT_OUTSIDE_SHIFT", "ORDER_CURRENCY_NOT_SUBSCRIBED", "PAYMENT_METHODS_NOT_CONFIGURED", "PAYMENT_METHOD_NOT_FOUND", "DELIVERY_METHOD_NOT_FOUND", "ORDER_BELOW_MINIMUM_PURCHASE", "ORDER_INVALID_CART", "EMAIL_VERIFICATION_REQUIRED", "ACCOUNT_DISABLED", "CURRENCY_MISMATCH", "SHIFT_NOT_OPEN", "ORDER_DISCOUNT_AFTER_INVOICE", "ORDER_DISCOUNT_ON_SERVICE_ORDER", "ORDER_DISCOUNT_ON_MARKETPLACE_ORDER", "ORDER_INVOICE_METHOD_OUTSTANDING_FACTURA", "ORDER_SERVICE_PERIOD_AFTER_INVOICE", "ORDER_ATTEMPT_COMMITTED", "ORDER_ATTEMPT_ABANDONED", "ORDER_ATTEMPT_KEY_EXPIRED", "ORDER_ATTEMPT_KEY_SCOPE_MISMATCH", "ORDER_COMPLETION_ATTEMPT_COMMITTED", "ORDER_COMPLETION_ATTEMPT_ABANDONED"];
|
|
2826
|
+
export declare const ORDER_ERROR_CODES: readonly ["ORDER_COST_DENOMINATION_UNKNOWN", "SERVICE_ORDER_DELIVERY_MANAGED", "ORDER_NOT_FOUND", "ORDER_LOCKED", "ORDER_NOT_READY", "ORDER_DELIVERED_ANOTHER_DAY", "ORDER_DELIVERY_STATE_UNCHANGED", "ORDER_ILLEGAL_TRANSITION", "ORDER_VERSION_CONFLICT", "CUSTOMER_NOT_FOUND", "CUSTOMER_MERGED", "ORDER_HAS_NO_CUSTOMER", "CUSTOMER_ANONYMIZED", "FX_CONVERSION_UNAVAILABLE", "ROLE_FORBIDDEN", "ORDER_CANCELLED", "PAYMENT_SETTLED_ON_ANOTHER_ORDER", "ORDER_HAS_SHIPMENTS", "ORDER_HAS_RETURNS", "SHIPMENT_QUANTITY_EXCEEDED", "SHIPMENT_LINE_MISMATCH", "SHIPMENT_NOT_FOUND", "SHIPMENT_LIMIT_REACHED", "SHIPMENT_TOO_LARGE", "ORDER_FULFILMENT_EXTERNAL", "SHIPMENT_FAILED", "ADMIN_REQUIRED", "IDEMPOTENCY_KEY_REQUIRED", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSE", "IDEMPOTENCY_IN_PROGRESS", "IDEMPOTENCY_LOCK_CONTENTION", "IDEMPOTENCY_KEY_FAILED", "IDEMPOTENT_RESPONSE_NOT_CACHED", "ORDER_CANCELLATION_NOT_PROTECTED", "ORDER_CANCELLATION_COMMITTED", "ORDER_CANCELLATION_LOCKED", "ORDER_CANCELLATION_TOO_LARGE", "ORDER_CANCELLATION_FAILED", "SALE_LEDGER_RETRACTION_REFUSED", "SALE_LEDGER_ROW_NOT_OWNED", "PRODUCT_NOT_FOUND", "PRODUCT_SALE_LIMIT_EXCEEDED", "PRODUCT_SALE_LIMIT_INVALID", "DEPOSIT_SOURCE_NOT_ALLOWED", "DEPOSIT_CURRENCY_MISMATCH", "DEPOSIT_EXCEEDS_TOTAL", "DEPOSIT_FREEZE_REQUIRES_INVOICE", "DEPOSIT_FREEZE_INVOICE_PENDING", "DEPOSIT_CHARACTERIZATION_CONFLICT", "DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING", "DEPOSIT_INVOICED_ORDER_MUST_FREEZE", "DEPOSIT_FROZEN_ORDER_MUST_FREEZE", "DEPOSIT_REFERENCE_IS_LINKED_PAYMENT", "DEPOSIT_DUPLICATE_REFERENCE", "TILL_TENDER_REQUIRES_DEPOSIT", "PAYMENT_REFERENCED_BY_DEPOSIT", "ORDER_HAS_UNREFUNDED_DEPOSIT", "ORDER_PRICE_FROZEN", "DEPOSIT_NOT_FOUND", "DEPOSIT_ALREADY_REFUNDED", "UNIT_QUANTITY_NOT_WHOLE", "UNIT_REVISION_STALE", "UNIT_QUANTITY_UNREPRESENTABLE", "KIT_RECIPE_CHANGED", "CART_PROMOTION_UNAVAILABLE", "ORDER_HAS_KIT_LINES", "ORDER_TARGET_REQUIRED", "ORDER_SOURCE_CONFLICT", "ORDER_CUSTOMER_REQUIRED", "BASKET_EMPTY", "BASKET_CHANGED_DURING_CHECKOUT", "CART_VERSION_CREATE_ONLY", "CART_VERSION_REQUIRES_CART_ID", "CART_REVISION_STALE", "CART_CUSTOMER_MISMATCH", "COUNTER_SALE_CREATE_ONLY", "SOLD_AT_CREATE_ONLY", "SOLD_AT_IN_FUTURE", "ORDER_TENDER_CREATE_ONLY", "CREDIT_OVERRIDE_CREATE_ONLY", "ON_ACCOUNT_CREATE_ONLY", "ON_ACCOUNT_WITH_TENDERS", "TENDERS_REQUIRE_COUNTER_SALE", "LINES_REQUIRE_COUNTER_SALE", "PRODUCT_COST_UNKNOWN", "PRICE_CHANGE_DISABLED", "LINE_DISCOUNT_EXCEEDS_MAX", "CUSTOMER_DISABLED", "SHIFT_NOT_AVAILABLE", "SOLD_AT_OUTSIDE_SHIFT", "ORDER_CURRENCY_NOT_SUBSCRIBED", "PAYMENT_METHODS_NOT_CONFIGURED", "PAYMENT_METHOD_NOT_FOUND", "DELIVERY_METHOD_NOT_FOUND", "ORDER_BELOW_MINIMUM_PURCHASE", "ORDER_INVALID_CART", "EMAIL_VERIFICATION_REQUIRED", "ACCOUNT_DISABLED", "CUSTOMER_ACCESS_PENDING", "CUSTOMER_ACCESS_REJECTED", "CURRENCY_MISMATCH", "SHIFT_NOT_OPEN", "ORDER_DISCOUNT_AFTER_INVOICE", "ORDER_DISCOUNT_ON_SERVICE_ORDER", "ORDER_DISCOUNT_ON_MARKETPLACE_ORDER", "ORDER_INVOICE_METHOD_OUTSTANDING_FACTURA", "ORDER_SERVICE_PERIOD_AFTER_INVOICE", "ORDER_ATTEMPT_COMMITTED", "ORDER_ATTEMPT_ABANDONED", "ORDER_ATTEMPT_KEY_EXPIRED", "ORDER_ATTEMPT_KEY_SCOPE_MISMATCH", "ORDER_COMPLETION_ATTEMPT_COMMITTED", "ORDER_COMPLETION_ATTEMPT_ABANDONED"];
|
|
2824
2827
|
export type OrderErrorCode = (typeof ORDER_ERROR_CODES)[number];
|
|
2825
2828
|
export {};
|
package/dist/order.js
CHANGED
|
@@ -379,6 +379,9 @@ export const orderFulfilmentProgress = (order) => {
|
|
|
379
379
|
* and the live customer has not verified. No data payload; before cart read.
|
|
380
380
|
* - `ACCOUNT_DISABLED` · 403 — the live customer is disabled. No data payload;
|
|
381
381
|
* before cart read. This is distinct from the staff `CUSTOMER_DISABLED` code.
|
|
382
|
+
* - `CUSTOMER_ACCESS_PENDING` / `CUSTOMER_ACCESS_REJECTED` · 403 — the live
|
|
383
|
+
* customer's storefront access awaits approval or was rejected
|
|
384
|
+
* (`Customer.accessState`). No data payload; checked beside `ACCOUNT_DISABLED`.
|
|
382
385
|
*
|
|
383
386
|
* Commit-time drawer refusals, on a create whose cash tender books into a
|
|
384
387
|
* drawer shift. No order committed, but a coupon redeemed before the commit
|
|
@@ -623,6 +626,8 @@ export const ORDER_ERROR_CODES = [
|
|
|
623
626
|
'ORDER_INVALID_CART',
|
|
624
627
|
'EMAIL_VERIFICATION_REQUIRED',
|
|
625
628
|
'ACCOUNT_DISABLED',
|
|
629
|
+
'CUSTOMER_ACCESS_PENDING',
|
|
630
|
+
'CUSTOMER_ACCESS_REJECTED',
|
|
626
631
|
// Commit-time drawer refusals; `CURRENCY_MISMATCH` carries its fields at the body's top level.
|
|
627
632
|
'CURRENCY_MISMATCH',
|
|
628
633
|
'SHIFT_NOT_OPEN',
|
package/dist/pricing.d.ts
CHANGED
|
@@ -27,6 +27,15 @@ declare global {
|
|
|
27
27
|
order?: number;
|
|
28
28
|
defaultCurrency?: string;
|
|
29
29
|
tierGated?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Which shopper audience this list is MEANT for. Absent means `'retail'`.
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ Content targeting only — it lets the storefront and the operator tell
|
|
34
|
+
* a wholesale tier from a retail one. It is NEVER a statement about
|
|
35
|
+
* consumer-law applicability: nothing may drop a price disclosure, a tax
|
|
36
|
+
* line or a consumer right because a customer's list says `'wholesale'`.
|
|
37
|
+
*/
|
|
38
|
+
audienceClass?: 'retail' | 'wholesale';
|
|
30
39
|
}
|
|
31
40
|
/**
|
|
32
41
|
* Quantity break within a slot. Resolution: highest `minQty <= qty` wins.
|
package/dist/store.d.ts
CHANGED
|
@@ -135,6 +135,17 @@ declare global {
|
|
|
135
135
|
* Never sent to shoppers.
|
|
136
136
|
*/
|
|
137
137
|
newCustomerPriceList?: number;
|
|
138
|
+
/**
|
|
139
|
+
* How storefront self-registration admits a shopper. Absent means
|
|
140
|
+
* `'open'`: the account is usable at once, as it always was.
|
|
141
|
+
* `'approval'`: `register` / `register-social` create the customer with
|
|
142
|
+
* `accessState: 'pending'` and issue no session until an admin-tier
|
|
143
|
+
* operator approves it (`POST /customers { accessState: 'approved' }`).
|
|
144
|
+
* Written by `PATCH /store` (ADMIN) and `PUT /platform/stores/{storeId}`
|
|
145
|
+
* (MANAGER). SENT TO SHOPPERS (web `GET /store` and the customer `stores`
|
|
146
|
+
* frame), so the storefront can say the account needs approval.
|
|
147
|
+
*/
|
|
148
|
+
registrationMode?: 'open' | 'approval';
|
|
138
149
|
showStocks?: boolean;
|
|
139
150
|
};
|
|
140
151
|
sidebar?: {
|
|
@@ -177,7 +188,7 @@ declare global {
|
|
|
177
188
|
* data: { field: 'ecommerce.config.newCustomerPriceList', value: number }; nothing written.
|
|
178
189
|
*/
|
|
179
190
|
interface EcommercePatchInput {
|
|
180
|
-
config?: Pick<NonNullable<Ecommerce['config']>, 'showDefaultPriceList' | 'newCustomerPriceList'> & StorefrontLiveSettingsPatch;
|
|
191
|
+
config?: Pick<NonNullable<Ecommerce['config']>, 'showDefaultPriceList' | 'newCustomerPriceList' | 'registrationMode'> & StorefrontLiveSettingsPatch;
|
|
181
192
|
sidebar?: Ecommerce['sidebar'];
|
|
182
193
|
home?: Omit<NonNullable<Ecommerce['home']>, 'displayOrders' | 'displayProfile'>;
|
|
183
194
|
themeColors?: Ecommerce['themeColors'];
|