@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
@@ -1 +1 @@
1
- {"version":3,"file":"returns.d.mts","sourceRoot":"","sources":["../src/resources/returns.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,+BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI5F;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlF;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,6BAA6B,EAAE,kBAAkB,CAAC;CAGlE;AAED,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAEzC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAC;IAE7C;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,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AgC,GAChC,mBAAmB,GACnB,SAAS,CAAC;QAEd;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,KAAK,EAAE,OAAO,CAAC;KAChB;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,UAAU,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;CACrE;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,SAAS;QACxB;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -5,14 +5,36 @@ import { RequestOptions } from "../internal/request-options.js";
5
5
  export declare class Returns extends APIResource {
6
6
  /**
7
7
  * Initiates a return of funds from a deposit to the source.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const _return = await client.returns.create({
12
+ * deposit_id: '550e8400-e29b-41d4-a716-446655440004',
13
+ * });
14
+ * ```
8
15
  */
9
16
  create(body: ReturnCreateParams, options?: RequestOptions): APIPromise<ReturnCreateResponse>;
10
17
  /**
11
18
  * Retrieves a return by ID.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const _return = await client.returns.retrieve(
23
+ * '550e8400-e29b-41d4-a716-446655440005',
24
+ * );
25
+ * ```
12
26
  */
13
27
  retrieve(id: string, options?: RequestOptions): APIPromise<ReturnRetrieveResponse>;
14
28
  /**
15
29
  * Lists deposit returns for the merchant with cursor-based pagination.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * // Automatically fetches more pages as needed.
34
+ * for await (const returnListResponse of client.returns.list()) {
35
+ * // ...
36
+ * }
37
+ * ```
16
38
  */
17
39
  list(query?: ReturnListParams | null | undefined, options?: RequestOptions): PagePromise<ReturnListResponsesCursorPage, ReturnListResponse>;
18
40
  }
@@ -27,11 +49,7 @@ export interface ReturnCreateResponse {
27
49
  */
28
50
  amount: string;
29
51
  /**
30
- * ISO 8601 UTC timestamp when the return was created.
31
- */
32
- created_at: string;
33
- /**
34
- * Currency code (ISO 4217 currency code or crypto currency code).
52
+ * Currency code (ISO 4217 or crypto).
35
53
  */
36
54
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
37
55
  /**
@@ -42,18 +60,31 @@ export interface ReturnCreateResponse {
42
60
  * Failure details when status is failed, otherwise null.
43
61
  */
44
62
  failure: ReturnCreateResponse.Failure | null;
63
+ /**
64
+ * ISO 8601 UTC timestamp when the return was initiated.
65
+ */
66
+ initiated_at: string;
67
+ /**
68
+ * Payment scheme or blockchain used for the return, or null when unknown.
69
+ */
70
+ rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
71
+ /**
72
+ * ISO 8601 UTC timestamp when the return was sent.
73
+ */
74
+ sent_at: string | null;
45
75
  /**
46
76
  * Current status of the return.
47
77
  */
48
- status: 'pending' | 'paid' | 'failed' | 'returned';
78
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
49
79
  /**
50
- * Type of the resource.
80
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
81
+ * rails support this field.
51
82
  */
52
- type: 'return';
83
+ tx_hash: string | null;
53
84
  /**
54
- * ISO 8601 UTC timestamp when the return was last updated.
85
+ * Resource type discriminator.
55
86
  */
56
- updated_at: string;
87
+ type: 'return';
57
88
  }
58
89
  export declare namespace ReturnCreateResponse {
59
90
  /**
@@ -63,7 +94,7 @@ export declare namespace ReturnCreateResponse {
63
94
  /**
64
95
  * Failure code.
65
96
  */
66
- code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
97
+ code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
67
98
  /**
68
99
  * Human-readable description of the failure.
69
100
  */
@@ -84,11 +115,7 @@ export interface ReturnRetrieveResponse {
84
115
  */
85
116
  amount: string;
86
117
  /**
87
- * ISO 8601 UTC timestamp when the return was created.
88
- */
89
- created_at: string;
90
- /**
91
- * Currency code (ISO 4217 currency code or crypto currency code).
118
+ * Currency code (ISO 4217 or crypto).
92
119
  */
93
120
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
94
121
  /**
@@ -99,18 +126,31 @@ export interface ReturnRetrieveResponse {
99
126
  * Failure details when status is failed, otherwise null.
100
127
  */
101
128
  failure: ReturnRetrieveResponse.Failure | null;
129
+ /**
130
+ * ISO 8601 UTC timestamp when the return was initiated.
131
+ */
132
+ initiated_at: string;
133
+ /**
134
+ * Payment scheme or blockchain used for the return, or null when unknown.
135
+ */
136
+ rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
137
+ /**
138
+ * ISO 8601 UTC timestamp when the return was sent.
139
+ */
140
+ sent_at: string | null;
102
141
  /**
103
142
  * Current status of the return.
104
143
  */
105
- status: 'pending' | 'paid' | 'failed' | 'returned';
144
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
106
145
  /**
107
- * Type of the resource.
146
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
147
+ * rails support this field.
108
148
  */
109
- type: 'return';
149
+ tx_hash: string | null;
110
150
  /**
111
- * ISO 8601 UTC timestamp when the return was last updated.
151
+ * Resource type discriminator.
112
152
  */
113
- updated_at: string;
153
+ type: 'return';
114
154
  }
115
155
  export declare namespace ReturnRetrieveResponse {
116
156
  /**
@@ -120,7 +160,7 @@ export declare namespace ReturnRetrieveResponse {
120
160
  /**
121
161
  * Failure code.
122
162
  */
123
- code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
163
+ code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
124
164
  /**
125
165
  * Human-readable description of the failure.
126
166
  */
@@ -141,11 +181,7 @@ export interface ReturnListResponse {
141
181
  */
142
182
  amount: string;
143
183
  /**
144
- * ISO 8601 UTC timestamp when the return was created.
145
- */
146
- created_at: string;
147
- /**
148
- * Currency code (ISO 4217 currency code or crypto currency code).
184
+ * Currency code (ISO 4217 or crypto).
149
185
  */
150
186
  currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
151
187
  /**
@@ -156,18 +192,31 @@ export interface ReturnListResponse {
156
192
  * Failure details when status is failed, otherwise null.
157
193
  */
158
194
  failure: ReturnListResponse.Failure | null;
195
+ /**
196
+ * ISO 8601 UTC timestamp when the return was initiated.
197
+ */
198
+ initiated_at: string;
199
+ /**
200
+ * Payment scheme or blockchain used for the return, or null when unknown.
201
+ */
202
+ rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'swift' | 'internal' | 'target' | 'ach' | 'fedwire' | 'bitcoin' | 'bitcoin_testnet4' | 'ethereum' | 'ethereum_sepolia' | 'solana' | 'solana_devnet' | 'polygon' | 'polygon_amoy' | null;
203
+ /**
204
+ * ISO 8601 UTC timestamp when the return was sent.
205
+ */
206
+ sent_at: string | null;
159
207
  /**
160
208
  * Current status of the return.
161
209
  */
162
- status: 'pending' | 'paid' | 'failed' | 'returned';
210
+ status: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
163
211
  /**
164
- * Type of the resource.
212
+ * Transaction hash for crypto returns, or null when not known. Only blockchain
213
+ * rails support this field.
165
214
  */
166
- type: 'return';
215
+ tx_hash: string | null;
167
216
  /**
168
- * ISO 8601 UTC timestamp when the return was last updated.
217
+ * Resource type discriminator.
169
218
  */
170
- updated_at: string;
219
+ type: 'return';
171
220
  }
172
221
  export declare namespace ReturnListResponse {
173
222
  /**
@@ -177,7 +226,7 @@ export declare namespace ReturnListResponse {
177
226
  /**
178
227
  * Failure code.
179
228
  */
180
- code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
229
+ code: 'account_closed' | 'account_blocked' | 'insufficient_funds' | 'invalid_account_format' | 'invalid_routing_number' | 'invalid_instruction' | 'invalid_amount' | 'invalid_time' | 'duplicate_transaction' | 'payee_verification_failed' | 'system_error' | 'provider_system_error' | 'rejected_by_correspondent_bank' | 'blocked_by_review' | 'unknown';
181
230
  /**
182
231
  * Human-readable description of the failure.
183
232
  */
@@ -193,10 +242,6 @@ export interface ReturnCreateParams {
193
242
  * Deposit to return funds from.
194
243
  */
195
244
  deposit_id: string;
196
- /**
197
- * Payment rail when the deposit allows multiple schemes.
198
- */
199
- rail?: 'sepa_instant' | 'sepa' | 'faster_payments';
200
245
  }
201
246
  export interface ReturnListParams extends CursorPageParams {
202
247
  created_at?: ReturnListParams.CreatedAt;
@@ -205,9 +250,9 @@ export interface ReturnListParams extends CursorPageParams {
205
250
  */
206
251
  deposit_id?: string;
207
252
  /**
208
- * Current status of the return.
253
+ * Filter by return status.
209
254
  */
210
- status?: 'pending' | 'paid' | 'failed' | 'returned';
255
+ status?: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned';
211
256
  }
212
257
  export declare namespace ReturnListParams {
213
258
  interface CreatedAt {
@@ -1 +1 @@
1
- {"version":3,"file":"returns.d.ts","sourceRoot":"","sources":["../src/resources/returns.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,8BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI5F;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlF;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,g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CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -8,18 +8,40 @@ const path_1 = require("../internal/utils/path.js");
8
8
  class Returns extends resource_1.APIResource {
9
9
  /**
10
10
  * Initiates a return of funds from a deposit to the source.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const _return = await client.returns.create({
15
+ * deposit_id: '550e8400-e29b-41d4-a716-446655440004',
16
+ * });
17
+ * ```
11
18
  */
12
19
  create(body, options) {
13
20
  return this._client.post('/v1/returns', { body, ...options });
14
21
  }
15
22
  /**
16
23
  * Retrieves a return by ID.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const _return = await client.returns.retrieve(
28
+ * '550e8400-e29b-41d4-a716-446655440005',
29
+ * );
30
+ * ```
17
31
  */
18
32
  retrieve(id, options) {
19
33
  return this._client.get((0, path_1.path) `/v1/returns/${id}`, options);
20
34
  }
21
35
  /**
22
36
  * Lists deposit returns for the merchant with cursor-based pagination.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * // Automatically fetches more pages as needed.
41
+ * for await (const returnListResponse of client.returns.list()) {
42
+ * // ...
43
+ * }
44
+ * ```
23
45
  */
24
46
  list(query = {}, options) {
25
47
  return this._client.getAPIList('/v1/returns', (pagination_1.CursorPage), { query, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"returns.js","sourceRoot":"","sources":["../src/resources/returns.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO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vG,CAAC;CACF;AA9CD,0BA8CC"}
@@ -5,18 +5,40 @@ import { path } from "../internal/utils/path.mjs";
5
5
  export class Returns extends APIResource {
6
6
  /**
7
7
  * Initiates a return of funds from a deposit to the source.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const _return = await client.returns.create({
12
+ * deposit_id: '550e8400-e29b-41d4-a716-446655440004',
13
+ * });
14
+ * ```
8
15
  */
9
16
  create(body, options) {
10
17
  return this._client.post('/v1/returns', { body, ...options });
11
18
  }
12
19
  /**
13
20
  * Retrieves a return by ID.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const _return = await client.returns.retrieve(
25
+ * '550e8400-e29b-41d4-a716-446655440005',
26
+ * );
27
+ * ```
14
28
  */
15
29
  retrieve(id, options) {
16
30
  return this._client.get(path `/v1/returns/${id}`, options);
17
31
  }
18
32
  /**
19
33
  * Lists deposit returns for the merchant with cursor-based pagination.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * // Automatically fetches more pages as needed.
38
+ * for await (const returnListResponse of client.returns.list()) {
39
+ * // ...
40
+ * }
41
+ * ```
20
42
  */
21
43
  list(query = {}, options) {
22
44
  return this._client.getAPIList('/v1/returns', (CursorPage), { query, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"returns.mjs","sourceRoot":"","sources":["../src/resources/returns.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,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,UAA8B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
1
+ {"version":3,"file":"returns.mjs","sourceRoot":"","sources":["../src/resources/returns.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,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,UAA8B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
@@ -19,7 +19,7 @@ export declare namespace ScopeListResponse {
19
19
  /**
20
20
  * Scope identifier in `resource:action` format.
21
21
  */
22
- id: 'payouts:read' | 'payouts:write' | 'deposits:read' | 'returns:read' | 'returns:write' | 'conversions:read' | 'conversions:write' | 'quotes:read' | 'accounts:read' | 'accounts:write' | 'account_programs:read' | 'account_holders:read' | 'account_holders:write' | 'webhook_subscriptions:read' | 'webhook_subscriptions:write' | 'events:read' | 'webhook_deliveries:read' | 'webhook_deliveries:write' | 'transactions:read';
22
+ id: 'payouts:read' | 'payouts:write' | 'deposits:read' | 'returns:read' | 'returns:write' | 'conversions:read' | 'conversions:write' | 'quotes:read' | 'accounts:read' | 'accounts:write' | 'account_programs:read' | 'account_holders:read' | 'account_holders:write' | 'counterparties:read' | 'counterparties:write' | 'webhook_subscriptions:read' | 'webhook_subscriptions:write' | 'events:read' | 'webhook_deliveries:read' | 'webhook_deliveries:write' | 'transactions:read' | 'simulations:write';
23
23
  /**
24
24
  * Action category.
25
25
  */
@@ -40,6 +40,9 @@ export declare namespace ScopeListResponse {
40
40
  * Resource the scope applies to.
41
41
  */
42
42
  resource: string;
43
+ /**
44
+ * Resource type discriminator.
45
+ */
43
46
  type: 'scope';
44
47
  }
45
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scopes.d.mts","sourceRoot":"","sources":["../src/resources/scopes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEpC,QAAQ,EAAE,OAAO,CAAC;IAElB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,IAAI;QACnB;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c,GACd,eAAe,GACf,eAAe,GACf,cAAc,GACd,eAAe,GACf,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,uBAAuB,GACvB,sBAAsB,GACtB,uBAAuB,GACvB,qBAAqB,GACrB,sBAAsB,GACtB,4BAA4B,GAC5B,6BAA6B,GAC7B,aAAa,GACb,yBAAyB,GACzB,0BAA0B,GAC1B,mBAAmB,GACnB,mBAAmB,CAAC;QAExB;;WAEG;QACH,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAEzB;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,IAAI,EAAE,OAAO,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
@@ -19,7 +19,7 @@ export declare namespace ScopeListResponse {
19
19
  /**
20
20
  * Scope identifier in `resource:action` format.
21
21
  */
22
- id: 'payouts:read' | 'payouts:write' | 'deposits:read' | 'returns:read' | 'returns:write' | 'conversions:read' | 'conversions:write' | 'quotes:read' | 'accounts:read' | 'accounts:write' | 'account_programs:read' | 'account_holders:read' | 'account_holders:write' | 'webhook_subscriptions:read' | 'webhook_subscriptions:write' | 'events:read' | 'webhook_deliveries:read' | 'webhook_deliveries:write' | 'transactions:read';
22
+ id: 'payouts:read' | 'payouts:write' | 'deposits:read' | 'returns:read' | 'returns:write' | 'conversions:read' | 'conversions:write' | 'quotes:read' | 'accounts:read' | 'accounts:write' | 'account_programs:read' | 'account_holders:read' | 'account_holders:write' | 'counterparties:read' | 'counterparties:write' | 'webhook_subscriptions:read' | 'webhook_subscriptions:write' | 'events:read' | 'webhook_deliveries:read' | 'webhook_deliveries:write' | 'transactions:read' | 'simulations:write';
23
23
  /**
24
24
  * Action category.
25
25
  */
@@ -40,6 +40,9 @@ export declare namespace ScopeListResponse {
40
40
  * Resource the scope applies to.
41
41
  */
42
42
  resource: string;
43
+ /**
44
+ * Resource type discriminator.
45
+ */
43
46
  type: 'scope';
44
47
  }
45
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/resources/scopes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEpC,QAAQ,EAAE,OAAO,CAAC;IAElB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EACE,cAAc,GACd,eAAe,GACf,eAAe,GACf,cAAc,GACd,eAAe,GACf,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,uBAAuB,GACvB,sBAAsB,GACtB,uBAAuB,GACvB,4BAA4B,GAC5B,6BAA6B,GAC7B,aAAa,GACb,yBAAyB,GACzB,0BAA0B,GAC1B,mBAAmB,CAAC;QAExB;;WAEG;QACH,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAEzB;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,W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7B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,IAAI,EAAE,OAAO,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
@@ -0,0 +1,215 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../internal/request-options.mjs";
4
+ export declare class AccountPrograms extends APIResource {
5
+ /**
6
+ * Creates a Mock-US USD account program owned by the caller merchant. This
7
+ * endpoint is unavailable in live production.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const accountProgram =
12
+ * await client.simulations.accountPrograms.create({
13
+ * label: 'x',
14
+ * });
15
+ * ```
16
+ */
17
+ create(body: AccountProgramCreateParams, options?: RequestOptions): APIPromise<AccountProgramCreateResponse>;
18
+ /**
19
+ * Closes an account program. All child accounts must be drained via the drain
20
+ * endpoint first. This endpoint is unavailable in live production.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const response =
25
+ * await client.simulations.accountPrograms.close(
26
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
27
+ * { reason: 'aml_risk_fraud' },
28
+ * );
29
+ * ```
30
+ */
31
+ close(id: string, body: AccountProgramCloseParams, options?: RequestOptions): APIPromise<AccountProgramCloseResponse>;
32
+ /**
33
+ * Creates outbound payouts that drain the residual balance of every frozen account
34
+ * under the program to the provided destination. The program must be frozen. Every
35
+ * returned `payout_ids[i]` must be settled via
36
+ * `POST /v1/simulations/payouts/{id}/send` for the program balance to reach zero.
37
+ * This endpoint is unavailable in live production.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const response =
42
+ * await client.simulations.accountPrograms.drain(
43
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
44
+ * {
45
+ * destination: {
46
+ * account_holder_name: 'Acme Sandbox Ltd.',
47
+ * iban: 'DE89370400440532013000',
48
+ * type: 'iban',
49
+ * },
50
+ * },
51
+ * );
52
+ * ```
53
+ */
54
+ drain(id: string, body: AccountProgramDrainParams, options?: RequestOptions): APIPromise<AccountProgramDrainResponse>;
55
+ /**
56
+ * Freezes an existing account program and its virtual accounts. This endpoint is
57
+ * unavailable in live production.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const response =
62
+ * await client.simulations.accountPrograms.freeze(
63
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
64
+ * );
65
+ * ```
66
+ */
67
+ freeze(id: string, options?: RequestOptions): APIPromise<AccountProgramFreezeResponse>;
68
+ /**
69
+ * Unfreezes an existing account program and its virtual accounts. This endpoint is
70
+ * unavailable in live production.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const response =
75
+ * await client.simulations.accountPrograms.unfreeze(
76
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
77
+ * );
78
+ * ```
79
+ */
80
+ unfreeze(id: string, options?: RequestOptions): APIPromise<AccountProgramUnfreezeResponse>;
81
+ }
82
+ export interface AccountProgramCreateResponse {
83
+ /**
84
+ * Account program whose lifecycle is being simulated.
85
+ */
86
+ account_program_id: string;
87
+ /**
88
+ * Resource type discriminator.
89
+ */
90
+ type: 'account_program_simulation';
91
+ }
92
+ export interface AccountProgramCloseResponse {
93
+ /**
94
+ * Account program whose lifecycle is being simulated.
95
+ */
96
+ account_program_id: string;
97
+ /**
98
+ * Resource type discriminator.
99
+ */
100
+ type: 'account_program_simulation';
101
+ }
102
+ export interface AccountProgramDrainResponse {
103
+ /**
104
+ * Account program whose lifecycle is being simulated.
105
+ */
106
+ account_program_id: string;
107
+ /**
108
+ * Payouts created by the drain. Feed each id to
109
+ * `POST /v1/simulations/payouts/{id}/send` to settle.
110
+ */
111
+ payout_ids: Array<string>;
112
+ /**
113
+ * Resource type discriminator.
114
+ */
115
+ type: 'account_program_simulation';
116
+ }
117
+ export interface AccountProgramFreezeResponse {
118
+ /**
119
+ * Account program whose lifecycle is being simulated.
120
+ */
121
+ account_program_id: string;
122
+ /**
123
+ * Resource type discriminator.
124
+ */
125
+ type: 'account_program_simulation';
126
+ }
127
+ export interface AccountProgramUnfreezeResponse {
128
+ /**
129
+ * Account program whose lifecycle is being simulated.
130
+ */
131
+ account_program_id: string;
132
+ /**
133
+ * Resource type discriminator.
134
+ */
135
+ type: 'account_program_simulation';
136
+ }
137
+ export interface AccountProgramCreateParams {
138
+ /**
139
+ * Human-readable label for the account program.
140
+ */
141
+ label: string;
142
+ }
143
+ export interface AccountProgramCloseParams {
144
+ /**
145
+ * Reason for closing the account program.
146
+ */
147
+ reason: 'aml_risk_fraud' | 'client_request';
148
+ }
149
+ export interface AccountProgramDrainParams {
150
+ /**
151
+ * Fiat financial address to which the residual balance of every frozen account
152
+ * under the program is drained.
153
+ */
154
+ destination: AccountProgramDrainParams.IbanFinancialAddressRequest | AccountProgramDrainParams.SortCodeFinancialAddress | AccountProgramDrainParams.AbaFinancialAddress;
155
+ }
156
+ export declare namespace AccountProgramDrainParams {
157
+ interface IbanFinancialAddressRequest {
158
+ /**
159
+ * Name of the account holder.
160
+ */
161
+ account_holder_name: string;
162
+ /**
163
+ * International Bank Account Number.
164
+ */
165
+ iban: string;
166
+ /**
167
+ * Discriminator for IBAN financial address.
168
+ */
169
+ type: 'iban';
170
+ /**
171
+ * Bank Identifier Code. Optional; omit or send null if not provided.
172
+ */
173
+ bic?: string | null;
174
+ }
175
+ interface SortCodeFinancialAddress {
176
+ /**
177
+ * Name of the account holder.
178
+ */
179
+ account_holder_name: string;
180
+ /**
181
+ * UK account number (8 digits).
182
+ */
183
+ account_number: string;
184
+ /**
185
+ * UK sort code (6 digits).
186
+ */
187
+ sort_code: string;
188
+ /**
189
+ * Discriminator for UK sort code financial address.
190
+ */
191
+ type: 'sort_code';
192
+ }
193
+ interface AbaFinancialAddress {
194
+ /**
195
+ * Name of the account holder.
196
+ */
197
+ account_holder_name: string;
198
+ /**
199
+ * Bank account number.
200
+ */
201
+ account_number: string;
202
+ /**
203
+ * ABA routing number (9 digits).
204
+ */
205
+ routing_number: string;
206
+ /**
207
+ * Discriminator for ABA wire financial address.
208
+ */
209
+ type: 'aba';
210
+ }
211
+ }
212
+ export declare namespace AccountPrograms {
213
+ export { type AccountProgramCreateResponse as AccountProgramCreateResponse, type AccountProgramCloseResponse as AccountProgramCloseResponse, type AccountProgramDrainResponse as AccountProgramDrainResponse, type AccountProgramFreezeResponse as AccountProgramFreezeResponse, type AccountProgramUnfreezeResponse as AccountProgramUnfreezeResponse, type AccountProgramCreateParams as AccountProgramCreateParams, type AccountProgramCloseParams as AccountProgramCloseParams, type AccountProgramDrainParams as AccountProgramDrainParams, };
214
+ }
215
+ //# sourceMappingURL=account-programs.d.mts.map