platform-types 1.10.770 → 1.10.772

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.
@@ -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.
@@ -461,6 +461,8 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
461
461
  'COMMON_CANCEL',
462
462
  'COMMON_CLOSE',
463
463
  'COMMON_CONFIRM',
464
+ 'COMMON_DATE_RANGE_INVERTED',
465
+ 'COMMON_DATE_RANGE_MALFORMED',
464
466
  'COMMON_DISMISS_NOTICE',
465
467
  'COMMON_DOWNLOAD',
466
468
  'COMMON_EXPORT_CSV',
@@ -667,7 +669,10 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
667
669
  'HOME_HERO_CTA',
668
670
  'HOME_HERO_TITLE',
669
671
  'HOME_METRICS_BALANCE',
670
- 'HOME_METRICS_BALANCE_LABEL',
672
+ 'HOME_METRICS_BALANCE_CREDIT',
673
+ 'HOME_METRICS_BALANCE_OWED',
674
+ 'HOME_METRICS_BALANCE_SETTLED',
675
+ 'HOME_METRICS_BALANCE_UNAVAILABLE',
671
676
  'HOME_METRICS_BASKET',
672
677
  'HOME_METRICS_BASKET_LABEL',
673
678
  'HOME_METRICS_CURRENCY',
@@ -719,6 +724,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
719
724
  'INVOICES_COLUMN_TOTAL',
720
725
  'INVOICES_COLUMN_TYPE',
721
726
  'INVOICES_DATE_FROM',
727
+ 'INVOICES_DATE_UNTIL_LABEL',
722
728
  'INVOICES_DOWNLOAD_ERROR',
723
729
  'INVOICES_DOWNLOAD_PDF_ARIA',
724
730
  'INVOICES_DOWNLOAD_PDF_TOOLTIP',
@@ -867,11 +873,13 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
867
873
  'ORDERS_COLUMN_STATUS',
868
874
  'ORDERS_COLUMN_TOTAL',
869
875
  'ORDERS_DATE_FROM_LABEL',
876
+ 'ORDERS_DATE_UNTIL_LABEL',
870
877
  'ORDERS_EMPTY',
871
878
  'ORDERS_EMPTY_ACTION',
872
879
  'ORDERS_ERR_LOAD',
873
880
  'ORDERS_FILTERED_CLEAR',
874
881
  'ORDERS_FILTERED_EMPTY',
882
+ 'ORDERS_PENDING_ALWAYS_LISTED',
875
883
  'ORDERS_REPEAT_ARIA',
876
884
  'ORDERS_SEARCH_LABEL',
877
885
  'ORDERS_STATUS_CANCELLED_TOOLTIP',
@@ -1011,8 +1019,14 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
1011
1019
  'PAYMENTS_COLUMN_MOVEMENT',
1012
1020
  'PAYMENTS_COLUMN_PAYMENT',
1013
1021
  'PAYMENTS_DATE_FROM_LABEL',
1022
+ 'PAYMENTS_DATE_UNTIL_LABEL',
1014
1023
  'PAYMENTS_EXPORT_FILENAME',
1015
1024
  'PAYMENTS_LEDGER_UNAVAILABLE',
1025
+ 'PAYMENTS_PDF_DOWNLOAD',
1026
+ 'PAYMENTS_PDF_ERROR',
1027
+ 'PAYMENTS_PDF_FILENAME',
1028
+ 'PAYMENTS_PDF_TOO_LONG',
1029
+ 'PAYMENTS_PDF_UNAVAILABLE',
1016
1030
  'PAYMENTS_STATEMENT_ERROR',
1017
1031
  'PAYMENTS_STATEMENT_PARTIAL',
1018
1032
  'PAYMENTS_SUBTITLE',
@@ -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
@@ -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. `paymentAttempt` is attached on read and is never stored on the
111
- * order.
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.
@@ -458,6 +458,8 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
458
458
  'COMMON_CANCEL',
459
459
  'COMMON_CLOSE',
460
460
  'COMMON_CONFIRM',
461
+ 'COMMON_DATE_RANGE_INVERTED',
462
+ 'COMMON_DATE_RANGE_MALFORMED',
461
463
  'COMMON_DISMISS_NOTICE',
462
464
  'COMMON_DOWNLOAD',
463
465
  'COMMON_EXPORT_CSV',
@@ -664,7 +666,10 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
664
666
  'HOME_HERO_CTA',
665
667
  'HOME_HERO_TITLE',
666
668
  'HOME_METRICS_BALANCE',
667
- 'HOME_METRICS_BALANCE_LABEL',
669
+ 'HOME_METRICS_BALANCE_CREDIT',
670
+ 'HOME_METRICS_BALANCE_OWED',
671
+ 'HOME_METRICS_BALANCE_SETTLED',
672
+ 'HOME_METRICS_BALANCE_UNAVAILABLE',
668
673
  'HOME_METRICS_BASKET',
669
674
  'HOME_METRICS_BASKET_LABEL',
670
675
  'HOME_METRICS_CURRENCY',
@@ -716,6 +721,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
716
721
  'INVOICES_COLUMN_TOTAL',
717
722
  'INVOICES_COLUMN_TYPE',
718
723
  'INVOICES_DATE_FROM',
724
+ 'INVOICES_DATE_UNTIL_LABEL',
719
725
  'INVOICES_DOWNLOAD_ERROR',
720
726
  'INVOICES_DOWNLOAD_PDF_ARIA',
721
727
  'INVOICES_DOWNLOAD_PDF_TOOLTIP',
@@ -864,11 +870,13 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
864
870
  'ORDERS_COLUMN_STATUS',
865
871
  'ORDERS_COLUMN_TOTAL',
866
872
  'ORDERS_DATE_FROM_LABEL',
873
+ 'ORDERS_DATE_UNTIL_LABEL',
867
874
  'ORDERS_EMPTY',
868
875
  'ORDERS_EMPTY_ACTION',
869
876
  'ORDERS_ERR_LOAD',
870
877
  'ORDERS_FILTERED_CLEAR',
871
878
  'ORDERS_FILTERED_EMPTY',
879
+ 'ORDERS_PENDING_ALWAYS_LISTED',
872
880
  'ORDERS_REPEAT_ARIA',
873
881
  'ORDERS_SEARCH_LABEL',
874
882
  'ORDERS_STATUS_CANCELLED_TOOLTIP',
@@ -1008,8 +1016,14 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
1008
1016
  'PAYMENTS_COLUMN_MOVEMENT',
1009
1017
  'PAYMENTS_COLUMN_PAYMENT',
1010
1018
  'PAYMENTS_DATE_FROM_LABEL',
1019
+ 'PAYMENTS_DATE_UNTIL_LABEL',
1011
1020
  'PAYMENTS_EXPORT_FILENAME',
1012
1021
  'PAYMENTS_LEDGER_UNAVAILABLE',
1022
+ 'PAYMENTS_PDF_DOWNLOAD',
1023
+ 'PAYMENTS_PDF_ERROR',
1024
+ 'PAYMENTS_PDF_FILENAME',
1025
+ 'PAYMENTS_PDF_TOO_LONG',
1026
+ 'PAYMENTS_PDF_UNAVAILABLE',
1013
1027
  'PAYMENTS_STATEMENT_ERROR',
1014
1028
  'PAYMENTS_STATEMENT_PARTIAL',
1015
1029
  'PAYMENTS_SUBTITLE',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.770",
3
+ "version": "1.10.772",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",