@augustusbank/typescript-sdk 0.21.0 → 0.22.1

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 (216) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-holders.d.mts +1555 -1184
  12. package/resources/account-holders.d.mts.map +1 -1
  13. package/resources/account-holders.d.ts +1555 -1184
  14. package/resources/account-holders.d.ts.map +1 -1
  15. package/resources/account-holders.js +59 -0
  16. package/resources/account-holders.js.map +1 -1
  17. package/resources/account-holders.mjs +59 -0
  18. package/resources/account-holders.mjs.map +1 -1
  19. package/resources/account-programs.d.mts +22 -17
  20. package/resources/account-programs.d.mts.map +1 -1
  21. package/resources/account-programs.d.ts +22 -17
  22. package/resources/account-programs.d.ts.map +1 -1
  23. package/resources/account-programs.js +2 -2
  24. package/resources/account-programs.js.map +1 -1
  25. package/resources/account-programs.mjs +2 -2
  26. package/resources/account-programs.mjs.map +1 -1
  27. package/resources/accounts.d.mts +226 -48
  28. package/resources/accounts.d.mts.map +1 -1
  29. package/resources/accounts.d.ts +226 -48
  30. package/resources/accounts.d.ts.map +1 -1
  31. package/resources/accounts.js +55 -2
  32. package/resources/accounts.js.map +1 -1
  33. package/resources/accounts.mjs +55 -2
  34. package/resources/accounts.mjs.map +1 -1
  35. package/resources/api-keys.d.mts +1 -1
  36. package/resources/api-keys.d.mts.map +1 -1
  37. package/resources/api-keys.d.ts +1 -1
  38. package/resources/api-keys.d.ts.map +1 -1
  39. package/resources/api-versions.d.mts +3 -0
  40. package/resources/api-versions.d.mts.map +1 -1
  41. package/resources/api-versions.d.ts +3 -0
  42. package/resources/api-versions.d.ts.map +1 -1
  43. package/resources/conversions.d.mts +36 -81
  44. package/resources/conversions.d.mts.map +1 -1
  45. package/resources/conversions.d.ts +36 -81
  46. package/resources/conversions.d.ts.map +1 -1
  47. package/resources/conversions.js +25 -1
  48. package/resources/conversions.js.map +1 -1
  49. package/resources/conversions.mjs +25 -1
  50. package/resources/conversions.mjs.map +1 -1
  51. package/resources/counterparties.d.mts +1042 -0
  52. package/resources/counterparties.d.mts.map +1 -0
  53. package/resources/counterparties.d.ts +1042 -0
  54. package/resources/counterparties.d.ts.map +1 -0
  55. package/resources/counterparties.js +45 -0
  56. package/resources/counterparties.js.map +1 -0
  57. package/resources/counterparties.mjs +41 -0
  58. package/resources/counterparties.mjs.map +1 -0
  59. package/resources/deposits.d.mts +48 -186
  60. package/resources/deposits.d.mts.map +1 -1
  61. package/resources/deposits.d.ts +48 -186
  62. package/resources/deposits.d.ts.map +1 -1
  63. package/resources/events.d.mts +3 -3
  64. package/resources/events.d.mts.map +1 -1
  65. package/resources/events.d.ts +3 -3
  66. package/resources/events.d.ts.map +1 -1
  67. package/resources/index.d.mts +5 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +5 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +5 -1
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +2 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/payouts.d.mts +133 -335
  76. package/resources/payouts.d.mts.map +1 -1
  77. package/resources/payouts.d.ts +133 -335
  78. package/resources/payouts.d.ts.map +1 -1
  79. package/resources/payouts.js +25 -0
  80. package/resources/payouts.js.map +1 -1
  81. package/resources/payouts.mjs +25 -0
  82. package/resources/payouts.mjs.map +1 -1
  83. package/resources/quotes/indicative.d.mts +7 -11
  84. package/resources/quotes/indicative.d.mts.map +1 -1
  85. package/resources/quotes/indicative.d.ts +7 -11
  86. package/resources/quotes/indicative.d.ts.map +1 -1
  87. package/resources/quotes/quotes.d.mts +4 -8
  88. package/resources/quotes/quotes.d.mts.map +1 -1
  89. package/resources/quotes/quotes.d.ts +4 -8
  90. package/resources/quotes/quotes.d.ts.map +1 -1
  91. package/resources/quotes/quotes.js.map +1 -1
  92. package/resources/quotes/quotes.mjs.map +1 -1
  93. package/resources/returns.d.mts +84 -39
  94. package/resources/returns.d.mts.map +1 -1
  95. package/resources/returns.d.ts +84 -39
  96. package/resources/returns.d.ts.map +1 -1
  97. package/resources/returns.js +22 -0
  98. package/resources/returns.js.map +1 -1
  99. package/resources/returns.mjs +22 -0
  100. package/resources/returns.mjs.map +1 -1
  101. package/resources/scopes.d.mts +4 -1
  102. package/resources/scopes.d.mts.map +1 -1
  103. package/resources/scopes.d.ts +4 -1
  104. package/resources/scopes.d.ts.map +1 -1
  105. package/resources/simulations/account-programs.d.mts +215 -0
  106. package/resources/simulations/account-programs.d.mts.map +1 -0
  107. package/resources/simulations/account-programs.d.ts +215 -0
  108. package/resources/simulations/account-programs.d.ts.map +1 -0
  109. package/resources/simulations/account-programs.js +96 -0
  110. package/resources/simulations/account-programs.js.map +1 -0
  111. package/resources/simulations/account-programs.mjs +92 -0
  112. package/resources/simulations/account-programs.mjs.map +1 -0
  113. package/resources/simulations/accounts.d.mts +209 -0
  114. package/resources/simulations/accounts.d.mts.map +1 -0
  115. package/resources/simulations/accounts.d.ts +209 -0
  116. package/resources/simulations/accounts.d.ts.map +1 -0
  117. package/resources/simulations/accounts.js +90 -0
  118. package/resources/simulations/accounts.js.map +1 -0
  119. package/resources/simulations/accounts.mjs +86 -0
  120. package/resources/simulations/accounts.mjs.map +1 -0
  121. package/resources/simulations/conversions.d.mts +54 -0
  122. package/resources/simulations/conversions.d.mts.map +1 -0
  123. package/resources/simulations/conversions.d.ts +54 -0
  124. package/resources/simulations/conversions.d.ts.map +1 -0
  125. package/resources/simulations/conversions.js +39 -0
  126. package/resources/simulations/conversions.js.map +1 -0
  127. package/resources/simulations/conversions.mjs +35 -0
  128. package/resources/simulations/conversions.mjs.map +1 -0
  129. package/resources/simulations/deposits.d.mts +202 -0
  130. package/resources/simulations/deposits.d.mts.map +1 -0
  131. package/resources/simulations/deposits.d.ts +202 -0
  132. package/resources/simulations/deposits.d.ts.map +1 -0
  133. package/resources/simulations/deposits.js +25 -0
  134. package/resources/simulations/deposits.js.map +1 -0
  135. package/resources/simulations/deposits.mjs +21 -0
  136. package/resources/simulations/deposits.mjs.map +1 -0
  137. package/resources/simulations/index.d.mts +7 -0
  138. package/resources/simulations/index.d.mts.map +1 -0
  139. package/resources/simulations/index.d.ts +7 -0
  140. package/resources/simulations/index.d.ts.map +1 -0
  141. package/resources/simulations/index.js +17 -0
  142. package/resources/simulations/index.js.map +1 -0
  143. package/resources/simulations/index.mjs +8 -0
  144. package/resources/simulations/index.mjs.map +1 -0
  145. package/resources/simulations/payouts.d.mts +62 -0
  146. package/resources/simulations/payouts.d.mts.map +1 -0
  147. package/resources/simulations/payouts.d.ts +62 -0
  148. package/resources/simulations/payouts.d.ts.map +1 -0
  149. package/resources/simulations/payouts.js +39 -0
  150. package/resources/simulations/payouts.js.map +1 -0
  151. package/resources/simulations/payouts.mjs +35 -0
  152. package/resources/simulations/payouts.mjs.map +1 -0
  153. package/resources/simulations/simulations.d.mts +26 -0
  154. package/resources/simulations/simulations.d.mts.map +1 -0
  155. package/resources/simulations/simulations.d.ts +26 -0
  156. package/resources/simulations/simulations.d.ts.map +1 -0
  157. package/resources/simulations/simulations.js +33 -0
  158. package/resources/simulations/simulations.js.map +1 -0
  159. package/resources/simulations/simulations.mjs +28 -0
  160. package/resources/simulations/simulations.mjs.map +1 -0
  161. package/resources/simulations.d.mts +2 -0
  162. package/resources/simulations.d.mts.map +1 -0
  163. package/resources/simulations.d.ts +2 -0
  164. package/resources/simulations.d.ts.map +1 -0
  165. package/resources/simulations.js +6 -0
  166. package/resources/simulations.js.map +1 -0
  167. package/resources/simulations.mjs +3 -0
  168. package/resources/simulations.mjs.map +1 -0
  169. package/resources/transactions.d.mts +342 -162
  170. package/resources/transactions.d.mts.map +1 -1
  171. package/resources/transactions.d.ts +342 -162
  172. package/resources/transactions.d.ts.map +1 -1
  173. package/resources/webhook-subscriptions.d.mts +61 -11
  174. package/resources/webhook-subscriptions.d.mts.map +1 -1
  175. package/resources/webhook-subscriptions.d.ts +61 -11
  176. package/resources/webhook-subscriptions.d.ts.map +1 -1
  177. package/resources/webhook-subscriptions.js +49 -0
  178. package/resources/webhook-subscriptions.js.map +1 -1
  179. package/resources/webhook-subscriptions.mjs +49 -0
  180. package/resources/webhook-subscriptions.mjs.map +1 -1
  181. package/resources/webhooks.d.mts +976 -978
  182. package/resources/webhooks.d.mts.map +1 -1
  183. package/resources/webhooks.d.ts +976 -978
  184. package/resources/webhooks.d.ts.map +1 -1
  185. package/src/client.ts +48 -8
  186. package/src/resources/account-holders.ts +1701 -1282
  187. package/src/resources/account-programs.ts +30 -19
  188. package/src/resources/accounts.ts +265 -50
  189. package/src/resources/api-keys.ts +3 -0
  190. package/src/resources/api-versions.ts +3 -0
  191. package/src/resources/conversions.ts +36 -93
  192. package/src/resources/counterparties.ts +3127 -0
  193. package/src/resources/deposits.ts +66 -269
  194. package/src/resources/events.ts +18 -12
  195. package/src/resources/index.ts +21 -4
  196. package/src/resources/payouts.ts +204 -439
  197. package/src/resources/quotes/indicative.ts +7 -12
  198. package/src/resources/quotes/quotes.ts +4 -9
  199. package/src/resources/returns.ts +144 -40
  200. package/src/resources/scopes.ts +7 -1
  201. package/src/resources/simulations/account-programs.ts +282 -0
  202. package/src/resources/simulations/accounts.ts +265 -0
  203. package/src/resources/simulations/conversions.ts +70 -0
  204. package/src/resources/simulations/deposits.ts +522 -0
  205. package/src/resources/simulations/index.ts +33 -0
  206. package/src/resources/simulations/payouts.ts +80 -0
  207. package/src/resources/simulations/simulations.ts +92 -0
  208. package/src/resources/simulations.ts +3 -0
  209. package/src/resources/transactions.ts +954 -206
  210. package/src/resources/webhook-subscriptions.ts +102 -36
  211. package/src/resources/webhooks.ts +1283 -1153
  212. package/src/version.ts +1 -1
  213. package/version.d.mts +1 -1
  214. package/version.d.ts +1 -1
  215. package/version.js +1 -1
  216. package/version.mjs +1 -1
@@ -31,8 +31,12 @@ export class AccountPrograms extends APIResource {
31
31
  * Returns the aggregated available balance for all virtual accounts under the
32
32
  * account program.
33
33
  */
34
- retrieveBalance(id: string, options?: RequestOptions): APIPromise<AccountProgramRetrieveBalanceResponse> {
35
- return this._client.get(path`/v1/account_programs/${id}/balance`, options);
34
+ retrieveBalance(
35
+ id: string,
36
+ query: AccountProgramRetrieveBalanceParams | null | undefined = {},
37
+ options?: RequestOptions,
38
+ ): APIPromise<AccountProgramRetrieveBalanceResponse> {
39
+ return this._client.get(path`/v1/account_programs/${id}/balance`, { query, ...options });
36
40
  }
37
41
  }
38
42
 
@@ -44,12 +48,6 @@ export interface AccountProgramRetrieveResponse {
44
48
  */
45
49
  id: string;
46
50
 
47
- /**
48
- * Which for-benefit-of (FBO) program model applies: `fbo_program` (merchant
49
- * program) or `fbo_sponsored` (sponsored program).
50
- */
51
- account_program_type: 'fbo_program' | 'fbo_sponsored';
52
-
53
51
  /**
54
52
  * ISO 8601 UTC timestamp when the account program was created.
55
53
  */
@@ -83,12 +81,6 @@ export interface AccountProgramListResponse {
83
81
  */
84
82
  id: string;
85
83
 
86
- /**
87
- * Which for-benefit-of (FBO) program model applies: `fbo_program` (merchant
88
- * program) or `fbo_sponsored` (sponsored program).
89
- */
90
- account_program_type: 'fbo_program' | 'fbo_sponsored';
91
-
92
84
  /**
93
85
  * ISO 8601 UTC timestamp when the account program was created.
94
86
  */
@@ -122,10 +114,7 @@ export interface AccountProgramRetrieveBalanceResponse {
122
114
  */
123
115
  id: string;
124
116
 
125
- /**
126
- * Total available balance as a string decimal (e.g. "100.50").
127
- */
128
- amount: string;
117
+ amount: AccountProgramRetrieveBalanceResponse.Amount;
129
118
 
130
119
  /**
131
120
  * ISO 8601 UTC timestamp when this balance snapshot was produced.
@@ -133,7 +122,7 @@ export interface AccountProgramRetrieveBalanceResponse {
133
122
  as_of: string;
134
123
 
135
124
  /**
136
- * ISO 4217 currency code for the balance.
125
+ * ISO 4217 currency code.
137
126
  */
138
127
  currency: 'EUR' | 'GBP' | 'USD';
139
128
 
@@ -143,8 +132,29 @@ export interface AccountProgramRetrieveBalanceResponse {
143
132
  type: 'account_program_balance';
144
133
  }
145
134
 
135
+ export namespace AccountProgramRetrieveBalanceResponse {
136
+ export interface Amount {
137
+ /**
138
+ * Available balance as a string decimal (e.g. "100.50").
139
+ */
140
+ available: string;
141
+
142
+ /**
143
+ * Pending balance as a string decimal (e.g. "7.50").
144
+ */
145
+ pending: string;
146
+ }
147
+ }
148
+
146
149
  export interface AccountProgramListParams extends CursorPageParams {}
147
150
 
151
+ export interface AccountProgramRetrieveBalanceParams {
152
+ /**
153
+ * ISO 8601 UTC timestamp to retrieve balance at.
154
+ */
155
+ as_of?: string;
156
+ }
157
+
148
158
  export declare namespace AccountPrograms {
149
159
  export {
150
160
  type AccountProgramRetrieveResponse as AccountProgramRetrieveResponse,
@@ -152,5 +162,6 @@ export declare namespace AccountPrograms {
152
162
  type AccountProgramRetrieveBalanceResponse as AccountProgramRetrieveBalanceResponse,
153
163
  type AccountProgramListResponsesCursorPage as AccountProgramListResponsesCursorPage,
154
164
  type AccountProgramListParams as AccountProgramListParams,
165
+ type AccountProgramRetrieveBalanceParams as AccountProgramRetrieveBalanceParams,
155
166
  };
156
167
  }
@@ -9,6 +9,15 @@ import { path } from '../internal/utils/path';
9
9
  export class Accounts extends APIResource {
10
10
  /**
11
11
  * Creates a new account.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const account = await client.accounts.create({
16
+ * account_holder_id: '68e0a1b2c3d4e5f60718293a',
17
+ * account_program_id:
18
+ * '550e8400-e29b-41d4-a716-446655440002',
19
+ * });
20
+ * ```
12
21
  */
13
22
  create(body: AccountCreateParams, options?: RequestOptions): APIPromise<AccountCreateResponse> {
14
23
  return this._client.post('/v1/accounts', { body, ...options });
@@ -16,6 +25,13 @@ export class Accounts extends APIResource {
16
25
 
17
26
  /**
18
27
  * Retrieves an account by ID.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const account = await client.accounts.retrieve(
32
+ * '550e8400-e29b-41d4-a716-446655440001',
33
+ * );
34
+ * ```
19
35
  */
20
36
  retrieve(id: string, options?: RequestOptions): APIPromise<AccountRetrieveResponse> {
21
37
  return this._client.get(path`/v1/accounts/${id}`, options);
@@ -23,6 +39,14 @@ export class Accounts extends APIResource {
23
39
 
24
40
  /**
25
41
  * Returns a paginated list of accounts.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * // Automatically fetches more pages as needed.
46
+ * for await (const accountListResponse of client.accounts.list()) {
47
+ * // ...
48
+ * }
49
+ * ```
26
50
  */
27
51
  list(
28
52
  query: AccountListParams | null | undefined = {},
@@ -33,6 +57,14 @@ export class Accounts extends APIResource {
33
57
 
34
58
  /**
35
59
  * Closes an account
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const response = await client.accounts.close(
64
+ * '550e8400-e29b-41d4-a716-446655440001',
65
+ * { reason: 'aml_risk_fraud' },
66
+ * );
67
+ * ```
36
68
  */
37
69
  close(id: string, body: AccountCloseParams, options?: RequestOptions): APIPromise<AccountCloseResponse> {
38
70
  return this._client.post(path`/v1/accounts/${id}/close`, { body, ...options });
@@ -40,6 +72,13 @@ export class Accounts extends APIResource {
40
72
 
41
73
  /**
42
74
  * Freezes an account
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const response = await client.accounts.freeze(
79
+ * '550e8400-e29b-41d4-a716-446655440001',
80
+ * );
81
+ * ```
43
82
  */
44
83
  freeze(id: string, options?: RequestOptions): APIPromise<AccountFreezeResponse> {
45
84
  return this._client.post(path`/v1/accounts/${id}/freeze`, options);
@@ -47,13 +86,31 @@ export class Accounts extends APIResource {
47
86
 
48
87
  /**
49
88
  * Retrieves the available balance for an account.
50
- */
51
- retrieveBalance(id: string, options?: RequestOptions): APIPromise<AccountRetrieveBalanceResponse> {
52
- return this._client.get(path`/v1/accounts/${id}/balance`, options);
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const response = await client.accounts.retrieveBalance(
93
+ * '550e8400-e29b-41d4-a716-446655440001',
94
+ * );
95
+ * ```
96
+ */
97
+ retrieveBalance(
98
+ id: string,
99
+ query: AccountRetrieveBalanceParams | null | undefined = {},
100
+ options?: RequestOptions,
101
+ ): APIPromise<AccountRetrieveBalanceResponse> {
102
+ return this._client.get(path`/v1/accounts/${id}/balance`, { query, ...options });
53
103
  }
54
104
 
55
105
  /**
56
106
  * Unfreezes an account
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * const response = await client.accounts.unfreeze(
111
+ * '550e8400-e29b-41d4-a716-446655440001',
112
+ * );
113
+ * ```
57
114
  */
58
115
  unfreeze(id: string, options?: RequestOptions): APIPromise<AccountUnfreezeResponse> {
59
116
  return this._client.post(path`/v1/accounts/${id}/unfreeze`, options);
@@ -68,11 +125,6 @@ export interface AccountCreateResponse {
68
125
  */
69
126
  id: string;
70
127
 
71
- /**
72
- * Type of the account.
73
- */
74
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
75
-
76
128
  /**
77
129
  * Asset type of the account.
78
130
  */
@@ -84,7 +136,7 @@ export interface AccountCreateResponse {
84
136
  created_at: string;
85
137
 
86
138
  /**
87
- * ISO 4217 currency code for the account.
139
+ * Currency code (ISO 4217 or crypto).
88
140
  */
89
141
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
90
142
 
@@ -96,6 +148,7 @@ export interface AccountCreateResponse {
96
148
  | AccountCreateResponse.IbanFinancialAddress
97
149
  | AccountCreateResponse.SortCodeFinancialAddress
98
150
  | AccountCreateResponse.AbaFinancialAddress
151
+ | AccountCreateResponse.BicFinancialAddress
99
152
  | AccountCreateResponse.CryptoWalletFinancialAddress
100
153
  >;
101
154
 
@@ -187,6 +240,34 @@ export namespace AccountCreateResponse {
187
240
  type: 'aba';
188
241
  }
189
242
 
243
+ export interface BicFinancialAddress {
244
+ /**
245
+ * Name of the account holder.
246
+ */
247
+ account_holder_name: string;
248
+
249
+ /**
250
+ * Local-format bank account number.
251
+ */
252
+ account_number: string;
253
+
254
+ /**
255
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
256
+ */
257
+ bic: string;
258
+
259
+ /**
260
+ * Domestic bank or branch code where the destination country uses one (for example
261
+ * the BSB in Australia), or null.
262
+ */
263
+ local_bank_code: string | null;
264
+
265
+ /**
266
+ * Discriminator for BIC + local account financial address.
267
+ */
268
+ type: 'bic';
269
+ }
270
+
190
271
  export interface CryptoWalletFinancialAddress {
191
272
  /**
192
273
  * Wallet address on the specified blockchain.
@@ -219,11 +300,6 @@ export interface AccountRetrieveResponse {
219
300
  */
220
301
  id: string;
221
302
 
222
- /**
223
- * Type of the account.
224
- */
225
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
226
-
227
303
  /**
228
304
  * Asset type of the account.
229
305
  */
@@ -235,7 +311,7 @@ export interface AccountRetrieveResponse {
235
311
  created_at: string;
236
312
 
237
313
  /**
238
- * ISO 4217 currency code for the account.
314
+ * Currency code (ISO 4217 or crypto).
239
315
  */
240
316
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
241
317
 
@@ -247,6 +323,7 @@ export interface AccountRetrieveResponse {
247
323
  | AccountRetrieveResponse.IbanFinancialAddress
248
324
  | AccountRetrieveResponse.SortCodeFinancialAddress
249
325
  | AccountRetrieveResponse.AbaFinancialAddress
326
+ | AccountRetrieveResponse.BicFinancialAddress
250
327
  | AccountRetrieveResponse.CryptoWalletFinancialAddress
251
328
  >;
252
329
 
@@ -338,6 +415,34 @@ export namespace AccountRetrieveResponse {
338
415
  type: 'aba';
339
416
  }
340
417
 
418
+ export interface BicFinancialAddress {
419
+ /**
420
+ * Name of the account holder.
421
+ */
422
+ account_holder_name: string;
423
+
424
+ /**
425
+ * Local-format bank account number.
426
+ */
427
+ account_number: string;
428
+
429
+ /**
430
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
431
+ */
432
+ bic: string;
433
+
434
+ /**
435
+ * Domestic bank or branch code where the destination country uses one (for example
436
+ * the BSB in Australia), or null.
437
+ */
438
+ local_bank_code: string | null;
439
+
440
+ /**
441
+ * Discriminator for BIC + local account financial address.
442
+ */
443
+ type: 'bic';
444
+ }
445
+
341
446
  export interface CryptoWalletFinancialAddress {
342
447
  /**
343
448
  * Wallet address on the specified blockchain.
@@ -370,11 +475,6 @@ export interface AccountListResponse {
370
475
  */
371
476
  id: string;
372
477
 
373
- /**
374
- * Type of the account.
375
- */
376
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
377
-
378
478
  /**
379
479
  * Asset type of the account.
380
480
  */
@@ -386,7 +486,7 @@ export interface AccountListResponse {
386
486
  created_at: string;
387
487
 
388
488
  /**
389
- * ISO 4217 currency code for the account.
489
+ * Currency code (ISO 4217 or crypto).
390
490
  */
391
491
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
392
492
 
@@ -398,6 +498,7 @@ export interface AccountListResponse {
398
498
  | AccountListResponse.IbanFinancialAddress
399
499
  | AccountListResponse.SortCodeFinancialAddress
400
500
  | AccountListResponse.AbaFinancialAddress
501
+ | AccountListResponse.BicFinancialAddress
401
502
  | AccountListResponse.CryptoWalletFinancialAddress
402
503
  >;
403
504
 
@@ -489,6 +590,34 @@ export namespace AccountListResponse {
489
590
  type: 'aba';
490
591
  }
491
592
 
593
+ export interface BicFinancialAddress {
594
+ /**
595
+ * Name of the account holder.
596
+ */
597
+ account_holder_name: string;
598
+
599
+ /**
600
+ * Local-format bank account number.
601
+ */
602
+ account_number: string;
603
+
604
+ /**
605
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
606
+ */
607
+ bic: string;
608
+
609
+ /**
610
+ * Domestic bank or branch code where the destination country uses one (for example
611
+ * the BSB in Australia), or null.
612
+ */
613
+ local_bank_code: string | null;
614
+
615
+ /**
616
+ * Discriminator for BIC + local account financial address.
617
+ */
618
+ type: 'bic';
619
+ }
620
+
492
621
  export interface CryptoWalletFinancialAddress {
493
622
  /**
494
623
  * Wallet address on the specified blockchain.
@@ -521,11 +650,6 @@ export interface AccountCloseResponse {
521
650
  */
522
651
  id: string;
523
652
 
524
- /**
525
- * Type of the account.
526
- */
527
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
528
-
529
653
  /**
530
654
  * Asset type of the account.
531
655
  */
@@ -537,7 +661,7 @@ export interface AccountCloseResponse {
537
661
  created_at: string;
538
662
 
539
663
  /**
540
- * ISO 4217 currency code for the account.
664
+ * Currency code (ISO 4217 or crypto).
541
665
  */
542
666
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
543
667
 
@@ -549,6 +673,7 @@ export interface AccountCloseResponse {
549
673
  | AccountCloseResponse.IbanFinancialAddress
550
674
  | AccountCloseResponse.SortCodeFinancialAddress
551
675
  | AccountCloseResponse.AbaFinancialAddress
676
+ | AccountCloseResponse.BicFinancialAddress
552
677
  | AccountCloseResponse.CryptoWalletFinancialAddress
553
678
  >;
554
679
 
@@ -640,6 +765,34 @@ export namespace AccountCloseResponse {
640
765
  type: 'aba';
641
766
  }
642
767
 
768
+ export interface BicFinancialAddress {
769
+ /**
770
+ * Name of the account holder.
771
+ */
772
+ account_holder_name: string;
773
+
774
+ /**
775
+ * Local-format bank account number.
776
+ */
777
+ account_number: string;
778
+
779
+ /**
780
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
781
+ */
782
+ bic: string;
783
+
784
+ /**
785
+ * Domestic bank or branch code where the destination country uses one (for example
786
+ * the BSB in Australia), or null.
787
+ */
788
+ local_bank_code: string | null;
789
+
790
+ /**
791
+ * Discriminator for BIC + local account financial address.
792
+ */
793
+ type: 'bic';
794
+ }
795
+
643
796
  export interface CryptoWalletFinancialAddress {
644
797
  /**
645
798
  * Wallet address on the specified blockchain.
@@ -672,11 +825,6 @@ export interface AccountFreezeResponse {
672
825
  */
673
826
  id: string;
674
827
 
675
- /**
676
- * Type of the account.
677
- */
678
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
679
-
680
828
  /**
681
829
  * Asset type of the account.
682
830
  */
@@ -688,7 +836,7 @@ export interface AccountFreezeResponse {
688
836
  created_at: string;
689
837
 
690
838
  /**
691
- * ISO 4217 currency code for the account.
839
+ * Currency code (ISO 4217 or crypto).
692
840
  */
693
841
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
694
842
 
@@ -700,6 +848,7 @@ export interface AccountFreezeResponse {
700
848
  | AccountFreezeResponse.IbanFinancialAddress
701
849
  | AccountFreezeResponse.SortCodeFinancialAddress
702
850
  | AccountFreezeResponse.AbaFinancialAddress
851
+ | AccountFreezeResponse.BicFinancialAddress
703
852
  | AccountFreezeResponse.CryptoWalletFinancialAddress
704
853
  >;
705
854
 
@@ -791,6 +940,34 @@ export namespace AccountFreezeResponse {
791
940
  type: 'aba';
792
941
  }
793
942
 
943
+ export interface BicFinancialAddress {
944
+ /**
945
+ * Name of the account holder.
946
+ */
947
+ account_holder_name: string;
948
+
949
+ /**
950
+ * Local-format bank account number.
951
+ */
952
+ account_number: string;
953
+
954
+ /**
955
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
956
+ */
957
+ bic: string;
958
+
959
+ /**
960
+ * Domestic bank or branch code where the destination country uses one (for example
961
+ * the BSB in Australia), or null.
962
+ */
963
+ local_bank_code: string | null;
964
+
965
+ /**
966
+ * Discriminator for BIC + local account financial address.
967
+ */
968
+ type: 'bic';
969
+ }
970
+
794
971
  export interface CryptoWalletFinancialAddress {
795
972
  /**
796
973
  * Wallet address on the specified blockchain.
@@ -823,10 +1000,7 @@ export interface AccountRetrieveBalanceResponse {
823
1000
  */
824
1001
  account_id: string;
825
1002
 
826
- /**
827
- * Available balance amount as a decimal string.
828
- */
829
- amount: string;
1003
+ amount: AccountRetrieveBalanceResponse.Amount;
830
1004
 
831
1005
  /**
832
1006
  * ISO 8601 UTC timestamp when the balance was retrieved.
@@ -834,7 +1008,7 @@ export interface AccountRetrieveBalanceResponse {
834
1008
  as_of: string;
835
1009
 
836
1010
  /**
837
- * ISO 4217 currency code for the balance.
1011
+ * Currency code (ISO 4217 or crypto).
838
1012
  */
839
1013
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
840
1014
 
@@ -844,17 +1018,26 @@ export interface AccountRetrieveBalanceResponse {
844
1018
  type: 'account_balance';
845
1019
  }
846
1020
 
1021
+ export namespace AccountRetrieveBalanceResponse {
1022
+ export interface Amount {
1023
+ /**
1024
+ * Available balance as a string decimal (e.g. "100.50").
1025
+ */
1026
+ available: string;
1027
+
1028
+ /**
1029
+ * Pending balance as a string decimal (e.g. "7.50").
1030
+ */
1031
+ pending: string;
1032
+ }
1033
+ }
1034
+
847
1035
  export interface AccountUnfreezeResponse {
848
1036
  /**
849
1037
  * Unique identifier of the account.
850
1038
  */
851
1039
  id: string;
852
1040
 
853
- /**
854
- * Type of the account.
855
- */
856
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
857
-
858
1041
  /**
859
1042
  * Asset type of the account.
860
1043
  */
@@ -866,7 +1049,7 @@ export interface AccountUnfreezeResponse {
866
1049
  created_at: string;
867
1050
 
868
1051
  /**
869
- * ISO 4217 currency code for the account.
1052
+ * Currency code (ISO 4217 or crypto).
870
1053
  */
871
1054
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
872
1055
 
@@ -878,6 +1061,7 @@ export interface AccountUnfreezeResponse {
878
1061
  | AccountUnfreezeResponse.IbanFinancialAddress
879
1062
  | AccountUnfreezeResponse.SortCodeFinancialAddress
880
1063
  | AccountUnfreezeResponse.AbaFinancialAddress
1064
+ | AccountUnfreezeResponse.BicFinancialAddress
881
1065
  | AccountUnfreezeResponse.CryptoWalletFinancialAddress
882
1066
  >;
883
1067
 
@@ -969,6 +1153,34 @@ export namespace AccountUnfreezeResponse {
969
1153
  type: 'aba';
970
1154
  }
971
1155
 
1156
+ export interface BicFinancialAddress {
1157
+ /**
1158
+ * Name of the account holder.
1159
+ */
1160
+ account_holder_name: string;
1161
+
1162
+ /**
1163
+ * Local-format bank account number.
1164
+ */
1165
+ account_number: string;
1166
+
1167
+ /**
1168
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
1169
+ */
1170
+ bic: string;
1171
+
1172
+ /**
1173
+ * Domestic bank or branch code where the destination country uses one (for example
1174
+ * the BSB in Australia), or null.
1175
+ */
1176
+ local_bank_code: string | null;
1177
+
1178
+ /**
1179
+ * Discriminator for BIC + local account financial address.
1180
+ */
1181
+ type: 'bic';
1182
+ }
1183
+
972
1184
  export interface CryptoWalletFinancialAddress {
973
1185
  /**
974
1186
  * Wallet address on the specified blockchain.
@@ -1005,11 +1217,6 @@ export interface AccountCreateParams {
1005
1217
  * ID of the account program to create the account under.
1006
1218
  */
1007
1219
  account_program_id: string;
1008
-
1009
- /**
1010
- * Type of account. Currently only virtual account.
1011
- */
1012
- account_type: 'virtual_account';
1013
1220
  }
1014
1221
 
1015
1222
  export interface AccountListParams extends CursorPageParams {
@@ -1027,7 +1234,7 @@ export interface AccountListParams extends CursorPageParams {
1027
1234
  /**
1028
1235
  * ID of the account program to list virtual accounts for.
1029
1236
  */
1030
- parent_id?: string;
1237
+ account_program_id?: string;
1031
1238
 
1032
1239
  /**
1033
1240
  * Filter by account status.
@@ -1042,6 +1249,13 @@ export interface AccountCloseParams {
1042
1249
  reason: 'aml_risk_fraud' | 'client_request';
1043
1250
  }
1044
1251
 
1252
+ export interface AccountRetrieveBalanceParams {
1253
+ /**
1254
+ * ISO 8601 UTC timestamp to retrieve balance at.
1255
+ */
1256
+ as_of?: string;
1257
+ }
1258
+
1045
1259
  export declare namespace Accounts {
1046
1260
  export {
1047
1261
  type AccountCreateResponse as AccountCreateResponse,
@@ -1055,5 +1269,6 @@ export declare namespace Accounts {
1055
1269
  type AccountCreateParams as AccountCreateParams,
1056
1270
  type AccountListParams as AccountListParams,
1057
1271
  type AccountCloseParams as AccountCloseParams,
1272
+ type AccountRetrieveBalanceParams as AccountRetrieveBalanceParams,
1058
1273
  };
1059
1274
  }
@@ -67,12 +67,15 @@ export interface APIKeyIntrospectResponse {
67
67
  | 'account_programs:read'
68
68
  | 'account_holders:read'
69
69
  | 'account_holders:write'
70
+ | 'counterparties:read'
71
+ | 'counterparties:write'
70
72
  | 'webhook_subscriptions:read'
71
73
  | 'webhook_subscriptions:write'
72
74
  | 'events:read'
73
75
  | 'webhook_deliveries:read'
74
76
  | 'webhook_deliveries:write'
75
77
  | 'transactions:read'
78
+ | 'simulations:write'
76
79
  >;
77
80
 
78
81
  /**
@@ -52,6 +52,9 @@ export namespace APIVersionListResponse {
52
52
  */
53
53
  sunset_at: string | null;
54
54
 
55
+ /**
56
+ * Resource type discriminator.
57
+ */
55
58
  type: 'api_version';
56
59
  }
57
60
  }