platform-types 1.10.796 → 1.10.798

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.
@@ -80,6 +80,17 @@ declare global {
80
80
  currency: string;
81
81
  /** The store's name for the delivery method chosen, when it still resolves. */
82
82
  deliveryMethodName?: string;
83
+ /**
84
+ * Present, and `true`, only when the order is meant to be paid online: the
85
+ * row of the store's CURRENT `paymentMethods` whose `id` is the order's
86
+ * payment method declares `storefront: 'mp-checkout-pro'` — the method rule
87
+ * the guest checkout mints `paymentGrant` on, without its payability
88
+ * gates, so a paid or cancelled online order still carries it. The order
89
+ * stores only the method id: a row re-typed after the order changes the
90
+ * answer. No grant and nothing payable is implied; absent on an order paid
91
+ * offline, or whose method row is gone.
92
+ */
93
+ onlinePayment?: true;
83
94
  /** The latest online payment attempt, when the order has one. */
84
95
  paymentAttempt?: OrderPaymentAttemptView;
85
96
  contact: {
package/dist/product.d.ts CHANGED
@@ -30,7 +30,8 @@ declare global {
30
30
  unitRevision: number;
31
31
  }
32
32
  type ProductUnitsInput = Omit<ProductUnits, 'unitRevision'>;
33
- type PublicProductUnits = Pick<ProductUnits, 'baseUnit' | 'purchaseUnit' | 'packLabel'>;
33
+ /** The display declaration plus the purchase-unit factor; `unitRevision` stays server-only. */
34
+ type PublicProductUnits = Pick<ProductUnits, 'baseUnit' | 'purchaseUnit' | 'packLabel' | 'baseUnitsPerPurchaseUnit'>;
34
35
  type PublicProduct = Omit<Partial<Product>, 'units' | 'unitRevisionGeneration'> & {
35
36
  units?: PublicProductUnits | null;
36
37
  };
package/dist/store.d.ts CHANGED
@@ -528,6 +528,52 @@ 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';
533
+ /**
534
+ * The consumer-law facts a storefront renders: the merchant identity disclosure, the
535
+ * Botón de Arrepentimiento and the privacy-text variants. Built by the api at read time
536
+ * from the STORE row, never stored or writable, and never inferred from a price list's
537
+ * `audienceClass` — every caller of one store sees the same block.
538
+ */
539
+ interface StorePublicLegal {
540
+ identity: {
541
+ /** `integrations.afip.razonSocial` trimmed, else `Store.name` (the invoice emisor rule). */
542
+ legalName: string;
543
+ /** `Store.cuit`, as the frame's own `cuit`. */
544
+ cuit?: string;
545
+ /**
546
+ * The invoice's fiscal domicile composition of the `integrations.afip` address leaves
547
+ * once they are complete (`address`, `postalCode`, `province`; `city` optional), else
548
+ * `Store.address` with `missing` naming `fiscalAddress` — a partial domicile is never
549
+ * published. Never the public contact's `address`.
550
+ */
551
+ fiscalAddress?: string;
552
+ /** Only the frame's own `publicContact` targets: absent when the shop publishes none. */
553
+ email?: string;
554
+ phone?: StorefrontPublicContact['phone'];
555
+ whatsapp?: StorefrontPublicContact['whatsapp'];
556
+ };
557
+ /**
558
+ * Always sent: its presence means "render the withdrawal button". `channels` are the
559
+ * public contact's targets, never prefilled links — the request text is the storefront's;
560
+ * empty when the shop publishes neither, and `missing` then names `withdrawalChannel`.
561
+ */
562
+ withdrawal: {
563
+ channels: {
564
+ email?: string;
565
+ whatsapp?: StorefrontPublicContact['whatsapp'];
566
+ };
567
+ hours?: StorefrontContactHours;
568
+ };
569
+ privacy: {
570
+ /** The same verdict as `ecommerce.config.guestCheckoutAvailable`. */
571
+ guestPurchase: boolean;
572
+ /** `['mercadopago']` while any `paymentMethods` row is `storefront: 'mp-checkout-pro'`, whatever its audience rule; else `[]`. */
573
+ onlinePayment: Array<'mercadopago'>;
574
+ };
575
+ missing: StorePublicLegalMissing[];
576
+ }
531
577
  interface Store {
532
578
  /** Optional operational mail preferences; absent sales-digest/email means enabled. */
533
579
  notificationPreferences?: Partial<Record<'sales-digest', Partial<Record<NotificationPreferenceChannel, boolean>>>>;
@@ -1156,6 +1202,13 @@ declare global {
1156
1202
  * email/phone pair explicitly consented by config.publicContact is used.
1157
1203
  */
1158
1204
  publicContact?: StorefrontPublicContact;
1205
+ /**
1206
+ * Server-built consumer-law block: sent on every `200` of web `GET /store` and on the
1207
+ * storefront preview's store frame, the same for a guest and a customer. Read-time,
1208
+ * never stored or writable. NOT on customer STORE frames: a storefront rehydrates it by
1209
+ * refetching web `GET /store`, as it does on socket reconnect.
1210
+ */
1211
+ legal?: StorePublicLegal;
1159
1212
  /** Read-only legacy editor seed, available only to the entitled tenant ADMIN. */
1160
1213
  storefrontEditorBaseline?: StorefrontEditorBaseline;
1161
1214
  /** Public aggregate from the immutable publication and live platform layers. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.796",
3
+ "version": "1.10.798",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",