sinfactura-types 1.10.596 → 1.10.598

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.
@@ -493,10 +493,11 @@ exports.SOCKET_ACTIONS = [
493
493
  * it would strip nothing from a webhook frame.
494
494
  */
495
495
  'webhooks',
496
- // Explicit deletions — the row is gone, not updated.
496
+ // Explicit deletions and compatibility clears.
497
497
  'account-delete',
498
+ /** Cart cleared, emptied or deleted; data is BasketsDeleteData. */
498
499
  'baskets-delete',
499
- // Makes "emptying the last line deletes the row" explicit on the wire.
500
+ // Reserved deletion action; current cart clears emit baskets-delete.
500
501
  'cart-delete',
501
502
  'log-delete',
502
503
  // Notifications & messaging.
package/dist/invoice.d.ts CHANGED
@@ -113,6 +113,10 @@ declare global {
113
113
  paymentCondition: string;
114
114
  deliveryCondition: string;
115
115
  items: InvoiceItem[];
116
+ partialItems?: {
117
+ index: number;
118
+ quantity: number;
119
+ }[];
116
120
  neto10: number;
117
121
  neto21: number;
118
122
  iva10: number;
@@ -374,6 +378,7 @@ declare global {
374
378
  dueDate?: number;
375
379
  }
376
380
  interface InvoiceItem {
381
+ unit?: ProductUnit;
377
382
  code: string;
378
383
  description: string;
379
384
  quantity: number;
package/dist/socket.d.ts CHANGED
@@ -86,6 +86,19 @@ export interface CustomersRefetchData {
86
86
  */
87
87
  refetch: true;
88
88
  }
89
+ /**
90
+ * `data` of a `baskets-delete` frame after order conversion, an emptying write,
91
+ * or an explicit cart deletion. Emptying keeps the row and uses this action as
92
+ * a compatibility clear signal. Action-only consumers can keep clearing their
93
+ * cart cache; list consumers can target `cartId` when present and invalidate
94
+ * when it is absent.
95
+ */
96
+ export interface BasketsDeleteData {
97
+ /** Scalar id of the affected cart. Omitted for legacy carts without an id. */
98
+ cartId?: string;
99
+ /** Present on both DELETE endpoints; order and emptying clears omit it. */
100
+ customerId?: string;
101
+ }
89
102
  /** Runtime guard — narrows an untrusted string to a known action. */
90
103
  export declare const isSocketAction: (value: unknown) => value is SocketAction;
91
104
  /**
package/dist/socket.js CHANGED
@@ -490,10 +490,11 @@ export const SOCKET_ACTIONS = [
490
490
  * it would strip nothing from a webhook frame.
491
491
  */
492
492
  'webhooks',
493
- // Explicit deletions — the row is gone, not updated.
493
+ // Explicit deletions and compatibility clears.
494
494
  'account-delete',
495
+ /** Cart cleared, emptied or deleted; data is BasketsDeleteData. */
495
496
  'baskets-delete',
496
- // Makes "emptying the last line deletes the row" explicit on the wire.
497
+ // Reserved deletion action; current cart clears emit baskets-delete.
497
498
  'cart-delete',
498
499
  'log-delete',
499
500
  // Notifications & messaging.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.596",
3
+ "version": "1.10.598",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",