@augustusbank/typescript-sdk 0.20.0 → 0.22.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 (196) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  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 +2 -2
  20. package/resources/account-programs.d.ts +2 -2
  21. package/resources/accounts.d.mts +206 -43
  22. package/resources/accounts.d.mts.map +1 -1
  23. package/resources/accounts.d.ts +206 -43
  24. package/resources/accounts.d.ts.map +1 -1
  25. package/resources/accounts.js +53 -0
  26. package/resources/accounts.js.map +1 -1
  27. package/resources/accounts.mjs +53 -0
  28. package/resources/accounts.mjs.map +1 -1
  29. package/resources/api-keys.d.mts +1 -1
  30. package/resources/api-keys.d.mts.map +1 -1
  31. package/resources/api-keys.d.ts +1 -1
  32. package/resources/api-keys.d.ts.map +1 -1
  33. package/resources/api-versions.d.mts +3 -0
  34. package/resources/api-versions.d.mts.map +1 -1
  35. package/resources/api-versions.d.ts +3 -0
  36. package/resources/api-versions.d.ts.map +1 -1
  37. package/resources/conversions.d.mts +36 -81
  38. package/resources/conversions.d.mts.map +1 -1
  39. package/resources/conversions.d.ts +36 -81
  40. package/resources/conversions.d.ts.map +1 -1
  41. package/resources/conversions.js +25 -1
  42. package/resources/conversions.js.map +1 -1
  43. package/resources/conversions.mjs +25 -1
  44. package/resources/conversions.mjs.map +1 -1
  45. package/resources/counterparties.d.mts +1042 -0
  46. package/resources/counterparties.d.mts.map +1 -0
  47. package/resources/counterparties.d.ts +1042 -0
  48. package/resources/counterparties.d.ts.map +1 -0
  49. package/resources/counterparties.js +45 -0
  50. package/resources/counterparties.js.map +1 -0
  51. package/resources/counterparties.mjs +41 -0
  52. package/resources/counterparties.mjs.map +1 -0
  53. package/resources/deposits.d.mts +38 -186
  54. package/resources/deposits.d.mts.map +1 -1
  55. package/resources/deposits.d.ts +38 -186
  56. package/resources/deposits.d.ts.map +1 -1
  57. package/resources/index.d.mts +2 -0
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +2 -0
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +5 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +2 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/payouts.d.mts +458 -276
  66. package/resources/payouts.d.mts.map +1 -1
  67. package/resources/payouts.d.ts +458 -276
  68. package/resources/payouts.d.ts.map +1 -1
  69. package/resources/payouts.js +27 -0
  70. package/resources/payouts.js.map +1 -1
  71. package/resources/payouts.mjs +27 -0
  72. package/resources/payouts.mjs.map +1 -1
  73. package/resources/quotes/indicative.d.mts +7 -11
  74. package/resources/quotes/indicative.d.mts.map +1 -1
  75. package/resources/quotes/indicative.d.ts +7 -11
  76. package/resources/quotes/indicative.d.ts.map +1 -1
  77. package/resources/quotes/quotes.d.mts +4 -8
  78. package/resources/quotes/quotes.d.mts.map +1 -1
  79. package/resources/quotes/quotes.d.ts +4 -8
  80. package/resources/quotes/quotes.d.ts.map +1 -1
  81. package/resources/quotes/quotes.js.map +1 -1
  82. package/resources/quotes/quotes.mjs.map +1 -1
  83. package/resources/returns.d.mts +84 -39
  84. package/resources/returns.d.mts.map +1 -1
  85. package/resources/returns.d.ts +84 -39
  86. package/resources/returns.d.ts.map +1 -1
  87. package/resources/returns.js +22 -0
  88. package/resources/returns.js.map +1 -1
  89. package/resources/returns.mjs +22 -0
  90. package/resources/returns.mjs.map +1 -1
  91. package/resources/scopes.d.mts +4 -1
  92. package/resources/scopes.d.mts.map +1 -1
  93. package/resources/scopes.d.ts +4 -1
  94. package/resources/scopes.d.ts.map +1 -1
  95. package/resources/simulations/account-programs.d.mts +281 -0
  96. package/resources/simulations/account-programs.d.mts.map +1 -0
  97. package/resources/simulations/account-programs.d.ts +281 -0
  98. package/resources/simulations/account-programs.d.ts.map +1 -0
  99. package/resources/simulations/account-programs.js +98 -0
  100. package/resources/simulations/account-programs.js.map +1 -0
  101. package/resources/simulations/account-programs.mjs +94 -0
  102. package/resources/simulations/account-programs.mjs.map +1 -0
  103. package/resources/simulations/accounts.d.mts +270 -0
  104. package/resources/simulations/accounts.d.mts.map +1 -0
  105. package/resources/simulations/accounts.d.ts +270 -0
  106. package/resources/simulations/accounts.d.ts.map +1 -0
  107. package/resources/simulations/accounts.js +91 -0
  108. package/resources/simulations/accounts.js.map +1 -0
  109. package/resources/simulations/accounts.mjs +87 -0
  110. package/resources/simulations/accounts.mjs.map +1 -0
  111. package/resources/simulations/deposits.d.mts +218 -0
  112. package/resources/simulations/deposits.d.mts.map +1 -0
  113. package/resources/simulations/deposits.d.ts +218 -0
  114. package/resources/simulations/deposits.d.ts.map +1 -0
  115. package/resources/simulations/deposits.js +25 -0
  116. package/resources/simulations/deposits.js.map +1 -0
  117. package/resources/simulations/deposits.mjs +21 -0
  118. package/resources/simulations/deposits.mjs.map +1 -0
  119. package/resources/simulations/index.d.mts +6 -0
  120. package/resources/simulations/index.d.mts.map +1 -0
  121. package/resources/simulations/index.d.ts +6 -0
  122. package/resources/simulations/index.d.ts.map +1 -0
  123. package/resources/simulations/index.js +15 -0
  124. package/resources/simulations/index.js.map +1 -0
  125. package/resources/simulations/index.mjs +7 -0
  126. package/resources/simulations/index.mjs.map +1 -0
  127. package/resources/simulations/payouts.d.mts +76 -0
  128. package/resources/simulations/payouts.d.mts.map +1 -0
  129. package/resources/simulations/payouts.d.ts +76 -0
  130. package/resources/simulations/payouts.d.ts.map +1 -0
  131. package/resources/simulations/payouts.js +39 -0
  132. package/resources/simulations/payouts.js.map +1 -0
  133. package/resources/simulations/payouts.mjs +35 -0
  134. package/resources/simulations/payouts.mjs.map +1 -0
  135. package/resources/simulations/simulations.d.mts +22 -0
  136. package/resources/simulations/simulations.d.mts.map +1 -0
  137. package/resources/simulations/simulations.d.ts +22 -0
  138. package/resources/simulations/simulations.d.ts.map +1 -0
  139. package/resources/simulations/simulations.js +29 -0
  140. package/resources/simulations/simulations.js.map +1 -0
  141. package/resources/simulations/simulations.mjs +24 -0
  142. package/resources/simulations/simulations.mjs.map +1 -0
  143. package/resources/simulations.d.mts +2 -0
  144. package/resources/simulations.d.mts.map +1 -0
  145. package/resources/simulations.d.ts +2 -0
  146. package/resources/simulations.d.ts.map +1 -0
  147. package/resources/simulations.js +6 -0
  148. package/resources/simulations.js.map +1 -0
  149. package/resources/simulations.mjs +3 -0
  150. package/resources/simulations.mjs.map +1 -0
  151. package/resources/transactions.d.mts +300 -180
  152. package/resources/transactions.d.mts.map +1 -1
  153. package/resources/transactions.d.ts +300 -180
  154. package/resources/transactions.d.ts.map +1 -1
  155. package/resources/webhook-subscriptions.d.mts +54 -4
  156. package/resources/webhook-subscriptions.d.mts.map +1 -1
  157. package/resources/webhook-subscriptions.d.ts +54 -4
  158. package/resources/webhook-subscriptions.d.ts.map +1 -1
  159. package/resources/webhook-subscriptions.js +49 -0
  160. package/resources/webhook-subscriptions.js.map +1 -1
  161. package/resources/webhook-subscriptions.mjs +49 -0
  162. package/resources/webhook-subscriptions.mjs.map +1 -1
  163. package/resources/webhooks.d.mts +736 -953
  164. package/resources/webhooks.d.mts.map +1 -1
  165. package/resources/webhooks.d.ts +736 -953
  166. package/resources/webhooks.d.ts.map +1 -1
  167. package/src/client.ts +32 -0
  168. package/src/resources/account-holders.ts +1701 -1282
  169. package/src/resources/account-programs.ts +2 -2
  170. package/src/resources/accounts.ts +236 -44
  171. package/src/resources/api-keys.ts +3 -0
  172. package/src/resources/api-versions.ts +3 -0
  173. package/src/resources/conversions.ts +36 -93
  174. package/src/resources/counterparties.ts +3127 -0
  175. package/src/resources/deposits.ts +54 -269
  176. package/src/resources/index.ts +13 -0
  177. package/src/resources/payouts.ts +2089 -367
  178. package/src/resources/quotes/indicative.ts +7 -12
  179. package/src/resources/quotes/quotes.ts +4 -9
  180. package/src/resources/returns.ts +144 -40
  181. package/src/resources/scopes.ts +7 -1
  182. package/src/resources/simulations/account-programs.ts +363 -0
  183. package/src/resources/simulations/accounts.ts +340 -0
  184. package/src/resources/simulations/deposits.ts +530 -0
  185. package/src/resources/simulations/index.ts +32 -0
  186. package/src/resources/simulations/payouts.ts +98 -0
  187. package/src/resources/simulations/simulations.ts +82 -0
  188. package/src/resources/simulations.ts +3 -0
  189. package/src/resources/transactions.ts +910 -232
  190. package/src/resources/webhook-subscriptions.ts +54 -4
  191. package/src/resources/webhooks.ts +948 -1126
  192. package/src/version.ts +1 -1
  193. package/version.d.mts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -8,24 +8,83 @@ const path_1 = require("../internal/utils/path.js");
8
8
  class AccountHolders extends resource_1.APIResource {
9
9
  /**
10
10
  * Creates a new account holder and starts asynchronous processing.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const accountHolder = await client.accountHolders.create({
15
+ * account_program_id:
16
+ * '550e8400-e29b-41d4-a716-446655440002',
17
+ * beneficiary_data: {
18
+ * country_of_citizenship: 'US',
19
+ * date_of_birth: '1990-01-15',
20
+ * identification: { type: 'ssn', value: '123-45-6789' },
21
+ * legal_name: 'Jordan Rivera',
22
+ * residential_address: {
23
+ * city: 'San Francisco',
24
+ * country_code: 'US',
25
+ * line_1: '548 Market St',
26
+ * postal_code: '94103',
27
+ * state: 'CA',
28
+ * },
29
+ * },
30
+ * holder_type: 'natural_person',
31
+ * });
32
+ * ```
11
33
  */
12
34
  create(body, options) {
13
35
  return this._client.post('/v1/account_holders', { body, ...options });
14
36
  }
15
37
  /**
16
38
  * Retrieves an account holder by ID.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const accountHolder = await client.accountHolders.retrieve(
43
+ * '68e0a1b2c3d4e5f60718293a',
44
+ * );
45
+ * ```
17
46
  */
18
47
  retrieve(id, options) {
19
48
  return this._client.get((0, path_1.path) `/v1/account_holders/${id}`, options);
20
49
  }
21
50
  /**
22
51
  * Replaces the beneficiary details of an existing account holder.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const accountHolder = await client.accountHolders.update(
56
+ * '68e0a1b2c3d4e5f60718293a',
57
+ * {
58
+ * beneficiary_data: {
59
+ * country_of_citizenship: 'US',
60
+ * date_of_birth: '1990-01-15',
61
+ * identification: { type: 'ssn', value: '123-45-6789' },
62
+ * legal_name: 'Jordan Rivera',
63
+ * residential_address: {
64
+ * city: 'San Francisco',
65
+ * country_code: 'US',
66
+ * line_1: '548 Market St',
67
+ * postal_code: '94103',
68
+ * state: 'CA',
69
+ * },
70
+ * },
71
+ * },
72
+ * );
73
+ * ```
23
74
  */
24
75
  update(id, body, options) {
25
76
  return this._client.post((0, path_1.path) `/v1/account_holders/${id}`, { body, ...options });
26
77
  }
27
78
  /**
28
79
  * Lists account holders for the merchant with cursor-based pagination.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * // Automatically fetches more pages as needed.
84
+ * for await (const accountHolderListResponse of client.accountHolders.list()) {
85
+ * // ...
86
+ * }
87
+ * ```
29
88
  */
30
89
  list(query = {}, options) {
31
90
  return this._client.getAPIList('/v1/account_holders', (pagination_1.CursorPage), {
@@ -1 +1 @@
1
- {"version":3,"file":"account-holders.js","sourceRoot":"","sources":["../src/resources/account-holders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;OAEG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O,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CACJ,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,uBAAqC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAjGD,wCAiGC"}
@@ -5,24 +5,83 @@ import { path } from "../internal/utils/path.mjs";
5
5
  export class AccountHolders extends APIResource {
6
6
  /**
7
7
  * Creates a new account holder and starts asynchronous processing.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const accountHolder = await client.accountHolders.create({
12
+ * account_program_id:
13
+ * '550e8400-e29b-41d4-a716-446655440002',
14
+ * beneficiary_data: {
15
+ * country_of_citizenship: 'US',
16
+ * date_of_birth: '1990-01-15',
17
+ * identification: { type: 'ssn', value: '123-45-6789' },
18
+ * legal_name: 'Jordan Rivera',
19
+ * residential_address: {
20
+ * city: 'San Francisco',
21
+ * country_code: 'US',
22
+ * line_1: '548 Market St',
23
+ * postal_code: '94103',
24
+ * state: 'CA',
25
+ * },
26
+ * },
27
+ * holder_type: 'natural_person',
28
+ * });
29
+ * ```
8
30
  */
9
31
  create(body, options) {
10
32
  return this._client.post('/v1/account_holders', { body, ...options });
11
33
  }
12
34
  /**
13
35
  * Retrieves an account holder by ID.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const accountHolder = await client.accountHolders.retrieve(
40
+ * '68e0a1b2c3d4e5f60718293a',
41
+ * );
42
+ * ```
14
43
  */
15
44
  retrieve(id, options) {
16
45
  return this._client.get(path `/v1/account_holders/${id}`, options);
17
46
  }
18
47
  /**
19
48
  * Replaces the beneficiary details of an existing account holder.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const accountHolder = await client.accountHolders.update(
53
+ * '68e0a1b2c3d4e5f60718293a',
54
+ * {
55
+ * beneficiary_data: {
56
+ * country_of_citizenship: 'US',
57
+ * date_of_birth: '1990-01-15',
58
+ * identification: { type: 'ssn', value: '123-45-6789' },
59
+ * legal_name: 'Jordan Rivera',
60
+ * residential_address: {
61
+ * city: 'San Francisco',
62
+ * country_code: 'US',
63
+ * line_1: '548 Market St',
64
+ * postal_code: '94103',
65
+ * state: 'CA',
66
+ * },
67
+ * },
68
+ * },
69
+ * );
70
+ * ```
20
71
  */
21
72
  update(id, body, options) {
22
73
  return this._client.post(path `/v1/account_holders/${id}`, { body, ...options });
23
74
  }
24
75
  /**
25
76
  * Lists account holders for the merchant with cursor-based pagination.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * // Automatically fetches more pages as needed.
81
+ * for await (const accountHolderListResponse of client.accountHolders.list()) {
82
+ * // ...
83
+ * }
84
+ * ```
26
85
  */
27
86
  list(query = {}, options) {
28
87
  return this._client.getAPIList('/v1/account_holders', (CursorPage), {
@@ -1 +1 @@
1
- {"version":3,"file":"account-holders.mjs","sourceRoot":"","sources":["../src/resources/account-holders.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,UAAU,EAAsC,+BAA2B;AAEpF,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,IAA+B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EA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AE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CACJ,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,UAAqC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -88,7 +88,7 @@ export interface AccountProgramRetrieveBalanceResponse {
88
88
  */
89
89
  id: string;
90
90
  /**
91
- * Total available balance as a string decimal (e.g. "100.50").
91
+ * Available balance as a string decimal (e.g. "100.50").
92
92
  */
93
93
  amount: string;
94
94
  /**
@@ -96,7 +96,7 @@ export interface AccountProgramRetrieveBalanceResponse {
96
96
  */
97
97
  as_of: string;
98
98
  /**
99
- * ISO 4217 currency code for the balance.
99
+ * ISO 4217 currency code.
100
100
  */
101
101
  currency: 'EUR' | 'GBP' | 'USD';
102
102
  /**
@@ -88,7 +88,7 @@ export interface AccountProgramRetrieveBalanceResponse {
88
88
  */
89
89
  id: string;
90
90
  /**
91
- * Total available balance as a string decimal (e.g. "100.50").
91
+ * Available balance as a string decimal (e.g. "100.50").
92
92
  */
93
93
  amount: string;
94
94
  /**
@@ -96,7 +96,7 @@ export interface AccountProgramRetrieveBalanceResponse {
96
96
  */
97
97
  as_of: string;
98
98
  /**
99
- * ISO 4217 currency code for the balance.
99
+ * ISO 4217 currency code.
100
100
  */
101
101
  currency: 'EUR' | 'GBP' | 'USD';
102
102
  /**
@@ -5,30 +5,83 @@ import { RequestOptions } from "../internal/request-options.mjs";
5
5
  export declare class Accounts extends APIResource {
6
6
  /**
7
7
  * Creates a new account.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const account = await client.accounts.create({
12
+ * account_holder_id: '68e0a1b2c3d4e5f60718293a',
13
+ * account_program_id:
14
+ * '550e8400-e29b-41d4-a716-446655440002',
15
+ * });
16
+ * ```
8
17
  */
9
18
  create(body: AccountCreateParams, options?: RequestOptions): APIPromise<AccountCreateResponse>;
10
19
  /**
11
20
  * Retrieves an account by ID.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const account = await client.accounts.retrieve(
25
+ * '550e8400-e29b-41d4-a716-446655440001',
26
+ * );
27
+ * ```
12
28
  */
13
29
  retrieve(id: string, options?: RequestOptions): APIPromise<AccountRetrieveResponse>;
14
30
  /**
15
31
  * Returns a paginated list of accounts.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * // Automatically fetches more pages as needed.
36
+ * for await (const accountListResponse of client.accounts.list()) {
37
+ * // ...
38
+ * }
39
+ * ```
16
40
  */
17
41
  list(query?: AccountListParams | null | undefined, options?: RequestOptions): PagePromise<AccountListResponsesCursorPage, AccountListResponse>;
18
42
  /**
19
43
  * Closes an account
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const response = await client.accounts.close(
48
+ * '550e8400-e29b-41d4-a716-446655440001',
49
+ * { reason: 'aml_risk_fraud' },
50
+ * );
51
+ * ```
20
52
  */
21
53
  close(id: string, body: AccountCloseParams, options?: RequestOptions): APIPromise<AccountCloseResponse>;
22
54
  /**
23
55
  * Freezes an account
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const response = await client.accounts.freeze(
60
+ * '550e8400-e29b-41d4-a716-446655440001',
61
+ * );
62
+ * ```
24
63
  */
25
64
  freeze(id: string, options?: RequestOptions): APIPromise<AccountFreezeResponse>;
26
65
  /**
27
66
  * Retrieves the available balance for an account.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.accounts.retrieveBalance(
71
+ * '550e8400-e29b-41d4-a716-446655440001',
72
+ * );
73
+ * ```
28
74
  */
29
75
  retrieveBalance(id: string, options?: RequestOptions): APIPromise<AccountRetrieveBalanceResponse>;
30
76
  /**
31
77
  * Unfreezes an account
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const response = await client.accounts.unfreeze(
82
+ * '550e8400-e29b-41d4-a716-446655440001',
83
+ * );
84
+ * ```
32
85
  */
33
86
  unfreeze(id: string, options?: RequestOptions): APIPromise<AccountUnfreezeResponse>;
34
87
  }
@@ -38,10 +91,6 @@ export interface AccountCreateResponse {
38
91
  * Unique identifier of the account.
39
92
  */
40
93
  id: string;
41
- /**
42
- * Type of the account.
43
- */
44
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
45
94
  /**
46
95
  * Asset type of the account.
47
96
  */
@@ -51,14 +100,14 @@ export interface AccountCreateResponse {
51
100
  */
52
101
  created_at: string;
53
102
  /**
54
- * ISO 4217 currency code for the account.
103
+ * Currency code (ISO 4217 or crypto).
55
104
  */
56
105
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
57
106
  /**
58
107
  * Payment identifiers (e.g. IBAN, account number, wallet address) through which
59
108
  * this account can send or receive funds.
60
109
  */
61
- financial_addresses: Array<AccountCreateResponse.IbanFinancialAddress | AccountCreateResponse.SortCodeFinancialAddress | AccountCreateResponse.AbaFinancialAddress | AccountCreateResponse.CryptoWalletFinancialAddress>;
110
+ financial_addresses: Array<AccountCreateResponse.IbanFinancialAddress | AccountCreateResponse.SortCodeFinancialAddress | AccountCreateResponse.AbaFinancialAddress | AccountCreateResponse.BicFinancialAddress | AccountCreateResponse.CryptoWalletFinancialAddress>;
62
111
  /**
63
112
  * Human-readable label for the account.
64
113
  */
@@ -131,6 +180,29 @@ export declare namespace AccountCreateResponse {
131
180
  */
132
181
  type: 'aba';
133
182
  }
183
+ interface BicFinancialAddress {
184
+ /**
185
+ * Name of the account holder.
186
+ */
187
+ account_holder_name: string;
188
+ /**
189
+ * Local-format bank account number.
190
+ */
191
+ account_number: string;
192
+ /**
193
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
194
+ */
195
+ bic: string;
196
+ /**
197
+ * Domestic bank or branch code where the destination country uses one (for example
198
+ * the BSB in Australia), or null.
199
+ */
200
+ local_bank_code: string | null;
201
+ /**
202
+ * Discriminator for BIC + local account financial address.
203
+ */
204
+ type: 'bic';
205
+ }
134
206
  interface CryptoWalletFinancialAddress {
135
207
  /**
136
208
  * Wallet address on the specified blockchain.
@@ -151,10 +223,6 @@ export interface AccountRetrieveResponse {
151
223
  * Unique identifier of the account.
152
224
  */
153
225
  id: string;
154
- /**
155
- * Type of the account.
156
- */
157
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
158
226
  /**
159
227
  * Asset type of the account.
160
228
  */
@@ -164,14 +232,14 @@ export interface AccountRetrieveResponse {
164
232
  */
165
233
  created_at: string;
166
234
  /**
167
- * ISO 4217 currency code for the account.
235
+ * Currency code (ISO 4217 or crypto).
168
236
  */
169
237
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
170
238
  /**
171
239
  * Payment identifiers (e.g. IBAN, account number, wallet address) through which
172
240
  * this account can send or receive funds.
173
241
  */
174
- financial_addresses: Array<AccountRetrieveResponse.IbanFinancialAddress | AccountRetrieveResponse.SortCodeFinancialAddress | AccountRetrieveResponse.AbaFinancialAddress | AccountRetrieveResponse.CryptoWalletFinancialAddress>;
242
+ financial_addresses: Array<AccountRetrieveResponse.IbanFinancialAddress | AccountRetrieveResponse.SortCodeFinancialAddress | AccountRetrieveResponse.AbaFinancialAddress | AccountRetrieveResponse.BicFinancialAddress | AccountRetrieveResponse.CryptoWalletFinancialAddress>;
175
243
  /**
176
244
  * Human-readable label for the account.
177
245
  */
@@ -244,6 +312,29 @@ export declare namespace AccountRetrieveResponse {
244
312
  */
245
313
  type: 'aba';
246
314
  }
315
+ interface BicFinancialAddress {
316
+ /**
317
+ * Name of the account holder.
318
+ */
319
+ account_holder_name: string;
320
+ /**
321
+ * Local-format bank account number.
322
+ */
323
+ account_number: string;
324
+ /**
325
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
326
+ */
327
+ bic: string;
328
+ /**
329
+ * Domestic bank or branch code where the destination country uses one (for example
330
+ * the BSB in Australia), or null.
331
+ */
332
+ local_bank_code: string | null;
333
+ /**
334
+ * Discriminator for BIC + local account financial address.
335
+ */
336
+ type: 'bic';
337
+ }
247
338
  interface CryptoWalletFinancialAddress {
248
339
  /**
249
340
  * Wallet address on the specified blockchain.
@@ -264,10 +355,6 @@ export interface AccountListResponse {
264
355
  * Unique identifier of the account.
265
356
  */
266
357
  id: string;
267
- /**
268
- * Type of the account.
269
- */
270
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
271
358
  /**
272
359
  * Asset type of the account.
273
360
  */
@@ -277,14 +364,14 @@ export interface AccountListResponse {
277
364
  */
278
365
  created_at: string;
279
366
  /**
280
- * ISO 4217 currency code for the account.
367
+ * Currency code (ISO 4217 or crypto).
281
368
  */
282
369
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
283
370
  /**
284
371
  * Payment identifiers (e.g. IBAN, account number, wallet address) through which
285
372
  * this account can send or receive funds.
286
373
  */
287
- financial_addresses: Array<AccountListResponse.IbanFinancialAddress | AccountListResponse.SortCodeFinancialAddress | AccountListResponse.AbaFinancialAddress | AccountListResponse.CryptoWalletFinancialAddress>;
374
+ financial_addresses: Array<AccountListResponse.IbanFinancialAddress | AccountListResponse.SortCodeFinancialAddress | AccountListResponse.AbaFinancialAddress | AccountListResponse.BicFinancialAddress | AccountListResponse.CryptoWalletFinancialAddress>;
288
375
  /**
289
376
  * Human-readable label for the account.
290
377
  */
@@ -357,6 +444,29 @@ export declare namespace AccountListResponse {
357
444
  */
358
445
  type: 'aba';
359
446
  }
447
+ interface BicFinancialAddress {
448
+ /**
449
+ * Name of the account holder.
450
+ */
451
+ account_holder_name: string;
452
+ /**
453
+ * Local-format bank account number.
454
+ */
455
+ account_number: string;
456
+ /**
457
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
458
+ */
459
+ bic: string;
460
+ /**
461
+ * Domestic bank or branch code where the destination country uses one (for example
462
+ * the BSB in Australia), or null.
463
+ */
464
+ local_bank_code: string | null;
465
+ /**
466
+ * Discriminator for BIC + local account financial address.
467
+ */
468
+ type: 'bic';
469
+ }
360
470
  interface CryptoWalletFinancialAddress {
361
471
  /**
362
472
  * Wallet address on the specified blockchain.
@@ -377,10 +487,6 @@ export interface AccountCloseResponse {
377
487
  * Unique identifier of the account.
378
488
  */
379
489
  id: string;
380
- /**
381
- * Type of the account.
382
- */
383
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
384
490
  /**
385
491
  * Asset type of the account.
386
492
  */
@@ -390,14 +496,14 @@ export interface AccountCloseResponse {
390
496
  */
391
497
  created_at: string;
392
498
  /**
393
- * ISO 4217 currency code for the account.
499
+ * Currency code (ISO 4217 or crypto).
394
500
  */
395
501
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
396
502
  /**
397
503
  * Payment identifiers (e.g. IBAN, account number, wallet address) through which
398
504
  * this account can send or receive funds.
399
505
  */
400
- financial_addresses: Array<AccountCloseResponse.IbanFinancialAddress | AccountCloseResponse.SortCodeFinancialAddress | AccountCloseResponse.AbaFinancialAddress | AccountCloseResponse.CryptoWalletFinancialAddress>;
506
+ financial_addresses: Array<AccountCloseResponse.IbanFinancialAddress | AccountCloseResponse.SortCodeFinancialAddress | AccountCloseResponse.AbaFinancialAddress | AccountCloseResponse.BicFinancialAddress | AccountCloseResponse.CryptoWalletFinancialAddress>;
401
507
  /**
402
508
  * Human-readable label for the account.
403
509
  */
@@ -470,6 +576,29 @@ export declare namespace AccountCloseResponse {
470
576
  */
471
577
  type: 'aba';
472
578
  }
579
+ interface BicFinancialAddress {
580
+ /**
581
+ * Name of the account holder.
582
+ */
583
+ account_holder_name: string;
584
+ /**
585
+ * Local-format bank account number.
586
+ */
587
+ account_number: string;
588
+ /**
589
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
590
+ */
591
+ bic: string;
592
+ /**
593
+ * Domestic bank or branch code where the destination country uses one (for example
594
+ * the BSB in Australia), or null.
595
+ */
596
+ local_bank_code: string | null;
597
+ /**
598
+ * Discriminator for BIC + local account financial address.
599
+ */
600
+ type: 'bic';
601
+ }
473
602
  interface CryptoWalletFinancialAddress {
474
603
  /**
475
604
  * Wallet address on the specified blockchain.
@@ -490,10 +619,6 @@ export interface AccountFreezeResponse {
490
619
  * Unique identifier of the account.
491
620
  */
492
621
  id: string;
493
- /**
494
- * Type of the account.
495
- */
496
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
497
622
  /**
498
623
  * Asset type of the account.
499
624
  */
@@ -503,14 +628,14 @@ export interface AccountFreezeResponse {
503
628
  */
504
629
  created_at: string;
505
630
  /**
506
- * ISO 4217 currency code for the account.
631
+ * Currency code (ISO 4217 or crypto).
507
632
  */
508
633
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
509
634
  /**
510
635
  * Payment identifiers (e.g. IBAN, account number, wallet address) through which
511
636
  * this account can send or receive funds.
512
637
  */
513
- financial_addresses: Array<AccountFreezeResponse.IbanFinancialAddress | AccountFreezeResponse.SortCodeFinancialAddress | AccountFreezeResponse.AbaFinancialAddress | AccountFreezeResponse.CryptoWalletFinancialAddress>;
638
+ financial_addresses: Array<AccountFreezeResponse.IbanFinancialAddress | AccountFreezeResponse.SortCodeFinancialAddress | AccountFreezeResponse.AbaFinancialAddress | AccountFreezeResponse.BicFinancialAddress | AccountFreezeResponse.CryptoWalletFinancialAddress>;
514
639
  /**
515
640
  * Human-readable label for the account.
516
641
  */
@@ -583,6 +708,29 @@ export declare namespace AccountFreezeResponse {
583
708
  */
584
709
  type: 'aba';
585
710
  }
711
+ interface BicFinancialAddress {
712
+ /**
713
+ * Name of the account holder.
714
+ */
715
+ account_holder_name: string;
716
+ /**
717
+ * Local-format bank account number.
718
+ */
719
+ account_number: string;
720
+ /**
721
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
722
+ */
723
+ bic: string;
724
+ /**
725
+ * Domestic bank or branch code where the destination country uses one (for example
726
+ * the BSB in Australia), or null.
727
+ */
728
+ local_bank_code: string | null;
729
+ /**
730
+ * Discriminator for BIC + local account financial address.
731
+ */
732
+ type: 'bic';
733
+ }
586
734
  interface CryptoWalletFinancialAddress {
587
735
  /**
588
736
  * Wallet address on the specified blockchain.
@@ -604,7 +752,7 @@ export interface AccountRetrieveBalanceResponse {
604
752
  */
605
753
  account_id: string;
606
754
  /**
607
- * Available balance amount as a decimal string.
755
+ * Available balance as a string decimal (e.g. "100.50").
608
756
  */
609
757
  amount: string;
610
758
  /**
@@ -612,7 +760,7 @@ export interface AccountRetrieveBalanceResponse {
612
760
  */
613
761
  as_of: string;
614
762
  /**
615
- * ISO 4217 currency code for the balance.
763
+ * Currency code (ISO 4217 or crypto).
616
764
  */
617
765
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
618
766
  /**
@@ -625,10 +773,6 @@ export interface AccountUnfreezeResponse {
625
773
  * Unique identifier of the account.
626
774
  */
627
775
  id: string;
628
- /**
629
- * Type of the account.
630
- */
631
- account_type: 'virtual_account' | 'payment_account' | 'collateral_account';
632
776
  /**
633
777
  * Asset type of the account.
634
778
  */
@@ -638,14 +782,14 @@ export interface AccountUnfreezeResponse {
638
782
  */
639
783
  created_at: string;
640
784
  /**
641
- * ISO 4217 currency code for the account.
785
+ * Currency code (ISO 4217 or crypto).
642
786
  */
643
787
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
644
788
  /**
645
789
  * Payment identifiers (e.g. IBAN, account number, wallet address) through which
646
790
  * this account can send or receive funds.
647
791
  */
648
- financial_addresses: Array<AccountUnfreezeResponse.IbanFinancialAddress | AccountUnfreezeResponse.SortCodeFinancialAddress | AccountUnfreezeResponse.AbaFinancialAddress | AccountUnfreezeResponse.CryptoWalletFinancialAddress>;
792
+ financial_addresses: Array<AccountUnfreezeResponse.IbanFinancialAddress | AccountUnfreezeResponse.SortCodeFinancialAddress | AccountUnfreezeResponse.AbaFinancialAddress | AccountUnfreezeResponse.BicFinancialAddress | AccountUnfreezeResponse.CryptoWalletFinancialAddress>;
649
793
  /**
650
794
  * Human-readable label for the account.
651
795
  */
@@ -718,6 +862,29 @@ export declare namespace AccountUnfreezeResponse {
718
862
  */
719
863
  type: 'aba';
720
864
  }
865
+ interface BicFinancialAddress {
866
+ /**
867
+ * Name of the account holder.
868
+ */
869
+ account_holder_name: string;
870
+ /**
871
+ * Local-format bank account number.
872
+ */
873
+ account_number: string;
874
+ /**
875
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
876
+ */
877
+ bic: string;
878
+ /**
879
+ * Domestic bank or branch code where the destination country uses one (for example
880
+ * the BSB in Australia), or null.
881
+ */
882
+ local_bank_code: string | null;
883
+ /**
884
+ * Discriminator for BIC + local account financial address.
885
+ */
886
+ type: 'bic';
887
+ }
721
888
  interface CryptoWalletFinancialAddress {
722
889
  /**
723
890
  * Wallet address on the specified blockchain.
@@ -742,10 +909,6 @@ export interface AccountCreateParams {
742
909
  * ID of the account program to create the account under.
743
910
  */
744
911
  account_program_id: string;
745
- /**
746
- * Type of account. Currently only virtual account.
747
- */
748
- account_type: 'virtual_account';
749
912
  }
750
913
  export interface AccountListParams extends CursorPageParams {
751
914
  /**
@@ -760,7 +923,7 @@ export interface AccountListParams extends CursorPageParams {
760
923
  /**
761
924
  * ID of the account program to list virtual accounts for.
762
925
  */
763
- parent_id?: string;
926
+ account_program_id?: string;
764
927
  /**
765
928
  * Filter by account status.
766
929
  */