@use-stall/types 0.3.11 → 0.3.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-stall/types",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Type declarations for Stall SDKs",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
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
- provider: string;
23
- external_id: string;
24
- name: string;
25
- type: UnifiedMethodsType;
26
- }[];
27
- fulfillment_methods: {
28
- provider: string;
29
- external_id: string;
30
- name: string;
31
- type: UnifiedFulfillmentMethods;
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 {
@@ -5,7 +5,6 @@ export interface OrganizationType {
5
5
  business_type: string;
6
6
  organization_name: string;
7
7
  organization_size: number | string;
8
- base_currency: string;
9
8
  business_address: string;
10
9
  owner: string;
11
10
  active: boolean;
@@ -28,6 +27,17 @@ export interface OrganizationType {
28
27
  timezone: string;
29
28
  onboarded: boolean;
30
29
  country: string;
30
+ currencies: {
31
+ base: string;
32
+ others: {
33
+ // name and rate pair e.g. ZAR: {rate :16.50, created_at:date,updated_at:date}
34
+ [key: string]: {
35
+ rate: number;
36
+ created_at: string;
37
+ updated_at: string;
38
+ };
39
+ };
40
+ };
31
41
  }
32
42
 
33
43
  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;