sinfactura-types 1.5.3 → 1.5.5
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/order.d.ts +12 -0
- package/dist/payment.d.ts +56 -0
- package/dist/store.d.ts +5 -0
- package/package.json +1 -1
package/dist/order.d.ts
CHANGED
|
@@ -39,6 +39,18 @@ declare global {
|
|
|
39
39
|
province: string;
|
|
40
40
|
postalCode: string;
|
|
41
41
|
};
|
|
42
|
+
mercadopago?: {
|
|
43
|
+
dynamicQr?: {
|
|
44
|
+
qrData: string;
|
|
45
|
+
inStoreOrderId: string;
|
|
46
|
+
posId: string;
|
|
47
|
+
externalReference: string;
|
|
48
|
+
amount: number;
|
|
49
|
+
currency: string;
|
|
50
|
+
expiresAt: number;
|
|
51
|
+
createdAt: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
42
54
|
}
|
|
43
55
|
interface ZebraTag {
|
|
44
56
|
orderId: string;
|
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