platform-types 1.10.731 → 1.10.733
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/audit.d.ts +4 -1
- package/dist/cash.d.ts +5 -1
- package/dist/cash.js +7 -0
- package/dist/cjs/cash.js +7 -0
- package/dist/cjs/order.js +16 -1
- package/dist/cjs/store.js +8 -3
- package/dist/cjs/terminal.js +2 -1
- package/dist/order.d.ts +32 -5
- package/dist/order.js +16 -1
- package/dist/store.d.ts +30 -7
- package/dist/store.js +8 -3
- package/dist/terminal.d.ts +12 -4
- package/dist/terminal.js +2 -1
- package/package.json +1 -1
package/dist/audit.d.ts
CHANGED
|
@@ -161,7 +161,10 @@ declare global {
|
|
|
161
161
|
* A seña leg was recorded (`POST /orders { mode: 'deposit' }`; an absorbed
|
|
162
162
|
* replay writes none). `after`: `tenderIds`, net `amount`, the order's
|
|
163
163
|
* `currency`, `freezesPrice`, the applied factura's `invoiceId` when it
|
|
164
|
-
* freezes, and `financialStatus`.
|
|
164
|
+
* freezes, and `financialStatus`. A freezing seña's `invoiceId` is absent
|
|
165
|
+
* only when the freeze was taken while the store's
|
|
166
|
+
* `config.modules.fiscalInvoicing` was `false` over an order carrying no
|
|
167
|
+
* live voucher — that freeze records no factura.
|
|
165
168
|
*/
|
|
166
169
|
| 'deposit_recorded'
|
|
167
170
|
/**
|
package/dist/cash.d.ts
CHANGED
|
@@ -511,12 +511,16 @@ declare global {
|
|
|
511
511
|
* - `WAREHOUSE_NOT_FOUND` · 404 — `GET /shifts?warehouseId=` naming a depósito
|
|
512
512
|
* the store does not have (`resolveReportWarehouseFilter`).
|
|
513
513
|
* - `ROLE_FORBIDDEN` · 403 · `VALIDATION_FAILED` · 400
|
|
514
|
+
* - `STORE_MODULE_DISABLED` · 403 — `POST /shifts` (open) while the store has
|
|
515
|
+
* `modules.cash` off; `data.module` is `'cash'` (`StoreModuleDisabledData`)
|
|
516
|
+
* and nothing is written. Close, movements, reconcile and reads of a shift
|
|
517
|
+
* already open stay reachable.
|
|
514
518
|
*
|
|
515
519
|
* ⚠️ Cross-cutting refusals are NOT repeated here — check `GATING_ERROR_CODES`
|
|
516
520
|
* as well, and `TERMINAL_ELEVATION_ERROR_CODES` for a money-out movement's PIN
|
|
517
521
|
* elevation.
|
|
518
522
|
*/
|
|
519
|
-
export declare const SHIFT_ERROR_CODES: readonly ["INVALID_SHIFT_ID", "SHIFT_NOT_FOUND", "SHIFT_ALREADY_OPEN", "SHIFT_NOT_OPEN", "SHIFT_NOT_CLOSED", "SHIFT_OWNER_MISMATCH", "CURRENCY_MISMATCH", "BUCKET_COUNTS_INVALID", "BUCKET_REVIEW_INVALID", "BUCKET_COUNT_MISSING", "SHIFT_CHANGED", "SHIFT_EVENTS_TRUNCATED", "CASH_DRAWER_BUSY", "SELF_APPROVAL_FORBIDDEN", "INVALID_DENOMINATION", "INVALID_CURSOR", "WAREHOUSE_NOT_FOUND", "ROLE_FORBIDDEN", "VALIDATION_FAILED"];
|
|
523
|
+
export declare const SHIFT_ERROR_CODES: readonly ["INVALID_SHIFT_ID", "SHIFT_NOT_FOUND", "SHIFT_ALREADY_OPEN", "SHIFT_NOT_OPEN", "SHIFT_NOT_CLOSED", "SHIFT_OWNER_MISMATCH", "CURRENCY_MISMATCH", "BUCKET_COUNTS_INVALID", "BUCKET_REVIEW_INVALID", "BUCKET_COUNT_MISSING", "SHIFT_CHANGED", "SHIFT_EVENTS_TRUNCATED", "CASH_DRAWER_BUSY", "SELF_APPROVAL_FORBIDDEN", "INVALID_DENOMINATION", "INVALID_CURSOR", "WAREHOUSE_NOT_FOUND", "ROLE_FORBIDDEN", "VALIDATION_FAILED", "STORE_MODULE_DISABLED"];
|
|
520
524
|
export type ShiftErrorCode = (typeof SHIFT_ERROR_CODES)[number];
|
|
521
525
|
/**
|
|
522
526
|
* Where a {@link ShiftMethodTotal}'s `label` came from.
|
package/dist/cash.js
CHANGED
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
* - `WAREHOUSE_NOT_FOUND` · 404 — `GET /shifts?warehouseId=` naming a depósito
|
|
38
38
|
* the store does not have (`resolveReportWarehouseFilter`).
|
|
39
39
|
* - `ROLE_FORBIDDEN` · 403 · `VALIDATION_FAILED` · 400
|
|
40
|
+
* - `STORE_MODULE_DISABLED` · 403 — `POST /shifts` (open) while the store has
|
|
41
|
+
* `modules.cash` off; `data.module` is `'cash'` (`StoreModuleDisabledData`)
|
|
42
|
+
* and nothing is written. Close, movements, reconcile and reads of a shift
|
|
43
|
+
* already open stay reachable.
|
|
40
44
|
*
|
|
41
45
|
* ⚠️ Cross-cutting refusals are NOT repeated here — check `GATING_ERROR_CODES`
|
|
42
46
|
* as well, and `TERMINAL_ELEVATION_ERROR_CODES` for a money-out movement's PIN
|
|
@@ -62,6 +66,9 @@ export const SHIFT_ERROR_CODES = [
|
|
|
62
66
|
'WAREHOUSE_NOT_FOUND',
|
|
63
67
|
'ROLE_FORBIDDEN',
|
|
64
68
|
'VALIDATION_FAILED',
|
|
69
|
+
// Opening a shift while the store has `modules.cash` off; its `data` is
|
|
70
|
+
// `StoreModuleDisabledData` (`StoreModuleRefusalBody` types the whole body).
|
|
71
|
+
'STORE_MODULE_DISABLED',
|
|
65
72
|
];
|
|
66
73
|
/**
|
|
67
74
|
* Where a {@link ShiftMethodTotal}'s `label` came from.
|
package/dist/cjs/cash.js
CHANGED
|
@@ -40,6 +40,10 @@ exports.METHOD_LABEL_SOURCES = exports.SHIFT_ERROR_CODES = void 0;
|
|
|
40
40
|
* - `WAREHOUSE_NOT_FOUND` · 404 — `GET /shifts?warehouseId=` naming a depósito
|
|
41
41
|
* the store does not have (`resolveReportWarehouseFilter`).
|
|
42
42
|
* - `ROLE_FORBIDDEN` · 403 · `VALIDATION_FAILED` · 400
|
|
43
|
+
* - `STORE_MODULE_DISABLED` · 403 — `POST /shifts` (open) while the store has
|
|
44
|
+
* `modules.cash` off; `data.module` is `'cash'` (`StoreModuleDisabledData`)
|
|
45
|
+
* and nothing is written. Close, movements, reconcile and reads of a shift
|
|
46
|
+
* already open stay reachable.
|
|
43
47
|
*
|
|
44
48
|
* ⚠️ Cross-cutting refusals are NOT repeated here — check `GATING_ERROR_CODES`
|
|
45
49
|
* as well, and `TERMINAL_ELEVATION_ERROR_CODES` for a money-out movement's PIN
|
|
@@ -65,6 +69,9 @@ exports.SHIFT_ERROR_CODES = [
|
|
|
65
69
|
'WAREHOUSE_NOT_FOUND',
|
|
66
70
|
'ROLE_FORBIDDEN',
|
|
67
71
|
'VALIDATION_FAILED',
|
|
72
|
+
// Opening a shift while the store has `modules.cash` off; its `data` is
|
|
73
|
+
// `StoreModuleDisabledData` (`StoreModuleRefusalBody` types the whole body).
|
|
74
|
+
'STORE_MODULE_DISABLED',
|
|
68
75
|
];
|
|
69
76
|
/**
|
|
70
77
|
* Where a {@link ShiftMethodTotal}'s `label` came from.
|
package/dist/cjs/order.js
CHANGED
|
@@ -229,12 +229,23 @@ exports.orderFulfilmentProgress = orderFulfilmentProgress;
|
|
|
229
229
|
* `DEPOSIT_EXCEEDS_TOTAL` · 409 · `DEPOSIT_FREEZE_REQUIRES_INVOICE` · 409 ·
|
|
230
230
|
* `DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING` · 409 ·
|
|
231
231
|
* `DEPOSIT_FREEZE_INVOICE_PENDING` · 409 · `DEPOSIT_INVOICED_ORDER_MUST_FREEZE`
|
|
232
|
-
* · 409 · `
|
|
232
|
+
* · 409 · `DEPOSIT_FROZEN_ORDER_MUST_FREEZE` · 409 ·
|
|
233
|
+
* `DEPOSIT_CHARACTERIZATION_CONFLICT` · 409 ·
|
|
233
234
|
* `DEPOSIT_REFERENCE_IS_LINKED_PAYMENT` · 409 · `DEPOSIT_DUPLICATE_REFERENCE` ·
|
|
234
235
|
* 409 — `mode: 'deposit'`, see `OrderDepositRequest`. `DEPOSIT_EXCEEDS_TOTAL`
|
|
235
236
|
* is also `mode: 'edit'`'s and the update leg's answer to a re-price that
|
|
236
237
|
* would leave the order's net señas above its new charged total. Nothing was
|
|
237
238
|
* written on any of them.
|
|
239
|
+
* - `ORDER_PRICE_FROZEN` · 409 — `mode: 'edit'`, or a `discount` change on the
|
|
240
|
+
* update leg, whose new charged total differs from the stored one on an order
|
|
241
|
+
* still holding an unrefunded seña that froze the price with NO factura (taken
|
|
242
|
+
* while `config.modules.fiscalInvoicing` was `false`). `data: { orderId }`.
|
|
243
|
+
* An edit that leaves the charged total unchanged still lands; giving that
|
|
244
|
+
* seña back (`mode: 'deposit-refund'`) lifts it. It is a refusal, not an
|
|
245
|
+
* `OrderLockReason`: the lock matrix is unchanged. A freeze applied to a
|
|
246
|
+
* factura answers that factura's own refusals instead (`ORDER_LOCKED`
|
|
247
|
+
* `invoiced` on an edit, `ORDER_DISCOUNT_AFTER_INVOICE` on the update leg).
|
|
248
|
+
* Nothing was written.
|
|
238
249
|
* - `TILL_TENDER_REQUIRES_DEPOSIT` · 400 — `mode: 'tender'` adding till money
|
|
239
250
|
* (any leg whose `source` is not `account`) to an order that is NOT yet
|
|
240
251
|
* delivered and holds no seña: money taken before delivery is a seña and
|
|
@@ -557,6 +568,8 @@ exports.ORDER_ERROR_CODES = [
|
|
|
557
568
|
'DEPOSIT_CHARACTERIZATION_CONFLICT',
|
|
558
569
|
'DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING',
|
|
559
570
|
'DEPOSIT_INVOICED_ORDER_MUST_FREEZE',
|
|
571
|
+
// A non-freezing seña on an order already holding a seña frozen with no factura.
|
|
572
|
+
'DEPOSIT_FROZEN_ORDER_MUST_FREEZE',
|
|
560
573
|
'DEPOSIT_REFERENCE_IS_LINKED_PAYMENT',
|
|
561
574
|
'DEPOSIT_DUPLICATE_REFERENCE',
|
|
562
575
|
// Till money on an undelivered order with no seña — `mode: 'deposit'` takes it.
|
|
@@ -565,6 +578,8 @@ exports.ORDER_ERROR_CODES = [
|
|
|
565
578
|
'PAYMENT_REFERENCED_BY_DEPOSIT',
|
|
566
579
|
// Customer cancellation of an order still holding a seña.
|
|
567
580
|
'ORDER_HAS_UNREFUNDED_DEPOSIT',
|
|
581
|
+
// A re-price moving the charged total of an order a seña froze with no factura.
|
|
582
|
+
'ORDER_PRICE_FROZEN',
|
|
568
583
|
// `POST /orders { mode: 'deposit-refund' }` — see `OrderDepositRefundRequest`.
|
|
569
584
|
'DEPOSIT_NOT_FOUND',
|
|
570
585
|
'DEPOSIT_ALREADY_REFUNDED',
|
package/dist/cjs/store.js
CHANGED
|
@@ -71,10 +71,14 @@ exports.isStoreModuleOn = isStoreModuleOn;
|
|
|
71
71
|
* - `STORE_MODULE_BALANCE_CHECK_INCOMPLETE` (409) — the bounded balance read
|
|
72
72
|
* stopped before it could prove every balance is zero. Retrying is harmless but
|
|
73
73
|
* walks the same rows, so a very large customer book keeps answering it.
|
|
74
|
+
* - `STORE_MODULE_SHIFTS_OPEN` (409) — `cash` off while any cash shift of the
|
|
75
|
+
* store is still open (the default drawer is not a shift anyone closes, so it
|
|
76
|
+
* never counts); `data.openShifts` carries the count, `data.truncated: true`
|
|
77
|
+
* marks it as a floor (see {@link StoreModuleShiftsOpenData}).
|
|
74
78
|
* - `STORE_MODULE_DISABLED` (403) — a server-enforced module is off (storefront
|
|
75
|
-
* self-booking, storefront survey); `data.module` names
|
|
76
|
-
* answers it too when a create, or returning a depósito
|
|
77
|
-
* a second active depósito while `multiWarehouse` is off
|
|
79
|
+
* self-booking, storefront survey, opening a cash shift); `data.module` names
|
|
80
|
+
* it. `POST /warehouses` answers it too when a create, or returning a depósito
|
|
81
|
+
* to service, would add a second active depósito while `multiWarehouse` is off
|
|
78
82
|
* (`data.module: 'multiWarehouse'`). Always 403, and never an Action Denied row.
|
|
79
83
|
*/
|
|
80
84
|
exports.STORE_MODULE_ERROR_CODES = [
|
|
@@ -84,5 +88,6 @@ exports.STORE_MODULE_ERROR_CODES = [
|
|
|
84
88
|
'STORE_MODULE_TRANSFER_IN_FLIGHT',
|
|
85
89
|
'STORE_MODULE_CUSTOMER_BALANCES',
|
|
86
90
|
'STORE_MODULE_BALANCE_CHECK_INCOMPLETE',
|
|
91
|
+
'STORE_MODULE_SHIFTS_OPEN',
|
|
87
92
|
'STORE_MODULE_DISABLED',
|
|
88
93
|
];
|
package/dist/cjs/terminal.js
CHANGED
|
@@ -66,7 +66,8 @@ exports.TERMINAL_ENROLMENT_ERROR_CODES = [
|
|
|
66
66
|
*
|
|
67
67
|
* - `TERMINAL_NOT_PAIRED` · 401 — the request carried no `sf_terminal` cookie,
|
|
68
68
|
* or one naming an unknown, expired or revoked terminal. Re-pair the till.
|
|
69
|
-
* - `SHIFT_NOT_OPEN` · 409 — activation by an employee who holds no open shift
|
|
69
|
+
* - `SHIFT_NOT_OPEN` · 409 — activation by an employee who holds no open shift,
|
|
70
|
+
* while the store's `cash` module is on (with it off no shift is asked for).
|
|
70
71
|
* - `TERMINAL_ACTIVATION_SESSION_INVALID` · 401 — the presented USER refresh
|
|
71
72
|
* credential cannot identify a signed modern family; clear delivery and sign in again.
|
|
72
73
|
* - `TERMINAL_ACTIVATION_SESSION_MISMATCH` · 409 — its signed employee or store
|
package/dist/order.d.ts
CHANGED
|
@@ -57,6 +57,11 @@ declare global {
|
|
|
57
57
|
* freezing SALES seña was applied to WHEN IT WAS TAKEN. On a carried
|
|
58
58
|
* service receipt this copies `appliedToInvoiceId` only when recorded;
|
|
59
59
|
* its absence is preserved, never inferred from `freezesPrice`.
|
|
60
|
+
* ⚠️ ABSENT on a freezing SALES seña too when it was taken while the
|
|
61
|
+
* store's `config.modules.fiscalInvoicing` was `false` over an order
|
|
62
|
+
* carrying no live voucher: that freeze records no factura. A reader
|
|
63
|
+
* prints or reasons about the freeze from `freezesPrice`, and about a
|
|
64
|
+
* factura only when this is present.
|
|
60
65
|
* The factura is issued for the order's full lines and is never
|
|
61
66
|
* reduced by the seña. A historical stamp: nothing re-points it
|
|
62
67
|
* if a credit note later credits that factura.
|
|
@@ -1917,7 +1922,11 @@ declare global {
|
|
|
1917
1922
|
* which), `409 DEPOSIT_CURRENCY_MISMATCH` (a cash seña whose drawer did not
|
|
1918
1923
|
* declare the order's currency; the body carries `declaredCurrencies`), `409 DEPOSIT_EXCEEDS_TOTAL` (more than the order still
|
|
1919
1924
|
* owes), `409 DEPOSIT_FREEZE_REQUIRES_INVOICE` (`freezesPrice: true` on an
|
|
1920
|
-
* order carrying no live voucher at all — invoice it first
|
|
1925
|
+
* order carrying no live voucher at all — invoice it first; NEVER answered
|
|
1926
|
+
* while the store's `config.modules.fiscalInvoicing` is `false`, where that
|
|
1927
|
+
* freeze is accepted with no `invoiceId` instead — absent or unreadable
|
|
1928
|
+
* modules count as on — except at commit, when fiscal invoicing was switched
|
|
1929
|
+
* back on between the read and the write; nothing is booked then), `409
|
|
1921
1930
|
* DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING` (`freezesPrice: true` where the
|
|
1922
1931
|
* order's vouchers exist but none qualifies — a factura a credit note counts
|
|
1923
1932
|
* as credited, a credit note still pending; invoicing again is NOT the
|
|
@@ -1925,7 +1934,10 @@ declare global {
|
|
|
1925
1934
|
* `pending_cae`, for either characterization), `409
|
|
1926
1935
|
* DEPOSIT_INVOICED_ORDER_MUST_FREEZE` (`freezesPrice: false` on an order
|
|
1927
1936
|
* already carrying an uncredited authorized factura — the price is already
|
|
1928
|
-
* fixed by it), `409
|
|
1937
|
+
* fixed by it), `409 DEPOSIT_FROZEN_ORDER_MUST_FREEZE` (`freezesPrice: false`
|
|
1938
|
+
* on an order still holding an unrefunded seña that froze the price with no
|
|
1939
|
+
* factura — the price is already frozen by it), `409
|
|
1940
|
+
* DEPOSIT_REFERENCE_IS_LINKED_PAYMENT` (the `reference` is
|
|
1929
1941
|
* a payment already linked to the order) and `409
|
|
1930
1942
|
* DEPOSIT_CHARACTERIZATION_CONFLICT` (a replay of an existing leg — a seña of
|
|
1931
1943
|
* the other characterization, or an ordinary tender — on money, method,
|
|
@@ -1956,7 +1968,11 @@ declare global {
|
|
|
1956
1968
|
reference?: string;
|
|
1957
1969
|
/** Cash handed back — a `source: 'cash'` seña only. */
|
|
1958
1970
|
change?: number;
|
|
1959
|
-
/**
|
|
1971
|
+
/**
|
|
1972
|
+
* Required, never defaulted. `true` needs an authorized factura on the order
|
|
1973
|
+
* first — except with `modules.fiscalInvoicing` off and no live voucher on
|
|
1974
|
+
* the order, where it freezes with no factura.
|
|
1975
|
+
*/
|
|
1960
1976
|
freezesPrice: boolean;
|
|
1961
1977
|
/** Same semantics as {@link OrderTenderRequest.shiftId}. */
|
|
1962
1978
|
shiftId?: string;
|
|
@@ -2500,12 +2516,23 @@ export declare const orderFulfilmentProgress: (order: OrderFulfilmentProgressInp
|
|
|
2500
2516
|
* `DEPOSIT_EXCEEDS_TOTAL` · 409 · `DEPOSIT_FREEZE_REQUIRES_INVOICE` · 409 ·
|
|
2501
2517
|
* `DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING` · 409 ·
|
|
2502
2518
|
* `DEPOSIT_FREEZE_INVOICE_PENDING` · 409 · `DEPOSIT_INVOICED_ORDER_MUST_FREEZE`
|
|
2503
|
-
* · 409 · `
|
|
2519
|
+
* · 409 · `DEPOSIT_FROZEN_ORDER_MUST_FREEZE` · 409 ·
|
|
2520
|
+
* `DEPOSIT_CHARACTERIZATION_CONFLICT` · 409 ·
|
|
2504
2521
|
* `DEPOSIT_REFERENCE_IS_LINKED_PAYMENT` · 409 · `DEPOSIT_DUPLICATE_REFERENCE` ·
|
|
2505
2522
|
* 409 — `mode: 'deposit'`, see `OrderDepositRequest`. `DEPOSIT_EXCEEDS_TOTAL`
|
|
2506
2523
|
* is also `mode: 'edit'`'s and the update leg's answer to a re-price that
|
|
2507
2524
|
* would leave the order's net señas above its new charged total. Nothing was
|
|
2508
2525
|
* written on any of them.
|
|
2526
|
+
* - `ORDER_PRICE_FROZEN` · 409 — `mode: 'edit'`, or a `discount` change on the
|
|
2527
|
+
* update leg, whose new charged total differs from the stored one on an order
|
|
2528
|
+
* still holding an unrefunded seña that froze the price with NO factura (taken
|
|
2529
|
+
* while `config.modules.fiscalInvoicing` was `false`). `data: { orderId }`.
|
|
2530
|
+
* An edit that leaves the charged total unchanged still lands; giving that
|
|
2531
|
+
* seña back (`mode: 'deposit-refund'`) lifts it. It is a refusal, not an
|
|
2532
|
+
* `OrderLockReason`: the lock matrix is unchanged. A freeze applied to a
|
|
2533
|
+
* factura answers that factura's own refusals instead (`ORDER_LOCKED`
|
|
2534
|
+
* `invoiced` on an edit, `ORDER_DISCOUNT_AFTER_INVOICE` on the update leg).
|
|
2535
|
+
* Nothing was written.
|
|
2509
2536
|
* - `TILL_TENDER_REQUIRES_DEPOSIT` · 400 — `mode: 'tender'` adding till money
|
|
2510
2537
|
* (any leg whose `source` is not `account`) to an order that is NOT yet
|
|
2511
2538
|
* delivered and holds no seña: money taken before delivery is a seña and
|
|
@@ -2772,6 +2799,6 @@ export declare const orderFulfilmentProgress: (order: OrderFulfilmentProgressInp
|
|
|
2772
2799
|
* `SUBSCRIPTION_READONLY`) sit on the order CREATE leg only: an edit is not a new
|
|
2773
2800
|
* order, so `bareOrderPostHandler` routes past `requireMetered` entirely.
|
|
2774
2801
|
*/
|
|
2775
|
-
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_REFERENCE_IS_LINKED_PAYMENT", "DEPOSIT_DUPLICATE_REFERENCE", "TILL_TENDER_REQUIRES_DEPOSIT", "PAYMENT_REFERENCED_BY_DEPOSIT", "ORDER_HAS_UNREFUNDED_DEPOSIT", "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"];
|
|
2802
|
+
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"];
|
|
2776
2803
|
export type OrderErrorCode = (typeof ORDER_ERROR_CODES)[number];
|
|
2777
2804
|
export {};
|
package/dist/order.js
CHANGED
|
@@ -222,12 +222,23 @@ export const orderFulfilmentProgress = (order) => {
|
|
|
222
222
|
* `DEPOSIT_EXCEEDS_TOTAL` · 409 · `DEPOSIT_FREEZE_REQUIRES_INVOICE` · 409 ·
|
|
223
223
|
* `DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING` · 409 ·
|
|
224
224
|
* `DEPOSIT_FREEZE_INVOICE_PENDING` · 409 · `DEPOSIT_INVOICED_ORDER_MUST_FREEZE`
|
|
225
|
-
* · 409 · `
|
|
225
|
+
* · 409 · `DEPOSIT_FROZEN_ORDER_MUST_FREEZE` · 409 ·
|
|
226
|
+
* `DEPOSIT_CHARACTERIZATION_CONFLICT` · 409 ·
|
|
226
227
|
* `DEPOSIT_REFERENCE_IS_LINKED_PAYMENT` · 409 · `DEPOSIT_DUPLICATE_REFERENCE` ·
|
|
227
228
|
* 409 — `mode: 'deposit'`, see `OrderDepositRequest`. `DEPOSIT_EXCEEDS_TOTAL`
|
|
228
229
|
* is also `mode: 'edit'`'s and the update leg's answer to a re-price that
|
|
229
230
|
* would leave the order's net señas above its new charged total. Nothing was
|
|
230
231
|
* written on any of them.
|
|
232
|
+
* - `ORDER_PRICE_FROZEN` · 409 — `mode: 'edit'`, or a `discount` change on the
|
|
233
|
+
* update leg, whose new charged total differs from the stored one on an order
|
|
234
|
+
* still holding an unrefunded seña that froze the price with NO factura (taken
|
|
235
|
+
* while `config.modules.fiscalInvoicing` was `false`). `data: { orderId }`.
|
|
236
|
+
* An edit that leaves the charged total unchanged still lands; giving that
|
|
237
|
+
* seña back (`mode: 'deposit-refund'`) lifts it. It is a refusal, not an
|
|
238
|
+
* `OrderLockReason`: the lock matrix is unchanged. A freeze applied to a
|
|
239
|
+
* factura answers that factura's own refusals instead (`ORDER_LOCKED`
|
|
240
|
+
* `invoiced` on an edit, `ORDER_DISCOUNT_AFTER_INVOICE` on the update leg).
|
|
241
|
+
* Nothing was written.
|
|
231
242
|
* - `TILL_TENDER_REQUIRES_DEPOSIT` · 400 — `mode: 'tender'` adding till money
|
|
232
243
|
* (any leg whose `source` is not `account`) to an order that is NOT yet
|
|
233
244
|
* delivered and holds no seña: money taken before delivery is a seña and
|
|
@@ -550,6 +561,8 @@ export const ORDER_ERROR_CODES = [
|
|
|
550
561
|
'DEPOSIT_CHARACTERIZATION_CONFLICT',
|
|
551
562
|
'DEPOSIT_FREEZE_INVOICE_NOT_QUALIFYING',
|
|
552
563
|
'DEPOSIT_INVOICED_ORDER_MUST_FREEZE',
|
|
564
|
+
// A non-freezing seña on an order already holding a seña frozen with no factura.
|
|
565
|
+
'DEPOSIT_FROZEN_ORDER_MUST_FREEZE',
|
|
553
566
|
'DEPOSIT_REFERENCE_IS_LINKED_PAYMENT',
|
|
554
567
|
'DEPOSIT_DUPLICATE_REFERENCE',
|
|
555
568
|
// Till money on an undelivered order with no seña — `mode: 'deposit'` takes it.
|
|
@@ -558,6 +571,8 @@ export const ORDER_ERROR_CODES = [
|
|
|
558
571
|
'PAYMENT_REFERENCED_BY_DEPOSIT',
|
|
559
572
|
// Customer cancellation of an order still holding a seña.
|
|
560
573
|
'ORDER_HAS_UNREFUNDED_DEPOSIT',
|
|
574
|
+
// A re-price moving the charged total of an order a seña froze with no factura.
|
|
575
|
+
'ORDER_PRICE_FROZEN',
|
|
561
576
|
// `POST /orders { mode: 'deposit-refund' }` — see `OrderDepositRefundRequest`.
|
|
562
577
|
'DEPOSIT_NOT_FOUND',
|
|
563
578
|
'DEPOSIT_ALREADY_REFUNDED',
|
package/dist/store.d.ts
CHANGED
|
@@ -915,9 +915,10 @@ declare global {
|
|
|
915
915
|
* `customerAccounts` while any customer carries a non-zero balance
|
|
916
916
|
* (`409 STORE_MODULE_CUSTOMER_BALANCES`, or
|
|
917
917
|
* `409 STORE_MODULE_BALANCE_CHECK_INCOMPLETE` when the bounded read could
|
|
918
|
-
* not finish)
|
|
918
|
+
* not finish); `cash` while any cash shift is still open
|
|
919
|
+
* (`409 STORE_MODULE_SHIFTS_OPEN` — `StoreModuleShiftsOpenData`).
|
|
919
920
|
*
|
|
920
|
-
* Enforced on the server for
|
|
921
|
+
* Enforced on the server for seven modules only:
|
|
921
922
|
* - `promotions` — applying one is refused `PROMOTION_NOT_ACTIVE` (the
|
|
922
923
|
* existing promotion refusal, not `STORE_MODULE_DISABLED`), a grant already
|
|
923
924
|
* frozen on a cart stays on the row but derives no money (its
|
|
@@ -942,6 +943,10 @@ declare global {
|
|
|
942
943
|
* operator's `POST /loyalty/earn` and every read stay reachable.
|
|
943
944
|
* - `marketing` — automation and campaign sends go out to nobody: each is
|
|
944
945
|
* settled `'skipped'` with reason `MODULE_OFF` at its send worker.
|
|
946
|
+
* - `cash` — a POS terminal activates WITHOUT a shift (no `shiftId`,
|
|
947
|
+
* living until its own expiry), and opening a shift (`POST /shifts`) is
|
|
948
|
+
* refused `403 STORE_MODULE_DISABLED`; every other `/shifts` endpoint
|
|
949
|
+
* (close, movements, reconcile, reads) stays reachable.
|
|
945
950
|
* Every other module is hide-only: its endpoints stay reachable. Public
|
|
946
951
|
* reads carry only `appointments`, `surveys`, `promotions` and
|
|
947
952
|
* `customerAccounts`. `PUT /platform/stores/{storeId}` refuses the leaf.
|
|
@@ -2046,13 +2051,17 @@ export declare const isStoreModuleOn: (modules: StoreModules | null | undefined,
|
|
|
2046
2051
|
* - `STORE_MODULE_BALANCE_CHECK_INCOMPLETE` (409) — the bounded balance read
|
|
2047
2052
|
* stopped before it could prove every balance is zero. Retrying is harmless but
|
|
2048
2053
|
* walks the same rows, so a very large customer book keeps answering it.
|
|
2054
|
+
* - `STORE_MODULE_SHIFTS_OPEN` (409) — `cash` off while any cash shift of the
|
|
2055
|
+
* store is still open (the default drawer is not a shift anyone closes, so it
|
|
2056
|
+
* never counts); `data.openShifts` carries the count, `data.truncated: true`
|
|
2057
|
+
* marks it as a floor (see {@link StoreModuleShiftsOpenData}).
|
|
2049
2058
|
* - `STORE_MODULE_DISABLED` (403) — a server-enforced module is off (storefront
|
|
2050
|
-
* self-booking, storefront survey); `data.module` names
|
|
2051
|
-
* answers it too when a create, or returning a depósito
|
|
2052
|
-
* a second active depósito while `multiWarehouse` is off
|
|
2059
|
+
* self-booking, storefront survey, opening a cash shift); `data.module` names
|
|
2060
|
+
* it. `POST /warehouses` answers it too when a create, or returning a depósito
|
|
2061
|
+
* to service, would add a second active depósito while `multiWarehouse` is off
|
|
2053
2062
|
* (`data.module: 'multiWarehouse'`). Always 403, and never an Action Denied row.
|
|
2054
2063
|
*/
|
|
2055
|
-
export declare const STORE_MODULE_ERROR_CODES: readonly ["STORE_MODULE_UNKNOWN", "STORE_MODULE_NOT_BOOLEAN", "STORE_MODULE_WAREHOUSES_ACTIVE", "STORE_MODULE_TRANSFER_IN_FLIGHT", "STORE_MODULE_CUSTOMER_BALANCES", "STORE_MODULE_BALANCE_CHECK_INCOMPLETE", "STORE_MODULE_DISABLED"];
|
|
2064
|
+
export declare const STORE_MODULE_ERROR_CODES: readonly ["STORE_MODULE_UNKNOWN", "STORE_MODULE_NOT_BOOLEAN", "STORE_MODULE_WAREHOUSES_ACTIVE", "STORE_MODULE_TRANSFER_IN_FLIGHT", "STORE_MODULE_CUSTOMER_BALANCES", "STORE_MODULE_BALANCE_CHECK_INCOMPLETE", "STORE_MODULE_SHIFTS_OPEN", "STORE_MODULE_DISABLED"];
|
|
2056
2065
|
export type StoreModuleErrorCode = (typeof STORE_MODULE_ERROR_CODES)[number];
|
|
2057
2066
|
/** `data` of `400 STORE_MODULE_UNKNOWN` — the unknown key, cut to its first 64 UTF-16 code units. */
|
|
2058
2067
|
export interface StoreModuleUnknownData {
|
|
@@ -2092,7 +2101,20 @@ export interface StoreModuleCustomerBalancesData {
|
|
|
2092
2101
|
export interface StoreModuleBalanceCheckIncompleteData {
|
|
2093
2102
|
module: 'customerAccounts';
|
|
2094
2103
|
}
|
|
2095
|
-
/**
|
|
2104
|
+
/**
|
|
2105
|
+
* `data` of `409 STORE_MODULE_SHIFTS_OPEN`.
|
|
2106
|
+
*
|
|
2107
|
+
* `openShifts` is the number of open cash shifts the read SAW — the store
|
|
2108
|
+
* default drawer excluded. `truncated: true` marks the read as stopped early,
|
|
2109
|
+
* so that number is a FLOOR (possibly `0`: "could not finish counting");
|
|
2110
|
+
* absent, the count is exact and at least one.
|
|
2111
|
+
*/
|
|
2112
|
+
export interface StoreModuleShiftsOpenData {
|
|
2113
|
+
module: 'cash';
|
|
2114
|
+
openShifts: number;
|
|
2115
|
+
truncated?: true;
|
|
2116
|
+
}
|
|
2117
|
+
/** `data` of `403 STORE_MODULE_DISABLED` — the switched-off module the request needed. */
|
|
2096
2118
|
export interface StoreModuleDisabledData {
|
|
2097
2119
|
module: StoreModuleKey;
|
|
2098
2120
|
}
|
|
@@ -2109,6 +2131,7 @@ export interface StoreModuleRefusalDataByCode {
|
|
|
2109
2131
|
STORE_MODULE_TRANSFER_IN_FLIGHT: StoreModuleTransferInFlightData;
|
|
2110
2132
|
STORE_MODULE_CUSTOMER_BALANCES: StoreModuleCustomerBalancesData;
|
|
2111
2133
|
STORE_MODULE_BALANCE_CHECK_INCOMPLETE: StoreModuleBalanceCheckIncompleteData;
|
|
2134
|
+
STORE_MODULE_SHIFTS_OPEN: StoreModuleShiftsOpenData;
|
|
2112
2135
|
STORE_MODULE_DISABLED: StoreModuleDisabledData;
|
|
2113
2136
|
}
|
|
2114
2137
|
/**
|
package/dist/store.js
CHANGED
|
@@ -66,10 +66,14 @@ export const isStoreModuleOn = (modules, module) => modules?.[module] !== false;
|
|
|
66
66
|
* - `STORE_MODULE_BALANCE_CHECK_INCOMPLETE` (409) — the bounded balance read
|
|
67
67
|
* stopped before it could prove every balance is zero. Retrying is harmless but
|
|
68
68
|
* walks the same rows, so a very large customer book keeps answering it.
|
|
69
|
+
* - `STORE_MODULE_SHIFTS_OPEN` (409) — `cash` off while any cash shift of the
|
|
70
|
+
* store is still open (the default drawer is not a shift anyone closes, so it
|
|
71
|
+
* never counts); `data.openShifts` carries the count, `data.truncated: true`
|
|
72
|
+
* marks it as a floor (see {@link StoreModuleShiftsOpenData}).
|
|
69
73
|
* - `STORE_MODULE_DISABLED` (403) — a server-enforced module is off (storefront
|
|
70
|
-
* self-booking, storefront survey); `data.module` names
|
|
71
|
-
* answers it too when a create, or returning a depósito
|
|
72
|
-
* a second active depósito while `multiWarehouse` is off
|
|
74
|
+
* self-booking, storefront survey, opening a cash shift); `data.module` names
|
|
75
|
+
* it. `POST /warehouses` answers it too when a create, or returning a depósito
|
|
76
|
+
* to service, would add a second active depósito while `multiWarehouse` is off
|
|
73
77
|
* (`data.module: 'multiWarehouse'`). Always 403, and never an Action Denied row.
|
|
74
78
|
*/
|
|
75
79
|
export const STORE_MODULE_ERROR_CODES = [
|
|
@@ -79,5 +83,6 @@ export const STORE_MODULE_ERROR_CODES = [
|
|
|
79
83
|
'STORE_MODULE_TRANSFER_IN_FLIGHT',
|
|
80
84
|
'STORE_MODULE_CUSTOMER_BALANCES',
|
|
81
85
|
'STORE_MODULE_BALANCE_CHECK_INCOMPLETE',
|
|
86
|
+
'STORE_MODULE_SHIFTS_OPEN',
|
|
82
87
|
'STORE_MODULE_DISABLED',
|
|
83
88
|
];
|
package/dist/terminal.d.ts
CHANGED
|
@@ -293,11 +293,18 @@ declare global {
|
|
|
293
293
|
activatedByName: string;
|
|
294
294
|
/**
|
|
295
295
|
* The activating employee's OPEN shift. The activation ends the moment
|
|
296
|
-
* this shift closes; activating with no open shift is `409 SHIFT_NOT_OPEN
|
|
296
|
+
* this shift closes; activating with no open shift is `409 SHIFT_NOT_OPEN`
|
|
297
|
+
* while the store's `cash` module is on (absent counts as on).
|
|
298
|
+
*
|
|
299
|
+
* ABSENT on a SHIFT-LESS activation — one made while
|
|
300
|
+
* `config.modules.cash === false`, when no shift is asked for. That
|
|
301
|
+
* activation lives until `expiresAt` alone, whatever the switch reads
|
|
302
|
+
* later; cash sales on its till attribute to the store's default drawer
|
|
303
|
+
* whenever the operator holds no open shift of their own.
|
|
297
304
|
*/
|
|
298
|
-
shiftId
|
|
305
|
+
shiftId?: string;
|
|
299
306
|
activatedAt: number;
|
|
300
|
-
/** The 12-hour hard cap, unix ms.
|
|
307
|
+
/** The 12-hour hard cap, unix ms. A shift-bound activation's shift closing ends it sooner. */
|
|
301
308
|
expiresAt: number;
|
|
302
309
|
}
|
|
303
310
|
/** A PIN ladder refusal from operator login or elevation; whole seconds until that gate unlocks. */
|
|
@@ -563,7 +570,8 @@ export type TerminalEnrolmentErrorCode = (typeof TERMINAL_ENROLMENT_ERROR_CODES)
|
|
|
563
570
|
*
|
|
564
571
|
* - `TERMINAL_NOT_PAIRED` · 401 — the request carried no `sf_terminal` cookie,
|
|
565
572
|
* or one naming an unknown, expired or revoked terminal. Re-pair the till.
|
|
566
|
-
* - `SHIFT_NOT_OPEN` · 409 — activation by an employee who holds no open shift
|
|
573
|
+
* - `SHIFT_NOT_OPEN` · 409 — activation by an employee who holds no open shift,
|
|
574
|
+
* while the store's `cash` module is on (with it off no shift is asked for).
|
|
567
575
|
* - `TERMINAL_ACTIVATION_SESSION_INVALID` · 401 — the presented USER refresh
|
|
568
576
|
* credential cannot identify a signed modern family; clear delivery and sign in again.
|
|
569
577
|
* - `TERMINAL_ACTIVATION_SESSION_MISMATCH` · 409 — its signed employee or store
|
package/dist/terminal.js
CHANGED
|
@@ -63,7 +63,8 @@ export const TERMINAL_ENROLMENT_ERROR_CODES = [
|
|
|
63
63
|
*
|
|
64
64
|
* - `TERMINAL_NOT_PAIRED` · 401 — the request carried no `sf_terminal` cookie,
|
|
65
65
|
* or one naming an unknown, expired or revoked terminal. Re-pair the till.
|
|
66
|
-
* - `SHIFT_NOT_OPEN` · 409 — activation by an employee who holds no open shift
|
|
66
|
+
* - `SHIFT_NOT_OPEN` · 409 — activation by an employee who holds no open shift,
|
|
67
|
+
* while the store's `cash` module is on (with it off no shift is asked for).
|
|
67
68
|
* - `TERMINAL_ACTIVATION_SESSION_INVALID` · 401 — the presented USER refresh
|
|
68
69
|
* credential cannot identify a signed modern family; clear delivery and sign in again.
|
|
69
70
|
* - `TERMINAL_ACTIVATION_SESSION_MISMATCH` · 409 — its signed employee or store
|