platform-types 1.10.805 → 1.10.807

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.
@@ -6,7 +6,8 @@ exports.WEB_NOTIFICATIONS_MAX_LIMIT = exports.CUSTOMER_NOTIFICATION_TYPES = expo
6
6
  // legacy opt-ins and explicit channel maps remain source data on USER rows.
7
7
  // Addressed ERROR / ML_FACTURADOR_COLLISION / ML_SELLER_SWITCHED /
8
8
  // ML_CONNECTION_BROKEN / MENTION / CUSTOMER_PENDING_APPROVAL /
9
- // PAYMENT_ATTEMPT_RESOLUTION / CUSTOMER_WHOLESALE_REQUEST / STOREFRONT_QUOTE_REQUEST do not select a
9
+ // PAYMENT_ATTEMPT_RESOLUTION / CUSTOMER_WHOLESALE_REQUEST / STOREFRONT_QUOTE_REQUEST /
10
+ // REFUND_OBLIGATION_OVERDUE do not select a
10
11
  // producer subscriber audience;
11
12
  // the consumer still reads the live USER row for each delivery channel.
12
13
  // AFIP_CERT_EXPIRY is seeded on the founding user and uses the subscriber index.
@@ -236,6 +237,26 @@ var NotificationTypeEnum;
236
237
  * socket).
237
238
  */
238
239
  NotificationTypeEnum["STOREFRONT_QUOTE_REQUEST"] = "STOREFRONT_QUOTE_REQUEST";
240
+ /**
241
+ * A refund obligation went overdue: its due date passed and the hourly
242
+ * sweep, after reconciling the payment, still found the money owed
243
+ * (`open` → `overdue`). Names the order (`orderId`) in the title; the app
244
+ * opens the refund queue (`GET /refund-obligations?state=overdue`) from it.
245
+ *
246
+ * ⚠️ ADMIN-ONLY, and its own preference key. The producer fans out to every
247
+ * non-disabled ADMIN of the store (`listActiveAdmins`) — the tier that closes
248
+ * an obligation — so a client offers the `REFUND_OBLIGATION_OVERDUE` toggle
249
+ * to ADMINs only. No legacy opt-in scan: the consumer enforces explicit
250
+ * type/channel preferences (`notificationPreferences.REFUND_OBLIGATION_OVERDUE`),
251
+ * default-on when absent. Additive — no backfill or consumer migration owed.
252
+ *
253
+ * Once per `open` → `overdue` move: it rings only on that committed move,
254
+ * so an obligation a reopen sent back to `open` from a hold (a lifted
255
+ * dispute, the operator's decision) rings again on its new deadline. The
256
+ * daily repeat of an obligation already `overdue` writes the
257
+ * `REFUND_OVERDUE` ERROR row and rings nothing. Never a `customerId`.
258
+ */
259
+ NotificationTypeEnum["REFUND_OBLIGATION_OVERDUE"] = "REFUND_OBLIGATION_OVERDUE";
239
260
  })(NotificationTypeEnum || (exports.NotificationTypeEnum = NotificationTypeEnum = {}));
240
261
  /**
241
262
  * The notification types a CUSTOMER bell can carry today; each links through
package/dist/cjs/store.js CHANGED
@@ -187,6 +187,8 @@ exports.STORE_PATCH_ERROR_CODES = [
187
187
  'PRICE_LIST_NOT_FOUND',
188
188
  'DELIVERY_FEE_INVALID',
189
189
  'WHOLESALE_LIST_REQUIRED',
190
+ 'DATA_FISCAL_URL_INVALID',
191
+ 'STORE_PUBLIC_HOST_MISSING',
190
192
  'FORBIDDEN',
191
193
  'STORE_NOT_FOUND',
192
194
  ];
@@ -213,7 +213,27 @@ export declare enum NotificationTypeEnum {
213
213
  * audience — the bell would reach a signed-in requester's own storefront
214
214
  * socket).
215
215
  */
216
- STOREFRONT_QUOTE_REQUEST = "STOREFRONT_QUOTE_REQUEST"
216
+ STOREFRONT_QUOTE_REQUEST = "STOREFRONT_QUOTE_REQUEST",
217
+ /**
218
+ * A refund obligation went overdue: its due date passed and the hourly
219
+ * sweep, after reconciling the payment, still found the money owed
220
+ * (`open` → `overdue`). Names the order (`orderId`) in the title; the app
221
+ * opens the refund queue (`GET /refund-obligations?state=overdue`) from it.
222
+ *
223
+ * ⚠️ ADMIN-ONLY, and its own preference key. The producer fans out to every
224
+ * non-disabled ADMIN of the store (`listActiveAdmins`) — the tier that closes
225
+ * an obligation — so a client offers the `REFUND_OBLIGATION_OVERDUE` toggle
226
+ * to ADMINs only. No legacy opt-in scan: the consumer enforces explicit
227
+ * type/channel preferences (`notificationPreferences.REFUND_OBLIGATION_OVERDUE`),
228
+ * default-on when absent. Additive — no backfill or consumer migration owed.
229
+ *
230
+ * Once per `open` → `overdue` move: it rings only on that committed move,
231
+ * so an obligation a reopen sent back to `open` from a hold (a lifted
232
+ * dispute, the operator's decision) rings again on its new deadline. The
233
+ * daily repeat of an obligation already `overdue` writes the
234
+ * `REFUND_OVERDUE` ERROR row and rings nothing. Never a `customerId`.
235
+ */
236
+ REFUND_OBLIGATION_OVERDUE = "REFUND_OBLIGATION_OVERDUE"
217
237
  }
218
238
  /**
219
239
  * The notification types a CUSTOMER bell can carry today; each links through
@@ -3,7 +3,8 @@
3
3
  // legacy opt-ins and explicit channel maps remain source data on USER rows.
4
4
  // Addressed ERROR / ML_FACTURADOR_COLLISION / ML_SELLER_SWITCHED /
5
5
  // ML_CONNECTION_BROKEN / MENTION / CUSTOMER_PENDING_APPROVAL /
6
- // PAYMENT_ATTEMPT_RESOLUTION / CUSTOMER_WHOLESALE_REQUEST / STOREFRONT_QUOTE_REQUEST do not select a
6
+ // PAYMENT_ATTEMPT_RESOLUTION / CUSTOMER_WHOLESALE_REQUEST / STOREFRONT_QUOTE_REQUEST /
7
+ // REFUND_OBLIGATION_OVERDUE do not select a
7
8
  // producer subscriber audience;
8
9
  // the consumer still reads the live USER row for each delivery channel.
9
10
  // AFIP_CERT_EXPIRY is seeded on the founding user and uses the subscriber index.
@@ -233,6 +234,26 @@ export var NotificationTypeEnum;
233
234
  * socket).
234
235
  */
235
236
  NotificationTypeEnum["STOREFRONT_QUOTE_REQUEST"] = "STOREFRONT_QUOTE_REQUEST";
237
+ /**
238
+ * A refund obligation went overdue: its due date passed and the hourly
239
+ * sweep, after reconciling the payment, still found the money owed
240
+ * (`open` → `overdue`). Names the order (`orderId`) in the title; the app
241
+ * opens the refund queue (`GET /refund-obligations?state=overdue`) from it.
242
+ *
243
+ * ⚠️ ADMIN-ONLY, and its own preference key. The producer fans out to every
244
+ * non-disabled ADMIN of the store (`listActiveAdmins`) — the tier that closes
245
+ * an obligation — so a client offers the `REFUND_OBLIGATION_OVERDUE` toggle
246
+ * to ADMINs only. No legacy opt-in scan: the consumer enforces explicit
247
+ * type/channel preferences (`notificationPreferences.REFUND_OBLIGATION_OVERDUE`),
248
+ * default-on when absent. Additive — no backfill or consumer migration owed.
249
+ *
250
+ * Once per `open` → `overdue` move: it rings only on that committed move,
251
+ * so an obligation a reopen sent back to `open` from a hold (a lifted
252
+ * dispute, the operator's decision) rings again on its new deadline. The
253
+ * daily repeat of an obligation already `overdue` writes the
254
+ * `REFUND_OVERDUE` ERROR row and rings nothing. Never a `customerId`.
255
+ */
256
+ NotificationTypeEnum["REFUND_OBLIGATION_OVERDUE"] = "REFUND_OBLIGATION_OVERDUE";
236
257
  })(NotificationTypeEnum || (NotificationTypeEnum = {}));
237
258
  /**
238
259
  * The notification types a CUSTOMER bell can carry today; each links through
package/dist/store.d.ts CHANGED
@@ -528,8 +528,8 @@ declare global {
528
528
  /** Unix ms — when the retired label's redirect ends (its reservation end). */
529
529
  redirectUntil?: number;
530
530
  }
531
- /** An identity or withdrawal fact {@link StorePublicLegal} could not resolve; the storefront warns or degrades on it. */
532
- type StorePublicLegalMissing = 'razonSocial' | 'fiscalAddress' | 'email' | 'phone' | 'withdrawalChannel';
531
+ /** An identity, withdrawal or Data Fiscal fact {@link StorePublicLegal} could not resolve; the storefront warns or degrades on it. */
532
+ type StorePublicLegalMissing = 'razonSocial' | 'fiscalAddress' | 'email' | 'phone' | 'withdrawalChannel' | 'dataFiscal';
533
533
  /**
534
534
  * The consumer-law facts a storefront renders: the merchant identity disclosure, the
535
535
  * Botón de Arrepentimiento and the privacy-text variants. Built by the api at read time
@@ -572,6 +572,16 @@ declare global {
572
572
  /** `['mercadopago']` while any `paymentMethods` row is `storefront: 'mp-checkout-pro'`, whatever its audience rule; else `[]`. */
573
573
  onlinePayment: Array<'mercadopago'>;
574
574
  };
575
+ /**
576
+ * The shop's Formulario 960/D (Data Fiscal) link, from `integrations.afip.dataFiscal`.
577
+ * Absent when none is recorded, and `missing` then names `dataFiscal`.
578
+ * `matchesCurrentDomain` is `false` once the shop's public host is no longer the one the
579
+ * link was recorded for (RG 1415 art. 25 asks for a new form after a domain change).
580
+ */
581
+ dataFiscal?: {
582
+ url: string;
583
+ matchesCurrentDomain: boolean;
584
+ };
575
585
  missing: StorePublicLegalMissing[];
576
586
  }
577
587
  interface Store {
@@ -1780,6 +1790,21 @@ declare global {
1780
1790
  * clears it back to the default.
1781
1791
  */
1782
1792
  freight?: AfipFreightFiscal;
1793
+ /**
1794
+ * The shop's Formulario 960/D (Data Fiscal) link (RG 1415 art. 25). ADMIN-tier on
1795
+ * `PATCH /store`, which takes `{ url }` only: `url` is `https:` on an ARCA host
1796
+ * (`afip.gob.ar` or `arca.gob.ar`, subdomains included), and `domain` is STAMPED by the
1797
+ * api with the shop's public host at write time, never taken from the body. `null`
1798
+ * clears it. Published as `StorePublicLegal.dataFiscal`.
1799
+ */
1800
+ dataFiscal?: AfipDataFiscal;
1801
+ }
1802
+ /** {@link Afip.dataFiscal}: the link as recorded and the public host it was recorded for. */
1803
+ interface AfipDataFiscal {
1804
+ /** `https:` on `afip.gob.ar` / `arca.gob.ar` or a subdomain, normalised by the URL parser. */
1805
+ url: string;
1806
+ /** The shop's canonical public host when the link was written — bare host, no scheme. */
1807
+ domain: string;
1783
1808
  }
1784
1809
  /**
1785
1810
  * Write shape for the `afip` key of `PATCH /store`'s body. The wire accepts an
@@ -1795,6 +1820,10 @@ declare global {
1795
1820
  iibbJurisdictions?: IibbJurisdictionConfig[] | null;
1796
1821
  actividades?: number[] | null;
1797
1822
  freight?: AfipFreightFiscal | null;
1823
+ /** The link alone — the api stamps `domain` with the shop's public host and refuses one sent. */
1824
+ dataFiscal?: {
1825
+ url: string;
1826
+ } | null;
1798
1827
  }
1799
1828
  /**
1800
1829
  * Write shape for the `config` key of `PATCH /store`'s body. Two things the
@@ -2591,5 +2620,5 @@ export type StoreModuleRefusalBody = {
2591
2620
  * checks, the display-currency lock, the storefront fence) are not listed
2592
2621
  * either. Cross-cutting refusals: check `GATING_ERROR_CODES` as well.
2593
2622
  */
2594
- export declare const STORE_PATCH_ERROR_CODES: readonly ["STORE_CONFIG_FORBIDDEN", "STORE_ECOMMERCE_FORBIDDEN", "STORE_FISCAL_FIELD_FORBIDDEN", "STORE_JURISDICTION_FORBIDDEN", "AFIP_RELACION_FLAG_FORBIDDEN", "FX_TABLE_FORBIDDEN", "FX_AUTO_UPDATE_FORBIDDEN", "FIELD_NOT_WRITABLE_HERE", "AFIP_POINT_OF_SALE_NOT_CLEARABLE", "CURRENCY_CATALOG_ID_UNKNOWN", "ARS_RATE_MUST_BE_ONE", "CURRENCY_RATE_ABOVE_CEILING", "FX_CATALOG_ID_UNKNOWN", "FX_SOURCE_ID_UNKNOWN", "DISPLAY_CURRENCY_NOT_INVOICEABLE", "PRODUCT_CURRENCY_NOT_INVOICEABLE", "PRICE_LIST_NOT_FOUND", "DELIVERY_FEE_INVALID", "WHOLESALE_LIST_REQUIRED", "FORBIDDEN", "STORE_NOT_FOUND"];
2623
+ export declare const STORE_PATCH_ERROR_CODES: readonly ["STORE_CONFIG_FORBIDDEN", "STORE_ECOMMERCE_FORBIDDEN", "STORE_FISCAL_FIELD_FORBIDDEN", "STORE_JURISDICTION_FORBIDDEN", "AFIP_RELACION_FLAG_FORBIDDEN", "FX_TABLE_FORBIDDEN", "FX_AUTO_UPDATE_FORBIDDEN", "FIELD_NOT_WRITABLE_HERE", "AFIP_POINT_OF_SALE_NOT_CLEARABLE", "CURRENCY_CATALOG_ID_UNKNOWN", "ARS_RATE_MUST_BE_ONE", "CURRENCY_RATE_ABOVE_CEILING", "FX_CATALOG_ID_UNKNOWN", "FX_SOURCE_ID_UNKNOWN", "DISPLAY_CURRENCY_NOT_INVOICEABLE", "PRODUCT_CURRENCY_NOT_INVOICEABLE", "PRICE_LIST_NOT_FOUND", "DELIVERY_FEE_INVALID", "WHOLESALE_LIST_REQUIRED", "DATA_FISCAL_URL_INVALID", "STORE_PUBLIC_HOST_MISSING", "FORBIDDEN", "STORE_NOT_FOUND"];
2595
2624
  export type StorePatchErrorCode = (typeof STORE_PATCH_ERROR_CODES)[number];
package/dist/store.js CHANGED
@@ -182,6 +182,8 @@ export const STORE_PATCH_ERROR_CODES = [
182
182
  'PRICE_LIST_NOT_FOUND',
183
183
  'DELIVERY_FEE_INVALID',
184
184
  'WHOLESALE_LIST_REQUIRED',
185
+ 'DATA_FISCAL_URL_INVALID',
186
+ 'STORE_PUBLIC_HOST_MISSING',
185
187
  'FORBIDDEN',
186
188
  'STORE_NOT_FOUND',
187
189
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.805",
3
+ "version": "1.10.807",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",