@use-stall/types 0.3.11 → 0.3.13
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/device.d.ts +17 -12
- package/src/organizations.d.ts +22 -3
- package/src/payments.d.ts +9 -1
package/package.json
CHANGED
package/src/device.d.ts
CHANGED
|
@@ -18,18 +18,23 @@ export interface DeviceType {
|
|
|
18
18
|
connected_at: string;
|
|
19
19
|
connected_by: string;
|
|
20
20
|
device_details: DeviceDetails;
|
|
21
|
-
payment_methods:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
payment_methods: DevicePaymentMethod[];
|
|
22
|
+
fulfillment_methods: DeviceFulfillmentMethod[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DevicePaymentMethod {
|
|
26
|
+
provider: string;
|
|
27
|
+
external_id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
type: UnifiedMethodsType;
|
|
30
|
+
supported_currencies: string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface DeviceFulfillmentMethod {
|
|
34
|
+
provider: string;
|
|
35
|
+
external_id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
type: UnifiedFulfillmentMethods;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
export interface DeviceDetails {
|
package/src/organizations.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
export interface OrganizationDBConfig {
|
|
2
|
+
refresh_token?: string; // gsheets only — stored encrypted
|
|
3
|
+
database_url?: string; // postgres only — stored encrypted
|
|
4
|
+
spreadsheet_id?: string; // gsheets only — stored after first seed, stored encrypted
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface OrganizationDBType {
|
|
8
|
+
type: "default" | "postgres" | "gsheets";
|
|
9
|
+
config: OrganizationDBConfig;
|
|
10
|
+
}
|
|
2
11
|
|
|
3
12
|
export interface OrganizationType {
|
|
4
13
|
id: string;
|
|
5
14
|
business_type: string;
|
|
6
15
|
organization_name: string;
|
|
7
16
|
organization_size: number | string;
|
|
8
|
-
base_currency: string;
|
|
9
17
|
business_address: string;
|
|
10
18
|
owner: string;
|
|
11
19
|
active: boolean;
|
|
@@ -24,10 +32,21 @@ export interface OrganizationType {
|
|
|
24
32
|
emails: string[]; // Other email addresses with access, the primary one is the one with matching the owner uid
|
|
25
33
|
created_at: number;
|
|
26
34
|
updated_at: number;
|
|
27
|
-
|
|
35
|
+
db: OrganizationDBType;
|
|
28
36
|
timezone: string;
|
|
29
37
|
onboarded: boolean;
|
|
30
38
|
country: string;
|
|
39
|
+
currencies: {
|
|
40
|
+
base: string;
|
|
41
|
+
others: {
|
|
42
|
+
// name and rate pair e.g. ZAR: {rate :16.50, created_at:date,updated_at:date}
|
|
43
|
+
[key: string]: {
|
|
44
|
+
rate: number;
|
|
45
|
+
created_at: string;
|
|
46
|
+
updated_at: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
31
50
|
}
|
|
32
51
|
|
|
33
52
|
export interface ReceiptType {
|
package/src/payments.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export interface UnifiedPaymentProviderConfigType {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface FrontendPaymentMethodType {
|
|
55
|
-
id: string;
|
|
55
|
+
id: string;
|
|
56
56
|
provider: {
|
|
57
57
|
id: string; // provider id
|
|
58
58
|
name: string;
|
|
@@ -61,6 +61,7 @@ export interface FrontendPaymentMethodType {
|
|
|
61
61
|
external_id: string;
|
|
62
62
|
name: string;
|
|
63
63
|
type: UnifiedMethodsType;
|
|
64
|
+
supported_currencies: string[];
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
export type UnifiedPaymentCollectionStatus =
|
|
@@ -90,12 +91,19 @@ export interface UnifiedPaymentCollectionType {
|
|
|
90
91
|
status: UnifiedPaymentCollectionStatus;
|
|
91
92
|
type: UnifiedPaymentCollectionTransactionType;
|
|
92
93
|
amount: {
|
|
94
|
+
base_currency: string;
|
|
93
95
|
currency: string;
|
|
96
|
+
rate: number; // Rate of the currency if base then 1
|
|
94
97
|
value: number;
|
|
95
98
|
};
|
|
96
99
|
provider_id: string;
|
|
100
|
+
external_id: string;
|
|
97
101
|
payment_method: UnifiedPaymentMethodType;
|
|
98
102
|
note: string;
|
|
103
|
+
device: {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
};
|
|
99
107
|
metadata: {
|
|
100
108
|
stall_offline_id: string;
|
|
101
109
|
stall_offline_created_at: string;
|