@use-stall/types 0.8.0 → 0.9.0
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/package.json +1 -1
- package/src/payments.d.ts +7 -16
package/package.json
CHANGED
package/src/payments.d.ts
CHANGED
|
@@ -31,13 +31,10 @@ export interface UnifiedPaymentMethodType {
|
|
|
31
31
|
type: UnifiedMethodsType;
|
|
32
32
|
offline_support: boolean;
|
|
33
33
|
instant_clear: boolean; // whether the payment is cleared instantly like cash or custom
|
|
34
|
+
express: boolean; // for mobile money, a phone number is required to collect the payment
|
|
35
|
+
requires_otp: boolean; // for mobile money, an OTP is required to collect the payment
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
// The method actually used to collect one specific payment — richer than
|
|
37
|
-
// UnifiedPaymentMethodType (which just describes what a provider supports), since it
|
|
38
|
-
// captures the named device config and this collection's own details. No optional fields —
|
|
39
|
-
// original_amount/cash always carry real (possibly zero) values so callers never need to
|
|
40
|
-
// null-check them.
|
|
41
38
|
export interface UnifiedChargedPaymentMethodType extends UnifiedPaymentMethodType {
|
|
42
39
|
name: string;
|
|
43
40
|
method_id: string; // the device's payment-method serial/reference; distinct from the
|
|
@@ -47,6 +44,9 @@ export interface UnifiedChargedPaymentMethodType extends UnifiedPaymentMethodTyp
|
|
|
47
44
|
tendered: number;
|
|
48
45
|
change: number;
|
|
49
46
|
};
|
|
47
|
+
metadata?: {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface UnifiedPaymentProviderConfigType {
|
|
@@ -84,19 +84,10 @@ export interface FrontendPaymentMethodType {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export type UnifiedPaymentCollectionStatus =
|
|
87
|
-
| "
|
|
88
|
-
| "processing"
|
|
89
|
-
| "completed"
|
|
90
|
-
| "failed"
|
|
91
|
-
| "cancelled";
|
|
87
|
+
"pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
92
88
|
|
|
93
89
|
export type UnifiedPaymentCollectionTransactionType =
|
|
94
|
-
| "
|
|
95
|
-
| "return"
|
|
96
|
-
| "refund"
|
|
97
|
-
| "void"
|
|
98
|
-
| "pay-out"
|
|
99
|
-
| "pay-in";
|
|
90
|
+
"sale" | "return" | "refund" | "void" | "pay-out" | "pay-in";
|
|
100
91
|
|
|
101
92
|
export interface UnifiedPaymentCollectionType {
|
|
102
93
|
id: string;
|