@augustusbank/typescript-sdk 0.11.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 (534) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/LICENSE +201 -0
  3. package/README.md +394 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +249 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +249 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +542 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +538 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/pagination.d.mts +54 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +54 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +101 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +95 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +7 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +7 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +32 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +8 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +20 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +20 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +40 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +37 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/qs/formats.d.mts +7 -0
  117. package/internal/qs/formats.d.mts.map +1 -0
  118. package/internal/qs/formats.d.ts +7 -0
  119. package/internal/qs/formats.d.ts.map +1 -0
  120. package/internal/qs/formats.js +13 -0
  121. package/internal/qs/formats.js.map +1 -0
  122. package/internal/qs/formats.mjs +9 -0
  123. package/internal/qs/formats.mjs.map +1 -0
  124. package/internal/qs/index.d.mts +10 -0
  125. package/internal/qs/index.d.mts.map +1 -0
  126. package/internal/qs/index.d.ts +10 -0
  127. package/internal/qs/index.d.ts.map +1 -0
  128. package/internal/qs/index.js +14 -0
  129. package/internal/qs/index.js.map +1 -0
  130. package/internal/qs/index.mjs +10 -0
  131. package/internal/qs/index.mjs.map +1 -0
  132. package/internal/qs/stringify.d.mts +3 -0
  133. package/internal/qs/stringify.d.mts.map +1 -0
  134. package/internal/qs/stringify.d.ts +3 -0
  135. package/internal/qs/stringify.d.ts.map +1 -0
  136. package/internal/qs/stringify.js +277 -0
  137. package/internal/qs/stringify.js.map +1 -0
  138. package/internal/qs/stringify.mjs +274 -0
  139. package/internal/qs/stringify.mjs.map +1 -0
  140. package/internal/qs/types.d.mts +57 -0
  141. package/internal/qs/types.d.mts.map +1 -0
  142. package/internal/qs/types.d.ts +57 -0
  143. package/internal/qs/types.d.ts.map +1 -0
  144. package/internal/qs/types.js +3 -0
  145. package/internal/qs/types.js.map +1 -0
  146. package/internal/qs/types.mjs +2 -0
  147. package/internal/qs/types.mjs.map +1 -0
  148. package/internal/qs/utils.d.mts +15 -0
  149. package/internal/qs/utils.d.mts.map +1 -0
  150. package/internal/qs/utils.d.ts +15 -0
  151. package/internal/qs/utils.d.ts.map +1 -0
  152. package/internal/qs/utils.js +230 -0
  153. package/internal/qs/utils.js.map +1 -0
  154. package/internal/qs/utils.mjs +217 -0
  155. package/internal/qs/utils.mjs.map +1 -0
  156. package/internal/request-options.d.mts +75 -0
  157. package/internal/request-options.d.mts.map +1 -0
  158. package/internal/request-options.d.ts +75 -0
  159. package/internal/request-options.d.ts.map +1 -0
  160. package/internal/request-options.js +14 -0
  161. package/internal/request-options.js.map +1 -0
  162. package/internal/request-options.mjs +10 -0
  163. package/internal/request-options.mjs.map +1 -0
  164. package/internal/shim-types.d.mts +17 -0
  165. package/internal/shim-types.d.mts.map +1 -0
  166. package/internal/shim-types.d.ts +17 -0
  167. package/internal/shim-types.d.ts.map +1 -0
  168. package/internal/shim-types.js +4 -0
  169. package/internal/shim-types.js.map +1 -0
  170. package/internal/shim-types.mjs +3 -0
  171. package/internal/shim-types.mjs.map +1 -0
  172. package/internal/shims.d.mts +20 -0
  173. package/internal/shims.d.mts.map +1 -0
  174. package/internal/shims.d.ts +20 -0
  175. package/internal/shims.d.ts.map +1 -0
  176. package/internal/shims.js +92 -0
  177. package/internal/shims.js.map +1 -0
  178. package/internal/shims.mjs +85 -0
  179. package/internal/shims.mjs.map +1 -0
  180. package/internal/to-file.d.mts +45 -0
  181. package/internal/to-file.d.mts.map +1 -0
  182. package/internal/to-file.d.ts +45 -0
  183. package/internal/to-file.d.ts.map +1 -0
  184. package/internal/to-file.js +91 -0
  185. package/internal/to-file.js.map +1 -0
  186. package/internal/to-file.mjs +88 -0
  187. package/internal/to-file.mjs.map +1 -0
  188. package/internal/tslib.js +81 -0
  189. package/internal/tslib.mjs +17 -0
  190. package/internal/types.d.mts +69 -0
  191. package/internal/types.d.mts.map +1 -0
  192. package/internal/types.d.ts +69 -0
  193. package/internal/types.d.ts.map +1 -0
  194. package/internal/types.js +4 -0
  195. package/internal/types.js.map +1 -0
  196. package/internal/types.mjs +3 -0
  197. package/internal/types.mjs.map +1 -0
  198. package/internal/uploads.d.mts +42 -0
  199. package/internal/uploads.d.mts.map +1 -0
  200. package/internal/uploads.d.ts +42 -0
  201. package/internal/uploads.d.ts.map +1 -0
  202. package/internal/uploads.js +141 -0
  203. package/internal/uploads.js.map +1 -0
  204. package/internal/uploads.mjs +131 -0
  205. package/internal/uploads.mjs.map +1 -0
  206. package/internal/utils/base64.d.mts +3 -0
  207. package/internal/utils/base64.d.mts.map +1 -0
  208. package/internal/utils/base64.d.ts +3 -0
  209. package/internal/utils/base64.d.ts.map +1 -0
  210. package/internal/utils/base64.js +38 -0
  211. package/internal/utils/base64.js.map +1 -0
  212. package/internal/utils/base64.mjs +33 -0
  213. package/internal/utils/base64.mjs.map +1 -0
  214. package/internal/utils/bytes.d.mts +4 -0
  215. package/internal/utils/bytes.d.mts.map +1 -0
  216. package/internal/utils/bytes.d.ts +4 -0
  217. package/internal/utils/bytes.d.ts.map +1 -0
  218. package/internal/utils/bytes.js +31 -0
  219. package/internal/utils/bytes.js.map +1 -0
  220. package/internal/utils/bytes.mjs +26 -0
  221. package/internal/utils/bytes.mjs.map +1 -0
  222. package/internal/utils/env.d.mts +9 -0
  223. package/internal/utils/env.d.mts.map +1 -0
  224. package/internal/utils/env.d.ts +9 -0
  225. package/internal/utils/env.d.ts.map +1 -0
  226. package/internal/utils/env.js +22 -0
  227. package/internal/utils/env.js.map +1 -0
  228. package/internal/utils/env.mjs +18 -0
  229. package/internal/utils/env.mjs.map +1 -0
  230. package/internal/utils/log.d.mts +37 -0
  231. package/internal/utils/log.d.mts.map +1 -0
  232. package/internal/utils/log.d.ts +37 -0
  233. package/internal/utils/log.d.ts.map +1 -0
  234. package/internal/utils/log.js +87 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +81 -0
  237. package/internal/utils/log.mjs.map +1 -0
  238. package/internal/utils/path.d.mts +15 -0
  239. package/internal/utils/path.d.mts.map +1 -0
  240. package/internal/utils/path.d.ts +15 -0
  241. package/internal/utils/path.d.ts.map +1 -0
  242. package/internal/utils/path.js +79 -0
  243. package/internal/utils/path.js.map +1 -0
  244. package/internal/utils/path.mjs +74 -0
  245. package/internal/utils/path.mjs.map +1 -0
  246. package/internal/utils/query.d.mts +2 -0
  247. package/internal/utils/query.d.mts.map +1 -0
  248. package/internal/utils/query.d.ts +2 -0
  249. package/internal/utils/query.d.ts.map +1 -0
  250. package/internal/utils/query.js +10 -0
  251. package/internal/utils/query.js.map +1 -0
  252. package/internal/utils/query.mjs +6 -0
  253. package/internal/utils/query.mjs.map +1 -0
  254. package/internal/utils/sleep.d.mts +2 -0
  255. package/internal/utils/sleep.d.mts.map +1 -0
  256. package/internal/utils/sleep.d.ts +2 -0
  257. package/internal/utils/sleep.d.ts.map +1 -0
  258. package/internal/utils/sleep.js +7 -0
  259. package/internal/utils/sleep.js.map +1 -0
  260. package/internal/utils/sleep.mjs +3 -0
  261. package/internal/utils/sleep.mjs.map +1 -0
  262. package/internal/utils/uuid.d.mts +5 -0
  263. package/internal/utils/uuid.d.mts.map +1 -0
  264. package/internal/utils/uuid.d.ts +5 -0
  265. package/internal/utils/uuid.d.ts.map +1 -0
  266. package/internal/utils/uuid.js +19 -0
  267. package/internal/utils/uuid.js.map +1 -0
  268. package/internal/utils/uuid.mjs +15 -0
  269. package/internal/utils/uuid.mjs.map +1 -0
  270. package/internal/utils/values.d.mts +18 -0
  271. package/internal/utils/values.d.mts.map +1 -0
  272. package/internal/utils/values.d.ts +18 -0
  273. package/internal/utils/values.d.ts.map +1 -0
  274. package/internal/utils/values.js +112 -0
  275. package/internal/utils/values.js.map +1 -0
  276. package/internal/utils/values.mjs +94 -0
  277. package/internal/utils/values.mjs.map +1 -0
  278. package/internal/utils.d.mts +8 -0
  279. package/internal/utils.d.mts.map +1 -0
  280. package/internal/utils.d.ts +8 -0
  281. package/internal/utils.d.ts.map +1 -0
  282. package/internal/utils.js +12 -0
  283. package/internal/utils.js.map +1 -0
  284. package/internal/utils.mjs +9 -0
  285. package/internal/utils.mjs.map +1 -0
  286. package/package.json +161 -0
  287. package/pagination.d.mts +2 -0
  288. package/pagination.d.mts.map +1 -0
  289. package/pagination.d.ts +2 -0
  290. package/pagination.d.ts.map +1 -0
  291. package/pagination.js +6 -0
  292. package/pagination.js.map +1 -0
  293. package/pagination.mjs +2 -0
  294. package/pagination.mjs.map +1 -0
  295. package/resource.d.mts +2 -0
  296. package/resource.d.mts.map +1 -0
  297. package/resource.d.ts +2 -0
  298. package/resource.d.ts.map +1 -0
  299. package/resource.js +6 -0
  300. package/resource.js.map +1 -0
  301. package/resource.mjs +2 -0
  302. package/resource.mjs.map +1 -0
  303. package/resources/account-programs.d.mts +112 -0
  304. package/resources/account-programs.d.mts.map +1 -0
  305. package/resources/account-programs.d.ts +112 -0
  306. package/resources/account-programs.d.ts.map +1 -0
  307. package/resources/account-programs.js +33 -0
  308. package/resources/account-programs.js.map +1 -0
  309. package/resources/account-programs.mjs +29 -0
  310. package/resources/account-programs.mjs.map +1 -0
  311. package/resources/accounts.d.mts +850 -0
  312. package/resources/accounts.d.mts.map +1 -0
  313. package/resources/accounts.d.ts +850 -0
  314. package/resources/accounts.d.ts.map +1 -0
  315. package/resources/accounts.js +53 -0
  316. package/resources/accounts.js.map +1 -0
  317. package/resources/accounts.mjs +49 -0
  318. package/resources/accounts.mjs.map +1 -0
  319. package/resources/api-keys.d.mts +58 -0
  320. package/resources/api-keys.d.mts.map +1 -0
  321. package/resources/api-keys.d.ts +58 -0
  322. package/resources/api-keys.d.ts.map +1 -0
  323. package/resources/api-keys.js +17 -0
  324. package/resources/api-keys.js.map +1 -0
  325. package/resources/api-keys.mjs +13 -0
  326. package/resources/api-keys.mjs.map +1 -0
  327. package/resources/api-versions.d.mts +47 -0
  328. package/resources/api-versions.d.mts.map +1 -0
  329. package/resources/api-versions.d.ts +47 -0
  330. package/resources/api-versions.d.ts.map +1 -0
  331. package/resources/api-versions.js +17 -0
  332. package/resources/api-versions.js.map +1 -0
  333. package/resources/api-versions.mjs +13 -0
  334. package/resources/api-versions.mjs.map +1 -0
  335. package/resources/conversions.d.mts +270 -0
  336. package/resources/conversions.d.mts.map +1 -0
  337. package/resources/conversions.d.ts +270 -0
  338. package/resources/conversions.d.ts.map +1 -0
  339. package/resources/conversions.js +32 -0
  340. package/resources/conversions.js.map +1 -0
  341. package/resources/conversions.mjs +28 -0
  342. package/resources/conversions.mjs.map +1 -0
  343. package/resources/deposits.d.mts +252 -0
  344. package/resources/deposits.d.mts.map +1 -0
  345. package/resources/deposits.d.ts +252 -0
  346. package/resources/deposits.d.ts.map +1 -0
  347. package/resources/deposits.js +23 -0
  348. package/resources/deposits.js.map +1 -0
  349. package/resources/deposits.mjs +19 -0
  350. package/resources/deposits.mjs.map +1 -0
  351. package/resources/events.d.mts +101 -0
  352. package/resources/events.d.mts.map +1 -0
  353. package/resources/events.d.ts +101 -0
  354. package/resources/events.d.ts.map +1 -0
  355. package/resources/events.js +24 -0
  356. package/resources/events.js.map +1 -0
  357. package/resources/events.mjs +20 -0
  358. package/resources/events.mjs.map +1 -0
  359. package/resources/index.d.mts +15 -0
  360. package/resources/index.d.mts.map +1 -0
  361. package/resources/index.d.ts +15 -0
  362. package/resources/index.d.ts.map +1 -0
  363. package/resources/index.js +33 -0
  364. package/resources/index.js.map +1 -0
  365. package/resources/index.mjs +16 -0
  366. package/resources/index.mjs.map +1 -0
  367. package/resources/payouts.d.mts +550 -0
  368. package/resources/payouts.d.mts.map +1 -0
  369. package/resources/payouts.d.ts +550 -0
  370. package/resources/payouts.d.ts.map +1 -0
  371. package/resources/payouts.js +29 -0
  372. package/resources/payouts.js.map +1 -0
  373. package/resources/payouts.mjs +25 -0
  374. package/resources/payouts.mjs.map +1 -0
  375. package/resources/quotes/index.d.mts +3 -0
  376. package/resources/quotes/index.d.mts.map +1 -0
  377. package/resources/quotes/index.d.ts +3 -0
  378. package/resources/quotes/index.d.ts.map +1 -0
  379. package/resources/quotes/index.js +9 -0
  380. package/resources/quotes/index.js.map +1 -0
  381. package/resources/quotes/index.mjs +4 -0
  382. package/resources/quotes/index.mjs.map +1 -0
  383. package/resources/quotes/indicative.d.mts +76 -0
  384. package/resources/quotes/indicative.d.mts.map +1 -0
  385. package/resources/quotes/indicative.d.ts +76 -0
  386. package/resources/quotes/indicative.d.ts.map +1 -0
  387. package/resources/quotes/indicative.js +15 -0
  388. package/resources/quotes/indicative.js.map +1 -0
  389. package/resources/quotes/indicative.mjs +11 -0
  390. package/resources/quotes/indicative.mjs.map +1 -0
  391. package/resources/quotes/quotes.d.mts +71 -0
  392. package/resources/quotes/quotes.d.mts.map +1 -0
  393. package/resources/quotes/quotes.d.ts +71 -0
  394. package/resources/quotes/quotes.d.ts.map +1 -0
  395. package/resources/quotes/quotes.js +24 -0
  396. package/resources/quotes/quotes.js.map +1 -0
  397. package/resources/quotes/quotes.mjs +19 -0
  398. package/resources/quotes/quotes.mjs.map +1 -0
  399. package/resources/quotes.d.mts +2 -0
  400. package/resources/quotes.d.mts.map +1 -0
  401. package/resources/quotes.d.ts +2 -0
  402. package/resources/quotes.d.ts.map +1 -0
  403. package/resources/quotes.js +6 -0
  404. package/resources/quotes.js.map +1 -0
  405. package/resources/quotes.mjs +3 -0
  406. package/resources/quotes.mjs.map +1 -0
  407. package/resources/returns.d.mts +70 -0
  408. package/resources/returns.d.mts.map +1 -0
  409. package/resources/returns.d.ts +70 -0
  410. package/resources/returns.d.ts.map +1 -0
  411. package/resources/returns.js +16 -0
  412. package/resources/returns.js.map +1 -0
  413. package/resources/returns.mjs +12 -0
  414. package/resources/returns.mjs.map +1 -0
  415. package/resources/scopes.d.mts +49 -0
  416. package/resources/scopes.d.mts.map +1 -0
  417. package/resources/scopes.d.ts +49 -0
  418. package/resources/scopes.d.ts.map +1 -0
  419. package/resources/scopes.js +17 -0
  420. package/resources/scopes.js.map +1 -0
  421. package/resources/scopes.mjs +13 -0
  422. package/resources/scopes.mjs.map +1 -0
  423. package/resources/webhook-deliveries.d.mts +203 -0
  424. package/resources/webhook-deliveries.d.mts.map +1 -0
  425. package/resources/webhook-deliveries.d.ts +203 -0
  426. package/resources/webhook-deliveries.d.ts.map +1 -0
  427. package/resources/webhook-deliveries.js +33 -0
  428. package/resources/webhook-deliveries.js.map +1 -0
  429. package/resources/webhook-deliveries.mjs +29 -0
  430. package/resources/webhook-deliveries.mjs.map +1 -0
  431. package/resources/webhook-subscriptions.d.mts +221 -0
  432. package/resources/webhook-subscriptions.d.mts.map +1 -0
  433. package/resources/webhook-subscriptions.d.ts +221 -0
  434. package/resources/webhook-subscriptions.d.ts.map +1 -0
  435. package/resources/webhook-subscriptions.js +54 -0
  436. package/resources/webhook-subscriptions.js.map +1 -0
  437. package/resources/webhook-subscriptions.mjs +50 -0
  438. package/resources/webhook-subscriptions.mjs.map +1 -0
  439. package/resources/webhooks.d.mts +1489 -0
  440. package/resources/webhooks.d.mts.map +1 -0
  441. package/resources/webhooks.d.ts +1489 -0
  442. package/resources/webhooks.d.ts.map +1 -0
  443. package/resources/webhooks.js +20 -0
  444. package/resources/webhooks.js.map +1 -0
  445. package/resources/webhooks.mjs +16 -0
  446. package/resources/webhooks.mjs.map +1 -0
  447. package/resources.d.mts +2 -0
  448. package/resources.d.mts.map +1 -0
  449. package/resources.d.ts +2 -0
  450. package/resources.d.ts.map +1 -0
  451. package/resources.js +5 -0
  452. package/resources.js.map +1 -0
  453. package/resources.mjs +2 -0
  454. package/resources.mjs.map +1 -0
  455. package/src/api-promise.ts +2 -0
  456. package/src/client.ts +1047 -0
  457. package/src/core/README.md +3 -0
  458. package/src/core/api-promise.ts +92 -0
  459. package/src/core/error.ts +130 -0
  460. package/src/core/pagination.ts +157 -0
  461. package/src/core/resource.ts +11 -0
  462. package/src/core/uploads.ts +2 -0
  463. package/src/error.ts +2 -0
  464. package/src/index.ts +23 -0
  465. package/src/internal/README.md +3 -0
  466. package/src/internal/builtin-types.ts +93 -0
  467. package/src/internal/detect-platform.ts +196 -0
  468. package/src/internal/errors.ts +33 -0
  469. package/src/internal/headers.ts +97 -0
  470. package/src/internal/parse.ts +56 -0
  471. package/src/internal/qs/LICENSE.md +13 -0
  472. package/src/internal/qs/README.md +3 -0
  473. package/src/internal/qs/formats.ts +10 -0
  474. package/src/internal/qs/index.ts +13 -0
  475. package/src/internal/qs/stringify.ts +385 -0
  476. package/src/internal/qs/types.ts +71 -0
  477. package/src/internal/qs/utils.ts +265 -0
  478. package/src/internal/request-options.ts +91 -0
  479. package/src/internal/shim-types.ts +26 -0
  480. package/src/internal/shims.ts +107 -0
  481. package/src/internal/to-file.ts +154 -0
  482. package/src/internal/types.ts +93 -0
  483. package/src/internal/uploads.ts +187 -0
  484. package/src/internal/utils/base64.ts +40 -0
  485. package/src/internal/utils/bytes.ts +32 -0
  486. package/src/internal/utils/env.ts +18 -0
  487. package/src/internal/utils/log.ts +128 -0
  488. package/src/internal/utils/path.ts +88 -0
  489. package/src/internal/utils/query.ts +7 -0
  490. package/src/internal/utils/sleep.ts +3 -0
  491. package/src/internal/utils/uuid.ts +17 -0
  492. package/src/internal/utils/values.ts +105 -0
  493. package/src/internal/utils.ts +9 -0
  494. package/src/lib/.keep +4 -0
  495. package/src/pagination.ts +2 -0
  496. package/src/resource.ts +2 -0
  497. package/src/resources/account-programs.ts +156 -0
  498. package/src/resources/accounts.ts +1603 -0
  499. package/src/resources/api-keys.ts +89 -0
  500. package/src/resources/api-versions.ts +61 -0
  501. package/src/resources/conversions.ts +340 -0
  502. package/src/resources/deposits.ts +364 -0
  503. package/src/resources/events.ts +170 -0
  504. package/src/resources/index.ts +99 -0
  505. package/src/resources/payouts.ts +735 -0
  506. package/src/resources/quotes/index.ts +4 -0
  507. package/src/resources/quotes/indicative.ts +100 -0
  508. package/src/resources/quotes/quotes.ts +108 -0
  509. package/src/resources/quotes.ts +3 -0
  510. package/src/resources/returns.ts +102 -0
  511. package/src/resources/scopes.ts +80 -0
  512. package/src/resources/webhook-deliveries.ts +267 -0
  513. package/src/resources/webhook-subscriptions.ts +411 -0
  514. package/src/resources/webhooks.ts +1953 -0
  515. package/src/resources.ts +1 -0
  516. package/src/tsconfig.json +11 -0
  517. package/src/uploads.ts +2 -0
  518. package/src/version.ts +1 -0
  519. package/uploads.d.mts +2 -0
  520. package/uploads.d.mts.map +1 -0
  521. package/uploads.d.ts +2 -0
  522. package/uploads.d.ts.map +1 -0
  523. package/uploads.js +6 -0
  524. package/uploads.js.map +1 -0
  525. package/uploads.mjs +2 -0
  526. package/uploads.mjs.map +1 -0
  527. package/version.d.mts +2 -0
  528. package/version.d.mts.map +1 -0
  529. package/version.d.ts +2 -0
  530. package/version.d.ts.map +1 -0
  531. package/version.js +5 -0
  532. package/version.js.map +1 -0
  533. package/version.mjs +2 -0
  534. package/version.mjs.map +1 -0
@@ -0,0 +1,1603 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Accounts extends APIResource {
10
+ /**
11
+ * Creates a new account.
12
+ */
13
+ create(body: AccountCreateParams, options?: RequestOptions): APIPromise<AccountCreateResponse> {
14
+ return this._client.post('/v1/accounts', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Retrieves an account by ID.
19
+ */
20
+ retrieve(id: string, options?: RequestOptions): APIPromise<AccountRetrieveResponse> {
21
+ return this._client.get(path`/v1/accounts/${id}`, options);
22
+ }
23
+
24
+ /**
25
+ * Returns a paginated list of accounts.
26
+ */
27
+ list(
28
+ query: AccountListParams | null | undefined = {},
29
+ options?: RequestOptions,
30
+ ): PagePromise<AccountListResponsesCursorPage, AccountListResponse> {
31
+ return this._client.getAPIList('/v1/accounts', CursorPage<AccountListResponse>, { query, ...options });
32
+ }
33
+
34
+ /**
35
+ * Closes an account
36
+ */
37
+ close(id: string, body: AccountCloseParams, options?: RequestOptions): APIPromise<AccountCloseResponse> {
38
+ return this._client.post(path`/v1/accounts/${id}/close`, { body, ...options });
39
+ }
40
+
41
+ /**
42
+ * Freezes an account
43
+ */
44
+ freeze(id: string, options?: RequestOptions): APIPromise<AccountFreezeResponse> {
45
+ return this._client.post(path`/v1/accounts/${id}/freeze`, options);
46
+ }
47
+
48
+ /**
49
+ * 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);
53
+ }
54
+
55
+ /**
56
+ * Unfreezes an account
57
+ */
58
+ unfreeze(id: string, options?: RequestOptions): APIPromise<AccountUnfreezeResponse> {
59
+ return this._client.post(path`/v1/accounts/${id}/unfreeze`, options);
60
+ }
61
+ }
62
+
63
+ export type AccountListResponsesCursorPage = CursorPage<AccountListResponse>;
64
+
65
+ export interface AccountCreateResponse {
66
+ /**
67
+ * Unique identifier of the account.
68
+ */
69
+ id: string;
70
+
71
+ /**
72
+ * Type of the account.
73
+ */
74
+ account_type: 'virtual_account' | 'payment_account';
75
+
76
+ /**
77
+ * Asset type of the account.
78
+ */
79
+ asset_type: 'fiat' | 'crypto';
80
+
81
+ /**
82
+ * ISO 8601 UTC timestamp when the account was created.
83
+ */
84
+ created_at: string;
85
+
86
+ /**
87
+ * ISO 4217 currency code for the account.
88
+ */
89
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
90
+
91
+ /**
92
+ * Payment identifiers (e.g. IBAN, account number, wallet address) through which
93
+ * this account can send or receive funds.
94
+ */
95
+ financial_addresses: Array<
96
+ | AccountCreateResponse.UnionMember0
97
+ | AccountCreateResponse.UnionMember1
98
+ | AccountCreateResponse.UnionMember2
99
+ | AccountCreateResponse.UnionMember3
100
+ >;
101
+
102
+ /**
103
+ * Human-readable label for the account.
104
+ */
105
+ label: string;
106
+
107
+ /**
108
+ * Current status of the account.
109
+ */
110
+ status: 'pending' | 'active' | 'frozen' | 'closed';
111
+
112
+ /**
113
+ * Resource type discriminator.
114
+ */
115
+ type: 'account';
116
+
117
+ /**
118
+ * ISO 8601 UTC timestamp when the account was last updated.
119
+ */
120
+ updated_at: string;
121
+ }
122
+
123
+ export namespace AccountCreateResponse {
124
+ export interface UnionMember0 {
125
+ /**
126
+ * Name of the account holder.
127
+ */
128
+ account_holder_name: string;
129
+
130
+ /**
131
+ * Bank Identifier Code, or null if not provided.
132
+ */
133
+ bic: string | null;
134
+
135
+ /**
136
+ * International Bank Account Number.
137
+ */
138
+ iban: string;
139
+
140
+ /**
141
+ * Discriminator for IBAN financial address.
142
+ */
143
+ type: 'iban';
144
+ }
145
+
146
+ export interface UnionMember1 {
147
+ /**
148
+ * Name of the account holder.
149
+ */
150
+ account_holder_name: string;
151
+
152
+ /**
153
+ * UK account number (8 digits).
154
+ */
155
+ account_number: string;
156
+
157
+ /**
158
+ * UK sort code (6 digits).
159
+ */
160
+ sort_code: string;
161
+
162
+ /**
163
+ * Discriminator for UK sort code financial address.
164
+ */
165
+ type: 'sort_code';
166
+ }
167
+
168
+ export interface UnionMember2 {
169
+ /**
170
+ * Name of the account holder.
171
+ */
172
+ account_holder_name: string;
173
+
174
+ /**
175
+ * Bank account number.
176
+ */
177
+ account_number: string;
178
+
179
+ /**
180
+ * ABA routing number (9 digits).
181
+ */
182
+ routing_number: string;
183
+
184
+ /**
185
+ * Discriminator for ABA wire financial address.
186
+ */
187
+ type: 'aba';
188
+ }
189
+
190
+ export interface UnionMember3 {
191
+ /**
192
+ * Wallet address on the specified blockchain.
193
+ */
194
+ address: string;
195
+
196
+ /**
197
+ * Blockchain network for the crypto wallet.
198
+ */
199
+ blockchain: 'ethereum' | 'solana' | 'polygon';
200
+
201
+ /**
202
+ * Discriminator for crypto wallet financial address.
203
+ */
204
+ type: 'crypto_wallet';
205
+ }
206
+ }
207
+
208
+ export interface AccountRetrieveResponse {
209
+ /**
210
+ * Unique identifier of the account.
211
+ */
212
+ id: string;
213
+
214
+ /**
215
+ * Type of the account.
216
+ */
217
+ account_type: 'virtual_account' | 'payment_account';
218
+
219
+ /**
220
+ * Asset type of the account.
221
+ */
222
+ asset_type: 'fiat' | 'crypto';
223
+
224
+ /**
225
+ * ISO 8601 UTC timestamp when the account was created.
226
+ */
227
+ created_at: string;
228
+
229
+ /**
230
+ * ISO 4217 currency code for the account.
231
+ */
232
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
233
+
234
+ /**
235
+ * Payment identifiers (e.g. IBAN, account number, wallet address) through which
236
+ * this account can send or receive funds.
237
+ */
238
+ financial_addresses: Array<
239
+ | AccountRetrieveResponse.UnionMember0
240
+ | AccountRetrieveResponse.UnionMember1
241
+ | AccountRetrieveResponse.UnionMember2
242
+ | AccountRetrieveResponse.UnionMember3
243
+ >;
244
+
245
+ /**
246
+ * Human-readable label for the account.
247
+ */
248
+ label: string;
249
+
250
+ /**
251
+ * Current status of the account.
252
+ */
253
+ status: 'pending' | 'active' | 'frozen' | 'closed';
254
+
255
+ /**
256
+ * Resource type discriminator.
257
+ */
258
+ type: 'account';
259
+
260
+ /**
261
+ * ISO 8601 UTC timestamp when the account was last updated.
262
+ */
263
+ updated_at: string;
264
+ }
265
+
266
+ export namespace AccountRetrieveResponse {
267
+ export interface UnionMember0 {
268
+ /**
269
+ * Name of the account holder.
270
+ */
271
+ account_holder_name: string;
272
+
273
+ /**
274
+ * Bank Identifier Code, or null if not provided.
275
+ */
276
+ bic: string | null;
277
+
278
+ /**
279
+ * International Bank Account Number.
280
+ */
281
+ iban: string;
282
+
283
+ /**
284
+ * Discriminator for IBAN financial address.
285
+ */
286
+ type: 'iban';
287
+ }
288
+
289
+ export interface UnionMember1 {
290
+ /**
291
+ * Name of the account holder.
292
+ */
293
+ account_holder_name: string;
294
+
295
+ /**
296
+ * UK account number (8 digits).
297
+ */
298
+ account_number: string;
299
+
300
+ /**
301
+ * UK sort code (6 digits).
302
+ */
303
+ sort_code: string;
304
+
305
+ /**
306
+ * Discriminator for UK sort code financial address.
307
+ */
308
+ type: 'sort_code';
309
+ }
310
+
311
+ export interface UnionMember2 {
312
+ /**
313
+ * Name of the account holder.
314
+ */
315
+ account_holder_name: string;
316
+
317
+ /**
318
+ * Bank account number.
319
+ */
320
+ account_number: string;
321
+
322
+ /**
323
+ * ABA routing number (9 digits).
324
+ */
325
+ routing_number: string;
326
+
327
+ /**
328
+ * Discriminator for ABA wire financial address.
329
+ */
330
+ type: 'aba';
331
+ }
332
+
333
+ export interface UnionMember3 {
334
+ /**
335
+ * Wallet address on the specified blockchain.
336
+ */
337
+ address: string;
338
+
339
+ /**
340
+ * Blockchain network for the crypto wallet.
341
+ */
342
+ blockchain: 'ethereum' | 'solana' | 'polygon';
343
+
344
+ /**
345
+ * Discriminator for crypto wallet financial address.
346
+ */
347
+ type: 'crypto_wallet';
348
+ }
349
+ }
350
+
351
+ export interface AccountListResponse {
352
+ /**
353
+ * Unique identifier of the account.
354
+ */
355
+ id: string;
356
+
357
+ /**
358
+ * Type of the account.
359
+ */
360
+ account_type: 'virtual_account' | 'payment_account';
361
+
362
+ /**
363
+ * Asset type of the account.
364
+ */
365
+ asset_type: 'fiat' | 'crypto';
366
+
367
+ /**
368
+ * ISO 8601 UTC timestamp when the account was created.
369
+ */
370
+ created_at: string;
371
+
372
+ /**
373
+ * ISO 4217 currency code for the account.
374
+ */
375
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
376
+
377
+ /**
378
+ * Payment identifiers (e.g. IBAN, account number, wallet address) through which
379
+ * this account can send or receive funds.
380
+ */
381
+ financial_addresses: Array<
382
+ | AccountListResponse.UnionMember0
383
+ | AccountListResponse.UnionMember1
384
+ | AccountListResponse.UnionMember2
385
+ | AccountListResponse.UnionMember3
386
+ >;
387
+
388
+ /**
389
+ * Human-readable label for the account.
390
+ */
391
+ label: string;
392
+
393
+ /**
394
+ * Current status of the account.
395
+ */
396
+ status: 'pending' | 'active' | 'frozen' | 'closed';
397
+
398
+ /**
399
+ * Resource type discriminator.
400
+ */
401
+ type: 'account';
402
+
403
+ /**
404
+ * ISO 8601 UTC timestamp when the account was last updated.
405
+ */
406
+ updated_at: string;
407
+ }
408
+
409
+ export namespace AccountListResponse {
410
+ export interface UnionMember0 {
411
+ /**
412
+ * Name of the account holder.
413
+ */
414
+ account_holder_name: string;
415
+
416
+ /**
417
+ * Bank Identifier Code, or null if not provided.
418
+ */
419
+ bic: string | null;
420
+
421
+ /**
422
+ * International Bank Account Number.
423
+ */
424
+ iban: string;
425
+
426
+ /**
427
+ * Discriminator for IBAN financial address.
428
+ */
429
+ type: 'iban';
430
+ }
431
+
432
+ export interface UnionMember1 {
433
+ /**
434
+ * Name of the account holder.
435
+ */
436
+ account_holder_name: string;
437
+
438
+ /**
439
+ * UK account number (8 digits).
440
+ */
441
+ account_number: string;
442
+
443
+ /**
444
+ * UK sort code (6 digits).
445
+ */
446
+ sort_code: string;
447
+
448
+ /**
449
+ * Discriminator for UK sort code financial address.
450
+ */
451
+ type: 'sort_code';
452
+ }
453
+
454
+ export interface UnionMember2 {
455
+ /**
456
+ * Name of the account holder.
457
+ */
458
+ account_holder_name: string;
459
+
460
+ /**
461
+ * Bank account number.
462
+ */
463
+ account_number: string;
464
+
465
+ /**
466
+ * ABA routing number (9 digits).
467
+ */
468
+ routing_number: string;
469
+
470
+ /**
471
+ * Discriminator for ABA wire financial address.
472
+ */
473
+ type: 'aba';
474
+ }
475
+
476
+ export interface UnionMember3 {
477
+ /**
478
+ * Wallet address on the specified blockchain.
479
+ */
480
+ address: string;
481
+
482
+ /**
483
+ * Blockchain network for the crypto wallet.
484
+ */
485
+ blockchain: 'ethereum' | 'solana' | 'polygon';
486
+
487
+ /**
488
+ * Discriminator for crypto wallet financial address.
489
+ */
490
+ type: 'crypto_wallet';
491
+ }
492
+ }
493
+
494
+ export interface AccountCloseResponse {
495
+ /**
496
+ * Unique identifier of the account.
497
+ */
498
+ id: string;
499
+
500
+ /**
501
+ * Type of the account.
502
+ */
503
+ account_type: 'virtual_account' | 'payment_account';
504
+
505
+ /**
506
+ * Asset type of the account.
507
+ */
508
+ asset_type: 'fiat' | 'crypto';
509
+
510
+ /**
511
+ * ISO 8601 UTC timestamp when the account was created.
512
+ */
513
+ created_at: string;
514
+
515
+ /**
516
+ * ISO 4217 currency code for the account.
517
+ */
518
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
519
+
520
+ /**
521
+ * Payment identifiers (e.g. IBAN, account number, wallet address) through which
522
+ * this account can send or receive funds.
523
+ */
524
+ financial_addresses: Array<
525
+ | AccountCloseResponse.UnionMember0
526
+ | AccountCloseResponse.UnionMember1
527
+ | AccountCloseResponse.UnionMember2
528
+ | AccountCloseResponse.UnionMember3
529
+ >;
530
+
531
+ /**
532
+ * Human-readable label for the account.
533
+ */
534
+ label: string;
535
+
536
+ /**
537
+ * Current status of the account.
538
+ */
539
+ status: 'pending' | 'active' | 'frozen' | 'closed';
540
+
541
+ /**
542
+ * Resource type discriminator.
543
+ */
544
+ type: 'account';
545
+
546
+ /**
547
+ * ISO 8601 UTC timestamp when the account was last updated.
548
+ */
549
+ updated_at: string;
550
+ }
551
+
552
+ export namespace AccountCloseResponse {
553
+ export interface UnionMember0 {
554
+ /**
555
+ * Name of the account holder.
556
+ */
557
+ account_holder_name: string;
558
+
559
+ /**
560
+ * Bank Identifier Code, or null if not provided.
561
+ */
562
+ bic: string | null;
563
+
564
+ /**
565
+ * International Bank Account Number.
566
+ */
567
+ iban: string;
568
+
569
+ /**
570
+ * Discriminator for IBAN financial address.
571
+ */
572
+ type: 'iban';
573
+ }
574
+
575
+ export interface UnionMember1 {
576
+ /**
577
+ * Name of the account holder.
578
+ */
579
+ account_holder_name: string;
580
+
581
+ /**
582
+ * UK account number (8 digits).
583
+ */
584
+ account_number: string;
585
+
586
+ /**
587
+ * UK sort code (6 digits).
588
+ */
589
+ sort_code: string;
590
+
591
+ /**
592
+ * Discriminator for UK sort code financial address.
593
+ */
594
+ type: 'sort_code';
595
+ }
596
+
597
+ export interface UnionMember2 {
598
+ /**
599
+ * Name of the account holder.
600
+ */
601
+ account_holder_name: string;
602
+
603
+ /**
604
+ * Bank account number.
605
+ */
606
+ account_number: string;
607
+
608
+ /**
609
+ * ABA routing number (9 digits).
610
+ */
611
+ routing_number: string;
612
+
613
+ /**
614
+ * Discriminator for ABA wire financial address.
615
+ */
616
+ type: 'aba';
617
+ }
618
+
619
+ export interface UnionMember3 {
620
+ /**
621
+ * Wallet address on the specified blockchain.
622
+ */
623
+ address: string;
624
+
625
+ /**
626
+ * Blockchain network for the crypto wallet.
627
+ */
628
+ blockchain: 'ethereum' | 'solana' | 'polygon';
629
+
630
+ /**
631
+ * Discriminator for crypto wallet financial address.
632
+ */
633
+ type: 'crypto_wallet';
634
+ }
635
+ }
636
+
637
+ export interface AccountFreezeResponse {
638
+ /**
639
+ * Unique identifier of the account.
640
+ */
641
+ id: string;
642
+
643
+ /**
644
+ * Type of the account.
645
+ */
646
+ account_type: 'virtual_account' | 'payment_account';
647
+
648
+ /**
649
+ * Asset type of the account.
650
+ */
651
+ asset_type: 'fiat' | 'crypto';
652
+
653
+ /**
654
+ * ISO 8601 UTC timestamp when the account was created.
655
+ */
656
+ created_at: string;
657
+
658
+ /**
659
+ * ISO 4217 currency code for the account.
660
+ */
661
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
662
+
663
+ /**
664
+ * Payment identifiers (e.g. IBAN, account number, wallet address) through which
665
+ * this account can send or receive funds.
666
+ */
667
+ financial_addresses: Array<
668
+ | AccountFreezeResponse.UnionMember0
669
+ | AccountFreezeResponse.UnionMember1
670
+ | AccountFreezeResponse.UnionMember2
671
+ | AccountFreezeResponse.UnionMember3
672
+ >;
673
+
674
+ /**
675
+ * Human-readable label for the account.
676
+ */
677
+ label: string;
678
+
679
+ /**
680
+ * Current status of the account.
681
+ */
682
+ status: 'pending' | 'active' | 'frozen' | 'closed';
683
+
684
+ /**
685
+ * Resource type discriminator.
686
+ */
687
+ type: 'account';
688
+
689
+ /**
690
+ * ISO 8601 UTC timestamp when the account was last updated.
691
+ */
692
+ updated_at: string;
693
+ }
694
+
695
+ export namespace AccountFreezeResponse {
696
+ export interface UnionMember0 {
697
+ /**
698
+ * Name of the account holder.
699
+ */
700
+ account_holder_name: string;
701
+
702
+ /**
703
+ * Bank Identifier Code, or null if not provided.
704
+ */
705
+ bic: string | null;
706
+
707
+ /**
708
+ * International Bank Account Number.
709
+ */
710
+ iban: string;
711
+
712
+ /**
713
+ * Discriminator for IBAN financial address.
714
+ */
715
+ type: 'iban';
716
+ }
717
+
718
+ export interface UnionMember1 {
719
+ /**
720
+ * Name of the account holder.
721
+ */
722
+ account_holder_name: string;
723
+
724
+ /**
725
+ * UK account number (8 digits).
726
+ */
727
+ account_number: string;
728
+
729
+ /**
730
+ * UK sort code (6 digits).
731
+ */
732
+ sort_code: string;
733
+
734
+ /**
735
+ * Discriminator for UK sort code financial address.
736
+ */
737
+ type: 'sort_code';
738
+ }
739
+
740
+ export interface UnionMember2 {
741
+ /**
742
+ * Name of the account holder.
743
+ */
744
+ account_holder_name: string;
745
+
746
+ /**
747
+ * Bank account number.
748
+ */
749
+ account_number: string;
750
+
751
+ /**
752
+ * ABA routing number (9 digits).
753
+ */
754
+ routing_number: string;
755
+
756
+ /**
757
+ * Discriminator for ABA wire financial address.
758
+ */
759
+ type: 'aba';
760
+ }
761
+
762
+ export interface UnionMember3 {
763
+ /**
764
+ * Wallet address on the specified blockchain.
765
+ */
766
+ address: string;
767
+
768
+ /**
769
+ * Blockchain network for the crypto wallet.
770
+ */
771
+ blockchain: 'ethereum' | 'solana' | 'polygon';
772
+
773
+ /**
774
+ * Discriminator for crypto wallet financial address.
775
+ */
776
+ type: 'crypto_wallet';
777
+ }
778
+ }
779
+
780
+ export interface AccountRetrieveBalanceResponse {
781
+ /**
782
+ * Unique identifier of the account.
783
+ */
784
+ account_id: string;
785
+
786
+ /**
787
+ * Available balance amount as a decimal string.
788
+ */
789
+ amount: string;
790
+
791
+ /**
792
+ * ISO 8601 UTC timestamp when the balance was retrieved.
793
+ */
794
+ as_of: string;
795
+
796
+ /**
797
+ * ISO 4217 currency code for the balance.
798
+ */
799
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
800
+
801
+ /**
802
+ * Resource type discriminator.
803
+ */
804
+ type: 'account_balance';
805
+ }
806
+
807
+ export interface AccountUnfreezeResponse {
808
+ /**
809
+ * Unique identifier of the account.
810
+ */
811
+ id: string;
812
+
813
+ /**
814
+ * Type of the account.
815
+ */
816
+ account_type: 'virtual_account' | 'payment_account';
817
+
818
+ /**
819
+ * Asset type of the account.
820
+ */
821
+ asset_type: 'fiat' | 'crypto';
822
+
823
+ /**
824
+ * ISO 8601 UTC timestamp when the account was created.
825
+ */
826
+ created_at: string;
827
+
828
+ /**
829
+ * ISO 4217 currency code for the account.
830
+ */
831
+ currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
832
+
833
+ /**
834
+ * Payment identifiers (e.g. IBAN, account number, wallet address) through which
835
+ * this account can send or receive funds.
836
+ */
837
+ financial_addresses: Array<
838
+ | AccountUnfreezeResponse.UnionMember0
839
+ | AccountUnfreezeResponse.UnionMember1
840
+ | AccountUnfreezeResponse.UnionMember2
841
+ | AccountUnfreezeResponse.UnionMember3
842
+ >;
843
+
844
+ /**
845
+ * Human-readable label for the account.
846
+ */
847
+ label: string;
848
+
849
+ /**
850
+ * Current status of the account.
851
+ */
852
+ status: 'pending' | 'active' | 'frozen' | 'closed';
853
+
854
+ /**
855
+ * Resource type discriminator.
856
+ */
857
+ type: 'account';
858
+
859
+ /**
860
+ * ISO 8601 UTC timestamp when the account was last updated.
861
+ */
862
+ updated_at: string;
863
+ }
864
+
865
+ export namespace AccountUnfreezeResponse {
866
+ export interface UnionMember0 {
867
+ /**
868
+ * Name of the account holder.
869
+ */
870
+ account_holder_name: string;
871
+
872
+ /**
873
+ * Bank Identifier Code, or null if not provided.
874
+ */
875
+ bic: string | null;
876
+
877
+ /**
878
+ * International Bank Account Number.
879
+ */
880
+ iban: string;
881
+
882
+ /**
883
+ * Discriminator for IBAN financial address.
884
+ */
885
+ type: 'iban';
886
+ }
887
+
888
+ export interface UnionMember1 {
889
+ /**
890
+ * Name of the account holder.
891
+ */
892
+ account_holder_name: string;
893
+
894
+ /**
895
+ * UK account number (8 digits).
896
+ */
897
+ account_number: string;
898
+
899
+ /**
900
+ * UK sort code (6 digits).
901
+ */
902
+ sort_code: string;
903
+
904
+ /**
905
+ * Discriminator for UK sort code financial address.
906
+ */
907
+ type: 'sort_code';
908
+ }
909
+
910
+ export interface UnionMember2 {
911
+ /**
912
+ * Name of the account holder.
913
+ */
914
+ account_holder_name: string;
915
+
916
+ /**
917
+ * Bank account number.
918
+ */
919
+ account_number: string;
920
+
921
+ /**
922
+ * ABA routing number (9 digits).
923
+ */
924
+ routing_number: string;
925
+
926
+ /**
927
+ * Discriminator for ABA wire financial address.
928
+ */
929
+ type: 'aba';
930
+ }
931
+
932
+ export interface UnionMember3 {
933
+ /**
934
+ * Wallet address on the specified blockchain.
935
+ */
936
+ address: string;
937
+
938
+ /**
939
+ * Blockchain network for the crypto wallet.
940
+ */
941
+ blockchain: 'ethereum' | 'solana' | 'polygon';
942
+
943
+ /**
944
+ * Discriminator for crypto wallet financial address.
945
+ */
946
+ type: 'crypto_wallet';
947
+ }
948
+ }
949
+
950
+ export interface AccountCreateParams {
951
+ /**
952
+ * ID of the account program to create the account under.
953
+ */
954
+ account_program_id: string;
955
+
956
+ /**
957
+ * Type of account. Currently only virtual account.
958
+ */
959
+ account_type: 'virtual_account';
960
+
961
+ /**
962
+ * Personal information of the account beneficiary.
963
+ */
964
+ beneficiary_data: AccountCreateParams.BeneficiaryData;
965
+ }
966
+
967
+ export namespace AccountCreateParams {
968
+ /**
969
+ * Personal information of the account beneficiary.
970
+ */
971
+ export interface BeneficiaryData {
972
+ /**
973
+ * ISO 3166-1 alpha-2 country code of citizenship.
974
+ */
975
+ country_of_citizenship:
976
+ | 'AF'
977
+ | 'AL'
978
+ | 'DZ'
979
+ | 'AS'
980
+ | 'AD'
981
+ | 'AO'
982
+ | 'AI'
983
+ | 'AQ'
984
+ | 'AG'
985
+ | 'AR'
986
+ | 'AM'
987
+ | 'AW'
988
+ | 'AU'
989
+ | 'AT'
990
+ | 'AZ'
991
+ | 'BS'
992
+ | 'BH'
993
+ | 'BD'
994
+ | 'BB'
995
+ | 'BY'
996
+ | 'BE'
997
+ | 'BZ'
998
+ | 'BJ'
999
+ | 'BM'
1000
+ | 'BT'
1001
+ | 'BO'
1002
+ | 'BA'
1003
+ | 'BW'
1004
+ | 'BV'
1005
+ | 'BR'
1006
+ | 'IO'
1007
+ | 'BN'
1008
+ | 'BG'
1009
+ | 'BF'
1010
+ | 'BI'
1011
+ | 'KH'
1012
+ | 'CM'
1013
+ | 'CA'
1014
+ | 'CV'
1015
+ | 'KY'
1016
+ | 'CF'
1017
+ | 'TD'
1018
+ | 'CL'
1019
+ | 'CN'
1020
+ | 'CX'
1021
+ | 'CC'
1022
+ | 'CO'
1023
+ | 'KM'
1024
+ | 'CG'
1025
+ | 'CD'
1026
+ | 'CK'
1027
+ | 'CR'
1028
+ | 'CI'
1029
+ | 'HR'
1030
+ | 'CU'
1031
+ | 'CY'
1032
+ | 'CZ'
1033
+ | 'DK'
1034
+ | 'DJ'
1035
+ | 'DM'
1036
+ | 'DO'
1037
+ | 'EC'
1038
+ | 'EG'
1039
+ | 'SV'
1040
+ | 'GQ'
1041
+ | 'ER'
1042
+ | 'EE'
1043
+ | 'ET'
1044
+ | 'FK'
1045
+ | 'FO'
1046
+ | 'FJ'
1047
+ | 'FI'
1048
+ | 'FR'
1049
+ | 'GF'
1050
+ | 'PF'
1051
+ | 'TF'
1052
+ | 'GA'
1053
+ | 'GM'
1054
+ | 'GE'
1055
+ | 'DE'
1056
+ | 'GH'
1057
+ | 'GI'
1058
+ | 'GR'
1059
+ | 'GL'
1060
+ | 'GD'
1061
+ | 'GP'
1062
+ | 'GU'
1063
+ | 'GT'
1064
+ | 'GN'
1065
+ | 'GW'
1066
+ | 'GY'
1067
+ | 'HT'
1068
+ | 'HM'
1069
+ | 'VA'
1070
+ | 'HN'
1071
+ | 'HK'
1072
+ | 'HU'
1073
+ | 'IS'
1074
+ | 'IN'
1075
+ | 'ID'
1076
+ | 'IR'
1077
+ | 'IQ'
1078
+ | 'IE'
1079
+ | 'IL'
1080
+ | 'IT'
1081
+ | 'JM'
1082
+ | 'JP'
1083
+ | 'JO'
1084
+ | 'KZ'
1085
+ | 'KE'
1086
+ | 'KI'
1087
+ | 'KP'
1088
+ | 'KR'
1089
+ | 'KW'
1090
+ | 'KG'
1091
+ | 'LA'
1092
+ | 'LV'
1093
+ | 'LB'
1094
+ | 'LS'
1095
+ | 'LR'
1096
+ | 'LY'
1097
+ | 'LI'
1098
+ | 'LT'
1099
+ | 'LU'
1100
+ | 'MO'
1101
+ | 'MG'
1102
+ | 'MW'
1103
+ | 'MY'
1104
+ | 'MV'
1105
+ | 'ML'
1106
+ | 'MT'
1107
+ | 'MH'
1108
+ | 'MQ'
1109
+ | 'MR'
1110
+ | 'MU'
1111
+ | 'YT'
1112
+ | 'MX'
1113
+ | 'FM'
1114
+ | 'MD'
1115
+ | 'MC'
1116
+ | 'MN'
1117
+ | 'MS'
1118
+ | 'MA'
1119
+ | 'MZ'
1120
+ | 'MM'
1121
+ | 'NA'
1122
+ | 'NR'
1123
+ | 'NP'
1124
+ | 'NL'
1125
+ | 'NC'
1126
+ | 'NZ'
1127
+ | 'NI'
1128
+ | 'NE'
1129
+ | 'NG'
1130
+ | 'NU'
1131
+ | 'NF'
1132
+ | 'MP'
1133
+ | 'MK'
1134
+ | 'NO'
1135
+ | 'OM'
1136
+ | 'PK'
1137
+ | 'PW'
1138
+ | 'PS'
1139
+ | 'PA'
1140
+ | 'PG'
1141
+ | 'PY'
1142
+ | 'PE'
1143
+ | 'PH'
1144
+ | 'PN'
1145
+ | 'PL'
1146
+ | 'PT'
1147
+ | 'PR'
1148
+ | 'QA'
1149
+ | 'RE'
1150
+ | 'RO'
1151
+ | 'RU'
1152
+ | 'RW'
1153
+ | 'SH'
1154
+ | 'KN'
1155
+ | 'LC'
1156
+ | 'PM'
1157
+ | 'VC'
1158
+ | 'WS'
1159
+ | 'SM'
1160
+ | 'ST'
1161
+ | 'SA'
1162
+ | 'SN'
1163
+ | 'SC'
1164
+ | 'SL'
1165
+ | 'SG'
1166
+ | 'SK'
1167
+ | 'SI'
1168
+ | 'SB'
1169
+ | 'SO'
1170
+ | 'ZA'
1171
+ | 'GS'
1172
+ | 'ES'
1173
+ | 'LK'
1174
+ | 'SD'
1175
+ | 'SR'
1176
+ | 'SJ'
1177
+ | 'SZ'
1178
+ | 'SE'
1179
+ | 'CH'
1180
+ | 'SY'
1181
+ | 'TW'
1182
+ | 'TJ'
1183
+ | 'TZ'
1184
+ | 'TH'
1185
+ | 'TL'
1186
+ | 'TG'
1187
+ | 'TK'
1188
+ | 'TO'
1189
+ | 'TT'
1190
+ | 'TN'
1191
+ | 'TR'
1192
+ | 'TM'
1193
+ | 'TC'
1194
+ | 'TV'
1195
+ | 'UG'
1196
+ | 'UA'
1197
+ | 'AE'
1198
+ | 'GB'
1199
+ | 'US'
1200
+ | 'UM'
1201
+ | 'UY'
1202
+ | 'UZ'
1203
+ | 'VU'
1204
+ | 'VE'
1205
+ | 'VN'
1206
+ | 'VG'
1207
+ | 'VI'
1208
+ | 'WF'
1209
+ | 'EH'
1210
+ | 'YE'
1211
+ | 'ZM'
1212
+ | 'ZW'
1213
+ | 'AX'
1214
+ | 'BQ'
1215
+ | 'CW'
1216
+ | 'GG'
1217
+ | 'IM'
1218
+ | 'JE'
1219
+ | 'ME'
1220
+ | 'BL'
1221
+ | 'MF'
1222
+ | 'RS'
1223
+ | 'SX'
1224
+ | 'SS'
1225
+ | 'XK';
1226
+
1227
+ /**
1228
+ * Date of birth in YYYY-MM-DD (UTC) format.
1229
+ */
1230
+ date_of_birth: string;
1231
+
1232
+ /**
1233
+ * Government-issued identification. Discriminated union with type: "id" (generic
1234
+ * ID), "ssn" (Social Security Number, format ###-##-####), or "itin" (Individual
1235
+ * Taxpayer ID, format 9##-##-####).
1236
+ */
1237
+ identification:
1238
+ | BeneficiaryData.UnionMember0
1239
+ | BeneficiaryData.UnionMember1
1240
+ | BeneficiaryData.UnionMember2;
1241
+
1242
+ /**
1243
+ * Full legal name of the account holder.
1244
+ */
1245
+ legal_name: string;
1246
+
1247
+ /**
1248
+ * Residential address of the account holder.
1249
+ */
1250
+ residential_address: BeneficiaryData.ResidentialAddress;
1251
+ }
1252
+
1253
+ export namespace BeneficiaryData {
1254
+ export interface UnionMember0 {
1255
+ type: 'id';
1256
+
1257
+ value: string;
1258
+ }
1259
+
1260
+ export interface UnionMember1 {
1261
+ type: 'ssn';
1262
+
1263
+ value: string;
1264
+ }
1265
+
1266
+ export interface UnionMember2 {
1267
+ type: 'itin';
1268
+
1269
+ value: string;
1270
+ }
1271
+
1272
+ /**
1273
+ * Residential address of the account holder.
1274
+ */
1275
+ export interface ResidentialAddress {
1276
+ /**
1277
+ * City name.
1278
+ */
1279
+ city: string;
1280
+
1281
+ /**
1282
+ * ISO 3166-1 alpha-2 country code.
1283
+ */
1284
+ country:
1285
+ | 'AF'
1286
+ | 'AL'
1287
+ | 'DZ'
1288
+ | 'AS'
1289
+ | 'AD'
1290
+ | 'AO'
1291
+ | 'AI'
1292
+ | 'AQ'
1293
+ | 'AG'
1294
+ | 'AR'
1295
+ | 'AM'
1296
+ | 'AW'
1297
+ | 'AU'
1298
+ | 'AT'
1299
+ | 'AZ'
1300
+ | 'BS'
1301
+ | 'BH'
1302
+ | 'BD'
1303
+ | 'BB'
1304
+ | 'BY'
1305
+ | 'BE'
1306
+ | 'BZ'
1307
+ | 'BJ'
1308
+ | 'BM'
1309
+ | 'BT'
1310
+ | 'BO'
1311
+ | 'BA'
1312
+ | 'BW'
1313
+ | 'BV'
1314
+ | 'BR'
1315
+ | 'IO'
1316
+ | 'BN'
1317
+ | 'BG'
1318
+ | 'BF'
1319
+ | 'BI'
1320
+ | 'KH'
1321
+ | 'CM'
1322
+ | 'CA'
1323
+ | 'CV'
1324
+ | 'KY'
1325
+ | 'CF'
1326
+ | 'TD'
1327
+ | 'CL'
1328
+ | 'CN'
1329
+ | 'CX'
1330
+ | 'CC'
1331
+ | 'CO'
1332
+ | 'KM'
1333
+ | 'CG'
1334
+ | 'CD'
1335
+ | 'CK'
1336
+ | 'CR'
1337
+ | 'CI'
1338
+ | 'HR'
1339
+ | 'CU'
1340
+ | 'CY'
1341
+ | 'CZ'
1342
+ | 'DK'
1343
+ | 'DJ'
1344
+ | 'DM'
1345
+ | 'DO'
1346
+ | 'EC'
1347
+ | 'EG'
1348
+ | 'SV'
1349
+ | 'GQ'
1350
+ | 'ER'
1351
+ | 'EE'
1352
+ | 'ET'
1353
+ | 'FK'
1354
+ | 'FO'
1355
+ | 'FJ'
1356
+ | 'FI'
1357
+ | 'FR'
1358
+ | 'GF'
1359
+ | 'PF'
1360
+ | 'TF'
1361
+ | 'GA'
1362
+ | 'GM'
1363
+ | 'GE'
1364
+ | 'DE'
1365
+ | 'GH'
1366
+ | 'GI'
1367
+ | 'GR'
1368
+ | 'GL'
1369
+ | 'GD'
1370
+ | 'GP'
1371
+ | 'GU'
1372
+ | 'GT'
1373
+ | 'GN'
1374
+ | 'GW'
1375
+ | 'GY'
1376
+ | 'HT'
1377
+ | 'HM'
1378
+ | 'VA'
1379
+ | 'HN'
1380
+ | 'HK'
1381
+ | 'HU'
1382
+ | 'IS'
1383
+ | 'IN'
1384
+ | 'ID'
1385
+ | 'IR'
1386
+ | 'IQ'
1387
+ | 'IE'
1388
+ | 'IL'
1389
+ | 'IT'
1390
+ | 'JM'
1391
+ | 'JP'
1392
+ | 'JO'
1393
+ | 'KZ'
1394
+ | 'KE'
1395
+ | 'KI'
1396
+ | 'KP'
1397
+ | 'KR'
1398
+ | 'KW'
1399
+ | 'KG'
1400
+ | 'LA'
1401
+ | 'LV'
1402
+ | 'LB'
1403
+ | 'LS'
1404
+ | 'LR'
1405
+ | 'LY'
1406
+ | 'LI'
1407
+ | 'LT'
1408
+ | 'LU'
1409
+ | 'MO'
1410
+ | 'MG'
1411
+ | 'MW'
1412
+ | 'MY'
1413
+ | 'MV'
1414
+ | 'ML'
1415
+ | 'MT'
1416
+ | 'MH'
1417
+ | 'MQ'
1418
+ | 'MR'
1419
+ | 'MU'
1420
+ | 'YT'
1421
+ | 'MX'
1422
+ | 'FM'
1423
+ | 'MD'
1424
+ | 'MC'
1425
+ | 'MN'
1426
+ | 'MS'
1427
+ | 'MA'
1428
+ | 'MZ'
1429
+ | 'MM'
1430
+ | 'NA'
1431
+ | 'NR'
1432
+ | 'NP'
1433
+ | 'NL'
1434
+ | 'NC'
1435
+ | 'NZ'
1436
+ | 'NI'
1437
+ | 'NE'
1438
+ | 'NG'
1439
+ | 'NU'
1440
+ | 'NF'
1441
+ | 'MP'
1442
+ | 'MK'
1443
+ | 'NO'
1444
+ | 'OM'
1445
+ | 'PK'
1446
+ | 'PW'
1447
+ | 'PS'
1448
+ | 'PA'
1449
+ | 'PG'
1450
+ | 'PY'
1451
+ | 'PE'
1452
+ | 'PH'
1453
+ | 'PN'
1454
+ | 'PL'
1455
+ | 'PT'
1456
+ | 'PR'
1457
+ | 'QA'
1458
+ | 'RE'
1459
+ | 'RO'
1460
+ | 'RU'
1461
+ | 'RW'
1462
+ | 'SH'
1463
+ | 'KN'
1464
+ | 'LC'
1465
+ | 'PM'
1466
+ | 'VC'
1467
+ | 'WS'
1468
+ | 'SM'
1469
+ | 'ST'
1470
+ | 'SA'
1471
+ | 'SN'
1472
+ | 'SC'
1473
+ | 'SL'
1474
+ | 'SG'
1475
+ | 'SK'
1476
+ | 'SI'
1477
+ | 'SB'
1478
+ | 'SO'
1479
+ | 'ZA'
1480
+ | 'GS'
1481
+ | 'ES'
1482
+ | 'LK'
1483
+ | 'SD'
1484
+ | 'SR'
1485
+ | 'SJ'
1486
+ | 'SZ'
1487
+ | 'SE'
1488
+ | 'CH'
1489
+ | 'SY'
1490
+ | 'TW'
1491
+ | 'TJ'
1492
+ | 'TZ'
1493
+ | 'TH'
1494
+ | 'TL'
1495
+ | 'TG'
1496
+ | 'TK'
1497
+ | 'TO'
1498
+ | 'TT'
1499
+ | 'TN'
1500
+ | 'TR'
1501
+ | 'TM'
1502
+ | 'TC'
1503
+ | 'TV'
1504
+ | 'UG'
1505
+ | 'UA'
1506
+ | 'AE'
1507
+ | 'GB'
1508
+ | 'US'
1509
+ | 'UM'
1510
+ | 'UY'
1511
+ | 'UZ'
1512
+ | 'VU'
1513
+ | 'VE'
1514
+ | 'VN'
1515
+ | 'VG'
1516
+ | 'VI'
1517
+ | 'WF'
1518
+ | 'EH'
1519
+ | 'YE'
1520
+ | 'ZM'
1521
+ | 'ZW'
1522
+ | 'AX'
1523
+ | 'BQ'
1524
+ | 'CW'
1525
+ | 'GG'
1526
+ | 'IM'
1527
+ | 'JE'
1528
+ | 'ME'
1529
+ | 'BL'
1530
+ | 'MF'
1531
+ | 'RS'
1532
+ | 'SX'
1533
+ | 'SS'
1534
+ | 'XK';
1535
+
1536
+ /**
1537
+ * Postal or ZIP code.
1538
+ */
1539
+ postal_code: string;
1540
+
1541
+ /**
1542
+ * Primary street address.
1543
+ */
1544
+ street_line_1: string;
1545
+
1546
+ /**
1547
+ * Two-letter state code.
1548
+ */
1549
+ state?: string;
1550
+
1551
+ /**
1552
+ * Secondary street address (apartment, suite, etc.).
1553
+ */
1554
+ street_line_2?: string;
1555
+ }
1556
+ }
1557
+ }
1558
+
1559
+ export interface AccountListParams extends CursorPageParams {
1560
+ /**
1561
+ * Filter by account holder name (case-insensitive phrase match). Crypto wallets
1562
+ * are excluded when set.
1563
+ */
1564
+ account_holder_name?: string;
1565
+
1566
+ /**
1567
+ * Filter by exact fiat account number. Crypto wallets are excluded when set.
1568
+ */
1569
+ account_number?: string;
1570
+
1571
+ /**
1572
+ * ID of the account program to list virtual accounts for.
1573
+ */
1574
+ parent_id?: string;
1575
+
1576
+ /**
1577
+ * Filter by account status.
1578
+ */
1579
+ status?: 'pending' | 'active' | 'frozen';
1580
+ }
1581
+
1582
+ export interface AccountCloseParams {
1583
+ /**
1584
+ * Reason for closing the account.
1585
+ */
1586
+ reason: 'aml_risk_fraud' | 'client_request';
1587
+ }
1588
+
1589
+ export declare namespace Accounts {
1590
+ export {
1591
+ type AccountCreateResponse as AccountCreateResponse,
1592
+ type AccountRetrieveResponse as AccountRetrieveResponse,
1593
+ type AccountListResponse as AccountListResponse,
1594
+ type AccountCloseResponse as AccountCloseResponse,
1595
+ type AccountFreezeResponse as AccountFreezeResponse,
1596
+ type AccountRetrieveBalanceResponse as AccountRetrieveBalanceResponse,
1597
+ type AccountUnfreezeResponse as AccountUnfreezeResponse,
1598
+ type AccountListResponsesCursorPage as AccountListResponsesCursorPage,
1599
+ type AccountCreateParams as AccountCreateParams,
1600
+ type AccountListParams as AccountListParams,
1601
+ type AccountCloseParams as AccountCloseParams,
1602
+ };
1603
+ }