platform-types 1.10.769 → 1.10.771
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/socket.js +10 -0
- package/dist/cjs/store.js +3 -0
- package/dist/cjs/storefrontWebLiteralKeys.js +5 -0
- package/dist/delivery.d.ts +39 -0
- package/dist/paymentAttempt.d.ts +4 -2
- package/dist/socket.d.ts +1 -1
- package/dist/socket.js +10 -0
- package/dist/store.d.ts +27 -0
- package/dist/store.js +3 -0
- package/dist/storefrontWebLiteralKeys.js +5 -0
- package/package.json +1 -1
package/dist/cjs/socket.js
CHANGED
|
@@ -521,6 +521,16 @@ exports.SOCKET_ACTIONS = [
|
|
|
521
521
|
* customer broadcast. Sent once per committed state move of the attempt.
|
|
522
522
|
*/
|
|
523
523
|
'orderPaymentAttempt',
|
|
524
|
+
/**
|
|
525
|
+
* A storefront order's delivery was created or moved. `data` is
|
|
526
|
+
* `OrderDeliveryFrameData` (`delivery.ts`) — the order id and the minimised
|
|
527
|
+
* `OrderDeliveryView`, exactly what the shopper's own order read answers.
|
|
528
|
+
* Never the courier, a GPS fix, a proof asset, a note or a failure reason.
|
|
529
|
+
*
|
|
530
|
+
* ⚠️ To the order's OWN customer only (`wsPostCustomer`), never a store-wide
|
|
531
|
+
* customer broadcast; the operator frame for the same write is `deliveries`.
|
|
532
|
+
*/
|
|
533
|
+
'orderDelivery',
|
|
524
534
|
/**
|
|
525
535
|
* A storefront payment attempt an operator acts on changed: it entered
|
|
526
536
|
* `resolution`, took a further NEW approval while in it, or an operator
|
package/dist/cjs/store.js
CHANGED
|
@@ -135,6 +135,9 @@ exports.STORE_MODULE_ERROR_CODES = [
|
|
|
135
135
|
* `config.defaultProductCurrency` to a non-oficial USD variant.
|
|
136
136
|
* - `PRICE_LIST_NOT_FOUND` — an `ecommerce` save names a
|
|
137
137
|
* `newCustomerPriceList` that does not exist (`store/_ecommercePatch.ts`).
|
|
138
|
+
* `POST /store` answers it too, for a method row's `availability.priceLists`
|
|
139
|
+
* entry naming no list of the store, with `data: { field, value }` where
|
|
140
|
+
* `field` is `<catalog>[<row>].availability.priceLists[<entry>]`.
|
|
138
141
|
*
|
|
139
142
|
* Maintenance mode (`{ mode: 'maintenance', level }`, `store/_patchMaintenance.ts`):
|
|
140
143
|
* - `FORBIDDEN` (403) — the caller is neither an ADMIN nor a MANAGER.
|
|
@@ -540,6 +540,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
540
540
|
'EMAIL_VERIFY_ERR_WRONG_CODE_LAST',
|
|
541
541
|
'EMAIL_VERIFY_ERR_WRONG_CODE_PLAIN',
|
|
542
542
|
'EMAIL_VERIFY_RESEND',
|
|
543
|
+
'EMAIL_VERIFY_RESEND_IN',
|
|
543
544
|
'EMAIL_VERIFY_SENDING',
|
|
544
545
|
'EMAIL_VERIFY_SENT_TO',
|
|
545
546
|
'EMAIL_VERIFY_SUBMIT',
|
|
@@ -645,6 +646,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
645
646
|
'HEADER_SEARCH_RECENT',
|
|
646
647
|
'HEADER_SEARCH_SUGGESTIONS',
|
|
647
648
|
'HEADER_SEARCH_SUGGESTION_BARCODE',
|
|
649
|
+
'HEADER_SEARCH_SUGGESTION_SKU',
|
|
648
650
|
'HEADER_TOOLTIP_ACCOUNT',
|
|
649
651
|
'HEADER_TOOLTIP_BASKET',
|
|
650
652
|
'HEADER_TOOLTIP_NOTIFICATIONS',
|
|
@@ -723,6 +725,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
723
725
|
'INVOICES_EMPTY',
|
|
724
726
|
'INVOICES_EMPTY_ACTION',
|
|
725
727
|
'INVOICES_ERR_LOAD',
|
|
728
|
+
'INVOICES_EXPORT_FILENAME',
|
|
726
729
|
'INVOICES_IVA_LABEL',
|
|
727
730
|
'INVOICES_IVA_LABEL_PARTIAL',
|
|
728
731
|
'INVOICES_LOAD_MORE',
|
|
@@ -869,6 +872,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
869
872
|
'ORDERS_ERR_LOAD',
|
|
870
873
|
'ORDERS_FILTERED_CLEAR',
|
|
871
874
|
'ORDERS_FILTERED_EMPTY',
|
|
875
|
+
'ORDERS_REPEAT_ARIA',
|
|
872
876
|
'ORDERS_SEARCH_LABEL',
|
|
873
877
|
'ORDERS_STATUS_CANCELLED_TOOLTIP',
|
|
874
878
|
'ORDERS_STATUS_DELIVERED',
|
|
@@ -1007,6 +1011,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
1007
1011
|
'PAYMENTS_COLUMN_MOVEMENT',
|
|
1008
1012
|
'PAYMENTS_COLUMN_PAYMENT',
|
|
1009
1013
|
'PAYMENTS_DATE_FROM_LABEL',
|
|
1014
|
+
'PAYMENTS_EXPORT_FILENAME',
|
|
1010
1015
|
'PAYMENTS_LEDGER_UNAVAILABLE',
|
|
1011
1016
|
'PAYMENTS_STATEMENT_ERROR',
|
|
1012
1017
|
'PAYMENTS_STATEMENT_PARTIAL',
|
package/dist/delivery.d.ts
CHANGED
|
@@ -50,6 +50,45 @@ declare global {
|
|
|
50
50
|
createdAt: number;
|
|
51
51
|
updatedAt?: number;
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Where the shopper's own order's delivery stands — the MINIMISED projection the
|
|
55
|
+
* storefront shows on its order read (`StorefrontOrderView.delivery`) and the
|
|
56
|
+
* `orderDelivery` frame. An ALLOW-LIST, built from the delivery records
|
|
57
|
+
* operators keep: never the courier (name, contact, vehicle), a GPS fix, a proof
|
|
58
|
+
* asset, a note, a failure reason or the event log.
|
|
59
|
+
*
|
|
60
|
+
* Two arms, told apart by `kind`:
|
|
61
|
+
* - `'tracked'` — a delivery exists: `status` is the NEWEST event's type (never
|
|
62
|
+
* the cached header), `updatedAt` the ms epoch of the last change,
|
|
63
|
+
* `estimatedArrivalAt` the operator's estimate when one was given. `'failed'`
|
|
64
|
+
* carries no reason.
|
|
65
|
+
* - `'scheduled'` — no delivery yet: `nextDeliveryDate`, the next day
|
|
66
|
+
* (`YYYY-MM-DD` in `America/Buenos_Aires`, today included) on which one of
|
|
67
|
+
* the customer's enabled zones delivers, within the coming week. Only on an
|
|
68
|
+
* open order that is not a pickup and has no shipment; absent when no zone
|
|
69
|
+
* delivers. ⚠️ A delivery created before the order → delivery pointer existed
|
|
70
|
+
* is not found, so such an order can show `'scheduled'` while it is on its
|
|
71
|
+
* way — a transient residue of the launch that ends as those orders close.
|
|
72
|
+
*/
|
|
73
|
+
type OrderDeliveryView = {
|
|
74
|
+
kind: 'tracked';
|
|
75
|
+
status: DeliveryStatus;
|
|
76
|
+
updatedAt: number;
|
|
77
|
+
estimatedArrivalAt?: number;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'scheduled';
|
|
80
|
+
nextDeliveryDate: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* `data` of an `orderDelivery` socket frame, sent to the order's own customer
|
|
84
|
+
* only when a delivery is created or an event is appended to it.
|
|
85
|
+
*/
|
|
86
|
+
interface OrderDeliveryFrameData {
|
|
87
|
+
orderId: string;
|
|
88
|
+
delivery: Extract<OrderDeliveryView, {
|
|
89
|
+
kind: 'tracked';
|
|
90
|
+
}>;
|
|
91
|
+
}
|
|
53
92
|
/**
|
|
54
93
|
* Proof captured at the door. Stored in S3 under a SERVER-DERIVED key and
|
|
55
94
|
* read back through a short-lived presigned GET — the client never chooses
|
package/dist/paymentAttempt.d.ts
CHANGED
|
@@ -107,11 +107,13 @@ declare global {
|
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* The shopper's own order read: the order plus its payment attempt, when it
|
|
110
|
-
* has one
|
|
111
|
-
*
|
|
110
|
+
* has one, and where its delivery stands (`OrderDeliveryView`, `delivery.ts`),
|
|
111
|
+
* when there is anything to show. Both are attached on read and never stored
|
|
112
|
+
* on the order.
|
|
112
113
|
*/
|
|
113
114
|
type StorefrontOrderView = Order & {
|
|
114
115
|
paymentAttempt?: OrderPaymentAttemptView;
|
|
116
|
+
delivery?: OrderDeliveryView;
|
|
115
117
|
};
|
|
116
118
|
/**
|
|
117
119
|
* `data` of an `orderPaymentAttempt` socket frame, sent to the order's own
|
package/dist/socket.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* A client must ignore actions it does not own rather than assume it
|
|
27
27
|
* receives all of them.
|
|
28
28
|
*/
|
|
29
|
-
export declare const SOCKET_ACTIONS: readonly ["account", "appointments", "appointmentWaitlist", "attendance", "attributes", "automation-rules", "baskets", "cart", "brands", "cash", "catalogOperation", "categories", "campaigns", "customers", "customerNote", "customerAddress", "customerContact", "deliveries", "globals", "inventory", "invoices", "literals", "loyalty", "orders", "presupuestos", "products", "promotions", "segments", "returns", "rma", "templates", "services", "service-templates", "shifts", "stores", "suppliers", "supplier-invoice", "support", "surveys", "users", "warehouses", "zones", "favorites", "webhooks", "account-delete", "baskets-delete", "cart-delete", "log-delete", "notifications", "support-message", "payment_received", "mp_payment_status_changed", "payment_linked", "payment_unlinked", "mercadopago", "mercadopago_dynamic_qr_created", "mercadopago_static_qr_created", "mp_hook_log_appended", "mp_ipn_log_appended", "orderPaymentAttempt", "paymentAttemptChanged", "stripe", "subscription", "caea", "print", "print-order", "print-invoice", "print-product", "print-tag", "print_job_failed", "request_printers", "printers_changed", "agent_status_changed", "print_rules_changed", "printers_active", "agent_command", "maintenance", "currency_auto_updated", "drain_progress", "integration_event_appended", "userActivityRecorded", "mercadolibre_settlement_period", "customDomain", "purchaseOrders", "cycleCounts", "stockTransfers", "workItems"];
|
|
29
|
+
export declare const SOCKET_ACTIONS: readonly ["account", "appointments", "appointmentWaitlist", "attendance", "attributes", "automation-rules", "baskets", "cart", "brands", "cash", "catalogOperation", "categories", "campaigns", "customers", "customerNote", "customerAddress", "customerContact", "deliveries", "globals", "inventory", "invoices", "literals", "loyalty", "orders", "presupuestos", "products", "promotions", "segments", "returns", "rma", "templates", "services", "service-templates", "shifts", "stores", "suppliers", "supplier-invoice", "support", "surveys", "users", "warehouses", "zones", "favorites", "webhooks", "account-delete", "baskets-delete", "cart-delete", "log-delete", "notifications", "support-message", "payment_received", "mp_payment_status_changed", "payment_linked", "payment_unlinked", "mercadopago", "mercadopago_dynamic_qr_created", "mercadopago_static_qr_created", "mp_hook_log_appended", "mp_ipn_log_appended", "orderPaymentAttempt", "orderDelivery", "paymentAttemptChanged", "stripe", "subscription", "caea", "print", "print-order", "print-invoice", "print-product", "print-tag", "print_job_failed", "request_printers", "printers_changed", "agent_status_changed", "print_rules_changed", "printers_active", "agent_command", "maintenance", "currency_auto_updated", "drain_progress", "integration_event_appended", "userActivityRecorded", "mercadolibre_settlement_period", "customDomain", "purchaseOrders", "cycleCounts", "stockTransfers", "workItems"];
|
|
30
30
|
/** Union of every server→client data-frame action. */
|
|
31
31
|
export type SocketAction = (typeof SOCKET_ACTIONS)[number];
|
|
32
32
|
/**
|
package/dist/socket.js
CHANGED
|
@@ -518,6 +518,16 @@ export const SOCKET_ACTIONS = [
|
|
|
518
518
|
* customer broadcast. Sent once per committed state move of the attempt.
|
|
519
519
|
*/
|
|
520
520
|
'orderPaymentAttempt',
|
|
521
|
+
/**
|
|
522
|
+
* A storefront order's delivery was created or moved. `data` is
|
|
523
|
+
* `OrderDeliveryFrameData` (`delivery.ts`) — the order id and the minimised
|
|
524
|
+
* `OrderDeliveryView`, exactly what the shopper's own order read answers.
|
|
525
|
+
* Never the courier, a GPS fix, a proof asset, a note or a failure reason.
|
|
526
|
+
*
|
|
527
|
+
* ⚠️ To the order's OWN customer only (`wsPostCustomer`), never a store-wide
|
|
528
|
+
* customer broadcast; the operator frame for the same write is `deliveries`.
|
|
529
|
+
*/
|
|
530
|
+
'orderDelivery',
|
|
521
531
|
/**
|
|
522
532
|
* A storefront payment attempt an operator acts on changed: it entered
|
|
523
533
|
* `resolution`, took a further NEW approval while in it, or an operator
|
package/dist/store.d.ts
CHANGED
|
@@ -1774,6 +1774,30 @@ declare global {
|
|
|
1774
1774
|
* there too.
|
|
1775
1775
|
*/
|
|
1776
1776
|
storefront?: StorefrontMethodKind;
|
|
1777
|
+
/**
|
|
1778
|
+
* Which storefront callers may use this row: the audience rule a published
|
|
1779
|
+
* design item carries, matched the same way (`guest`, `customer`,
|
|
1780
|
+
* `retail`, `wholesale`, or the caller's effective price list in
|
|
1781
|
+
* `priceLists`). ABSENT means every storefront caller. Accepted on
|
|
1782
|
+
* `deliveryMethods` and `paymentMethods` rows by `POST /store`; a
|
|
1783
|
+
* `priceLists` entry naming no list of the store is
|
|
1784
|
+
* `400 PRICE_LIST_NOT_FOUND`.
|
|
1785
|
+
*
|
|
1786
|
+
* ⚠️ OPERATOR-ONLY. Never on a public projection: web `GET /store` drops
|
|
1787
|
+
* the rows a caller may not use and strips the rule from the rest, and the
|
|
1788
|
+
* customer STORE frame omits both catalogs while any row carries one. Web
|
|
1789
|
+
* `POST /orders` refuses a row the caller may not use with the same
|
|
1790
|
+
* `PAYMENT_METHOD_NOT_FOUND` / `DELIVERY_METHOD_NOT_FOUND` an unknown id
|
|
1791
|
+
* gets. Operator routes (POS, pre-orders, app order creation, tenders)
|
|
1792
|
+
* ignore it.
|
|
1793
|
+
*
|
|
1794
|
+
* A stored rule the write could not have produced (an unknown audience, an
|
|
1795
|
+
* undeclared key, a non-positive list) fails CLOSED for shoppers: hidden on
|
|
1796
|
+
* `GET /store`, refused at checkout, and both catalogs left off the frame.
|
|
1797
|
+
* Operator reads omit it, and `POST /store` keeps it when an existing row
|
|
1798
|
+
* is sent back without `availability`; sending a valid rule replaces it.
|
|
1799
|
+
*/
|
|
1800
|
+
availability?: StorefrontDesignVisibility;
|
|
1777
1801
|
}
|
|
1778
1802
|
interface FiscalCondition {
|
|
1779
1803
|
CbteTipo: {
|
|
@@ -2370,6 +2394,9 @@ export type StoreModuleRefusalBody = {
|
|
|
2370
2394
|
* `config.defaultProductCurrency` to a non-oficial USD variant.
|
|
2371
2395
|
* - `PRICE_LIST_NOT_FOUND` — an `ecommerce` save names a
|
|
2372
2396
|
* `newCustomerPriceList` that does not exist (`store/_ecommercePatch.ts`).
|
|
2397
|
+
* `POST /store` answers it too, for a method row's `availability.priceLists`
|
|
2398
|
+
* entry naming no list of the store, with `data: { field, value }` where
|
|
2399
|
+
* `field` is `<catalog>[<row>].availability.priceLists[<entry>]`.
|
|
2373
2400
|
*
|
|
2374
2401
|
* Maintenance mode (`{ mode: 'maintenance', level }`, `store/_patchMaintenance.ts`):
|
|
2375
2402
|
* - `FORBIDDEN` (403) — the caller is neither an ADMIN nor a MANAGER.
|
package/dist/store.js
CHANGED
|
@@ -130,6 +130,9 @@ export const STORE_MODULE_ERROR_CODES = [
|
|
|
130
130
|
* `config.defaultProductCurrency` to a non-oficial USD variant.
|
|
131
131
|
* - `PRICE_LIST_NOT_FOUND` — an `ecommerce` save names a
|
|
132
132
|
* `newCustomerPriceList` that does not exist (`store/_ecommercePatch.ts`).
|
|
133
|
+
* `POST /store` answers it too, for a method row's `availability.priceLists`
|
|
134
|
+
* entry naming no list of the store, with `data: { field, value }` where
|
|
135
|
+
* `field` is `<catalog>[<row>].availability.priceLists[<entry>]`.
|
|
133
136
|
*
|
|
134
137
|
* Maintenance mode (`{ mode: 'maintenance', level }`, `store/_patchMaintenance.ts`):
|
|
135
138
|
* - `FORBIDDEN` (403) — the caller is neither an ADMIN nor a MANAGER.
|
|
@@ -537,6 +537,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
537
537
|
'EMAIL_VERIFY_ERR_WRONG_CODE_LAST',
|
|
538
538
|
'EMAIL_VERIFY_ERR_WRONG_CODE_PLAIN',
|
|
539
539
|
'EMAIL_VERIFY_RESEND',
|
|
540
|
+
'EMAIL_VERIFY_RESEND_IN',
|
|
540
541
|
'EMAIL_VERIFY_SENDING',
|
|
541
542
|
'EMAIL_VERIFY_SENT_TO',
|
|
542
543
|
'EMAIL_VERIFY_SUBMIT',
|
|
@@ -642,6 +643,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
642
643
|
'HEADER_SEARCH_RECENT',
|
|
643
644
|
'HEADER_SEARCH_SUGGESTIONS',
|
|
644
645
|
'HEADER_SEARCH_SUGGESTION_BARCODE',
|
|
646
|
+
'HEADER_SEARCH_SUGGESTION_SKU',
|
|
645
647
|
'HEADER_TOOLTIP_ACCOUNT',
|
|
646
648
|
'HEADER_TOOLTIP_BASKET',
|
|
647
649
|
'HEADER_TOOLTIP_NOTIFICATIONS',
|
|
@@ -720,6 +722,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
720
722
|
'INVOICES_EMPTY',
|
|
721
723
|
'INVOICES_EMPTY_ACTION',
|
|
722
724
|
'INVOICES_ERR_LOAD',
|
|
725
|
+
'INVOICES_EXPORT_FILENAME',
|
|
723
726
|
'INVOICES_IVA_LABEL',
|
|
724
727
|
'INVOICES_IVA_LABEL_PARTIAL',
|
|
725
728
|
'INVOICES_LOAD_MORE',
|
|
@@ -866,6 +869,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
866
869
|
'ORDERS_ERR_LOAD',
|
|
867
870
|
'ORDERS_FILTERED_CLEAR',
|
|
868
871
|
'ORDERS_FILTERED_EMPTY',
|
|
872
|
+
'ORDERS_REPEAT_ARIA',
|
|
869
873
|
'ORDERS_SEARCH_LABEL',
|
|
870
874
|
'ORDERS_STATUS_CANCELLED_TOOLTIP',
|
|
871
875
|
'ORDERS_STATUS_DELIVERED',
|
|
@@ -1004,6 +1008,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
1004
1008
|
'PAYMENTS_COLUMN_MOVEMENT',
|
|
1005
1009
|
'PAYMENTS_COLUMN_PAYMENT',
|
|
1006
1010
|
'PAYMENTS_DATE_FROM_LABEL',
|
|
1011
|
+
'PAYMENTS_EXPORT_FILENAME',
|
|
1007
1012
|
'PAYMENTS_LEDGER_UNAVAILABLE',
|
|
1008
1013
|
'PAYMENTS_STATEMENT_ERROR',
|
|
1009
1014
|
'PAYMENTS_STATEMENT_PARTIAL',
|