sinfactura-types 1.10.607 → 1.10.608

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.
@@ -503,7 +503,6 @@ exports.SOCKET_ACTIONS = [
503
503
  // Notifications & messaging.
504
504
  'notifications',
505
505
  'support-message',
506
- 'whatsapp-message',
507
506
  /**
508
507
  * An automatic WhatsApp order draft settled (`ready` or `failed`). Admin
509
508
  * sockets of the store only; `data` is a `WhatsAppStoredOrderDraft`.
@@ -284,12 +284,13 @@ declare global {
284
284
  * What the outbound seam (`notify()`) knew about one call the moment its
285
285
  * transport returned. It is never a delivery receipt: `enqueued` and
286
286
  * `handed-off` say a queue or a sender took the message, and `sent` says the
287
- * provider accepted it. What the provider did next arrives later, through
288
- * `EMAILEVENT#`.
287
+ * provider accepted it. Later SES events arrive through `EMAILEVENT#`;
288
+ * WhatsApp status callbacks update the established `WHATSAPP#` history.
289
289
  */
290
- type NotifyDeliveryOutcome = 'sent' | 'not-sent' | 'enqueued' | 'handed-off' | 'failed';
290
+ type NotifyDeliveryOutcome = 'sent' | 'suppressed' | 'not-sent' | 'enqueued' | 'handed-off' | 'failed';
291
291
  /** Why a channel did not deliver, including send-time preference refusals. */
292
292
  type NotifyNotSentReason = 'skipped-by-preference' | 'demo' | 'suppressed' | 'refused';
293
+ type NotifyWhatsAppSuppressionReason = 'allowlist-missing' | 'recipient-malformed' | 'recipient-not-allowlisted';
293
294
  /**
294
295
  * A recorded transport outcome or send-time preference refusal — the
295
296
  * wire half of the `NOTIFY#{storeId}` delivery row. The stored row,
@@ -304,14 +305,14 @@ declare global {
304
305
  * `transport`, plus a count.
305
306
  */
306
307
  interface NotifyDelivery {
307
- transport: 'email' | 'queue' | 'ses' | 'ses-marketing' | 'push';
308
+ transport: 'email' | 'queue' | 'ses' | 'ses-marketing' | 'push' | 'whatsapp';
308
309
  /** The closed audience enum `notify()` accepts. */
309
310
  audience: 'store-customer' | 'account-holder' | 'store-operator' | 'platform-staff' | 'marketing-recipient';
310
311
  /** The producer's event name. Never recipient data. */
311
312
  logTag: string;
312
313
  outcome: NotifyDeliveryOutcome;
313
- /** Only when `outcome` is `'not-sent'`. */
314
- reason?: NotifyNotSentReason;
314
+ /** Only when `outcome` is `'not-sent'` or `'suppressed'`. */
315
+ reason?: NotifyNotSentReason | NotifyWhatsAppSuppressionReason;
315
316
  /** Provider channel for sent email; semantic channel for preference skips. */
316
317
  channel?: 'gmail' | 'ses' | NotificationPreferenceChannel;
317
318
  /** Only when SES returned one. The join key to `EMAILEVENT#`. */
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", "whatsapp-message", "whatsapp-order-draft", "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", "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"];
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", "whatsapp-order-draft", "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", "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"];
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
@@ -500,7 +500,6 @@ export const SOCKET_ACTIONS = [
500
500
  // Notifications & messaging.
501
501
  'notifications',
502
502
  'support-message',
503
- 'whatsapp-message',
504
503
  /**
505
504
  * An automatic WhatsApp order draft settled (`ready` or `failed`). Admin
506
505
  * sockets of the store only; `data` is a `WhatsAppStoredOrderDraft`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.607",
3
+ "version": "1.10.608",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",