@use-stall/types 0.1.2 → 0.1.3
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/integrations.d.ts +2 -0
- package/src/payments.d.ts +37 -47
package/package.json
CHANGED
package/src/integrations.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export interface IntegrationType {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export interface IntegrationConfigurationType {
|
|
63
|
+
id: string;
|
|
63
64
|
integration_id: string;
|
|
64
65
|
type: IntegrationConnectionType;
|
|
65
66
|
created_at: number;
|
|
@@ -71,6 +72,7 @@ export interface IntegrationConfigurationType {
|
|
|
71
72
|
token: string; // For bearer authentication
|
|
72
73
|
api_key_header: string; // For API key authentication or Custom header
|
|
73
74
|
api_key_value: string; // For API key authentication or Custom header
|
|
75
|
+
[key: string]: any;
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
78
|
|
package/src/payments.d.ts
CHANGED
|
@@ -1,55 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export type MethodsType =
|
|
2
|
+
| "card_present"
|
|
3
|
+
| "tap_to_pay" // mobile tap to pay on android and ios
|
|
4
|
+
| "online_checkout"
|
|
5
|
+
| "payment_link"
|
|
6
|
+
| "qr_code"
|
|
7
|
+
| "mobile_money"
|
|
8
|
+
| "cash"
|
|
9
|
+
| "manual";
|
|
10
|
+
|
|
11
|
+
export interface PaymentProviderType {
|
|
3
12
|
id: string;
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
13
|
+
title: string;
|
|
6
14
|
description: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
provider_name: string;
|
|
10
|
-
icon: string;
|
|
11
|
-
enabled: boolean;
|
|
12
|
-
editable: boolean;
|
|
13
|
-
sort_order: number;
|
|
14
|
-
supported_options: UnifiedPaymentMethodSupportedOptionsType;
|
|
15
|
-
supported_currencies: string[]; // Supported currencies (e.g., ["USD", "EUR"])
|
|
16
|
-
payment_plan: {
|
|
17
|
-
default: "full" | "partial" | "layaway" | "installment";
|
|
18
|
-
options: Array<"full" | "partial" | "layaway" | "installment">;
|
|
19
|
-
};
|
|
20
|
-
config?: UnifiedPaymentMethodConfigType;
|
|
21
|
-
rules: UnifiedPaymentMethodRulesType;
|
|
22
|
-
metadata?: Record<string, any>;
|
|
15
|
+
logo: string;
|
|
16
|
+
supported_methods: PaymentMethodType[];
|
|
23
17
|
}
|
|
24
18
|
|
|
25
|
-
export interface
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
tipping: boolean;
|
|
29
|
-
split: boolean;
|
|
30
|
-
offline: boolean;
|
|
31
|
-
register: boolean; // Track register sessions
|
|
19
|
+
export interface PaymentMethodType {
|
|
20
|
+
type: MethodsType;
|
|
21
|
+
offline_support: boolean;
|
|
32
22
|
}
|
|
33
23
|
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
webhook_url: string;
|
|
43
|
-
redirect: boolean;
|
|
44
|
-
redirect_url: string;
|
|
45
|
-
}
|
|
24
|
+
export type PaymentCollectionStatus =
|
|
25
|
+
| "pending"
|
|
26
|
+
| "processing"
|
|
27
|
+
| "completed"
|
|
28
|
+
| "failed"
|
|
29
|
+
| "cancelled"
|
|
30
|
+
| "refunded"
|
|
31
|
+
| "partially_refunded";
|
|
46
32
|
|
|
47
|
-
interface
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
export interface PaymentCollectionType {
|
|
34
|
+
id: string;
|
|
35
|
+
created_at: string;
|
|
36
|
+
updated_at: string;
|
|
37
|
+
status: PaymentCollectionStatus;
|
|
38
|
+
amount: {
|
|
39
|
+
currency: string;
|
|
40
|
+
value: number;
|
|
41
|
+
};
|
|
42
|
+
provider_id: string;
|
|
43
|
+
payment_method: PaymentMethodType;
|
|
44
|
+
note: string;
|
|
55
45
|
}
|