sinfactura-types 1.5.2 → 1.5.4

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.
package/dist/payment.d.ts CHANGED
@@ -47,3 +47,59 @@ export interface PaymentReceived {
47
47
  linkedAt?: number;
48
48
  linkSource?: "auto" | "manual";
49
49
  }
50
+ /**
51
+ * Confidence tier for a link suggestion (api#904).
52
+ *
53
+ * Mapped from heuristic match strength:
54
+ * - 'Alta': customer CUIT/email exact OR order amount-exact + ±24h
55
+ * - 'Media': order amount ±5% within ±7d
56
+ * - 'Baja': reserved for future broader heuristics (currently unused)
57
+ */
58
+ export type LinkSuggestionConfidence = "Alta" | "Media" | "Baja";
59
+ /**
60
+ * One ranked customer candidate for a payment's link dialog (api#904).
61
+ * The FE renders the chip with `fullName`, the confidence badge, and the
62
+ * `reason` text verbatim.
63
+ */
64
+ export interface CustomerCandidate {
65
+ customerId: string;
66
+ fullName: string;
67
+ cuit?: string;
68
+ email?: string;
69
+ confidence: LinkSuggestionConfidence;
70
+ reason: string;
71
+ score: number;
72
+ }
73
+ /**
74
+ * One ranked order candidate for a payment's link dialog (api#904).
75
+ * `orderCode` is currently identical to `orderId` (no separate short code
76
+ * field on Order today); kept as a distinct field for forward-compat with
77
+ * a future Order.code rollout.
78
+ *
79
+ * `currency` is always 'ARS' in v1 (the storage currency for SINFACTURA's
80
+ * Argentine tenants); USD-priced orders surface their ARS-equivalent total.
81
+ * `total` is therefore in ARS regardless of how the order was originally
82
+ * priced; FE may derive USD display from `Order.currency` (the FX rate)
83
+ * if needed.
84
+ */
85
+ export interface OrderCandidate {
86
+ orderId: string;
87
+ orderCode: string;
88
+ customerId: string;
89
+ customerName: string;
90
+ total: number;
91
+ currency: string;
92
+ dated: number;
93
+ confidence: LinkSuggestionConfidence;
94
+ reason: string;
95
+ score: number;
96
+ }
97
+ /**
98
+ * Response shape of `GET /payments/{source}/{paymentId}/link-suggestions`.
99
+ * Both arrays may be empty when no signal — FE renders "Sin sugerencias
100
+ * automáticas" and falls back to manual customer / order search inputs.
101
+ */
102
+ export interface LinkSuggestionsResponse {
103
+ customers: CustomerCandidate[];
104
+ orders: OrderCandidate[];
105
+ }
package/dist/store.d.ts CHANGED
@@ -177,6 +177,11 @@ declare global {
177
177
  defaultDeviceId?: string;
178
178
  defaultStoreMpId?: string;
179
179
  };
180
+ staticQr?: {
181
+ posId: string;
182
+ externalPosId: string;
183
+ createdAt: number;
184
+ };
180
185
  features?: {
181
186
  checkoutPro?: boolean;
182
187
  pointOfSale?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",