sinfactura-types 1.5.1 → 1.5.2

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.
Files changed (2) hide show
  1. package/dist/payment.d.ts +27 -0
  2. package/package.json +1 -1
package/dist/payment.d.ts CHANGED
@@ -20,3 +20,30 @@ export interface PaymentReceivedWsPayload {
20
20
  orderId?: string;
21
21
  invoiceId?: string;
22
22
  }
23
+ /**
24
+ * REST shape of a payment row returned by `GET /payments/received` (api#902).
25
+ *
26
+ * Distinct from `PaymentReceivedWsPayload` (api#880, the WS broadcast):
27
+ * - This carries denormalized labels (customerName, orderCode, invoiceCode)
28
+ * attached server-side at response time so the FE doesn't N+1 fetch.
29
+ * - The WS broadcast is the lean live-tail event; this is the canonical row.
30
+ */
31
+ export interface PaymentReceived {
32
+ paymentId: string;
33
+ source: PaymentReceivedSource;
34
+ total: number;
35
+ currency: string;
36
+ payerName?: string;
37
+ payerEmail?: string;
38
+ payerCuit?: string;
39
+ paidAt: number;
40
+ customerId?: string;
41
+ customerName?: string;
42
+ orderId?: string;
43
+ orderCode?: string;
44
+ invoiceId?: string;
45
+ invoiceCode?: string;
46
+ accountId?: string;
47
+ linkedAt?: number;
48
+ linkSource?: "auto" | "manual";
49
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",