platform-types 1.10.730 → 1.10.731

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/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 cashier's
145
- * `User.defaultWarehouseId` when it names an active depósito, else the
146
- * store's primary — the sale depósito ladder without its request and
147
- * channel rungs.
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/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/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 `403 STORE_MODULE_DISABLED` — the switched-off module the request needed. */
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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.730",
3
+ "version": "1.10.731",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",