@getivy/node-sdk 0.1.0-alpha.9 → 1.1.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.
Files changed (231) hide show
  1. package/CHANGELOG.md +334 -0
  2. package/README.md +16 -26
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +25 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +26 -16
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +36 -18
  13. package/index.d.ts +36 -18
  14. package/index.d.ts.map +1 -1
  15. package/index.js +27 -8
  16. package/index.js.map +1 -1
  17. package/index.mjs +27 -8
  18. package/index.mjs.map +1 -1
  19. package/package.json +11 -33
  20. package/resource.d.ts +1 -1
  21. package/resource.d.ts.map +1 -1
  22. package/resource.js.map +1 -1
  23. package/resource.mjs.map +1 -1
  24. package/resources/balance.d.ts +8 -5
  25. package/resources/balance.d.ts.map +1 -1
  26. package/resources/banks.d.ts +82 -67
  27. package/resources/banks.d.ts.map +1 -1
  28. package/resources/beneficiary-payouts.d.ts +61 -0
  29. package/resources/beneficiary-payouts.d.ts.map +1 -0
  30. package/resources/beneficiary-payouts.js +16 -0
  31. package/resources/beneficiary-payouts.js.map +1 -0
  32. package/resources/beneficiary-payouts.mjs +12 -0
  33. package/resources/beneficiary-payouts.mjs.map +1 -0
  34. package/resources/capabilities.d.ts +1 -10
  35. package/resources/capabilities.d.ts.map +1 -1
  36. package/resources/charges.d.ts +28 -19
  37. package/resources/charges.d.ts.map +1 -1
  38. package/resources/checkoutsession.d.ts +275 -1360
  39. package/resources/checkoutsession.d.ts.map +1 -1
  40. package/resources/customers.d.ts +140 -10
  41. package/resources/customers.d.ts.map +1 -1
  42. package/resources/customers.js +9 -2
  43. package/resources/customers.js.map +1 -1
  44. package/resources/customers.mjs +9 -2
  45. package/resources/customers.mjs.map +1 -1
  46. package/resources/data/accounts.d.ts +83 -0
  47. package/resources/data/accounts.d.ts.map +1 -0
  48. package/resources/data/accounts.js +15 -0
  49. package/resources/data/accounts.js.map +1 -0
  50. package/resources/data/accounts.mjs +11 -0
  51. package/resources/data/accounts.mjs.map +1 -0
  52. package/resources/data/balances.d.ts +48 -0
  53. package/resources/data/balances.d.ts.map +1 -0
  54. package/resources/data/balances.js +15 -0
  55. package/resources/data/balances.js.map +1 -0
  56. package/resources/data/balances.mjs +11 -0
  57. package/resources/data/balances.mjs.map +1 -0
  58. package/resources/data/consent.d.ts +80 -0
  59. package/resources/data/consent.d.ts.map +1 -0
  60. package/resources/data/consent.js +21 -0
  61. package/resources/data/consent.js.map +1 -0
  62. package/resources/data/consent.mjs +17 -0
  63. package/resources/data/consent.mjs.map +1 -0
  64. package/resources/data/data.d.ts +26 -0
  65. package/resources/data/data.d.ts.map +1 -0
  66. package/resources/data/data.js +55 -0
  67. package/resources/data/data.js.map +1 -0
  68. package/resources/data/data.mjs +28 -0
  69. package/resources/data/data.mjs.map +1 -0
  70. package/resources/data/index.d.ts +7 -0
  71. package/resources/data/index.d.ts.map +1 -0
  72. package/resources/data/index.js +17 -0
  73. package/resources/data/index.js.map +1 -0
  74. package/resources/data/index.mjs +8 -0
  75. package/resources/data/index.mjs.map +1 -0
  76. package/resources/data/session.d.ts +258 -0
  77. package/resources/data/session.d.ts.map +1 -0
  78. package/resources/data/session.js +21 -0
  79. package/resources/data/session.js.map +1 -0
  80. package/resources/data/session.mjs +17 -0
  81. package/resources/data/session.mjs.map +1 -0
  82. package/resources/data/transactions.d.ts +175 -0
  83. package/resources/data/transactions.d.ts.map +1 -0
  84. package/resources/data/transactions.js +16 -0
  85. package/resources/data/transactions.js.map +1 -0
  86. package/resources/data/transactions.mjs +12 -0
  87. package/resources/data/transactions.mjs.map +1 -0
  88. package/resources/data.d.ts +2 -0
  89. package/resources/data.d.ts.map +1 -0
  90. package/resources/data.js +19 -0
  91. package/resources/data.js.map +1 -0
  92. package/resources/data.mjs +3 -0
  93. package/resources/data.mjs.map +1 -0
  94. package/resources/deposits.d.ts +165 -0
  95. package/resources/deposits.d.ts.map +1 -0
  96. package/resources/deposits.js +15 -0
  97. package/resources/deposits.js.map +1 -0
  98. package/resources/deposits.mjs +11 -0
  99. package/resources/deposits.mjs.map +1 -0
  100. package/resources/fx.d.ts +90 -0
  101. package/resources/fx.d.ts.map +1 -0
  102. package/resources/fx.js +22 -0
  103. package/resources/fx.js.map +1 -0
  104. package/resources/fx.mjs +18 -0
  105. package/resources/fx.mjs.map +1 -0
  106. package/resources/index.d.ts +13 -8
  107. package/resources/index.d.ts.map +1 -1
  108. package/resources/index.js +15 -5
  109. package/resources/index.js.map +1 -1
  110. package/resources/index.mjs +7 -2
  111. package/resources/index.mjs.map +1 -1
  112. package/resources/mandates.d.ts +55 -17
  113. package/resources/mandates.d.ts.map +1 -1
  114. package/resources/orders.d.ts +720 -743
  115. package/resources/orders.d.ts.map +1 -1
  116. package/resources/orders.js +13 -3
  117. package/resources/orders.js.map +1 -1
  118. package/resources/orders.mjs +13 -3
  119. package/resources/orders.mjs.map +1 -1
  120. package/resources/payouts.d.ts +219 -103
  121. package/resources/payouts.d.ts.map +1 -1
  122. package/resources/payouts.js +3 -4
  123. package/resources/payouts.js.map +1 -1
  124. package/resources/payouts.mjs +3 -4
  125. package/resources/payouts.mjs.map +1 -1
  126. package/resources/refunds.d.ts +53 -97
  127. package/resources/refunds.d.ts.map +1 -1
  128. package/resources/refunds.js +8 -12
  129. package/resources/refunds.js.map +1 -1
  130. package/resources/refunds.mjs +8 -12
  131. package/resources/refunds.mjs.map +1 -1
  132. package/resources/returns.d.ts +104 -0
  133. package/resources/returns.d.ts.map +1 -0
  134. package/resources/returns.js +21 -0
  135. package/resources/returns.js.map +1 -0
  136. package/resources/returns.mjs +17 -0
  137. package/resources/returns.mjs.map +1 -0
  138. package/resources/subaccounts.d.ts +15 -5
  139. package/resources/subaccounts.d.ts.map +1 -1
  140. package/resources/subaccounts.js.map +1 -1
  141. package/resources/subaccounts.mjs.map +1 -1
  142. package/resources/transactions.d.ts +174 -0
  143. package/resources/transactions.d.ts.map +1 -0
  144. package/resources/transactions.js +15 -0
  145. package/resources/transactions.js.map +1 -0
  146. package/resources/transactions.mjs +11 -0
  147. package/resources/transactions.mjs.map +1 -0
  148. package/resources/webhook/index.d.ts +3 -0
  149. package/resources/webhook/index.d.ts.map +1 -0
  150. package/resources/webhook/index.js +9 -0
  151. package/resources/webhook/index.js.map +1 -0
  152. package/resources/webhook/index.mjs +4 -0
  153. package/resources/webhook/index.mjs.map +1 -0
  154. package/resources/webhook/subscription.d.ts +152 -0
  155. package/resources/webhook/subscription.d.ts.map +1 -0
  156. package/resources/{webhooksubscription.js → webhook/subscription.js} +6 -6
  157. package/resources/webhook/subscription.js.map +1 -0
  158. package/resources/{webhooksubscription.mjs → webhook/subscription.mjs} +4 -4
  159. package/resources/webhook/subscription.mjs.map +1 -0
  160. package/resources/webhook/webhook.d.ts +28 -0
  161. package/resources/webhook/webhook.d.ts.map +1 -0
  162. package/resources/webhook/webhook.js +45 -0
  163. package/resources/webhook/webhook.js.map +1 -0
  164. package/resources/webhook/webhook.mjs +18 -0
  165. package/resources/webhook/webhook.mjs.map +1 -0
  166. package/resources/webhook.d.ts +2 -0
  167. package/resources/webhook.d.ts.map +1 -0
  168. package/resources/webhook.js +19 -0
  169. package/resources/webhook.js.map +1 -0
  170. package/resources/webhook.mjs +3 -0
  171. package/resources/webhook.mjs.map +1 -0
  172. package/resources.d.ts +2 -0
  173. package/resources.d.ts.map +1 -0
  174. package/resources.js +18 -0
  175. package/resources.js.map +1 -0
  176. package/resources.mjs +2 -0
  177. package/resources.mjs.map +1 -0
  178. package/src/_shims/index.d.ts +2 -0
  179. package/src/_shims/index.js +5 -1
  180. package/src/_shims/index.mjs +5 -1
  181. package/src/core.ts +44 -16
  182. package/src/index.ts +111 -60
  183. package/src/resource.ts +1 -1
  184. package/src/resources/balance.ts +8 -5
  185. package/src/resources/banks.ts +130 -67
  186. package/src/resources/beneficiary-payouts.ts +78 -0
  187. package/src/resources/capabilities.ts +1 -10
  188. package/src/resources/charges.ts +30 -21
  189. package/src/resources/checkoutsession.ts +1224 -3096
  190. package/src/resources/customers.ts +164 -9
  191. package/src/resources/data/accounts.ts +113 -0
  192. package/src/resources/data/balances.ts +60 -0
  193. package/src/resources/data/consent.ts +110 -0
  194. package/src/resources/data/data.ts +75 -0
  195. package/src/resources/data/index.ts +20 -0
  196. package/src/resources/data/session.ts +1317 -0
  197. package/src/resources/data/transactions.ts +235 -0
  198. package/src/resources/data.ts +3 -0
  199. package/src/resources/deposits.ts +231 -0
  200. package/src/resources/fx.ts +119 -0
  201. package/src/resources/index.ts +33 -28
  202. package/src/resources/mandates.ts +79 -17
  203. package/src/resources/orders.ts +1449 -1075
  204. package/src/resources/payouts.ts +273 -103
  205. package/src/resources/refunds.ts +70 -111
  206. package/src/resources/returns.ts +140 -0
  207. package/src/resources/subaccounts.ts +26 -4
  208. package/src/resources/transactions.ts +234 -0
  209. package/src/resources/webhook/index.ts +16 -0
  210. package/src/resources/{webhooksubscription.ts → webhook/subscription.ts} +164 -112
  211. package/src/resources/webhook/webhook.ts +69 -0
  212. package/src/resources/webhook.ts +3 -0
  213. package/src/resources.ts +1 -0
  214. package/src/version.ts +1 -1
  215. package/version.d.ts +1 -1
  216. package/version.d.ts.map +1 -1
  217. package/version.js +1 -1
  218. package/version.js.map +1 -1
  219. package/version.mjs +1 -1
  220. package/version.mjs.map +1 -1
  221. package/resources/reports.d.ts +0 -120
  222. package/resources/reports.d.ts.map +0 -1
  223. package/resources/reports.js +0 -31
  224. package/resources/reports.js.map +0 -1
  225. package/resources/reports.mjs +0 -27
  226. package/resources/reports.mjs.map +0 -1
  227. package/resources/webhooksubscription.d.ts +0 -155
  228. package/resources/webhooksubscription.d.ts.map +0 -1
  229. package/resources/webhooksubscription.js.map +0 -1
  230. package/resources/webhooksubscription.mjs.map +0 -1
  231. package/src/resources/reports.ts +0 -172
@@ -5,14 +5,15 @@ import * as Core from '../core';
5
5
 
6
6
  export class Customers extends APIResource {
7
7
  /**
8
- * This endpoint allows merchants to create a new customer with email
8
+ * Create a new Customer representing your Customers. You can use the Customer to
9
+ * simplify the checkout process for returning journeys.
9
10
  */
10
11
  create(body: CustomerCreateParams, options?: Core.RequestOptions): Core.APIPromise<CustomerCreateResponse> {
11
12
  return this._client.post('/api/service/customer/create', { body, ...options });
12
13
  }
13
14
 
14
15
  /**
15
- * This endpoint allows merchants to retrieve the customer info by id
16
+ * Retrieve a Customer Object by its id.
16
17
  */
17
18
  retrieve(
18
19
  body: CustomerRetrieveParams,
@@ -20,41 +21,195 @@ export class Customers extends APIResource {
20
21
  ): Core.APIPromise<CustomerRetrieveResponse> {
21
22
  return this._client.post('/api/service/customer/retrieve', { body, ...options });
22
23
  }
24
+
25
+ /**
26
+ * Search for customers you have previously created using filters, e.g. by email.
27
+ */
28
+ search(body: CustomerSearchParams, options?: Core.RequestOptions): Core.APIPromise<CustomerSearchResponse> {
29
+ return this._client.post('/api/service/customer/search', { body, ...options });
30
+ }
23
31
  }
24
32
 
25
- /**
26
- * Returns the id and email of the created customer
27
- */
28
33
  export interface CustomerCreateResponse {
34
+ /**
35
+ * The id of the created customer
36
+ */
29
37
  id: string;
30
38
 
39
+ /**
40
+ * The email address of the created customer
41
+ */
31
42
  email: string;
32
43
  }
33
44
 
34
- /**
35
- * Returns the id, email and the merchantId of the customer
36
- */
37
45
  export interface CustomerRetrieveResponse {
46
+ /**
47
+ * The id of the customer
48
+ */
38
49
  id: string;
39
50
 
51
+ /**
52
+ * Array of bank accounts remembered by user
53
+ */
54
+ bankAccounts: Array<CustomerRetrieveResponse.BankAccount>;
55
+
56
+ /**
57
+ * The email address of the customer
58
+ */
40
59
  emailAddress: string;
60
+ }
41
61
 
42
- merchantId: string;
62
+ export namespace CustomerRetrieveResponse {
63
+ export interface BankAccount {
64
+ /**
65
+ * Remembered bank details
66
+ */
67
+ bank: BankAccount.Bank;
68
+
69
+ /**
70
+ * Last 4 digits of remembered account number
71
+ */
72
+ last4digits: string;
73
+ }
74
+
75
+ export namespace BankAccount {
76
+ /**
77
+ * Remembered bank details
78
+ */
79
+ export interface Bank {
80
+ /**
81
+ * The id of the bank
82
+ */
83
+ id: string;
84
+
85
+ /**
86
+ * The name of the bank
87
+ */
88
+ name: string;
89
+
90
+ /**
91
+ * URL address of bank logo image
92
+ */
93
+ logo?: string;
94
+ }
95
+ }
96
+ }
97
+
98
+ export interface CustomerSearchResponse {
99
+ /**
100
+ * The total number of items
101
+ */
102
+ count: number;
103
+
104
+ /**
105
+ * Whether there are more items to retrieve
106
+ */
107
+ hasNext: boolean;
108
+
109
+ /**
110
+ * Array of customer objects matching the search criteria
111
+ */
112
+ items: Array<CustomerSearchResponse.Item>;
113
+
114
+ /**
115
+ * The number of items skipped
116
+ */
117
+ skip: number;
118
+ }
119
+
120
+ export namespace CustomerSearchResponse {
121
+ export interface Item {
122
+ /**
123
+ * The id of the customer
124
+ */
125
+ id: string;
126
+
127
+ /**
128
+ * Array of bank accounts remembered by user
129
+ */
130
+ bankAccounts: Array<Item.BankAccount>;
131
+
132
+ /**
133
+ * The email address of the customer
134
+ */
135
+ emailAddress: string;
136
+ }
137
+
138
+ export namespace Item {
139
+ export interface BankAccount {
140
+ /**
141
+ * Remembered bank details
142
+ */
143
+ bank: BankAccount.Bank;
144
+
145
+ /**
146
+ * Last 4 digits of remembered account number
147
+ */
148
+ last4digits: string;
149
+ }
150
+
151
+ export namespace BankAccount {
152
+ /**
153
+ * Remembered bank details
154
+ */
155
+ export interface Bank {
156
+ /**
157
+ * The id of the bank
158
+ */
159
+ id: string;
160
+
161
+ /**
162
+ * The name of the bank
163
+ */
164
+ name: string;
165
+
166
+ /**
167
+ * URL address of bank logo image
168
+ */
169
+ logo?: string;
170
+ }
171
+ }
172
+ }
43
173
  }
44
174
 
45
175
  export interface CustomerCreateParams {
176
+ /**
177
+ * The email address of the customer
178
+ */
46
179
  email: string;
47
180
  }
48
181
 
49
182
  export interface CustomerRetrieveParams {
183
+ /**
184
+ * The id of the customer
185
+ */
50
186
  id: string;
51
187
  }
52
188
 
189
+ export interface CustomerSearchParams {
190
+ /**
191
+ * Search for customers by email
192
+ */
193
+ email: string;
194
+
195
+ /**
196
+ * A limit on the number of objects to be returned.
197
+ */
198
+ limit?: number;
199
+
200
+ /**
201
+ * The number of items to skip
202
+ */
203
+ skip?: number;
204
+ }
205
+
53
206
  export declare namespace Customers {
54
207
  export {
55
208
  type CustomerCreateResponse as CustomerCreateResponse,
56
209
  type CustomerRetrieveResponse as CustomerRetrieveResponse,
210
+ type CustomerSearchResponse as CustomerSearchResponse,
57
211
  type CustomerCreateParams as CustomerCreateParams,
58
212
  type CustomerRetrieveParams as CustomerRetrieveParams,
213
+ type CustomerSearchParams as CustomerSearchParams,
59
214
  };
60
215
  }
@@ -0,0 +1,113 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Accounts extends APIResource {
7
+ /**
8
+ * Retrieves the list of accounts for a given data session.
9
+ */
10
+ list(body: AccountListParams, options?: Core.RequestOptions): Core.APIPromise<AccountListResponse> {
11
+ return this._client.post('/api/service/data/accounts/list', { body, ...options });
12
+ }
13
+ }
14
+
15
+ export interface AccountListResponse {
16
+ /**
17
+ * Array of bank accounts for the given data session
18
+ */
19
+ accounts: Array<AccountListResponse.Account>;
20
+ }
21
+
22
+ export namespace AccountListResponse {
23
+ export interface Account {
24
+ /**
25
+ * The ID of the account.
26
+ */
27
+ id: string;
28
+
29
+ /**
30
+ * The ID of the bank.
31
+ */
32
+ bankId: string;
33
+
34
+ /**
35
+ * The name of the bank.
36
+ */
37
+ bankName: string;
38
+
39
+ /**
40
+ * The currency of the account.
41
+ */
42
+ currency: string;
43
+
44
+ /**
45
+ * Financial address details of the account
46
+ */
47
+ financialAddress: Array<Account.FinancialAddress>;
48
+
49
+ /**
50
+ * The name of the account.
51
+ */
52
+ accountName?: string;
53
+ }
54
+
55
+ export namespace Account {
56
+ export interface FinancialAddress {
57
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
58
+
59
+ bankCode?: FinancialAddress.BankCode;
60
+
61
+ bban?: FinancialAddress.Bban;
62
+
63
+ iban?: FinancialAddress.Iban;
64
+
65
+ sortCode?: FinancialAddress.SortCode;
66
+ }
67
+
68
+ export namespace FinancialAddress {
69
+ export interface BankCode {
70
+ accountNumber: string;
71
+
72
+ code: string;
73
+
74
+ accountHolderName?: string;
75
+ }
76
+
77
+ export interface Bban {
78
+ bban: string;
79
+
80
+ accountHolderName?: string;
81
+
82
+ bic?: string;
83
+ }
84
+
85
+ export interface Iban {
86
+ iban: string;
87
+
88
+ accountHolderName?: string;
89
+
90
+ bic?: string;
91
+ }
92
+
93
+ export interface SortCode {
94
+ accountNumber: string;
95
+
96
+ sortCode: string;
97
+
98
+ accountHolderName?: string;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ export interface AccountListParams {
105
+ /**
106
+ * The ID of the data session to retrieve accounts for.
107
+ */
108
+ sessionId: string;
109
+ }
110
+
111
+ export declare namespace Accounts {
112
+ export { type AccountListResponse as AccountListResponse, type AccountListParams as AccountListParams };
113
+ }
@@ -0,0 +1,60 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Balances extends APIResource {
7
+ /**
8
+ * Retrieves the list of account balances for a given data session.
9
+ */
10
+ list(body: BalanceListParams, options?: Core.RequestOptions): Core.APIPromise<BalanceListResponse> {
11
+ return this._client.post('/api/service/data/account-balances/list', { body, ...options });
12
+ }
13
+ }
14
+
15
+ export interface BalanceListResponse {
16
+ /**
17
+ * Array of account balances for the given data session
18
+ */
19
+ balances: Array<BalanceListResponse.Balance>;
20
+ }
21
+
22
+ export namespace BalanceListResponse {
23
+ export interface Balance {
24
+ /**
25
+ * The ID of the account.
26
+ */
27
+ accountId: string;
28
+
29
+ /**
30
+ * The available balance.
31
+ */
32
+ available: string;
33
+
34
+ /**
35
+ * The currency of the balance.
36
+ */
37
+ currency: string;
38
+
39
+ /**
40
+ * The current balance.
41
+ */
42
+ current: string;
43
+
44
+ /**
45
+ * The date and time when the balance was last updated.
46
+ */
47
+ timestamp: unknown;
48
+ }
49
+ }
50
+
51
+ export interface BalanceListParams {
52
+ /**
53
+ * The ID of the data session to retrieve account balances for.
54
+ */
55
+ sessionId: string;
56
+ }
57
+
58
+ export declare namespace Balances {
59
+ export { type BalanceListResponse as BalanceListResponse, type BalanceListParams as BalanceListParams };
60
+ }
@@ -0,0 +1,110 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Consent extends APIResource {
7
+ /**
8
+ * Retrieves the details of a consent by session ID.
9
+ */
10
+ retrieve(
11
+ body: ConsentRetrieveParams,
12
+ options?: Core.RequestOptions,
13
+ ): Core.APIPromise<ConsentRetrieveResponse> {
14
+ return this._client.post('/api/service/data/consent/details', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Revokes a consent by session ID.
19
+ */
20
+ revoke(body: ConsentRevokeParams, options?: Core.RequestOptions): Core.APIPromise<ConsentRevokeResponse> {
21
+ return this._client.post('/api/service/data/consent/revoke', { body, ...options });
22
+ }
23
+ }
24
+
25
+ export interface ConsentRetrieveResponse {
26
+ /**
27
+ * The Epoch time in seconds when the consent was created.
28
+ */
29
+ createdAt: number;
30
+
31
+ /**
32
+ * The permissions granted in this consent.
33
+ */
34
+ permissions: Array<'accounts' | 'balances' | 'transactions'>;
35
+
36
+ /**
37
+ * The current status of the consent.
38
+ */
39
+ status: 'created' | 'authorised' | 'expired' | 'revoked' | 'failed';
40
+
41
+ /**
42
+ * The Epoch time in seconds when the consent was last updated.
43
+ */
44
+ updatedAt: number;
45
+
46
+ /**
47
+ * The Epoch time in seconds at which the consent expires.
48
+ */
49
+ expiresAt?: number;
50
+
51
+ /**
52
+ * The Epoch time in seconds at which the consent was revoked.
53
+ */
54
+ revokedAt?: number;
55
+ }
56
+
57
+ export interface ConsentRevokeResponse {
58
+ /**
59
+ * The Epoch time in seconds when the consent was created.
60
+ */
61
+ createdAt: number;
62
+
63
+ /**
64
+ * The permissions granted in this consent.
65
+ */
66
+ permissions: Array<'accounts' | 'balances' | 'transactions'>;
67
+
68
+ /**
69
+ * The Epoch time in seconds at which the consent was revoked.
70
+ */
71
+ revokedAt: number;
72
+
73
+ /**
74
+ * The current status of the consent.
75
+ */
76
+ status: 'revoked';
77
+
78
+ /**
79
+ * The Epoch time in seconds when the consent was last updated.
80
+ */
81
+ updatedAt: number;
82
+
83
+ /**
84
+ * The Epoch time in seconds at which the consent expires.
85
+ */
86
+ expiresAt?: number;
87
+ }
88
+
89
+ export interface ConsentRetrieveParams {
90
+ /**
91
+ * The ID of the data session to which the consent belongs.
92
+ */
93
+ sessionId: string;
94
+ }
95
+
96
+ export interface ConsentRevokeParams {
97
+ /**
98
+ * The ID of the data session to which the consent belongs.
99
+ */
100
+ sessionId: string;
101
+ }
102
+
103
+ export declare namespace Consent {
104
+ export {
105
+ type ConsentRetrieveResponse as ConsentRetrieveResponse,
106
+ type ConsentRevokeResponse as ConsentRevokeResponse,
107
+ type ConsentRetrieveParams as ConsentRetrieveParams,
108
+ type ConsentRevokeParams as ConsentRevokeParams,
109
+ };
110
+ }
@@ -0,0 +1,75 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as AccountsAPI from './accounts';
5
+ import { AccountListParams, AccountListResponse, Accounts } from './accounts';
6
+ import * as BalancesAPI from './balances';
7
+ import { BalanceListParams, BalanceListResponse, Balances } from './balances';
8
+ import * as ConsentAPI from './consent';
9
+ import {
10
+ Consent,
11
+ ConsentRetrieveParams,
12
+ ConsentRetrieveResponse,
13
+ ConsentRevokeParams,
14
+ ConsentRevokeResponse,
15
+ } from './consent';
16
+ import * as SessionAPI from './session';
17
+ import {
18
+ Session,
19
+ SessionCreateParams,
20
+ SessionCreateResponse,
21
+ SessionRetrieveParams,
22
+ SessionRetrieveResponse,
23
+ } from './session';
24
+ import * as TransactionsAPI from './transactions';
25
+ import { TransactionListParams, TransactionListResponse, Transactions } from './transactions';
26
+
27
+ export class Data extends APIResource {
28
+ session: SessionAPI.Session = new SessionAPI.Session(this._client);
29
+ consent: ConsentAPI.Consent = new ConsentAPI.Consent(this._client);
30
+ accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
31
+ transactions: TransactionsAPI.Transactions = new TransactionsAPI.Transactions(this._client);
32
+ balances: BalancesAPI.Balances = new BalancesAPI.Balances(this._client);
33
+ }
34
+
35
+ Data.Session = Session;
36
+ Data.Consent = Consent;
37
+ Data.Accounts = Accounts;
38
+ Data.Transactions = Transactions;
39
+ Data.Balances = Balances;
40
+
41
+ export declare namespace Data {
42
+ export {
43
+ Session as Session,
44
+ type SessionCreateResponse as SessionCreateResponse,
45
+ type SessionRetrieveResponse as SessionRetrieveResponse,
46
+ type SessionCreateParams as SessionCreateParams,
47
+ type SessionRetrieveParams as SessionRetrieveParams,
48
+ };
49
+
50
+ export {
51
+ Consent as Consent,
52
+ type ConsentRetrieveResponse as ConsentRetrieveResponse,
53
+ type ConsentRevokeResponse as ConsentRevokeResponse,
54
+ type ConsentRetrieveParams as ConsentRetrieveParams,
55
+ type ConsentRevokeParams as ConsentRevokeParams,
56
+ };
57
+
58
+ export {
59
+ Accounts as Accounts,
60
+ type AccountListResponse as AccountListResponse,
61
+ type AccountListParams as AccountListParams,
62
+ };
63
+
64
+ export {
65
+ Transactions as Transactions,
66
+ type TransactionListResponse as TransactionListResponse,
67
+ type TransactionListParams as TransactionListParams,
68
+ };
69
+
70
+ export {
71
+ Balances as Balances,
72
+ type BalanceListResponse as BalanceListResponse,
73
+ type BalanceListParams as BalanceListParams,
74
+ };
75
+ }
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Accounts, type AccountListResponse, type AccountListParams } from './accounts';
4
+ export { Balances, type BalanceListResponse, type BalanceListParams } from './balances';
5
+ export {
6
+ Consent,
7
+ type ConsentRetrieveResponse,
8
+ type ConsentRevokeResponse,
9
+ type ConsentRetrieveParams,
10
+ type ConsentRevokeParams,
11
+ } from './consent';
12
+ export { Data } from './data';
13
+ export {
14
+ Session,
15
+ type SessionCreateResponse,
16
+ type SessionRetrieveResponse,
17
+ type SessionCreateParams,
18
+ type SessionRetrieveParams,
19
+ } from './session';
20
+ export { Transactions, type TransactionListResponse, type TransactionListParams } from './transactions';