platform-types 1.10.785 → 1.10.787
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/cjs/invoice.js +32 -1
- package/dist/cjs/order.js +2 -0
- package/dist/cjs/wholesaleRequest.js +2 -1
- package/dist/customer.d.ts +26 -0
- package/dist/invoice.d.ts +23 -0
- package/dist/invoice.js +31 -0
- package/dist/order.d.ts +13 -1
- package/dist/order.js +2 -0
- package/dist/wholesaleRequest.d.ts +11 -1
- package/dist/wholesaleRequest.js +2 -1
- package/package.json +1 -1
package/dist/cjs/invoice.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INVOICE_NOT_AUTHORIZED_RECOVERIES = exports.INVOICE_DOCUMENT_REFUSAL_CODES = exports.INVOICE_ISSUANCE_REFUSAL_RECOVERY = exports.INVOICE_ISSUANCE_REFUSAL_CODES = exports.INVOICE_POST_VOUCHER_ERROR_CODES = void 0;
|
|
3
|
+
exports.INVOICE_NOT_AUTHORIZED_RECOVERIES = exports.INVOICE_DOCUMENT_REFUSAL_CODES = exports.INVOICE_ISSUANCE_REFUSAL_RECOVERY = exports.INVOICE_ISSUANCE_REFUSAL_CODES = exports.INVOICE_RECEPTOR_REFUSAL_CODES = exports.INVOICE_POST_VOUCHER_ERROR_CODES = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* The codes `POST /invoices` answers AFTER a voucher number was spent — ARCA
|
|
6
6
|
* was asked, or a CAEA number was claimed — as a runtime value the app maps.
|
|
@@ -32,6 +32,37 @@ exports.INVOICE_POST_VOUCHER_ERROR_CODES = [
|
|
|
32
32
|
'INVOICE_EXPORT_OUTCOME_UNKNOWN',
|
|
33
33
|
'CAEA_COMMIT_FAILED_AFTER_CLAIM',
|
|
34
34
|
];
|
|
35
|
+
/**
|
|
36
|
+
* The `400` codes a domestic factura's RECEPTOR is refused under before ARCA
|
|
37
|
+
* is asked — answered by `POST /invoices` when the operator invoices, and by
|
|
38
|
+
* the storefront's `POST /orders/guest` up front, at any total, since a guest
|
|
39
|
+
* cannot complete their identity once the order exists. Each names what to
|
|
40
|
+
* fix in `invoiceMethod`:
|
|
41
|
+
*
|
|
42
|
+
* - `INVOICE_METHOD_MISSING` — no `invoiceMethod` (a guest order never: an
|
|
43
|
+
* absent one is Consumidor Final there).
|
|
44
|
+
* - `INVOICE_METHOD_COND_FISCAL_INVALID` — a `condFiscal` outside
|
|
45
|
+
* `FISCAL_CONDITIONS`, or none.
|
|
46
|
+
* - `INVOICE_METHOD_CUIT_MISSING` / `INVOICE_METHOD_CUIT_MALFORMED` — no
|
|
47
|
+
* `cuit`, or one that is not a number.
|
|
48
|
+
* - `RECEPTOR_IDENTITY_INVALID` — an explicit `docType`/`docNumber` ARCA would
|
|
49
|
+
* not take.
|
|
50
|
+
* - `RECEPTOR_DOC_TIPO_NOT_CUIT` / `INVOICE_METHOD_RAZON_SOCIAL_MISSING` — a
|
|
51
|
+
* Factura A or M (an RI issuer billing an RI or Monotributo buyer) whose
|
|
52
|
+
* receptor is not a CUIT, or has no razón social.
|
|
53
|
+
* - `RECEPTOR_DNI_REQUIRED` — the total in pesos is at or above the platform
|
|
54
|
+
* `minWithDni` and the receptor names no DNI or CUIT.
|
|
55
|
+
*/
|
|
56
|
+
exports.INVOICE_RECEPTOR_REFUSAL_CODES = [
|
|
57
|
+
'INVOICE_METHOD_MISSING',
|
|
58
|
+
'INVOICE_METHOD_COND_FISCAL_INVALID',
|
|
59
|
+
'INVOICE_METHOD_CUIT_MISSING',
|
|
60
|
+
'INVOICE_METHOD_CUIT_MALFORMED',
|
|
61
|
+
'RECEPTOR_IDENTITY_INVALID',
|
|
62
|
+
'RECEPTOR_DOC_TIPO_NOT_CUIT',
|
|
63
|
+
'INVOICE_METHOD_RAZON_SOCIAL_MISSING',
|
|
64
|
+
'RECEPTOR_DNI_REQUIRED',
|
|
65
|
+
];
|
|
35
66
|
/**
|
|
36
67
|
* The codes `POST /invoices` answers when it REFUSED to start an issuance — or
|
|
37
68
|
* could not confirm it — before any voucher of this request was recorded, as a
|
package/dist/cjs/order.js
CHANGED
|
@@ -675,6 +675,8 @@ exports.ORDER_ERROR_CODES = [
|
|
|
675
675
|
// saw it, or the cart is not in the store's order currency.
|
|
676
676
|
'DELIVERY_FEE_CHANGED',
|
|
677
677
|
'DELIVERY_FEE_CURRENCY_UNSUPPORTED',
|
|
678
|
+
// `POST /orders/guest`: the guest's `contact` (email + full name) is missing or malformed.
|
|
679
|
+
'GUEST_CONTACT_REQUIRED',
|
|
678
680
|
'ORDER_BELOW_MINIMUM_PURCHASE',
|
|
679
681
|
'ORDER_INVALID_CART',
|
|
680
682
|
// The storefront's confirmed-cart pin (`StorefrontOrderCreateRequest.expectedCartId` / `expectedCartVersion`).
|
|
@@ -28,7 +28,8 @@ exports.WHOLESALE_REQUEST_REASON_MAX = 500;
|
|
|
28
28
|
* - web `POST /user { mode: 'wholesale-request' }` (`stacks/web/lambdas/user/_wholesaleRequest.ts`):
|
|
29
29
|
* `WHOLESALE_REQUESTS_DISABLED`, `CUSTOMER_NOT_FOUND`, `CUSTOMER_ANONYMIZED`, `USER_NOT_ENABLED`,
|
|
30
30
|
* `CUSTOMER_ALREADY_WHOLESALE`, `WHOLESALE_REQUEST_CONTENDED`, `WHOLESALE_REQUEST_PENDING`;
|
|
31
|
-
* - app `GET /customers?mode=wholesale-requests
|
|
31
|
+
* - app `GET /customers?mode=wholesale-requests`, `GET /customers?mode=wholesale-request` and
|
|
32
|
+
* `POST /customers { mode: 'wholesale-decision' }`
|
|
32
33
|
* (`stacks/lambdas/customers/_wholesaleRequests.ts`): `ROLE_FORBIDDEN`, `ADMIN_REQUIRED`,
|
|
33
34
|
* `INVALID_CURSOR`, `WHOLESALE_REQUEST_NOT_PENDING`, `WHOLESALE_DECISION_CONTENDED`,
|
|
34
35
|
* `CUSTOMER_NOT_FOUND`, `CUSTOMER_ANONYMIZED`, `CUSTOMER_MERGED`, `PRICE_LIST_NOT_FOUND`,
|
package/dist/customer.d.ts
CHANGED
|
@@ -143,6 +143,12 @@ declare global {
|
|
|
143
143
|
* every other parameter, `disabled` included.
|
|
144
144
|
*/
|
|
145
145
|
accessState?: 'pending';
|
|
146
|
+
/**
|
|
147
|
+
* The guest-row set (`Customer.guestContact`, minted by a guest order).
|
|
148
|
+
* Absent: guests are excluded. `'only'`: guests only. `'all'`: both. ANDs with
|
|
149
|
+
* every other parameter; a `segmentId` never matches a guest.
|
|
150
|
+
*/
|
|
151
|
+
guest?: 'only' | 'all';
|
|
146
152
|
/** `'true'`: customers who have bought at least once. `'false'`: never bought. */
|
|
147
153
|
withBuy?: 'true' | 'false';
|
|
148
154
|
/**
|
|
@@ -197,7 +203,27 @@ declare global {
|
|
|
197
203
|
/** A short/failed ledger walk never supplies a fabricated balance. */
|
|
198
204
|
ledgerUnavailable?: 'ledger_currency_missing' | 'ledger_truncated' | 'ledger_read_failed';
|
|
199
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* The contact a guest left at checkout. Its PRESENCE on a CUSTOMER row is
|
|
208
|
+
* what marks the row a guest: minted inside a guest order's transaction,
|
|
209
|
+
* server-owned, never on an edit schema or a shopper auth payload. The email
|
|
210
|
+
* is normalized and NOT verified.
|
|
211
|
+
*/
|
|
212
|
+
interface GuestContact {
|
|
213
|
+
email: string;
|
|
214
|
+
fullName: string;
|
|
215
|
+
phone?: string;
|
|
216
|
+
}
|
|
200
217
|
interface Customer {
|
|
218
|
+
/**
|
|
219
|
+
* Present only on a guest row (`POST /orders/guest`). Such a row never
|
|
220
|
+
* carries a top-level `email` or `cuit`, a password, `minBuy` or
|
|
221
|
+
* `priceList`, so no identity index and no sign-in door can find it — and
|
|
222
|
+
* no edit can give it one: the operator `POST /customers` refuses an update
|
|
223
|
+
* of a guest row that sets any of them `409 GUEST_CUSTOMER_IDENTITY_LOCKED`
|
|
224
|
+
* (`data.fields` names them).
|
|
225
|
+
*/
|
|
226
|
+
guestContact?: GuestContact;
|
|
201
227
|
/** Store-scoped tag ids; absent on legacy and storefront projections. */
|
|
202
228
|
tagIds?: string[];
|
|
203
229
|
/**
|
package/dist/invoice.d.ts
CHANGED
|
@@ -992,6 +992,29 @@ declare global {
|
|
|
992
992
|
*/
|
|
993
993
|
export declare const INVOICE_POST_VOUCHER_ERROR_CODES: readonly ["INVOICE_PERSIST_AFTER_CAE_FAILED", "INVOICE_EXPORT_OUTCOME_UNKNOWN", "CAEA_COMMIT_FAILED_AFTER_CLAIM"];
|
|
994
994
|
export type InvoicePostVoucherErrorCode = (typeof INVOICE_POST_VOUCHER_ERROR_CODES)[number];
|
|
995
|
+
/**
|
|
996
|
+
* The `400` codes a domestic factura's RECEPTOR is refused under before ARCA
|
|
997
|
+
* is asked — answered by `POST /invoices` when the operator invoices, and by
|
|
998
|
+
* the storefront's `POST /orders/guest` up front, at any total, since a guest
|
|
999
|
+
* cannot complete their identity once the order exists. Each names what to
|
|
1000
|
+
* fix in `invoiceMethod`:
|
|
1001
|
+
*
|
|
1002
|
+
* - `INVOICE_METHOD_MISSING` — no `invoiceMethod` (a guest order never: an
|
|
1003
|
+
* absent one is Consumidor Final there).
|
|
1004
|
+
* - `INVOICE_METHOD_COND_FISCAL_INVALID` — a `condFiscal` outside
|
|
1005
|
+
* `FISCAL_CONDITIONS`, or none.
|
|
1006
|
+
* - `INVOICE_METHOD_CUIT_MISSING` / `INVOICE_METHOD_CUIT_MALFORMED` — no
|
|
1007
|
+
* `cuit`, or one that is not a number.
|
|
1008
|
+
* - `RECEPTOR_IDENTITY_INVALID` — an explicit `docType`/`docNumber` ARCA would
|
|
1009
|
+
* not take.
|
|
1010
|
+
* - `RECEPTOR_DOC_TIPO_NOT_CUIT` / `INVOICE_METHOD_RAZON_SOCIAL_MISSING` — a
|
|
1011
|
+
* Factura A or M (an RI issuer billing an RI or Monotributo buyer) whose
|
|
1012
|
+
* receptor is not a CUIT, or has no razón social.
|
|
1013
|
+
* - `RECEPTOR_DNI_REQUIRED` — the total in pesos is at or above the platform
|
|
1014
|
+
* `minWithDni` and the receptor names no DNI or CUIT.
|
|
1015
|
+
*/
|
|
1016
|
+
export declare const INVOICE_RECEPTOR_REFUSAL_CODES: readonly ["INVOICE_METHOD_MISSING", "INVOICE_METHOD_COND_FISCAL_INVALID", "INVOICE_METHOD_CUIT_MISSING", "INVOICE_METHOD_CUIT_MALFORMED", "RECEPTOR_IDENTITY_INVALID", "RECEPTOR_DOC_TIPO_NOT_CUIT", "INVOICE_METHOD_RAZON_SOCIAL_MISSING", "RECEPTOR_DNI_REQUIRED"];
|
|
1017
|
+
export type InvoiceReceptorRefusalCode = (typeof INVOICE_RECEPTOR_REFUSAL_CODES)[number];
|
|
995
1018
|
/**
|
|
996
1019
|
* The codes `POST /invoices` answers when it REFUSED to start an issuance — or
|
|
997
1020
|
* could not confirm it — before any voucher of this request was recorded, as a
|
package/dist/invoice.js
CHANGED
|
@@ -29,6 +29,37 @@ export const INVOICE_POST_VOUCHER_ERROR_CODES = [
|
|
|
29
29
|
'INVOICE_EXPORT_OUTCOME_UNKNOWN',
|
|
30
30
|
'CAEA_COMMIT_FAILED_AFTER_CLAIM',
|
|
31
31
|
];
|
|
32
|
+
/**
|
|
33
|
+
* The `400` codes a domestic factura's RECEPTOR is refused under before ARCA
|
|
34
|
+
* is asked — answered by `POST /invoices` when the operator invoices, and by
|
|
35
|
+
* the storefront's `POST /orders/guest` up front, at any total, since a guest
|
|
36
|
+
* cannot complete their identity once the order exists. Each names what to
|
|
37
|
+
* fix in `invoiceMethod`:
|
|
38
|
+
*
|
|
39
|
+
* - `INVOICE_METHOD_MISSING` — no `invoiceMethod` (a guest order never: an
|
|
40
|
+
* absent one is Consumidor Final there).
|
|
41
|
+
* - `INVOICE_METHOD_COND_FISCAL_INVALID` — a `condFiscal` outside
|
|
42
|
+
* `FISCAL_CONDITIONS`, or none.
|
|
43
|
+
* - `INVOICE_METHOD_CUIT_MISSING` / `INVOICE_METHOD_CUIT_MALFORMED` — no
|
|
44
|
+
* `cuit`, or one that is not a number.
|
|
45
|
+
* - `RECEPTOR_IDENTITY_INVALID` — an explicit `docType`/`docNumber` ARCA would
|
|
46
|
+
* not take.
|
|
47
|
+
* - `RECEPTOR_DOC_TIPO_NOT_CUIT` / `INVOICE_METHOD_RAZON_SOCIAL_MISSING` — a
|
|
48
|
+
* Factura A or M (an RI issuer billing an RI or Monotributo buyer) whose
|
|
49
|
+
* receptor is not a CUIT, or has no razón social.
|
|
50
|
+
* - `RECEPTOR_DNI_REQUIRED` — the total in pesos is at or above the platform
|
|
51
|
+
* `minWithDni` and the receptor names no DNI or CUIT.
|
|
52
|
+
*/
|
|
53
|
+
export const INVOICE_RECEPTOR_REFUSAL_CODES = [
|
|
54
|
+
'INVOICE_METHOD_MISSING',
|
|
55
|
+
'INVOICE_METHOD_COND_FISCAL_INVALID',
|
|
56
|
+
'INVOICE_METHOD_CUIT_MISSING',
|
|
57
|
+
'INVOICE_METHOD_CUIT_MALFORMED',
|
|
58
|
+
'RECEPTOR_IDENTITY_INVALID',
|
|
59
|
+
'RECEPTOR_DOC_TIPO_NOT_CUIT',
|
|
60
|
+
'INVOICE_METHOD_RAZON_SOCIAL_MISSING',
|
|
61
|
+
'RECEPTOR_DNI_REQUIRED',
|
|
62
|
+
];
|
|
32
63
|
/**
|
|
33
64
|
* The codes `POST /invoices` answers when it REFUSED to start an issuance — or
|
|
34
65
|
* could not confirm it — before any voucher of this request was recorded, as a
|
package/dist/order.d.ts
CHANGED
|
@@ -2482,6 +2482,18 @@ declare global {
|
|
|
2482
2482
|
*/
|
|
2483
2483
|
expectedFreight?: number;
|
|
2484
2484
|
}
|
|
2485
|
+
/**
|
|
2486
|
+
* Web `POST /orders/guest` body: a guest places an order from the server
|
|
2487
|
+
* guest cart its `X-Guest-Cart-Token` names. `StorefrontOrderCreateRequest`
|
|
2488
|
+
* without `saveAsDefault` (a guest has no defaults), plus the guest's
|
|
2489
|
+
* `contact`, and with the cart pin REQUIRED: the guest cart always has an
|
|
2490
|
+
* id and a version.
|
|
2491
|
+
*/
|
|
2492
|
+
interface StorefrontGuestOrderCreateRequest extends Omit<StorefrontOrderCreateRequest, 'saveAsDefault' | 'expectedCartId' | 'expectedCartVersion'> {
|
|
2493
|
+
contact: GuestContact;
|
|
2494
|
+
expectedCartId: string;
|
|
2495
|
+
expectedCartVersion: number;
|
|
2496
|
+
}
|
|
2485
2497
|
interface ZebraTag {
|
|
2486
2498
|
orderId: string;
|
|
2487
2499
|
fullName: string;
|
|
@@ -3023,6 +3035,6 @@ export declare const orderFulfilmentProgress: (order: OrderFulfilmentProgressInp
|
|
|
3023
3035
|
* `SUBSCRIPTION_READONLY`) sit on the order CREATE leg only: an edit is not a new
|
|
3024
3036
|
* order, so `bareOrderPostHandler` routes past `requireMetered` entirely.
|
|
3025
3037
|
*/
|
|
3026
|
-
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_HAS_FREIGHT_LINE", "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", "PAYMENT_METHOD_UNAVAILABLE", "CART_PRICES_CHANGED", "ORDER_ID_COLLISION", "DELIVERY_METHOD_NOT_FOUND", "DELIVERY_FEE_CHANGED", "DELIVERY_FEE_CURRENCY_UNSUPPORTED", "ORDER_BELOW_MINIMUM_PURCHASE", "ORDER_INVALID_CART", "CART_CHANGED_SINCE_CONFIRM", "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"];
|
|
3038
|
+
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_HAS_FREIGHT_LINE", "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", "PAYMENT_METHOD_UNAVAILABLE", "CART_PRICES_CHANGED", "ORDER_ID_COLLISION", "DELIVERY_METHOD_NOT_FOUND", "DELIVERY_FEE_CHANGED", "DELIVERY_FEE_CURRENCY_UNSUPPORTED", "GUEST_CONTACT_REQUIRED", "ORDER_BELOW_MINIMUM_PURCHASE", "ORDER_INVALID_CART", "CART_CHANGED_SINCE_CONFIRM", "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"];
|
|
3027
3039
|
export type OrderErrorCode = (typeof ORDER_ERROR_CODES)[number];
|
|
3028
3040
|
export {};
|
package/dist/order.js
CHANGED
|
@@ -668,6 +668,8 @@ export const ORDER_ERROR_CODES = [
|
|
|
668
668
|
// saw it, or the cart is not in the store's order currency.
|
|
669
669
|
'DELIVERY_FEE_CHANGED',
|
|
670
670
|
'DELIVERY_FEE_CURRENCY_UNSUPPORTED',
|
|
671
|
+
// `POST /orders/guest`: the guest's `contact` (email + full name) is missing or malformed.
|
|
672
|
+
'GUEST_CONTACT_REQUIRED',
|
|
671
673
|
'ORDER_BELOW_MINIMUM_PURCHASE',
|
|
672
674
|
'ORDER_INVALID_CART',
|
|
673
675
|
// The storefront's confirmed-cart pin (`StorefrontOrderCreateRequest.expectedCartId` / `expectedCartVersion`).
|
|
@@ -25,7 +25,8 @@ export declare const WHOLESALE_REQUEST_REASON_MAX = 500;
|
|
|
25
25
|
* - web `POST /user { mode: 'wholesale-request' }` (`stacks/web/lambdas/user/_wholesaleRequest.ts`):
|
|
26
26
|
* `WHOLESALE_REQUESTS_DISABLED`, `CUSTOMER_NOT_FOUND`, `CUSTOMER_ANONYMIZED`, `USER_NOT_ENABLED`,
|
|
27
27
|
* `CUSTOMER_ALREADY_WHOLESALE`, `WHOLESALE_REQUEST_CONTENDED`, `WHOLESALE_REQUEST_PENDING`;
|
|
28
|
-
* - app `GET /customers?mode=wholesale-requests
|
|
28
|
+
* - app `GET /customers?mode=wholesale-requests`, `GET /customers?mode=wholesale-request` and
|
|
29
|
+
* `POST /customers { mode: 'wholesale-decision' }`
|
|
29
30
|
* (`stacks/lambdas/customers/_wholesaleRequests.ts`): `ROLE_FORBIDDEN`, `ADMIN_REQUIRED`,
|
|
30
31
|
* `INVALID_CURSOR`, `WHOLESALE_REQUEST_NOT_PENDING`, `WHOLESALE_DECISION_CONTENDED`,
|
|
31
32
|
* `CUSTOMER_NOT_FOUND`, `CUSTOMER_ANONYMIZED`, `CUSTOMER_MERGED`, `PRICE_LIST_NOT_FOUND`,
|
|
@@ -130,6 +131,15 @@ declare global {
|
|
|
130
131
|
LastEvaluatedKey?: string;
|
|
131
132
|
truncated?: boolean;
|
|
132
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* App `GET /customers?mode=wholesale-request&customerId=…` (admin tier): ONE
|
|
136
|
+
* customer's request with the queue row's projection and customer join, or
|
|
137
|
+
* `data: null` when the customer never asked.
|
|
138
|
+
*/
|
|
139
|
+
interface WholesaleRequestPointResponse {
|
|
140
|
+
message: string;
|
|
141
|
+
data: WholesaleRequestQueueEntry | null;
|
|
142
|
+
}
|
|
133
143
|
/**
|
|
134
144
|
* App `POST /customers` body that decides a request. `'approved'` requires a
|
|
135
145
|
* wholesale-class `priceList` and refuses a `reason`; `'declined'` refuses a
|
package/dist/wholesaleRequest.js
CHANGED
|
@@ -25,7 +25,8 @@ export const WHOLESALE_REQUEST_REASON_MAX = 500;
|
|
|
25
25
|
* - web `POST /user { mode: 'wholesale-request' }` (`stacks/web/lambdas/user/_wholesaleRequest.ts`):
|
|
26
26
|
* `WHOLESALE_REQUESTS_DISABLED`, `CUSTOMER_NOT_FOUND`, `CUSTOMER_ANONYMIZED`, `USER_NOT_ENABLED`,
|
|
27
27
|
* `CUSTOMER_ALREADY_WHOLESALE`, `WHOLESALE_REQUEST_CONTENDED`, `WHOLESALE_REQUEST_PENDING`;
|
|
28
|
-
* - app `GET /customers?mode=wholesale-requests
|
|
28
|
+
* - app `GET /customers?mode=wholesale-requests`, `GET /customers?mode=wholesale-request` and
|
|
29
|
+
* `POST /customers { mode: 'wholesale-decision' }`
|
|
29
30
|
* (`stacks/lambdas/customers/_wholesaleRequests.ts`): `ROLE_FORBIDDEN`, `ADMIN_REQUIRED`,
|
|
30
31
|
* `INVALID_CURSOR`, `WHOLESALE_REQUEST_NOT_PENDING`, `WHOLESALE_DECISION_CONTENDED`,
|
|
31
32
|
* `CUSTOMER_NOT_FOUND`, `CUSTOMER_ANONYMIZED`, `CUSTOMER_MERGED`, `PRICE_LIST_NOT_FOUND`,
|