platform-types 1.10.730 → 1.10.732
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 +10 -4
- package/dist/cjs/order.js +16 -1
- package/dist/cjs/store.js +4 -1
- package/dist/order.d.ts +32 -5
- package/dist/order.js +16 -1
- package/dist/store.d.ts +9 -3
- package/dist/store.js +4 -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
|
@@ -141,10 +141,16 @@ declare global {
|
|
|
141
141
|
currency: string;
|
|
142
142
|
/**
|
|
143
143
|
* The depósito (`Warehouse.warehouseId`) this drawer sits in, stamped once at
|
|
144
|
-
* apertura so a sucursal can count and close its own tills. The
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
144
|
+
* apertura so a sucursal can count and close its own tills. The sale
|
|
145
|
+
* depósito ladder without its request and channel rungs, under the same
|
|
146
|
+
* `multiWarehouse` switch and sucursal scope: the cashier's
|
|
147
|
+
* `User.defaultWarehouseId` when it names an active depósito in their scope,
|
|
148
|
+
* else the store's primary, else a scoped cashier's first active allowed
|
|
149
|
+
* depósito. With `Store.config.modules.multiWarehouse` off the default is
|
|
150
|
+
* skipped, so the shift sits where the cashier's sales land. A scoped
|
|
151
|
+
* cashier with no active depósito left in scope falls back to the unscoped
|
|
152
|
+
* ladder (the default when on, else the primary), so the shift is still
|
|
153
|
+
* stamped.
|
|
148
154
|
*
|
|
149
155
|
* ⚠️ Optional and FORWARD-ONLY: shifts opened before it existed, shifts at a
|
|
150
156
|
* store with no depósito, and the store's default drawer carry none.
|
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
|
@@ -72,7 +72,10 @@ exports.isStoreModuleOn = isStoreModuleOn;
|
|
|
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
74
|
* - `STORE_MODULE_DISABLED` (403) — a server-enforced module is off (storefront
|
|
75
|
-
* self-booking, storefront survey); `data.module` names it.
|
|
75
|
+
* self-booking, storefront survey); `data.module` names it. `POST /warehouses`
|
|
76
|
+
* answers it too when a create, or returning a depósito to service, would add
|
|
77
|
+
* a second active depósito while `multiWarehouse` is off
|
|
78
|
+
* (`data.module: 'multiWarehouse'`). Always 403, and never an Action Denied row.
|
|
76
79
|
*/
|
|
77
80
|
exports.STORE_MODULE_ERROR_CODES = [
|
|
78
81
|
'STORE_MODULE_UNKNOWN',
|
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
|
@@ -933,7 +933,10 @@ declare global {
|
|
|
933
933
|
* so none is recorded, broadcast or mailed.
|
|
934
934
|
* - `multiWarehouse` — every sale resolves to the primary depósito (a
|
|
935
935
|
* scoped operator's sale to their own home depósito when the primary is
|
|
936
|
-
* outside their scope), and only the primary feeds MercadoLibre.
|
|
936
|
+
* outside their scope), and only the primary feeds MercadoLibre. A cash
|
|
937
|
+
* shift opens on that same depósito (the cashier's default is skipped),
|
|
938
|
+
* and creating or reactivating a depósito while another is active is
|
|
939
|
+
* refused `403 STORE_MODULE_DISABLED`.
|
|
937
940
|
* - `loyalty` — the automatic earn credits nothing (the `loyalty-earn`
|
|
938
941
|
* worker skips it, including one queued before the switch). The
|
|
939
942
|
* operator's `POST /loyalty/earn` and every read stay reachable.
|
|
@@ -2044,7 +2047,10 @@ export declare const isStoreModuleOn: (modules: StoreModules | null | undefined,
|
|
|
2044
2047
|
* stopped before it could prove every balance is zero. Retrying is harmless but
|
|
2045
2048
|
* walks the same rows, so a very large customer book keeps answering it.
|
|
2046
2049
|
* - `STORE_MODULE_DISABLED` (403) — a server-enforced module is off (storefront
|
|
2047
|
-
* self-booking, storefront survey); `data.module` names it.
|
|
2050
|
+
* self-booking, storefront survey); `data.module` names it. `POST /warehouses`
|
|
2051
|
+
* answers it too when a create, or returning a depósito to service, would add
|
|
2052
|
+
* a second active depósito while `multiWarehouse` is off
|
|
2053
|
+
* (`data.module: 'multiWarehouse'`). Always 403, and never an Action Denied row.
|
|
2048
2054
|
*/
|
|
2049
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"];
|
|
2050
2056
|
export type StoreModuleErrorCode = (typeof STORE_MODULE_ERROR_CODES)[number];
|
|
@@ -2086,7 +2092,7 @@ export interface StoreModuleCustomerBalancesData {
|
|
|
2086
2092
|
export interface StoreModuleBalanceCheckIncompleteData {
|
|
2087
2093
|
module: 'customerAccounts';
|
|
2088
2094
|
}
|
|
2089
|
-
/** `data` of `
|
|
2095
|
+
/** `data` of `STORE_MODULE_DISABLED` (403) — the switched-off module the request needed. */
|
|
2090
2096
|
export interface StoreModuleDisabledData {
|
|
2091
2097
|
module: StoreModuleKey;
|
|
2092
2098
|
}
|
package/dist/store.js
CHANGED
|
@@ -67,7 +67,10 @@ export const isStoreModuleOn = (modules, module) => modules?.[module] !== false;
|
|
|
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
69
|
* - `STORE_MODULE_DISABLED` (403) — a server-enforced module is off (storefront
|
|
70
|
-
* self-booking, storefront survey); `data.module` names it.
|
|
70
|
+
* self-booking, storefront survey); `data.module` names it. `POST /warehouses`
|
|
71
|
+
* answers it too when a create, or returning a depósito to service, would add
|
|
72
|
+
* a second active depósito while `multiWarehouse` is off
|
|
73
|
+
* (`data.module: 'multiWarehouse'`). Always 403, and never an Action Denied row.
|
|
71
74
|
*/
|
|
72
75
|
export const STORE_MODULE_ERROR_CODES = [
|
|
73
76
|
'STORE_MODULE_UNKNOWN',
|