@lightsparkdev/grid 0.2.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 (610) hide show
  1. package/.DS_Store +0 -0
  2. package/CHANGELOG.md +85 -0
  3. package/LICENSE +201 -0
  4. package/README.md +516 -0
  5. package/api-promise.d.mts +2 -0
  6. package/api-promise.d.mts.map +1 -0
  7. package/api-promise.d.ts +2 -0
  8. package/api-promise.d.ts.map +1 -0
  9. package/api-promise.js +6 -0
  10. package/api-promise.js.map +1 -0
  11. package/api-promise.mjs +2 -0
  12. package/api-promise.mjs.map +1 -0
  13. package/client.d.mts +302 -0
  14. package/client.d.mts.map +1 -0
  15. package/client.d.ts +302 -0
  16. package/client.d.ts.map +1 -0
  17. package/client.js +588 -0
  18. package/client.js.map +1 -0
  19. package/client.mjs +584 -0
  20. package/client.mjs.map +1 -0
  21. package/core/api-promise.d.mts +46 -0
  22. package/core/api-promise.d.mts.map +1 -0
  23. package/core/api-promise.d.ts +46 -0
  24. package/core/api-promise.d.ts.map +1 -0
  25. package/core/api-promise.js +74 -0
  26. package/core/api-promise.js.map +1 -0
  27. package/core/api-promise.mjs +70 -0
  28. package/core/api-promise.mjs.map +1 -0
  29. package/core/error.d.mts +2055 -0
  30. package/core/error.d.mts.map +1 -0
  31. package/core/error.d.ts +2055 -0
  32. package/core/error.d.ts.map +1 -0
  33. package/core/error.js +857 -0
  34. package/core/error.js.map +1 -0
  35. package/core/error.mjs +787 -0
  36. package/core/error.mjs.map +1 -0
  37. package/core/pagination.d.mts +58 -0
  38. package/core/pagination.d.mts.map +1 -0
  39. package/core/pagination.d.ts +58 -0
  40. package/core/pagination.d.ts.map +1 -0
  41. package/core/pagination.js +109 -0
  42. package/core/pagination.js.map +1 -0
  43. package/core/pagination.mjs +103 -0
  44. package/core/pagination.mjs.map +1 -0
  45. package/core/resource.d.mts +6 -0
  46. package/core/resource.d.mts.map +1 -0
  47. package/core/resource.d.ts +6 -0
  48. package/core/resource.d.ts.map +1 -0
  49. package/core/resource.js +11 -0
  50. package/core/resource.js.map +1 -0
  51. package/core/resource.mjs +7 -0
  52. package/core/resource.mjs.map +1 -0
  53. package/core/uploads.d.mts +3 -0
  54. package/core/uploads.d.mts.map +1 -0
  55. package/core/uploads.d.ts +3 -0
  56. package/core/uploads.d.ts.map +1 -0
  57. package/core/uploads.js +6 -0
  58. package/core/uploads.js.map +1 -0
  59. package/core/uploads.mjs +2 -0
  60. package/core/uploads.mjs.map +1 -0
  61. package/error.d.mts +2 -0
  62. package/error.d.mts.map +1 -0
  63. package/error.d.ts +2 -0
  64. package/error.d.ts.map +1 -0
  65. package/error.js +6 -0
  66. package/error.js.map +1 -0
  67. package/error.mjs +2 -0
  68. package/error.mjs.map +1 -0
  69. package/index.d.mts +7 -0
  70. package/index.d.mts.map +1 -0
  71. package/index.d.ts +7 -0
  72. package/index.d.ts.map +1 -0
  73. package/index.js +86 -0
  74. package/index.js.map +1 -0
  75. package/index.mjs +8 -0
  76. package/index.mjs.map +1 -0
  77. package/internal/.DS_Store +0 -0
  78. package/internal/builtin-types.d.mts +73 -0
  79. package/internal/builtin-types.d.mts.map +1 -0
  80. package/internal/builtin-types.d.ts +73 -0
  81. package/internal/builtin-types.d.ts.map +1 -0
  82. package/internal/builtin-types.js +4 -0
  83. package/internal/builtin-types.js.map +1 -0
  84. package/internal/builtin-types.mjs +3 -0
  85. package/internal/builtin-types.mjs.map +1 -0
  86. package/internal/detect-platform.d.mts +15 -0
  87. package/internal/detect-platform.d.mts.map +1 -0
  88. package/internal/detect-platform.d.ts +15 -0
  89. package/internal/detect-platform.d.ts.map +1 -0
  90. package/internal/detect-platform.js +162 -0
  91. package/internal/detect-platform.js.map +1 -0
  92. package/internal/detect-platform.mjs +157 -0
  93. package/internal/detect-platform.mjs.map +1 -0
  94. package/internal/errors.d.mts +3 -0
  95. package/internal/errors.d.mts.map +1 -0
  96. package/internal/errors.d.ts +3 -0
  97. package/internal/errors.d.ts.map +1 -0
  98. package/internal/errors.js +41 -0
  99. package/internal/errors.js.map +1 -0
  100. package/internal/errors.mjs +36 -0
  101. package/internal/errors.mjs.map +1 -0
  102. package/internal/headers.d.mts +20 -0
  103. package/internal/headers.d.mts.map +1 -0
  104. package/internal/headers.d.ts +20 -0
  105. package/internal/headers.d.ts.map +1 -0
  106. package/internal/headers.js +79 -0
  107. package/internal/headers.js.map +1 -0
  108. package/internal/headers.mjs +74 -0
  109. package/internal/headers.mjs.map +1 -0
  110. package/internal/parse.d.mts +12 -0
  111. package/internal/parse.d.mts.map +1 -0
  112. package/internal/parse.d.ts +12 -0
  113. package/internal/parse.d.ts.map +1 -0
  114. package/internal/parse.js +40 -0
  115. package/internal/parse.js.map +1 -0
  116. package/internal/parse.mjs +37 -0
  117. package/internal/parse.mjs.map +1 -0
  118. package/internal/qs/formats.d.mts +7 -0
  119. package/internal/qs/formats.d.mts.map +1 -0
  120. package/internal/qs/formats.d.ts +7 -0
  121. package/internal/qs/formats.d.ts.map +1 -0
  122. package/internal/qs/formats.js +13 -0
  123. package/internal/qs/formats.js.map +1 -0
  124. package/internal/qs/formats.mjs +9 -0
  125. package/internal/qs/formats.mjs.map +1 -0
  126. package/internal/qs/index.d.mts +10 -0
  127. package/internal/qs/index.d.mts.map +1 -0
  128. package/internal/qs/index.d.ts +10 -0
  129. package/internal/qs/index.d.ts.map +1 -0
  130. package/internal/qs/index.js +14 -0
  131. package/internal/qs/index.js.map +1 -0
  132. package/internal/qs/index.mjs +10 -0
  133. package/internal/qs/index.mjs.map +1 -0
  134. package/internal/qs/stringify.d.mts +3 -0
  135. package/internal/qs/stringify.d.mts.map +1 -0
  136. package/internal/qs/stringify.d.ts +3 -0
  137. package/internal/qs/stringify.d.ts.map +1 -0
  138. package/internal/qs/stringify.js +277 -0
  139. package/internal/qs/stringify.js.map +1 -0
  140. package/internal/qs/stringify.mjs +274 -0
  141. package/internal/qs/stringify.mjs.map +1 -0
  142. package/internal/qs/types.d.mts +57 -0
  143. package/internal/qs/types.d.mts.map +1 -0
  144. package/internal/qs/types.d.ts +57 -0
  145. package/internal/qs/types.d.ts.map +1 -0
  146. package/internal/qs/types.js +3 -0
  147. package/internal/qs/types.js.map +1 -0
  148. package/internal/qs/types.mjs +2 -0
  149. package/internal/qs/types.mjs.map +1 -0
  150. package/internal/qs/utils.d.mts +15 -0
  151. package/internal/qs/utils.d.mts.map +1 -0
  152. package/internal/qs/utils.d.ts +15 -0
  153. package/internal/qs/utils.d.ts.map +1 -0
  154. package/internal/qs/utils.js +230 -0
  155. package/internal/qs/utils.js.map +1 -0
  156. package/internal/qs/utils.mjs +217 -0
  157. package/internal/qs/utils.mjs.map +1 -0
  158. package/internal/request-options.d.mts +75 -0
  159. package/internal/request-options.d.mts.map +1 -0
  160. package/internal/request-options.d.ts +75 -0
  161. package/internal/request-options.d.ts.map +1 -0
  162. package/internal/request-options.js +14 -0
  163. package/internal/request-options.js.map +1 -0
  164. package/internal/request-options.mjs +10 -0
  165. package/internal/request-options.mjs.map +1 -0
  166. package/internal/shim-types.d.mts +17 -0
  167. package/internal/shim-types.d.mts.map +1 -0
  168. package/internal/shim-types.d.ts +17 -0
  169. package/internal/shim-types.d.ts.map +1 -0
  170. package/internal/shim-types.js +4 -0
  171. package/internal/shim-types.js.map +1 -0
  172. package/internal/shim-types.mjs +3 -0
  173. package/internal/shim-types.mjs.map +1 -0
  174. package/internal/shims.d.mts +20 -0
  175. package/internal/shims.d.mts.map +1 -0
  176. package/internal/shims.d.ts +20 -0
  177. package/internal/shims.d.ts.map +1 -0
  178. package/internal/shims.js +92 -0
  179. package/internal/shims.js.map +1 -0
  180. package/internal/shims.mjs +85 -0
  181. package/internal/shims.mjs.map +1 -0
  182. package/internal/to-file.d.mts +45 -0
  183. package/internal/to-file.d.mts.map +1 -0
  184. package/internal/to-file.d.ts +45 -0
  185. package/internal/to-file.d.ts.map +1 -0
  186. package/internal/to-file.js +91 -0
  187. package/internal/to-file.js.map +1 -0
  188. package/internal/to-file.mjs +88 -0
  189. package/internal/to-file.mjs.map +1 -0
  190. package/internal/tslib.js +81 -0
  191. package/internal/tslib.mjs +17 -0
  192. package/internal/types.d.mts +69 -0
  193. package/internal/types.d.mts.map +1 -0
  194. package/internal/types.d.ts +69 -0
  195. package/internal/types.d.ts.map +1 -0
  196. package/internal/types.js +4 -0
  197. package/internal/types.js.map +1 -0
  198. package/internal/types.mjs +3 -0
  199. package/internal/types.mjs.map +1 -0
  200. package/internal/uploads.d.mts +42 -0
  201. package/internal/uploads.d.mts.map +1 -0
  202. package/internal/uploads.d.ts +42 -0
  203. package/internal/uploads.d.ts.map +1 -0
  204. package/internal/uploads.js +141 -0
  205. package/internal/uploads.js.map +1 -0
  206. package/internal/uploads.mjs +131 -0
  207. package/internal/uploads.mjs.map +1 -0
  208. package/internal/utils/base64.d.mts +3 -0
  209. package/internal/utils/base64.d.mts.map +1 -0
  210. package/internal/utils/base64.d.ts +3 -0
  211. package/internal/utils/base64.d.ts.map +1 -0
  212. package/internal/utils/base64.js +38 -0
  213. package/internal/utils/base64.js.map +1 -0
  214. package/internal/utils/base64.mjs +33 -0
  215. package/internal/utils/base64.mjs.map +1 -0
  216. package/internal/utils/bytes.d.mts +4 -0
  217. package/internal/utils/bytes.d.mts.map +1 -0
  218. package/internal/utils/bytes.d.ts +4 -0
  219. package/internal/utils/bytes.d.ts.map +1 -0
  220. package/internal/utils/bytes.js +31 -0
  221. package/internal/utils/bytes.js.map +1 -0
  222. package/internal/utils/bytes.mjs +26 -0
  223. package/internal/utils/bytes.mjs.map +1 -0
  224. package/internal/utils/env.d.mts +9 -0
  225. package/internal/utils/env.d.mts.map +1 -0
  226. package/internal/utils/env.d.ts +9 -0
  227. package/internal/utils/env.d.ts.map +1 -0
  228. package/internal/utils/env.js +22 -0
  229. package/internal/utils/env.js.map +1 -0
  230. package/internal/utils/env.mjs +18 -0
  231. package/internal/utils/env.mjs.map +1 -0
  232. package/internal/utils/log.d.mts +37 -0
  233. package/internal/utils/log.d.mts.map +1 -0
  234. package/internal/utils/log.d.ts +37 -0
  235. package/internal/utils/log.d.ts.map +1 -0
  236. package/internal/utils/log.js +86 -0
  237. package/internal/utils/log.js.map +1 -0
  238. package/internal/utils/log.mjs +80 -0
  239. package/internal/utils/log.mjs.map +1 -0
  240. package/internal/utils/path.d.mts +15 -0
  241. package/internal/utils/path.d.mts.map +1 -0
  242. package/internal/utils/path.d.ts +15 -0
  243. package/internal/utils/path.d.ts.map +1 -0
  244. package/internal/utils/path.js +79 -0
  245. package/internal/utils/path.js.map +1 -0
  246. package/internal/utils/path.mjs +74 -0
  247. package/internal/utils/path.mjs.map +1 -0
  248. package/internal/utils/sleep.d.mts +2 -0
  249. package/internal/utils/sleep.d.mts.map +1 -0
  250. package/internal/utils/sleep.d.ts +2 -0
  251. package/internal/utils/sleep.d.ts.map +1 -0
  252. package/internal/utils/sleep.js +7 -0
  253. package/internal/utils/sleep.js.map +1 -0
  254. package/internal/utils/sleep.mjs +3 -0
  255. package/internal/utils/sleep.mjs.map +1 -0
  256. package/internal/utils/uuid.d.mts +5 -0
  257. package/internal/utils/uuid.d.mts.map +1 -0
  258. package/internal/utils/uuid.d.ts +5 -0
  259. package/internal/utils/uuid.d.ts.map +1 -0
  260. package/internal/utils/uuid.js +19 -0
  261. package/internal/utils/uuid.js.map +1 -0
  262. package/internal/utils/uuid.mjs +15 -0
  263. package/internal/utils/uuid.mjs.map +1 -0
  264. package/internal/utils/values.d.mts +18 -0
  265. package/internal/utils/values.d.mts.map +1 -0
  266. package/internal/utils/values.d.ts +18 -0
  267. package/internal/utils/values.d.ts.map +1 -0
  268. package/internal/utils/values.js +112 -0
  269. package/internal/utils/values.js.map +1 -0
  270. package/internal/utils/values.mjs +94 -0
  271. package/internal/utils/values.mjs.map +1 -0
  272. package/internal/utils.d.mts +7 -0
  273. package/internal/utils.d.mts.map +1 -0
  274. package/internal/utils.d.ts +7 -0
  275. package/internal/utils.d.ts.map +1 -0
  276. package/internal/utils.js +11 -0
  277. package/internal/utils.js.map +1 -0
  278. package/internal/utils.mjs +8 -0
  279. package/internal/utils.mjs.map +1 -0
  280. package/package.json +147 -0
  281. package/pagination.d.mts +2 -0
  282. package/pagination.d.mts.map +1 -0
  283. package/pagination.d.ts +2 -0
  284. package/pagination.d.ts.map +1 -0
  285. package/pagination.js +6 -0
  286. package/pagination.js.map +1 -0
  287. package/pagination.mjs +2 -0
  288. package/pagination.mjs.map +1 -0
  289. package/resource.d.mts +2 -0
  290. package/resource.d.mts.map +1 -0
  291. package/resource.d.ts +2 -0
  292. package/resource.d.ts.map +1 -0
  293. package/resource.js +6 -0
  294. package/resource.js.map +1 -0
  295. package/resource.mjs +2 -0
  296. package/resource.mjs.map +1 -0
  297. package/resources/.DS_Store +0 -0
  298. package/resources/config.d.mts +130 -0
  299. package/resources/config.d.mts.map +1 -0
  300. package/resources/config.d.ts +130 -0
  301. package/resources/config.d.ts.map +1 -0
  302. package/resources/config.js +47 -0
  303. package/resources/config.js.map +1 -0
  304. package/resources/config.mjs +43 -0
  305. package/resources/config.mjs.map +1 -0
  306. package/resources/customers/bulk.d.mts +170 -0
  307. package/resources/customers/bulk.d.mts.map +1 -0
  308. package/resources/customers/bulk.d.ts +170 -0
  309. package/resources/customers/bulk.d.ts.map +1 -0
  310. package/resources/customers/bulk.js +103 -0
  311. package/resources/customers/bulk.js.map +1 -0
  312. package/resources/customers/bulk.mjs +99 -0
  313. package/resources/customers/bulk.mjs.map +1 -0
  314. package/resources/customers/customers.d.mts +1238 -0
  315. package/resources/customers/customers.d.mts.map +1 -0
  316. package/resources/customers/customers.d.ts +1238 -0
  317. package/resources/customers/customers.d.ts.map +1 -0
  318. package/resources/customers/customers.js +130 -0
  319. package/resources/customers/customers.js.map +1 -0
  320. package/resources/customers/customers.mjs +125 -0
  321. package/resources/customers/customers.mjs.map +1 -0
  322. package/resources/customers/external-accounts.d.mts +461 -0
  323. package/resources/customers/external-accounts.d.mts.map +1 -0
  324. package/resources/customers/external-accounts.d.ts +461 -0
  325. package/resources/customers/external-accounts.d.ts.map +1 -0
  326. package/resources/customers/external-accounts.js +83 -0
  327. package/resources/customers/external-accounts.js.map +1 -0
  328. package/resources/customers/external-accounts.mjs +79 -0
  329. package/resources/customers/external-accounts.mjs.map +1 -0
  330. package/resources/customers/index.d.mts +4 -0
  331. package/resources/customers/index.d.mts.map +1 -0
  332. package/resources/customers/index.d.ts +4 -0
  333. package/resources/customers/index.d.ts.map +1 -0
  334. package/resources/customers/index.js +11 -0
  335. package/resources/customers/index.js.map +1 -0
  336. package/resources/customers/index.mjs +5 -0
  337. package/resources/customers/index.mjs.map +1 -0
  338. package/resources/customers.d.mts +2 -0
  339. package/resources/customers.d.mts.map +1 -0
  340. package/resources/customers.d.ts +2 -0
  341. package/resources/customers.d.ts.map +1 -0
  342. package/resources/customers.js +6 -0
  343. package/resources/customers.js.map +1 -0
  344. package/resources/customers.mjs +3 -0
  345. package/resources/customers.mjs.map +1 -0
  346. package/resources/exchange-rates.d.mts +101 -0
  347. package/resources/exchange-rates.d.mts.map +1 -0
  348. package/resources/exchange-rates.d.ts +101 -0
  349. package/resources/exchange-rates.d.ts.map +1 -0
  350. package/resources/exchange-rates.js +23 -0
  351. package/resources/exchange-rates.js.map +1 -0
  352. package/resources/exchange-rates.mjs +19 -0
  353. package/resources/exchange-rates.mjs.map +1 -0
  354. package/resources/index.d.mts +16 -0
  355. package/resources/index.d.mts.map +1 -0
  356. package/resources/index.d.ts +16 -0
  357. package/resources/index.d.ts.map +1 -0
  358. package/resources/index.js +35 -0
  359. package/resources/index.js.map +1 -0
  360. package/resources/index.mjs +17 -0
  361. package/resources/index.mjs.map +1 -0
  362. package/resources/invitations.d.mts +166 -0
  363. package/resources/invitations.d.mts.map +1 -0
  364. package/resources/invitations.d.ts +166 -0
  365. package/resources/invitations.d.ts.map +1 -0
  366. package/resources/invitations.js +83 -0
  367. package/resources/invitations.js.map +1 -0
  368. package/resources/invitations.mjs +79 -0
  369. package/resources/invitations.mjs.map +1 -0
  370. package/resources/plaid.d.mts +101 -0
  371. package/resources/plaid.d.mts.map +1 -0
  372. package/resources/plaid.d.ts +101 -0
  373. package/resources/plaid.d.ts.map +1 -0
  374. package/resources/plaid.js +64 -0
  375. package/resources/plaid.js.map +1 -0
  376. package/resources/plaid.mjs +60 -0
  377. package/resources/plaid.mjs.map +1 -0
  378. package/resources/platform/external-accounts.d.mts +111 -0
  379. package/resources/platform/external-accounts.d.mts.map +1 -0
  380. package/resources/platform/external-accounts.d.ts +111 -0
  381. package/resources/platform/external-accounts.d.ts.map +1 -0
  382. package/resources/platform/external-accounts.js +74 -0
  383. package/resources/platform/external-accounts.js.map +1 -0
  384. package/resources/platform/external-accounts.mjs +70 -0
  385. package/resources/platform/external-accounts.mjs.map +1 -0
  386. package/resources/platform/index.d.mts +3 -0
  387. package/resources/platform/index.d.mts.map +1 -0
  388. package/resources/platform/index.d.ts +3 -0
  389. package/resources/platform/index.d.ts.map +1 -0
  390. package/resources/platform/index.js +9 -0
  391. package/resources/platform/index.js.map +1 -0
  392. package/resources/platform/index.mjs +4 -0
  393. package/resources/platform/index.mjs.map +1 -0
  394. package/resources/platform/platform.d.mts +41 -0
  395. package/resources/platform/platform.d.mts.map +1 -0
  396. package/resources/platform/platform.d.ts +41 -0
  397. package/resources/platform/platform.d.ts.map +1 -0
  398. package/resources/platform/platform.js +34 -0
  399. package/resources/platform/platform.js.map +1 -0
  400. package/resources/platform/platform.mjs +29 -0
  401. package/resources/platform/platform.mjs.map +1 -0
  402. package/resources/platform.d.mts +2 -0
  403. package/resources/platform.d.mts.map +1 -0
  404. package/resources/platform.d.ts +2 -0
  405. package/resources/platform.d.ts.map +1 -0
  406. package/resources/platform.js +6 -0
  407. package/resources/platform.js.map +1 -0
  408. package/resources/platform.mjs +3 -0
  409. package/resources/platform.mjs.map +1 -0
  410. package/resources/quotes.d.mts +580 -0
  411. package/resources/quotes.d.mts.map +1 -0
  412. package/resources/quotes.d.ts +580 -0
  413. package/resources/quotes.d.ts.map +1 -0
  414. package/resources/quotes.js +122 -0
  415. package/resources/quotes.js.map +1 -0
  416. package/resources/quotes.mjs +118 -0
  417. package/resources/quotes.mjs.map +1 -0
  418. package/resources/receiver.d.mts +100 -0
  419. package/resources/receiver.d.mts.map +1 -0
  420. package/resources/receiver.d.ts +100 -0
  421. package/resources/receiver.d.ts.map +1 -0
  422. package/resources/receiver.js +27 -0
  423. package/resources/receiver.js.map +1 -0
  424. package/resources/receiver.mjs +23 -0
  425. package/resources/receiver.mjs.map +1 -0
  426. package/resources/sandbox/index.d.mts +4 -0
  427. package/resources/sandbox/index.d.mts.map +1 -0
  428. package/resources/sandbox/index.d.ts +4 -0
  429. package/resources/sandbox/index.d.ts.map +1 -0
  430. package/resources/sandbox/index.js +11 -0
  431. package/resources/sandbox/index.js.map +1 -0
  432. package/resources/sandbox/index.mjs +5 -0
  433. package/resources/sandbox/index.mjs.map +1 -0
  434. package/resources/sandbox/internal-accounts.d.mts +61 -0
  435. package/resources/sandbox/internal-accounts.d.mts.map +1 -0
  436. package/resources/sandbox/internal-accounts.d.ts +61 -0
  437. package/resources/sandbox/internal-accounts.d.ts.map +1 -0
  438. package/resources/sandbox/internal-accounts.js +29 -0
  439. package/resources/sandbox/internal-accounts.js.map +1 -0
  440. package/resources/sandbox/internal-accounts.mjs +25 -0
  441. package/resources/sandbox/internal-accounts.mjs.map +1 -0
  442. package/resources/sandbox/sandbox.d.mts +116 -0
  443. package/resources/sandbox/sandbox.d.mts.map +1 -0
  444. package/resources/sandbox/sandbox.d.ts +116 -0
  445. package/resources/sandbox/sandbox.d.ts.map +1 -0
  446. package/resources/sandbox/sandbox.js +37 -0
  447. package/resources/sandbox/sandbox.js.map +1 -0
  448. package/resources/sandbox/sandbox.mjs +32 -0
  449. package/resources/sandbox/sandbox.mjs.map +1 -0
  450. package/resources/sandbox/uma.d.mts +48 -0
  451. package/resources/sandbox/uma.d.mts.map +1 -0
  452. package/resources/sandbox/uma.d.ts +48 -0
  453. package/resources/sandbox/uma.d.ts.map +1 -0
  454. package/resources/sandbox/uma.js +27 -0
  455. package/resources/sandbox/uma.js.map +1 -0
  456. package/resources/sandbox/uma.mjs +23 -0
  457. package/resources/sandbox/uma.mjs.map +1 -0
  458. package/resources/sandbox.d.mts +2 -0
  459. package/resources/sandbox.d.mts.map +1 -0
  460. package/resources/sandbox.d.ts +2 -0
  461. package/resources/sandbox.d.ts.map +1 -0
  462. package/resources/sandbox.js +6 -0
  463. package/resources/sandbox.js.map +1 -0
  464. package/resources/sandbox.mjs +3 -0
  465. package/resources/sandbox.mjs.map +1 -0
  466. package/resources/tokens.d.mts +131 -0
  467. package/resources/tokens.d.mts.map +1 -0
  468. package/resources/tokens.d.ts +131 -0
  469. package/resources/tokens.d.ts.map +1 -0
  470. package/resources/tokens.js +67 -0
  471. package/resources/tokens.js.map +1 -0
  472. package/resources/tokens.mjs +63 -0
  473. package/resources/tokens.mjs.map +1 -0
  474. package/resources/transactions.d.mts +226 -0
  475. package/resources/transactions.d.mts.map +1 -0
  476. package/resources/transactions.d.ts +226 -0
  477. package/resources/transactions.d.ts.map +1 -0
  478. package/resources/transactions.js +71 -0
  479. package/resources/transactions.js.map +1 -0
  480. package/resources/transactions.mjs +67 -0
  481. package/resources/transactions.mjs.map +1 -0
  482. package/resources/transfer-in.d.mts +154 -0
  483. package/resources/transfer-in.d.mts.map +1 -0
  484. package/resources/transfer-in.d.ts +154 -0
  485. package/resources/transfer-in.d.ts.map +1 -0
  486. package/resources/transfer-in.js +42 -0
  487. package/resources/transfer-in.js.map +1 -0
  488. package/resources/transfer-in.mjs +38 -0
  489. package/resources/transfer-in.mjs.map +1 -0
  490. package/resources/transfer-out.d.mts +70 -0
  491. package/resources/transfer-out.d.mts.map +1 -0
  492. package/resources/transfer-out.d.ts +70 -0
  493. package/resources/transfer-out.d.ts.map +1 -0
  494. package/resources/transfer-out.js +40 -0
  495. package/resources/transfer-out.js.map +1 -0
  496. package/resources/transfer-out.mjs +36 -0
  497. package/resources/transfer-out.mjs.map +1 -0
  498. package/resources/uma-providers.d.mts +70 -0
  499. package/resources/uma-providers.d.mts.map +1 -0
  500. package/resources/uma-providers.d.ts +70 -0
  501. package/resources/uma-providers.d.ts.map +1 -0
  502. package/resources/uma-providers.js +21 -0
  503. package/resources/uma-providers.js.map +1 -0
  504. package/resources/uma-providers.mjs +17 -0
  505. package/resources/uma-providers.mjs.map +1 -0
  506. package/resources/webhooks.d.mts +27 -0
  507. package/resources/webhooks.d.mts.map +1 -0
  508. package/resources/webhooks.d.ts +27 -0
  509. package/resources/webhooks.d.ts.map +1 -0
  510. package/resources/webhooks.js +15 -0
  511. package/resources/webhooks.js.map +1 -0
  512. package/resources/webhooks.mjs +11 -0
  513. package/resources/webhooks.mjs.map +1 -0
  514. package/resources.d.mts +2 -0
  515. package/resources.d.mts.map +1 -0
  516. package/resources.d.ts +2 -0
  517. package/resources.d.ts.map +1 -0
  518. package/resources.js +5 -0
  519. package/resources.js.map +1 -0
  520. package/resources.mjs +2 -0
  521. package/resources.mjs.map +1 -0
  522. package/src/.DS_Store +0 -0
  523. package/src/api-promise.ts +2 -0
  524. package/src/client.ts +1111 -0
  525. package/src/core/README.md +3 -0
  526. package/src/core/api-promise.ts +92 -0
  527. package/src/core/error.ts +2936 -0
  528. package/src/core/pagination.ts +173 -0
  529. package/src/core/resource.ts +11 -0
  530. package/src/core/uploads.ts +2 -0
  531. package/src/error.ts +2 -0
  532. package/src/index.ts +76 -0
  533. package/src/internal/README.md +3 -0
  534. package/src/internal/builtin-types.ts +93 -0
  535. package/src/internal/detect-platform.ts +196 -0
  536. package/src/internal/errors.ts +33 -0
  537. package/src/internal/headers.ts +97 -0
  538. package/src/internal/parse.ts +56 -0
  539. package/src/internal/qs/LICENSE.md +13 -0
  540. package/src/internal/qs/README.md +3 -0
  541. package/src/internal/qs/formats.ts +10 -0
  542. package/src/internal/qs/index.ts +13 -0
  543. package/src/internal/qs/stringify.ts +385 -0
  544. package/src/internal/qs/types.ts +71 -0
  545. package/src/internal/qs/utils.ts +265 -0
  546. package/src/internal/request-options.ts +91 -0
  547. package/src/internal/shim-types.ts +26 -0
  548. package/src/internal/shims.ts +107 -0
  549. package/src/internal/to-file.ts +154 -0
  550. package/src/internal/types.ts +95 -0
  551. package/src/internal/uploads.ts +187 -0
  552. package/src/internal/utils/base64.ts +40 -0
  553. package/src/internal/utils/bytes.ts +32 -0
  554. package/src/internal/utils/env.ts +18 -0
  555. package/src/internal/utils/log.ts +127 -0
  556. package/src/internal/utils/path.ts +88 -0
  557. package/src/internal/utils/sleep.ts +3 -0
  558. package/src/internal/utils/uuid.ts +17 -0
  559. package/src/internal/utils/values.ts +105 -0
  560. package/src/internal/utils.ts +8 -0
  561. package/src/lib/.keep +4 -0
  562. package/src/pagination.ts +2 -0
  563. package/src/resource.ts +2 -0
  564. package/src/resources/config.ts +178 -0
  565. package/src/resources/customers/bulk.ts +201 -0
  566. package/src/resources/customers/customers.ts +1687 -0
  567. package/src/resources/customers/external-accounts.ts +630 -0
  568. package/src/resources/customers/index.ts +51 -0
  569. package/src/resources/customers.ts +3 -0
  570. package/src/resources/exchange-rates.ts +127 -0
  571. package/src/resources/index.ts +104 -0
  572. package/src/resources/invitations.ts +207 -0
  573. package/src/resources/plaid.ts +128 -0
  574. package/src/resources/platform/external-accounts.ts +136 -0
  575. package/src/resources/platform/index.ts +13 -0
  576. package/src/resources/platform/platform.ts +70 -0
  577. package/src/resources/platform.ts +3 -0
  578. package/src/resources/quotes.ts +726 -0
  579. package/src/resources/receiver.ts +139 -0
  580. package/src/resources/sandbox/index.ts +10 -0
  581. package/src/resources/sandbox/internal-accounts.ts +82 -0
  582. package/src/resources/sandbox/sandbox.ts +159 -0
  583. package/src/resources/sandbox/uma.ts +61 -0
  584. package/src/resources/sandbox.ts +3 -0
  585. package/src/resources/tokens.ts +176 -0
  586. package/src/resources/transactions.ts +312 -0
  587. package/src/resources/transfer-in.ts +193 -0
  588. package/src/resources/transfer-out.ts +90 -0
  589. package/src/resources/uma-providers.ts +98 -0
  590. package/src/resources/webhooks.ts +35 -0
  591. package/src/resources.ts +1 -0
  592. package/src/tsconfig.json +11 -0
  593. package/src/uploads.ts +2 -0
  594. package/src/version.ts +1 -0
  595. package/uploads.d.mts +2 -0
  596. package/uploads.d.mts.map +1 -0
  597. package/uploads.d.ts +2 -0
  598. package/uploads.d.ts.map +1 -0
  599. package/uploads.js +6 -0
  600. package/uploads.js.map +1 -0
  601. package/uploads.mjs +2 -0
  602. package/uploads.mjs.map +1 -0
  603. package/version.d.mts +2 -0
  604. package/version.d.mts.map +1 -0
  605. package/version.d.ts +2 -0
  606. package/version.d.ts.map +1 -0
  607. package/version.js +5 -0
  608. package/version.js.map +1 -0
  609. package/version.mjs +2 -0
  610. package/version.mjs.map +1 -0
@@ -0,0 +1,2936 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { castToError } from '../internal/errors';
4
+
5
+ export class LightsparkGridError extends Error {}
6
+
7
+ export class APIError<
8
+ TStatus extends number | undefined = number | undefined,
9
+ THeaders extends Headers | undefined = Headers | undefined,
10
+ TError extends Object | undefined = Object | undefined,
11
+ > extends LightsparkGridError {
12
+ /** HTTP status for the response that caused the error */
13
+ readonly status: TStatus;
14
+ /** HTTP headers for the response that caused the error */
15
+ readonly headers: THeaders;
16
+ /** JSON body of the response that caused the error */
17
+ readonly error: TError;
18
+
19
+ constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders) {
20
+ super(`${APIError.makeMessage(status, error, message)}`);
21
+ this.status = status;
22
+ this.headers = headers;
23
+ this.error = error;
24
+ }
25
+
26
+ private static makeMessage(status: number | undefined, error: any, message: string | undefined) {
27
+ const msg =
28
+ error?.message ?
29
+ typeof error.message === 'string' ?
30
+ error.message
31
+ : JSON.stringify(error.message)
32
+ : error ? JSON.stringify(error)
33
+ : message;
34
+
35
+ if (status && msg) {
36
+ return `${status} ${msg}`;
37
+ }
38
+ if (status) {
39
+ return `${status} status code (no body)`;
40
+ }
41
+ if (msg) {
42
+ return msg;
43
+ }
44
+ return '(no status code or body)';
45
+ }
46
+
47
+ static generate(
48
+ status: number | undefined,
49
+ errorResponse: Object | undefined,
50
+ message: string | undefined,
51
+ headers: Headers | undefined,
52
+ ): APIError {
53
+ if (!status || !headers) {
54
+ return new APIConnectionError({ message, cause: castToError(errorResponse) });
55
+ }
56
+
57
+ const error = errorResponse as Record<string, any>;
58
+
59
+ const code = error?.['code'];
60
+
61
+ if (code === 'AMOUNT_OUT_OF_RANGE' && status === 400) {
62
+ return new AmountOutOfRange(status, error, message, headers);
63
+ }
64
+
65
+ if (code === 'CERT_CHAIN_EXPIRED' && status === 400) {
66
+ return new CertChainExpired(status, error, message, headers);
67
+ }
68
+
69
+ if (code === 'CERT_CHAIN_INVALID' && status === 400) {
70
+ return new CertChainInvalid(status, error, message, headers);
71
+ }
72
+
73
+ if (code === 'INVALID_AMOUNT' && status === 400) {
74
+ return new InvalidAmount(status, error, message, headers);
75
+ }
76
+
77
+ if (code === 'INVALID_BANK_ACCOUNT' && status === 400) {
78
+ return new InvalidBankAccount(status, error, message, headers);
79
+ }
80
+
81
+ if (code === 'INVALID_CURRENCY' && status === 400) {
82
+ return new InvalidCurrency(status, error, message, headers);
83
+ }
84
+
85
+ if (code === 'INVALID_INPUT' && status === 400) {
86
+ return new InvalidInput(status, error, message, headers);
87
+ }
88
+
89
+ if (code === 'INVALID_NONCE' && status === 400) {
90
+ return new InvalidNonce(status, error, message, headers);
91
+ }
92
+
93
+ if (code === 'INVALID_PAYREQ_RESPONSE' && status === 400) {
94
+ return new InvalidPayreqResponse(status, error, message, headers);
95
+ }
96
+
97
+ if (code === 'INVALID_PUBKEY_FORMAT' && status === 400) {
98
+ return new InvalidPubkeyFormat(status, error, message, headers);
99
+ }
100
+
101
+ if (code === 'INVALID_RECEIVER' && status === 400) {
102
+ return new InvalidReceiver(status, error, message, headers);
103
+ }
104
+
105
+ if (code === 'INVALID_REQUEST_FORMAT' && status === 400) {
106
+ return new InvalidRequestFormat(status, error, message, headers);
107
+ }
108
+
109
+ if (code === 'INVALID_TIMESTAMP' && status === 400) {
110
+ return new InvalidTimestamp(status, error, message, headers);
111
+ }
112
+
113
+ if (code === 'INVALID_UMA_ADDRESS' && status === 400) {
114
+ return new InvalidUmaAddress(status, error, message, headers);
115
+ }
116
+
117
+ if (code === 'INVITATION_ALREADY_CLAIMED' && status === 400) {
118
+ return new InvitationAlreadyClaimed(status, error, message, headers);
119
+ }
120
+
121
+ if (code === 'INVITATION_CANCELLED' && status === 400) {
122
+ return new InvitationCancelled(status, error, message, headers);
123
+ }
124
+
125
+ if (code === 'INVITATIONS_NOT_CONFIGURED' && status === 400) {
126
+ return new InvitationsNotConfigured(status, error, message, headers);
127
+ }
128
+
129
+ if (code === 'LOOKUP_REQUEST_FAILED' && status === 400) {
130
+ return new LookupRequestFailed(status, error, message, headers);
131
+ }
132
+
133
+ if (code === 'MISSING_MANDATORY_USER_INFO' && status === 400) {
134
+ return new MissingMandatoryUserInfo(status, error, message, headers);
135
+ }
136
+
137
+ if (code === 'MISSING_REQUIRED_UMA_PARAMETERS' && status === 400) {
138
+ return new MissingRequiredUmaParameters(status, error, message, headers);
139
+ }
140
+
141
+ if (code === 'PARSE_LNURLP_RESPONSE_ERROR' && status === 400) {
142
+ return new ParseLnurlpResponseError(status, error, message, headers);
143
+ }
144
+
145
+ if (code === 'PARSE_PAYREQ_RESPONSE_ERROR' && status === 400) {
146
+ return new ParsePayreqResponseError(status, error, message, headers);
147
+ }
148
+
149
+ if (code === 'QUOTE_REQUEST_FAILED' && status === 400) {
150
+ return new QuoteRequestFailed(status, error, message, headers);
151
+ }
152
+
153
+ if (code === 'SELF_PAYMENT' && status === 400) {
154
+ return new SelfPayment(status, error, message, headers);
155
+ }
156
+
157
+ if (code === 'SENDER_NOT_ACCEPTED' && status === 400) {
158
+ return new SenderNotAccepted(status, error, message, headers);
159
+ }
160
+
161
+ if (code === 'WEBHOOK_DELIVERY_ERROR' && status === 400) {
162
+ return new WebhookDeliveryError(status, error, message, headers);
163
+ }
164
+
165
+ if (code === 'WEBHOOK_ENDPOINT_NOT_SET' && status === 400) {
166
+ return new WebhookEndpointNotSet(status, error, message, headers);
167
+ }
168
+
169
+ if (code === 'INVALID_SIGNATURE' && status === 401) {
170
+ return new InvalidSignature(status, error, message, headers);
171
+ }
172
+
173
+ if (code === 'UNAUTHORIZED' && status === 401) {
174
+ return new Unauthorized(status, error, message, headers);
175
+ }
176
+
177
+ if (code === 'COUNTERPARTY_NOT_ALLOWED' && status === 403) {
178
+ return new CounterpartyNotAllowed(status, error, message, headers);
179
+ }
180
+
181
+ if (code === 'FORBIDDEN' && status === 403) {
182
+ return new Forbidden(status, error, message, headers);
183
+ }
184
+
185
+ if (code === 'USER_NOT_READY' && status === 403) {
186
+ return new UserNotReady(status, error, message, headers);
187
+ }
188
+
189
+ if (code === 'VELOCITY_LIMIT_EXCEEDED' && status === 403) {
190
+ return new VelocityLimitExceeded(status, error, message, headers);
191
+ }
192
+
193
+ if (code === 'BULK_UPLOAD_JOB_NOT_FOUND' && status === 404) {
194
+ return new BulkUploadJobNotFound(status, error, message, headers);
195
+ }
196
+
197
+ if (code === 'INVITATION_NOT_FOUND' && status === 404) {
198
+ return new InvitationNotFound(status, error, message, headers);
199
+ }
200
+
201
+ if (code === 'LOOKUP_REQUEST_NOT_FOUND' && status === 404) {
202
+ return new LookupRequestNotFound(status, error, message, headers);
203
+ }
204
+
205
+ if (code === 'QUOTE_NOT_FOUND' && status === 404) {
206
+ return new QuoteNotFound(status, error, message, headers);
207
+ }
208
+
209
+ if (code === 'REFERENCE_NOT_FOUND' && status === 404) {
210
+ return new ReferenceNotFound(status, error, message, headers);
211
+ }
212
+
213
+ if (code === 'TOKEN_NOT_FOUND' && status === 404) {
214
+ return new TokenNotFound(status, error, message, headers);
215
+ }
216
+
217
+ if (code === 'TRANSACTION_NOT_FOUND' && status === 404) {
218
+ return new TransactionNotFound(status, error, message, headers);
219
+ }
220
+
221
+ if (code === 'USER_NOT_FOUND' && status === 404) {
222
+ return new UserNotFound(status, error, message, headers);
223
+ }
224
+
225
+ if (code === 'TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL' && status === 409) {
226
+ return new TransactionNotPendingPlatformApproval(status, error, message, headers);
227
+ }
228
+
229
+ if (code === 'UMA_ADDRESS_EXISTS' && status === 409) {
230
+ return new UmaAddressExists(status, error, message, headers);
231
+ }
232
+
233
+ if (code === 'CUSTOMER_DELETED' && status === 410) {
234
+ return new CustomerDeleted(status, error, message, headers);
235
+ }
236
+
237
+ if (code === 'UNSUPPORTED_UMA_VERSION' && status === 412) {
238
+ return new UnsupportedUmaVersion(status, error, message, headers);
239
+ }
240
+
241
+ if (code === 'COUNTERPARTY_PUBKEY_FETCH_ERROR' && status === 424) {
242
+ return new CounterpartyPubkeyFetchError(status, error, message, headers);
243
+ }
244
+
245
+ if (code === 'LNURLP_REQUEST_FAILED' && status === 424) {
246
+ return new LnurlpRequestFailed(status, error, message, headers);
247
+ }
248
+
249
+ if (code === 'NO_COMPATIBLE_UMA_VERSION' && status === 424) {
250
+ return new NoCompatibleUmaVersion(status, error, message, headers);
251
+ }
252
+
253
+ if (code === 'PAYREQ_REQUEST_FAILED' && status === 424) {
254
+ return new PayreqRequestFailed(status, error, message, headers);
255
+ }
256
+
257
+ if (code === 'GRID_SWITCH_ERROR' && status === 500) {
258
+ return new GridSwitchError(status, error, message, headers);
259
+ }
260
+
261
+ if (code === 'INTERNAL_ERROR' && status === 500) {
262
+ return new InternalError(status, error, message, headers);
263
+ }
264
+
265
+ if (code === 'NOT_IMPLEMENTED' && status === 501) {
266
+ return new NotImplemented(status, error, message, headers);
267
+ }
268
+
269
+ if (code === 'UNRECOGNIZED_MANDATORY_PAYEE_DATA_KEY' && status === 501) {
270
+ return new UnrecognizedMandatoryPayeeDataKey(status, error, message, headers);
271
+ }
272
+
273
+ if (status === 400) {
274
+ return new BadRequestError(status, error, message, headers);
275
+ }
276
+
277
+ if (status === 401) {
278
+ return new AuthenticationError(status, error, message, headers);
279
+ }
280
+
281
+ if (status === 403) {
282
+ return new PermissionDeniedError(status, error, message, headers);
283
+ }
284
+
285
+ if (status === 404) {
286
+ return new NotFoundError(status, error, message, headers);
287
+ }
288
+
289
+ if (status === 409) {
290
+ return new ConflictError(status, error, message, headers);
291
+ }
292
+
293
+ if (status === 422) {
294
+ return new UnprocessableEntityError(status, error, message, headers);
295
+ }
296
+
297
+ if (status === 429) {
298
+ return new RateLimitError(status, error, message, headers);
299
+ }
300
+
301
+ if (status >= 500) {
302
+ return new InternalServerError(status, error, message, headers);
303
+ }
304
+
305
+ return new APIError(status, error, message, headers);
306
+ }
307
+ }
308
+
309
+ export class APIUserAbortError extends APIError<undefined, undefined, undefined> {
310
+ constructor({ message }: { message?: string } = {}) {
311
+ super(undefined, undefined, message || 'Request was aborted.', undefined);
312
+ }
313
+ }
314
+
315
+ export class APIConnectionError extends APIError<undefined, undefined, undefined> {
316
+ constructor({ message, cause }: { message?: string | undefined; cause?: Error | undefined }) {
317
+ super(undefined, undefined, message || 'Connection error.', undefined);
318
+ // in some environments the 'cause' property is already declared
319
+ // @ts-ignore
320
+ if (cause) this.cause = cause;
321
+ }
322
+ }
323
+
324
+ export class APIConnectionTimeoutError extends APIConnectionError {
325
+ constructor({ message }: { message?: string } = {}) {
326
+ super({ message: message ?? 'Request timed out.' });
327
+ }
328
+ }
329
+
330
+ export class BadRequestError extends APIError<400, Headers> {}
331
+
332
+ export class AuthenticationError extends APIError<401, Headers> {}
333
+
334
+ export class PermissionDeniedError extends APIError<403, Headers> {}
335
+
336
+ export class NotFoundError extends APIError<404, Headers> {}
337
+
338
+ export class ConflictError extends APIError<409, Headers> {}
339
+
340
+ export class UnprocessableEntityError extends APIError<422, Headers> {}
341
+
342
+ export class RateLimitError extends APIError<429, Headers> {}
343
+
344
+ export class InternalServerError extends APIError<number, Headers> {}
345
+
346
+ export class AmountOutOfRange extends BadRequestError {
347
+ /**
348
+ * | Error Code | Description |
349
+ * | ------------------------------- | ------------------------------------------------------------- |
350
+ * | INVALID_INPUT | Invalid input provided |
351
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
352
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
353
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
354
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
355
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
356
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
357
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
358
+ * | INVALID_RECEIVER | Receiver is invalid |
359
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
360
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
361
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
362
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
363
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
364
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
365
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
366
+ * | INVALID_CURRENCY | Currency is invalid |
367
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
368
+ * | INVALID_NONCE | Nonce is invalid |
369
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
370
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
371
+ * | SELF_PAYMENT | Self payment not allowed |
372
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
373
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
374
+ * | INVALID_AMOUNT | Amount is invalid |
375
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
376
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
377
+ */
378
+ code: 'AMOUNT_OUT_OF_RANGE';
379
+
380
+ /**
381
+ * Error message
382
+ */
383
+ override message: string;
384
+
385
+ /**
386
+ * HTTP status code
387
+ */
388
+ override status: 400;
389
+
390
+ /**
391
+ * Additional error details
392
+ */
393
+ details?: { [key: string]: unknown };
394
+
395
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
396
+ const data = error as Record<string, any>;
397
+ super(status, error, message, headers);
398
+
399
+ this.code = data?.['code'];
400
+ this.message = data?.['message'];
401
+ this.status = data?.['status'];
402
+ this.details = data?.['details'];
403
+ }
404
+ }
405
+
406
+ export class CertChainExpired extends BadRequestError {
407
+ /**
408
+ * | Error Code | Description |
409
+ * | ------------------------------- | ------------------------------------------------------------- |
410
+ * | INVALID_INPUT | Invalid input provided |
411
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
412
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
413
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
414
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
415
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
416
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
417
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
418
+ * | INVALID_RECEIVER | Receiver is invalid |
419
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
420
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
421
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
422
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
423
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
424
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
425
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
426
+ * | INVALID_CURRENCY | Currency is invalid |
427
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
428
+ * | INVALID_NONCE | Nonce is invalid |
429
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
430
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
431
+ * | SELF_PAYMENT | Self payment not allowed |
432
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
433
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
434
+ * | INVALID_AMOUNT | Amount is invalid |
435
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
436
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
437
+ */
438
+ code: 'CERT_CHAIN_EXPIRED';
439
+
440
+ /**
441
+ * Error message
442
+ */
443
+ override message: string;
444
+
445
+ /**
446
+ * HTTP status code
447
+ */
448
+ override status: 400;
449
+
450
+ /**
451
+ * Additional error details
452
+ */
453
+ details?: { [key: string]: unknown };
454
+
455
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
456
+ const data = error as Record<string, any>;
457
+ super(status, error, message, headers);
458
+
459
+ this.code = data?.['code'];
460
+ this.message = data?.['message'];
461
+ this.status = data?.['status'];
462
+ this.details = data?.['details'];
463
+ }
464
+ }
465
+
466
+ export class CertChainInvalid extends BadRequestError {
467
+ /**
468
+ * | Error Code | Description |
469
+ * | ------------------------------- | ------------------------------------------------------------- |
470
+ * | INVALID_INPUT | Invalid input provided |
471
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
472
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
473
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
474
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
475
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
476
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
477
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
478
+ * | INVALID_RECEIVER | Receiver is invalid |
479
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
480
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
481
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
482
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
483
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
484
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
485
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
486
+ * | INVALID_CURRENCY | Currency is invalid |
487
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
488
+ * | INVALID_NONCE | Nonce is invalid |
489
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
490
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
491
+ * | SELF_PAYMENT | Self payment not allowed |
492
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
493
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
494
+ * | INVALID_AMOUNT | Amount is invalid |
495
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
496
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
497
+ */
498
+ code: 'CERT_CHAIN_INVALID';
499
+
500
+ /**
501
+ * Error message
502
+ */
503
+ override message: string;
504
+
505
+ /**
506
+ * HTTP status code
507
+ */
508
+ override status: 400;
509
+
510
+ /**
511
+ * Additional error details
512
+ */
513
+ details?: { [key: string]: unknown };
514
+
515
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
516
+ const data = error as Record<string, any>;
517
+ super(status, error, message, headers);
518
+
519
+ this.code = data?.['code'];
520
+ this.message = data?.['message'];
521
+ this.status = data?.['status'];
522
+ this.details = data?.['details'];
523
+ }
524
+ }
525
+
526
+ export class InvalidAmount extends BadRequestError {
527
+ /**
528
+ * | Error Code | Description |
529
+ * | ------------------------------- | ------------------------------------------------------------- |
530
+ * | INVALID_INPUT | Invalid input provided |
531
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
532
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
533
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
534
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
535
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
536
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
537
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
538
+ * | INVALID_RECEIVER | Receiver is invalid |
539
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
540
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
541
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
542
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
543
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
544
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
545
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
546
+ * | INVALID_CURRENCY | Currency is invalid |
547
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
548
+ * | INVALID_NONCE | Nonce is invalid |
549
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
550
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
551
+ * | SELF_PAYMENT | Self payment not allowed |
552
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
553
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
554
+ * | INVALID_AMOUNT | Amount is invalid |
555
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
556
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
557
+ */
558
+ code: 'INVALID_AMOUNT';
559
+
560
+ /**
561
+ * Error message
562
+ */
563
+ override message: string;
564
+
565
+ /**
566
+ * HTTP status code
567
+ */
568
+ override status: 400;
569
+
570
+ /**
571
+ * Additional error details
572
+ */
573
+ details?: { [key: string]: unknown };
574
+
575
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
576
+ const data = error as Record<string, any>;
577
+ super(status, error, message, headers);
578
+
579
+ this.code = data?.['code'];
580
+ this.message = data?.['message'];
581
+ this.status = data?.['status'];
582
+ this.details = data?.['details'];
583
+ }
584
+ }
585
+
586
+ export class InvalidBankAccount extends BadRequestError {
587
+ /**
588
+ * | Error Code | Description |
589
+ * | ------------------------------- | ------------------------------------------------------------- |
590
+ * | INVALID_INPUT | Invalid input provided |
591
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
592
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
593
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
594
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
595
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
596
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
597
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
598
+ * | INVALID_RECEIVER | Receiver is invalid |
599
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
600
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
601
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
602
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
603
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
604
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
605
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
606
+ * | INVALID_CURRENCY | Currency is invalid |
607
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
608
+ * | INVALID_NONCE | Nonce is invalid |
609
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
610
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
611
+ * | SELF_PAYMENT | Self payment not allowed |
612
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
613
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
614
+ * | INVALID_AMOUNT | Amount is invalid |
615
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
616
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
617
+ */
618
+ code: 'INVALID_BANK_ACCOUNT';
619
+
620
+ /**
621
+ * Error message
622
+ */
623
+ override message: string;
624
+
625
+ /**
626
+ * HTTP status code
627
+ */
628
+ override status: 400;
629
+
630
+ /**
631
+ * Additional error details
632
+ */
633
+ details?: { [key: string]: unknown };
634
+
635
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
636
+ const data = error as Record<string, any>;
637
+ super(status, error, message, headers);
638
+
639
+ this.code = data?.['code'];
640
+ this.message = data?.['message'];
641
+ this.status = data?.['status'];
642
+ this.details = data?.['details'];
643
+ }
644
+ }
645
+
646
+ export class InvalidCurrency extends BadRequestError {
647
+ /**
648
+ * | Error Code | Description |
649
+ * | ------------------------------- | ------------------------------------------------------------- |
650
+ * | INVALID_INPUT | Invalid input provided |
651
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
652
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
653
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
654
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
655
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
656
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
657
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
658
+ * | INVALID_RECEIVER | Receiver is invalid |
659
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
660
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
661
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
662
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
663
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
664
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
665
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
666
+ * | INVALID_CURRENCY | Currency is invalid |
667
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
668
+ * | INVALID_NONCE | Nonce is invalid |
669
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
670
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
671
+ * | SELF_PAYMENT | Self payment not allowed |
672
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
673
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
674
+ * | INVALID_AMOUNT | Amount is invalid |
675
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
676
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
677
+ */
678
+ code: 'INVALID_CURRENCY';
679
+
680
+ /**
681
+ * Error message
682
+ */
683
+ override message: string;
684
+
685
+ /**
686
+ * HTTP status code
687
+ */
688
+ override status: 400;
689
+
690
+ /**
691
+ * Additional error details
692
+ */
693
+ details?: { [key: string]: unknown };
694
+
695
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
696
+ const data = error as Record<string, any>;
697
+ super(status, error, message, headers);
698
+
699
+ this.code = data?.['code'];
700
+ this.message = data?.['message'];
701
+ this.status = data?.['status'];
702
+ this.details = data?.['details'];
703
+ }
704
+ }
705
+
706
+ export class InvalidInput extends BadRequestError {
707
+ /**
708
+ * | Error Code | Description |
709
+ * | ------------------------------- | ------------------------------------------------------------- |
710
+ * | INVALID_INPUT | Invalid input provided |
711
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
712
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
713
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
714
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
715
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
716
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
717
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
718
+ * | INVALID_RECEIVER | Receiver is invalid |
719
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
720
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
721
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
722
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
723
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
724
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
725
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
726
+ * | INVALID_CURRENCY | Currency is invalid |
727
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
728
+ * | INVALID_NONCE | Nonce is invalid |
729
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
730
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
731
+ * | SELF_PAYMENT | Self payment not allowed |
732
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
733
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
734
+ * | INVALID_AMOUNT | Amount is invalid |
735
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
736
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
737
+ */
738
+ code: 'INVALID_INPUT';
739
+
740
+ /**
741
+ * Error message
742
+ */
743
+ override message: string;
744
+
745
+ /**
746
+ * HTTP status code
747
+ */
748
+ override status: 400;
749
+
750
+ /**
751
+ * Additional error details
752
+ */
753
+ details?: { [key: string]: unknown };
754
+
755
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
756
+ const data = error as Record<string, any>;
757
+ super(status, error, message, headers);
758
+
759
+ this.code = data?.['code'];
760
+ this.message = data?.['message'];
761
+ this.status = data?.['status'];
762
+ this.details = data?.['details'];
763
+ }
764
+ }
765
+
766
+ export class InvalidNonce extends BadRequestError {
767
+ /**
768
+ * | Error Code | Description |
769
+ * | ------------------------------- | ------------------------------------------------------------- |
770
+ * | INVALID_INPUT | Invalid input provided |
771
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
772
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
773
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
774
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
775
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
776
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
777
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
778
+ * | INVALID_RECEIVER | Receiver is invalid |
779
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
780
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
781
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
782
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
783
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
784
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
785
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
786
+ * | INVALID_CURRENCY | Currency is invalid |
787
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
788
+ * | INVALID_NONCE | Nonce is invalid |
789
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
790
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
791
+ * | SELF_PAYMENT | Self payment not allowed |
792
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
793
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
794
+ * | INVALID_AMOUNT | Amount is invalid |
795
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
796
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
797
+ */
798
+ code: 'INVALID_NONCE';
799
+
800
+ /**
801
+ * Error message
802
+ */
803
+ override message: string;
804
+
805
+ /**
806
+ * HTTP status code
807
+ */
808
+ override status: 400;
809
+
810
+ /**
811
+ * Additional error details
812
+ */
813
+ details?: { [key: string]: unknown };
814
+
815
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
816
+ const data = error as Record<string, any>;
817
+ super(status, error, message, headers);
818
+
819
+ this.code = data?.['code'];
820
+ this.message = data?.['message'];
821
+ this.status = data?.['status'];
822
+ this.details = data?.['details'];
823
+ }
824
+ }
825
+
826
+ export class InvalidPayreqResponse extends BadRequestError {
827
+ /**
828
+ * | Error Code | Description |
829
+ * | ------------------------------- | ------------------------------------------------------------- |
830
+ * | INVALID_INPUT | Invalid input provided |
831
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
832
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
833
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
834
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
835
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
836
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
837
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
838
+ * | INVALID_RECEIVER | Receiver is invalid |
839
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
840
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
841
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
842
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
843
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
844
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
845
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
846
+ * | INVALID_CURRENCY | Currency is invalid |
847
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
848
+ * | INVALID_NONCE | Nonce is invalid |
849
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
850
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
851
+ * | SELF_PAYMENT | Self payment not allowed |
852
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
853
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
854
+ * | INVALID_AMOUNT | Amount is invalid |
855
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
856
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
857
+ */
858
+ code: 'INVALID_PAYREQ_RESPONSE';
859
+
860
+ /**
861
+ * Error message
862
+ */
863
+ override message: string;
864
+
865
+ /**
866
+ * HTTP status code
867
+ */
868
+ override status: 400;
869
+
870
+ /**
871
+ * Additional error details
872
+ */
873
+ details?: { [key: string]: unknown };
874
+
875
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
876
+ const data = error as Record<string, any>;
877
+ super(status, error, message, headers);
878
+
879
+ this.code = data?.['code'];
880
+ this.message = data?.['message'];
881
+ this.status = data?.['status'];
882
+ this.details = data?.['details'];
883
+ }
884
+ }
885
+
886
+ export class InvalidPubkeyFormat extends BadRequestError {
887
+ /**
888
+ * | Error Code | Description |
889
+ * | ------------------------------- | ------------------------------------------------------------- |
890
+ * | INVALID_INPUT | Invalid input provided |
891
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
892
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
893
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
894
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
895
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
896
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
897
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
898
+ * | INVALID_RECEIVER | Receiver is invalid |
899
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
900
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
901
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
902
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
903
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
904
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
905
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
906
+ * | INVALID_CURRENCY | Currency is invalid |
907
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
908
+ * | INVALID_NONCE | Nonce is invalid |
909
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
910
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
911
+ * | SELF_PAYMENT | Self payment not allowed |
912
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
913
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
914
+ * | INVALID_AMOUNT | Amount is invalid |
915
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
916
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
917
+ */
918
+ code: 'INVALID_PUBKEY_FORMAT';
919
+
920
+ /**
921
+ * Error message
922
+ */
923
+ override message: string;
924
+
925
+ /**
926
+ * HTTP status code
927
+ */
928
+ override status: 400;
929
+
930
+ /**
931
+ * Additional error details
932
+ */
933
+ details?: { [key: string]: unknown };
934
+
935
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
936
+ const data = error as Record<string, any>;
937
+ super(status, error, message, headers);
938
+
939
+ this.code = data?.['code'];
940
+ this.message = data?.['message'];
941
+ this.status = data?.['status'];
942
+ this.details = data?.['details'];
943
+ }
944
+ }
945
+
946
+ export class InvalidReceiver extends BadRequestError {
947
+ /**
948
+ * | Error Code | Description |
949
+ * | ------------------------------- | ------------------------------------------------------------- |
950
+ * | INVALID_INPUT | Invalid input provided |
951
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
952
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
953
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
954
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
955
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
956
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
957
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
958
+ * | INVALID_RECEIVER | Receiver is invalid |
959
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
960
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
961
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
962
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
963
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
964
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
965
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
966
+ * | INVALID_CURRENCY | Currency is invalid |
967
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
968
+ * | INVALID_NONCE | Nonce is invalid |
969
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
970
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
971
+ * | SELF_PAYMENT | Self payment not allowed |
972
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
973
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
974
+ * | INVALID_AMOUNT | Amount is invalid |
975
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
976
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
977
+ */
978
+ code: 'INVALID_RECEIVER';
979
+
980
+ /**
981
+ * Error message
982
+ */
983
+ override message: string;
984
+
985
+ /**
986
+ * HTTP status code
987
+ */
988
+ override status: 400;
989
+
990
+ /**
991
+ * Additional error details
992
+ */
993
+ details?: { [key: string]: unknown };
994
+
995
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
996
+ const data = error as Record<string, any>;
997
+ super(status, error, message, headers);
998
+
999
+ this.code = data?.['code'];
1000
+ this.message = data?.['message'];
1001
+ this.status = data?.['status'];
1002
+ this.details = data?.['details'];
1003
+ }
1004
+ }
1005
+
1006
+ export class InvalidRequestFormat extends BadRequestError {
1007
+ /**
1008
+ * | Error Code | Description |
1009
+ * | ------------------------------- | ------------------------------------------------------------- |
1010
+ * | INVALID_INPUT | Invalid input provided |
1011
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1012
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1013
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1014
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1015
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1016
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1017
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1018
+ * | INVALID_RECEIVER | Receiver is invalid |
1019
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1020
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1021
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1022
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1023
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1024
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1025
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1026
+ * | INVALID_CURRENCY | Currency is invalid |
1027
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1028
+ * | INVALID_NONCE | Nonce is invalid |
1029
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1030
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1031
+ * | SELF_PAYMENT | Self payment not allowed |
1032
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1033
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1034
+ * | INVALID_AMOUNT | Amount is invalid |
1035
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1036
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1037
+ */
1038
+ code: 'INVALID_REQUEST_FORMAT';
1039
+
1040
+ /**
1041
+ * Error message
1042
+ */
1043
+ override message: string;
1044
+
1045
+ /**
1046
+ * HTTP status code
1047
+ */
1048
+ override status: 400;
1049
+
1050
+ /**
1051
+ * Additional error details
1052
+ */
1053
+ details?: { [key: string]: unknown };
1054
+
1055
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1056
+ const data = error as Record<string, any>;
1057
+ super(status, error, message, headers);
1058
+
1059
+ this.code = data?.['code'];
1060
+ this.message = data?.['message'];
1061
+ this.status = data?.['status'];
1062
+ this.details = data?.['details'];
1063
+ }
1064
+ }
1065
+
1066
+ export class InvalidTimestamp extends BadRequestError {
1067
+ /**
1068
+ * | Error Code | Description |
1069
+ * | ------------------------------- | ------------------------------------------------------------- |
1070
+ * | INVALID_INPUT | Invalid input provided |
1071
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1072
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1073
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1074
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1075
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1076
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1077
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1078
+ * | INVALID_RECEIVER | Receiver is invalid |
1079
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1080
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1081
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1082
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1083
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1084
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1085
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1086
+ * | INVALID_CURRENCY | Currency is invalid |
1087
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1088
+ * | INVALID_NONCE | Nonce is invalid |
1089
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1090
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1091
+ * | SELF_PAYMENT | Self payment not allowed |
1092
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1093
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1094
+ * | INVALID_AMOUNT | Amount is invalid |
1095
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1096
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1097
+ */
1098
+ code: 'INVALID_TIMESTAMP';
1099
+
1100
+ /**
1101
+ * Error message
1102
+ */
1103
+ override message: string;
1104
+
1105
+ /**
1106
+ * HTTP status code
1107
+ */
1108
+ override status: 400;
1109
+
1110
+ /**
1111
+ * Additional error details
1112
+ */
1113
+ details?: { [key: string]: unknown };
1114
+
1115
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1116
+ const data = error as Record<string, any>;
1117
+ super(status, error, message, headers);
1118
+
1119
+ this.code = data?.['code'];
1120
+ this.message = data?.['message'];
1121
+ this.status = data?.['status'];
1122
+ this.details = data?.['details'];
1123
+ }
1124
+ }
1125
+
1126
+ export class InvalidUmaAddress extends BadRequestError {
1127
+ /**
1128
+ * | Error Code | Description |
1129
+ * | ------------------------------- | ------------------------------------------------------------- |
1130
+ * | INVALID_INPUT | Invalid input provided |
1131
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1132
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1133
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1134
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1135
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1136
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1137
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1138
+ * | INVALID_RECEIVER | Receiver is invalid |
1139
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1140
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1141
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1142
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1143
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1144
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1145
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1146
+ * | INVALID_CURRENCY | Currency is invalid |
1147
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1148
+ * | INVALID_NONCE | Nonce is invalid |
1149
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1150
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1151
+ * | SELF_PAYMENT | Self payment not allowed |
1152
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1153
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1154
+ * | INVALID_AMOUNT | Amount is invalid |
1155
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1156
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1157
+ */
1158
+ code: 'INVALID_UMA_ADDRESS';
1159
+
1160
+ /**
1161
+ * Error message
1162
+ */
1163
+ override message: string;
1164
+
1165
+ /**
1166
+ * HTTP status code
1167
+ */
1168
+ override status: 400;
1169
+
1170
+ /**
1171
+ * Additional error details
1172
+ */
1173
+ details?: { [key: string]: unknown };
1174
+
1175
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1176
+ const data = error as Record<string, any>;
1177
+ super(status, error, message, headers);
1178
+
1179
+ this.code = data?.['code'];
1180
+ this.message = data?.['message'];
1181
+ this.status = data?.['status'];
1182
+ this.details = data?.['details'];
1183
+ }
1184
+ }
1185
+
1186
+ export class InvitationAlreadyClaimed extends BadRequestError {
1187
+ /**
1188
+ * | Error Code | Description |
1189
+ * | ------------------------------- | ------------------------------------------------------------- |
1190
+ * | INVALID_INPUT | Invalid input provided |
1191
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1192
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1193
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1194
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1195
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1196
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1197
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1198
+ * | INVALID_RECEIVER | Receiver is invalid |
1199
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1200
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1201
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1202
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1203
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1204
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1205
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1206
+ * | INVALID_CURRENCY | Currency is invalid |
1207
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1208
+ * | INVALID_NONCE | Nonce is invalid |
1209
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1210
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1211
+ * | SELF_PAYMENT | Self payment not allowed |
1212
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1213
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1214
+ * | INVALID_AMOUNT | Amount is invalid |
1215
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1216
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1217
+ */
1218
+ code: 'INVITATION_ALREADY_CLAIMED';
1219
+
1220
+ /**
1221
+ * Error message
1222
+ */
1223
+ override message: string;
1224
+
1225
+ /**
1226
+ * HTTP status code
1227
+ */
1228
+ override status: 400;
1229
+
1230
+ /**
1231
+ * Additional error details
1232
+ */
1233
+ details?: { [key: string]: unknown };
1234
+
1235
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1236
+ const data = error as Record<string, any>;
1237
+ super(status, error, message, headers);
1238
+
1239
+ this.code = data?.['code'];
1240
+ this.message = data?.['message'];
1241
+ this.status = data?.['status'];
1242
+ this.details = data?.['details'];
1243
+ }
1244
+ }
1245
+
1246
+ export class InvitationCancelled extends BadRequestError {
1247
+ /**
1248
+ * | Error Code | Description |
1249
+ * | ------------------------------- | ------------------------------------------------------------- |
1250
+ * | INVALID_INPUT | Invalid input provided |
1251
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1252
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1253
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1254
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1255
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1256
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1257
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1258
+ * | INVALID_RECEIVER | Receiver is invalid |
1259
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1260
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1261
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1262
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1263
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1264
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1265
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1266
+ * | INVALID_CURRENCY | Currency is invalid |
1267
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1268
+ * | INVALID_NONCE | Nonce is invalid |
1269
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1270
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1271
+ * | SELF_PAYMENT | Self payment not allowed |
1272
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1273
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1274
+ * | INVALID_AMOUNT | Amount is invalid |
1275
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1276
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1277
+ */
1278
+ code: 'INVITATION_CANCELLED';
1279
+
1280
+ /**
1281
+ * Error message
1282
+ */
1283
+ override message: string;
1284
+
1285
+ /**
1286
+ * HTTP status code
1287
+ */
1288
+ override status: 400;
1289
+
1290
+ /**
1291
+ * Additional error details
1292
+ */
1293
+ details?: { [key: string]: unknown };
1294
+
1295
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1296
+ const data = error as Record<string, any>;
1297
+ super(status, error, message, headers);
1298
+
1299
+ this.code = data?.['code'];
1300
+ this.message = data?.['message'];
1301
+ this.status = data?.['status'];
1302
+ this.details = data?.['details'];
1303
+ }
1304
+ }
1305
+
1306
+ export class InvitationsNotConfigured extends BadRequestError {
1307
+ /**
1308
+ * | Error Code | Description |
1309
+ * | ------------------------------- | ------------------------------------------------------------- |
1310
+ * | INVALID_INPUT | Invalid input provided |
1311
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1312
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1313
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1314
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1315
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1316
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1317
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1318
+ * | INVALID_RECEIVER | Receiver is invalid |
1319
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1320
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1321
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1322
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1323
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1324
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1325
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1326
+ * | INVALID_CURRENCY | Currency is invalid |
1327
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1328
+ * | INVALID_NONCE | Nonce is invalid |
1329
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1330
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1331
+ * | SELF_PAYMENT | Self payment not allowed |
1332
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1333
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1334
+ * | INVALID_AMOUNT | Amount is invalid |
1335
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1336
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1337
+ */
1338
+ code: 'INVITATIONS_NOT_CONFIGURED';
1339
+
1340
+ /**
1341
+ * Error message
1342
+ */
1343
+ override message: string;
1344
+
1345
+ /**
1346
+ * HTTP status code
1347
+ */
1348
+ override status: 400;
1349
+
1350
+ /**
1351
+ * Additional error details
1352
+ */
1353
+ details?: { [key: string]: unknown };
1354
+
1355
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1356
+ const data = error as Record<string, any>;
1357
+ super(status, error, message, headers);
1358
+
1359
+ this.code = data?.['code'];
1360
+ this.message = data?.['message'];
1361
+ this.status = data?.['status'];
1362
+ this.details = data?.['details'];
1363
+ }
1364
+ }
1365
+
1366
+ export class LookupRequestFailed extends BadRequestError {
1367
+ /**
1368
+ * | Error Code | Description |
1369
+ * | ------------------------------- | ------------------------------------------------------------- |
1370
+ * | INVALID_INPUT | Invalid input provided |
1371
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1372
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1373
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1374
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1375
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1376
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1377
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1378
+ * | INVALID_RECEIVER | Receiver is invalid |
1379
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1380
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1381
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1382
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1383
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1384
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1385
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1386
+ * | INVALID_CURRENCY | Currency is invalid |
1387
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1388
+ * | INVALID_NONCE | Nonce is invalid |
1389
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1390
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1391
+ * | SELF_PAYMENT | Self payment not allowed |
1392
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1393
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1394
+ * | INVALID_AMOUNT | Amount is invalid |
1395
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1396
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1397
+ */
1398
+ code: 'LOOKUP_REQUEST_FAILED';
1399
+
1400
+ /**
1401
+ * Error message
1402
+ */
1403
+ override message: string;
1404
+
1405
+ /**
1406
+ * HTTP status code
1407
+ */
1408
+ override status: 400;
1409
+
1410
+ /**
1411
+ * Additional error details
1412
+ */
1413
+ details?: { [key: string]: unknown };
1414
+
1415
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1416
+ const data = error as Record<string, any>;
1417
+ super(status, error, message, headers);
1418
+
1419
+ this.code = data?.['code'];
1420
+ this.message = data?.['message'];
1421
+ this.status = data?.['status'];
1422
+ this.details = data?.['details'];
1423
+ }
1424
+ }
1425
+
1426
+ export class MissingMandatoryUserInfo extends BadRequestError {
1427
+ /**
1428
+ * | Error Code | Description |
1429
+ * | ------------------------------- | ------------------------------------------------------------- |
1430
+ * | INVALID_INPUT | Invalid input provided |
1431
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1432
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1433
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1434
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1435
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1436
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1437
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1438
+ * | INVALID_RECEIVER | Receiver is invalid |
1439
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1440
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1441
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1442
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1443
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1444
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1445
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1446
+ * | INVALID_CURRENCY | Currency is invalid |
1447
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1448
+ * | INVALID_NONCE | Nonce is invalid |
1449
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1450
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1451
+ * | SELF_PAYMENT | Self payment not allowed |
1452
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1453
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1454
+ * | INVALID_AMOUNT | Amount is invalid |
1455
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1456
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1457
+ */
1458
+ code: 'MISSING_MANDATORY_USER_INFO';
1459
+
1460
+ /**
1461
+ * Error message
1462
+ */
1463
+ override message: string;
1464
+
1465
+ /**
1466
+ * HTTP status code
1467
+ */
1468
+ override status: 400;
1469
+
1470
+ /**
1471
+ * Additional error details
1472
+ */
1473
+ details?: { [key: string]: unknown };
1474
+
1475
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1476
+ const data = error as Record<string, any>;
1477
+ super(status, error, message, headers);
1478
+
1479
+ this.code = data?.['code'];
1480
+ this.message = data?.['message'];
1481
+ this.status = data?.['status'];
1482
+ this.details = data?.['details'];
1483
+ }
1484
+ }
1485
+
1486
+ export class MissingRequiredUmaParameters extends BadRequestError {
1487
+ /**
1488
+ * | Error Code | Description |
1489
+ * | ------------------------------- | ------------------------------------------------------------- |
1490
+ * | INVALID_INPUT | Invalid input provided |
1491
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1492
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1493
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1494
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1495
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1496
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1497
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1498
+ * | INVALID_RECEIVER | Receiver is invalid |
1499
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1500
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1501
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1502
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1503
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1504
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1505
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1506
+ * | INVALID_CURRENCY | Currency is invalid |
1507
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1508
+ * | INVALID_NONCE | Nonce is invalid |
1509
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1510
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1511
+ * | SELF_PAYMENT | Self payment not allowed |
1512
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1513
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1514
+ * | INVALID_AMOUNT | Amount is invalid |
1515
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1516
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1517
+ */
1518
+ code: 'MISSING_REQUIRED_UMA_PARAMETERS';
1519
+
1520
+ /**
1521
+ * Error message
1522
+ */
1523
+ override message: string;
1524
+
1525
+ /**
1526
+ * HTTP status code
1527
+ */
1528
+ override status: 400;
1529
+
1530
+ /**
1531
+ * Additional error details
1532
+ */
1533
+ details?: { [key: string]: unknown };
1534
+
1535
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1536
+ const data = error as Record<string, any>;
1537
+ super(status, error, message, headers);
1538
+
1539
+ this.code = data?.['code'];
1540
+ this.message = data?.['message'];
1541
+ this.status = data?.['status'];
1542
+ this.details = data?.['details'];
1543
+ }
1544
+ }
1545
+
1546
+ export class ParseLnurlpResponseError extends BadRequestError {
1547
+ /**
1548
+ * | Error Code | Description |
1549
+ * | ------------------------------- | ------------------------------------------------------------- |
1550
+ * | INVALID_INPUT | Invalid input provided |
1551
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1552
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1553
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1554
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1555
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1556
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1557
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1558
+ * | INVALID_RECEIVER | Receiver is invalid |
1559
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1560
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1561
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1562
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1563
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1564
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1565
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1566
+ * | INVALID_CURRENCY | Currency is invalid |
1567
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1568
+ * | INVALID_NONCE | Nonce is invalid |
1569
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1570
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1571
+ * | SELF_PAYMENT | Self payment not allowed |
1572
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1573
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1574
+ * | INVALID_AMOUNT | Amount is invalid |
1575
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1576
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1577
+ */
1578
+ code: 'PARSE_LNURLP_RESPONSE_ERROR';
1579
+
1580
+ /**
1581
+ * Error message
1582
+ */
1583
+ override message: string;
1584
+
1585
+ /**
1586
+ * HTTP status code
1587
+ */
1588
+ override status: 400;
1589
+
1590
+ /**
1591
+ * Additional error details
1592
+ */
1593
+ details?: { [key: string]: unknown };
1594
+
1595
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1596
+ const data = error as Record<string, any>;
1597
+ super(status, error, message, headers);
1598
+
1599
+ this.code = data?.['code'];
1600
+ this.message = data?.['message'];
1601
+ this.status = data?.['status'];
1602
+ this.details = data?.['details'];
1603
+ }
1604
+ }
1605
+
1606
+ export class ParsePayreqResponseError extends BadRequestError {
1607
+ /**
1608
+ * | Error Code | Description |
1609
+ * | ------------------------------- | ------------------------------------------------------------- |
1610
+ * | INVALID_INPUT | Invalid input provided |
1611
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1612
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1613
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1614
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1615
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1616
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1617
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1618
+ * | INVALID_RECEIVER | Receiver is invalid |
1619
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1620
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1621
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1622
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1623
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1624
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1625
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1626
+ * | INVALID_CURRENCY | Currency is invalid |
1627
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1628
+ * | INVALID_NONCE | Nonce is invalid |
1629
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1630
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1631
+ * | SELF_PAYMENT | Self payment not allowed |
1632
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1633
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1634
+ * | INVALID_AMOUNT | Amount is invalid |
1635
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1636
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1637
+ */
1638
+ code: 'PARSE_PAYREQ_RESPONSE_ERROR';
1639
+
1640
+ /**
1641
+ * Error message
1642
+ */
1643
+ override message: string;
1644
+
1645
+ /**
1646
+ * HTTP status code
1647
+ */
1648
+ override status: 400;
1649
+
1650
+ /**
1651
+ * Additional error details
1652
+ */
1653
+ details?: { [key: string]: unknown };
1654
+
1655
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1656
+ const data = error as Record<string, any>;
1657
+ super(status, error, message, headers);
1658
+
1659
+ this.code = data?.['code'];
1660
+ this.message = data?.['message'];
1661
+ this.status = data?.['status'];
1662
+ this.details = data?.['details'];
1663
+ }
1664
+ }
1665
+
1666
+ export class QuoteRequestFailed extends BadRequestError {
1667
+ /**
1668
+ * | Error Code | Description |
1669
+ * | ------------------------------- | ------------------------------------------------------------- |
1670
+ * | INVALID_INPUT | Invalid input provided |
1671
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1672
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1673
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1674
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1675
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1676
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1677
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1678
+ * | INVALID_RECEIVER | Receiver is invalid |
1679
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1680
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1681
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1682
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1683
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1684
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1685
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1686
+ * | INVALID_CURRENCY | Currency is invalid |
1687
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1688
+ * | INVALID_NONCE | Nonce is invalid |
1689
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1690
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1691
+ * | SELF_PAYMENT | Self payment not allowed |
1692
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1693
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1694
+ * | INVALID_AMOUNT | Amount is invalid |
1695
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1696
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1697
+ */
1698
+ code: 'QUOTE_REQUEST_FAILED';
1699
+
1700
+ /**
1701
+ * Error message
1702
+ */
1703
+ override message: string;
1704
+
1705
+ /**
1706
+ * HTTP status code
1707
+ */
1708
+ override status: 400;
1709
+
1710
+ /**
1711
+ * Additional error details
1712
+ */
1713
+ details?: { [key: string]: unknown };
1714
+
1715
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1716
+ const data = error as Record<string, any>;
1717
+ super(status, error, message, headers);
1718
+
1719
+ this.code = data?.['code'];
1720
+ this.message = data?.['message'];
1721
+ this.status = data?.['status'];
1722
+ this.details = data?.['details'];
1723
+ }
1724
+ }
1725
+
1726
+ export class SelfPayment extends BadRequestError {
1727
+ /**
1728
+ * | Error Code | Description |
1729
+ * | ------------------------------- | ------------------------------------------------------------- |
1730
+ * | INVALID_INPUT | Invalid input provided |
1731
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1732
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1733
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1734
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1735
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1736
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1737
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1738
+ * | INVALID_RECEIVER | Receiver is invalid |
1739
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1740
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1741
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1742
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1743
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1744
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1745
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1746
+ * | INVALID_CURRENCY | Currency is invalid |
1747
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1748
+ * | INVALID_NONCE | Nonce is invalid |
1749
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1750
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1751
+ * | SELF_PAYMENT | Self payment not allowed |
1752
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1753
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1754
+ * | INVALID_AMOUNT | Amount is invalid |
1755
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1756
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1757
+ */
1758
+ code: 'SELF_PAYMENT';
1759
+
1760
+ /**
1761
+ * Error message
1762
+ */
1763
+ override message: string;
1764
+
1765
+ /**
1766
+ * HTTP status code
1767
+ */
1768
+ override status: 400;
1769
+
1770
+ /**
1771
+ * Additional error details
1772
+ */
1773
+ details?: { [key: string]: unknown };
1774
+
1775
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1776
+ const data = error as Record<string, any>;
1777
+ super(status, error, message, headers);
1778
+
1779
+ this.code = data?.['code'];
1780
+ this.message = data?.['message'];
1781
+ this.status = data?.['status'];
1782
+ this.details = data?.['details'];
1783
+ }
1784
+ }
1785
+
1786
+ export class SenderNotAccepted extends BadRequestError {
1787
+ /**
1788
+ * | Error Code | Description |
1789
+ * | ------------------------------- | ------------------------------------------------------------- |
1790
+ * | INVALID_INPUT | Invalid input provided |
1791
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1792
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1793
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1794
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1795
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1796
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1797
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1798
+ * | INVALID_RECEIVER | Receiver is invalid |
1799
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1800
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1801
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1802
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1803
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1804
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1805
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1806
+ * | INVALID_CURRENCY | Currency is invalid |
1807
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1808
+ * | INVALID_NONCE | Nonce is invalid |
1809
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1810
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1811
+ * | SELF_PAYMENT | Self payment not allowed |
1812
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1813
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1814
+ * | INVALID_AMOUNT | Amount is invalid |
1815
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1816
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1817
+ */
1818
+ code: 'SENDER_NOT_ACCEPTED';
1819
+
1820
+ /**
1821
+ * Error message
1822
+ */
1823
+ override message: string;
1824
+
1825
+ /**
1826
+ * HTTP status code
1827
+ */
1828
+ override status: 400;
1829
+
1830
+ /**
1831
+ * Additional error details
1832
+ */
1833
+ details?: { [key: string]: unknown };
1834
+
1835
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1836
+ const data = error as Record<string, any>;
1837
+ super(status, error, message, headers);
1838
+
1839
+ this.code = data?.['code'];
1840
+ this.message = data?.['message'];
1841
+ this.status = data?.['status'];
1842
+ this.details = data?.['details'];
1843
+ }
1844
+ }
1845
+
1846
+ export class WebhookDeliveryError extends BadRequestError {
1847
+ /**
1848
+ * | Error Code | Description |
1849
+ * | ------------------------------- | ------------------------------------------------------------- |
1850
+ * | INVALID_INPUT | Invalid input provided |
1851
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1852
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1853
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1854
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1855
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1856
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1857
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1858
+ * | INVALID_RECEIVER | Receiver is invalid |
1859
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1860
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1861
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1862
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1863
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1864
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1865
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1866
+ * | INVALID_CURRENCY | Currency is invalid |
1867
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1868
+ * | INVALID_NONCE | Nonce is invalid |
1869
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1870
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1871
+ * | SELF_PAYMENT | Self payment not allowed |
1872
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1873
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1874
+ * | INVALID_AMOUNT | Amount is invalid |
1875
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1876
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1877
+ */
1878
+ code: 'WEBHOOK_DELIVERY_ERROR';
1879
+
1880
+ /**
1881
+ * Error message
1882
+ */
1883
+ override message: string;
1884
+
1885
+ /**
1886
+ * HTTP status code
1887
+ */
1888
+ override status: 400;
1889
+
1890
+ /**
1891
+ * Additional error details
1892
+ */
1893
+ details?: { [key: string]: unknown };
1894
+
1895
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1896
+ const data = error as Record<string, any>;
1897
+ super(status, error, message, headers);
1898
+
1899
+ this.code = data?.['code'];
1900
+ this.message = data?.['message'];
1901
+ this.status = data?.['status'];
1902
+ this.details = data?.['details'];
1903
+ }
1904
+ }
1905
+
1906
+ export class WebhookEndpointNotSet extends BadRequestError {
1907
+ /**
1908
+ * | Error Code | Description |
1909
+ * | ------------------------------- | ------------------------------------------------------------- |
1910
+ * | INVALID_INPUT | Invalid input provided |
1911
+ * | MISSING_MANDATORY_USER_INFO | Required customer information is missing |
1912
+ * | INVITATION_ALREADY_CLAIMED | Invitation has already been claimed |
1913
+ * | INVITATIONS_NOT_CONFIGURED | Invitations are not configured |
1914
+ * | INVALID_UMA_ADDRESS | UMA address format is invalid |
1915
+ * | INVITATION_CANCELLED | Invitation has been cancelled |
1916
+ * | QUOTE_REQUEST_FAILED | An issue occurred during the quote process; this is retryable |
1917
+ * | INVALID_PAYREQ_RESPONSE | Counterparty Payreq response was invalid |
1918
+ * | INVALID_RECEIVER | Receiver is invalid |
1919
+ * | PARSE_PAYREQ_RESPONSE_ERROR | Error parsing receiver PayReq response |
1920
+ * | CERT_CHAIN_INVALID | Counterparty certificate chain is invalid |
1921
+ * | CERT_CHAIN_EXPIRED | Counterparty certificate chain has expired |
1922
+ * | INVALID_PUBKEY_FORMAT | Counterparty Public key format is invalid |
1923
+ * | MISSING_REQUIRED_UMA_PARAMETERS | Counterparty required UMA parameters are missing |
1924
+ * | SENDER_NOT_ACCEPTED | Sender is not accepted |
1925
+ * | AMOUNT_OUT_OF_RANGE | Amount is out of range |
1926
+ * | INVALID_CURRENCY | Currency is invalid |
1927
+ * | INVALID_TIMESTAMP | Timestamp is invalid |
1928
+ * | INVALID_NONCE | Nonce is invalid |
1929
+ * | INVALID_REQUEST_FORMAT | Request format is invalid |
1930
+ * | INVALID_BANK_ACCOUNT | Bank account is invalid |
1931
+ * | SELF_PAYMENT | Self payment not allowed |
1932
+ * | LOOKUP_REQUEST_FAILED | Lookup request failed |
1933
+ * | PARSE_LNURLP_RESPONSE_ERROR | Error parsing LNURLP response |
1934
+ * | INVALID_AMOUNT | Amount is invalid |
1935
+ * | WEBHOOK_ENDPOINT_NOT_SET | Webhook endpoint is not set |
1936
+ * | WEBHOOK_DELIVERY_ERROR | Webhook delivery error |
1937
+ */
1938
+ code: 'WEBHOOK_ENDPOINT_NOT_SET';
1939
+
1940
+ /**
1941
+ * Error message
1942
+ */
1943
+ override message: string;
1944
+
1945
+ /**
1946
+ * HTTP status code
1947
+ */
1948
+ override status: 400;
1949
+
1950
+ /**
1951
+ * Additional error details
1952
+ */
1953
+ details?: { [key: string]: unknown };
1954
+
1955
+ constructor(status: 400, error: Object, message: string | undefined, headers: Headers) {
1956
+ const data = error as Record<string, any>;
1957
+ super(status, error, message, headers);
1958
+
1959
+ this.code = data?.['code'];
1960
+ this.message = data?.['message'];
1961
+ this.status = data?.['status'];
1962
+ this.details = data?.['details'];
1963
+ }
1964
+ }
1965
+
1966
+ export class InvalidSignature extends AuthenticationError {
1967
+ /**
1968
+ * | Error Code | Description |
1969
+ * | ----------------- | --------------------------- |
1970
+ * | UNAUTHORIZED | Issue with API credentials |
1971
+ * | INVALID_SIGNATURE | Signature header is invalid |
1972
+ */
1973
+ code: 'INVALID_SIGNATURE';
1974
+
1975
+ /**
1976
+ * Error message
1977
+ */
1978
+ override message: string;
1979
+
1980
+ /**
1981
+ * HTTP status code
1982
+ */
1983
+ override status: 401;
1984
+
1985
+ /**
1986
+ * Additional error details
1987
+ */
1988
+ details?: { [key: string]: unknown };
1989
+
1990
+ constructor(status: 401, error: Object, message: string | undefined, headers: Headers) {
1991
+ const data = error as Record<string, any>;
1992
+ super(status, error, message, headers);
1993
+
1994
+ this.code = data?.['code'];
1995
+ this.message = data?.['message'];
1996
+ this.status = data?.['status'];
1997
+ this.details = data?.['details'];
1998
+ }
1999
+ }
2000
+
2001
+ export class Unauthorized extends AuthenticationError {
2002
+ /**
2003
+ * | Error Code | Description |
2004
+ * | ----------------- | --------------------------- |
2005
+ * | UNAUTHORIZED | Issue with API credentials |
2006
+ * | INVALID_SIGNATURE | Signature header is invalid |
2007
+ */
2008
+ code: 'UNAUTHORIZED';
2009
+
2010
+ /**
2011
+ * Error message
2012
+ */
2013
+ override message: string;
2014
+
2015
+ /**
2016
+ * HTTP status code
2017
+ */
2018
+ override status: 401;
2019
+
2020
+ /**
2021
+ * Additional error details
2022
+ */
2023
+ details?: { [key: string]: unknown };
2024
+
2025
+ constructor(status: 401, error: Object, message: string | undefined, headers: Headers) {
2026
+ const data = error as Record<string, any>;
2027
+ super(status, error, message, headers);
2028
+
2029
+ this.code = data?.['code'];
2030
+ this.message = data?.['message'];
2031
+ this.status = data?.['status'];
2032
+ this.details = data?.['details'];
2033
+ }
2034
+ }
2035
+
2036
+ export class CounterpartyNotAllowed extends PermissionDeniedError {
2037
+ /**
2038
+ * | Error Code | Description |
2039
+ * | ------------------------ | -------------------------------------------------- |
2040
+ * | FORBIDDEN | Insufficient permissions |
2041
+ * | USER_NOT_READY | Customer exists but is not ready for operation |
2042
+ * | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account |
2043
+ * | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits |
2044
+ */
2045
+ code: 'COUNTERPARTY_NOT_ALLOWED';
2046
+
2047
+ /**
2048
+ * Error message
2049
+ */
2050
+ override message: string;
2051
+
2052
+ /**
2053
+ * HTTP status code
2054
+ */
2055
+ override status: 403;
2056
+
2057
+ /**
2058
+ * Additional error details
2059
+ */
2060
+ details?: { [key: string]: unknown };
2061
+
2062
+ constructor(status: 403, error: Object, message: string | undefined, headers: Headers) {
2063
+ const data = error as Record<string, any>;
2064
+ super(status, error, message, headers);
2065
+
2066
+ this.code = data?.['code'];
2067
+ this.message = data?.['message'];
2068
+ this.status = data?.['status'];
2069
+ this.details = data?.['details'];
2070
+ }
2071
+ }
2072
+
2073
+ export class Forbidden extends PermissionDeniedError {
2074
+ /**
2075
+ * | Error Code | Description |
2076
+ * | ------------------------ | -------------------------------------------------- |
2077
+ * | FORBIDDEN | Insufficient permissions |
2078
+ * | USER_NOT_READY | Customer exists but is not ready for operation |
2079
+ * | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account |
2080
+ * | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits |
2081
+ */
2082
+ code: 'FORBIDDEN';
2083
+
2084
+ /**
2085
+ * Error message
2086
+ */
2087
+ override message: string;
2088
+
2089
+ /**
2090
+ * HTTP status code
2091
+ */
2092
+ override status: 403;
2093
+
2094
+ /**
2095
+ * Additional error details
2096
+ */
2097
+ details?: { [key: string]: unknown };
2098
+
2099
+ constructor(status: 403, error: Object, message: string | undefined, headers: Headers) {
2100
+ const data = error as Record<string, any>;
2101
+ super(status, error, message, headers);
2102
+
2103
+ this.code = data?.['code'];
2104
+ this.message = data?.['message'];
2105
+ this.status = data?.['status'];
2106
+ this.details = data?.['details'];
2107
+ }
2108
+ }
2109
+
2110
+ export class UserNotReady extends PermissionDeniedError {
2111
+ /**
2112
+ * | Error Code | Description |
2113
+ * | ------------------------ | -------------------------------------------------- |
2114
+ * | FORBIDDEN | Insufficient permissions |
2115
+ * | USER_NOT_READY | Customer exists but is not ready for operation |
2116
+ * | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account |
2117
+ * | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits |
2118
+ */
2119
+ code: 'USER_NOT_READY';
2120
+
2121
+ /**
2122
+ * Error message
2123
+ */
2124
+ override message: string;
2125
+
2126
+ /**
2127
+ * HTTP status code
2128
+ */
2129
+ override status: 403;
2130
+
2131
+ /**
2132
+ * Additional error details
2133
+ */
2134
+ details?: { [key: string]: unknown };
2135
+
2136
+ constructor(status: 403, error: Object, message: string | undefined, headers: Headers) {
2137
+ const data = error as Record<string, any>;
2138
+ super(status, error, message, headers);
2139
+
2140
+ this.code = data?.['code'];
2141
+ this.message = data?.['message'];
2142
+ this.status = data?.['status'];
2143
+ this.details = data?.['details'];
2144
+ }
2145
+ }
2146
+
2147
+ export class VelocityLimitExceeded extends PermissionDeniedError {
2148
+ /**
2149
+ * | Error Code | Description |
2150
+ * | ------------------------ | -------------------------------------------------- |
2151
+ * | FORBIDDEN | Insufficient permissions |
2152
+ * | USER_NOT_READY | Customer exists but is not ready for operation |
2153
+ * | COUNTERPARTY_NOT_ALLOWED | Counterparty has not been enabled for your account |
2154
+ * | VELOCITY_LIMIT_EXCEEDED | Counterparty has exceeded velocity limits |
2155
+ */
2156
+ code: 'VELOCITY_LIMIT_EXCEEDED';
2157
+
2158
+ /**
2159
+ * Error message
2160
+ */
2161
+ override message: string;
2162
+
2163
+ /**
2164
+ * HTTP status code
2165
+ */
2166
+ override status: 403;
2167
+
2168
+ /**
2169
+ * Additional error details
2170
+ */
2171
+ details?: { [key: string]: unknown };
2172
+
2173
+ constructor(status: 403, error: Object, message: string | undefined, headers: Headers) {
2174
+ const data = error as Record<string, any>;
2175
+ super(status, error, message, headers);
2176
+
2177
+ this.code = data?.['code'];
2178
+ this.message = data?.['message'];
2179
+ this.status = data?.['status'];
2180
+ this.details = data?.['details'];
2181
+ }
2182
+ }
2183
+
2184
+ export class BulkUploadJobNotFound extends NotFoundError {
2185
+ /**
2186
+ * | Error Code | Description |
2187
+ * | ------------------------- | ------------------------- |
2188
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2189
+ * | INVITATION_NOT_FOUND | Invitation not found |
2190
+ * | USER_NOT_FOUND | Customer not found |
2191
+ * | QUOTE_NOT_FOUND | Quote not found |
2192
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2193
+ * | TOKEN_NOT_FOUND | Token not found |
2194
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2195
+ * | REFERENCE_NOT_FOUND | Reference not found |
2196
+ */
2197
+ code: 'BULK_UPLOAD_JOB_NOT_FOUND';
2198
+
2199
+ /**
2200
+ * Error message
2201
+ */
2202
+ override message: string;
2203
+
2204
+ /**
2205
+ * HTTP status code
2206
+ */
2207
+ override status: 404;
2208
+
2209
+ /**
2210
+ * Additional error details
2211
+ */
2212
+ details?: { [key: string]: unknown };
2213
+
2214
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2215
+ const data = error as Record<string, any>;
2216
+ super(status, error, message, headers);
2217
+
2218
+ this.code = data?.['code'];
2219
+ this.message = data?.['message'];
2220
+ this.status = data?.['status'];
2221
+ this.details = data?.['details'];
2222
+ }
2223
+ }
2224
+
2225
+ export class InvitationNotFound extends NotFoundError {
2226
+ /**
2227
+ * | Error Code | Description |
2228
+ * | ------------------------- | ------------------------- |
2229
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2230
+ * | INVITATION_NOT_FOUND | Invitation not found |
2231
+ * | USER_NOT_FOUND | Customer not found |
2232
+ * | QUOTE_NOT_FOUND | Quote not found |
2233
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2234
+ * | TOKEN_NOT_FOUND | Token not found |
2235
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2236
+ * | REFERENCE_NOT_FOUND | Reference not found |
2237
+ */
2238
+ code: 'INVITATION_NOT_FOUND';
2239
+
2240
+ /**
2241
+ * Error message
2242
+ */
2243
+ override message: string;
2244
+
2245
+ /**
2246
+ * HTTP status code
2247
+ */
2248
+ override status: 404;
2249
+
2250
+ /**
2251
+ * Additional error details
2252
+ */
2253
+ details?: { [key: string]: unknown };
2254
+
2255
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2256
+ const data = error as Record<string, any>;
2257
+ super(status, error, message, headers);
2258
+
2259
+ this.code = data?.['code'];
2260
+ this.message = data?.['message'];
2261
+ this.status = data?.['status'];
2262
+ this.details = data?.['details'];
2263
+ }
2264
+ }
2265
+
2266
+ export class LookupRequestNotFound extends NotFoundError {
2267
+ /**
2268
+ * | Error Code | Description |
2269
+ * | ------------------------- | ------------------------- |
2270
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2271
+ * | INVITATION_NOT_FOUND | Invitation not found |
2272
+ * | USER_NOT_FOUND | Customer not found |
2273
+ * | QUOTE_NOT_FOUND | Quote not found |
2274
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2275
+ * | TOKEN_NOT_FOUND | Token not found |
2276
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2277
+ * | REFERENCE_NOT_FOUND | Reference not found |
2278
+ */
2279
+ code: 'LOOKUP_REQUEST_NOT_FOUND';
2280
+
2281
+ /**
2282
+ * Error message
2283
+ */
2284
+ override message: string;
2285
+
2286
+ /**
2287
+ * HTTP status code
2288
+ */
2289
+ override status: 404;
2290
+
2291
+ /**
2292
+ * Additional error details
2293
+ */
2294
+ details?: { [key: string]: unknown };
2295
+
2296
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2297
+ const data = error as Record<string, any>;
2298
+ super(status, error, message, headers);
2299
+
2300
+ this.code = data?.['code'];
2301
+ this.message = data?.['message'];
2302
+ this.status = data?.['status'];
2303
+ this.details = data?.['details'];
2304
+ }
2305
+ }
2306
+
2307
+ export class QuoteNotFound extends NotFoundError {
2308
+ /**
2309
+ * | Error Code | Description |
2310
+ * | ------------------------- | ------------------------- |
2311
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2312
+ * | INVITATION_NOT_FOUND | Invitation not found |
2313
+ * | USER_NOT_FOUND | Customer not found |
2314
+ * | QUOTE_NOT_FOUND | Quote not found |
2315
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2316
+ * | TOKEN_NOT_FOUND | Token not found |
2317
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2318
+ * | REFERENCE_NOT_FOUND | Reference not found |
2319
+ */
2320
+ code: 'QUOTE_NOT_FOUND';
2321
+
2322
+ /**
2323
+ * Error message
2324
+ */
2325
+ override message: string;
2326
+
2327
+ /**
2328
+ * HTTP status code
2329
+ */
2330
+ override status: 404;
2331
+
2332
+ /**
2333
+ * Additional error details
2334
+ */
2335
+ details?: { [key: string]: unknown };
2336
+
2337
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2338
+ const data = error as Record<string, any>;
2339
+ super(status, error, message, headers);
2340
+
2341
+ this.code = data?.['code'];
2342
+ this.message = data?.['message'];
2343
+ this.status = data?.['status'];
2344
+ this.details = data?.['details'];
2345
+ }
2346
+ }
2347
+
2348
+ export class ReferenceNotFound extends NotFoundError {
2349
+ /**
2350
+ * | Error Code | Description |
2351
+ * | ------------------------- | ------------------------- |
2352
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2353
+ * | INVITATION_NOT_FOUND | Invitation not found |
2354
+ * | USER_NOT_FOUND | Customer not found |
2355
+ * | QUOTE_NOT_FOUND | Quote not found |
2356
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2357
+ * | TOKEN_NOT_FOUND | Token not found |
2358
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2359
+ * | REFERENCE_NOT_FOUND | Reference not found |
2360
+ */
2361
+ code: 'REFERENCE_NOT_FOUND';
2362
+
2363
+ /**
2364
+ * Error message
2365
+ */
2366
+ override message: string;
2367
+
2368
+ /**
2369
+ * HTTP status code
2370
+ */
2371
+ override status: 404;
2372
+
2373
+ /**
2374
+ * Additional error details
2375
+ */
2376
+ details?: { [key: string]: unknown };
2377
+
2378
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2379
+ const data = error as Record<string, any>;
2380
+ super(status, error, message, headers);
2381
+
2382
+ this.code = data?.['code'];
2383
+ this.message = data?.['message'];
2384
+ this.status = data?.['status'];
2385
+ this.details = data?.['details'];
2386
+ }
2387
+ }
2388
+
2389
+ export class TokenNotFound extends NotFoundError {
2390
+ /**
2391
+ * | Error Code | Description |
2392
+ * | ------------------------- | ------------------------- |
2393
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2394
+ * | INVITATION_NOT_FOUND | Invitation not found |
2395
+ * | USER_NOT_FOUND | Customer not found |
2396
+ * | QUOTE_NOT_FOUND | Quote not found |
2397
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2398
+ * | TOKEN_NOT_FOUND | Token not found |
2399
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2400
+ * | REFERENCE_NOT_FOUND | Reference not found |
2401
+ */
2402
+ code: 'TOKEN_NOT_FOUND';
2403
+
2404
+ /**
2405
+ * Error message
2406
+ */
2407
+ override message: string;
2408
+
2409
+ /**
2410
+ * HTTP status code
2411
+ */
2412
+ override status: 404;
2413
+
2414
+ /**
2415
+ * Additional error details
2416
+ */
2417
+ details?: { [key: string]: unknown };
2418
+
2419
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2420
+ const data = error as Record<string, any>;
2421
+ super(status, error, message, headers);
2422
+
2423
+ this.code = data?.['code'];
2424
+ this.message = data?.['message'];
2425
+ this.status = data?.['status'];
2426
+ this.details = data?.['details'];
2427
+ }
2428
+ }
2429
+
2430
+ export class TransactionNotFound extends NotFoundError {
2431
+ /**
2432
+ * | Error Code | Description |
2433
+ * | ------------------------- | ------------------------- |
2434
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2435
+ * | INVITATION_NOT_FOUND | Invitation not found |
2436
+ * | USER_NOT_FOUND | Customer not found |
2437
+ * | QUOTE_NOT_FOUND | Quote not found |
2438
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2439
+ * | TOKEN_NOT_FOUND | Token not found |
2440
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2441
+ * | REFERENCE_NOT_FOUND | Reference not found |
2442
+ */
2443
+ code: 'TRANSACTION_NOT_FOUND';
2444
+
2445
+ /**
2446
+ * Error message
2447
+ */
2448
+ override message: string;
2449
+
2450
+ /**
2451
+ * HTTP status code
2452
+ */
2453
+ override status: 404;
2454
+
2455
+ /**
2456
+ * Additional error details
2457
+ */
2458
+ details?: { [key: string]: unknown };
2459
+
2460
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2461
+ const data = error as Record<string, any>;
2462
+ super(status, error, message, headers);
2463
+
2464
+ this.code = data?.['code'];
2465
+ this.message = data?.['message'];
2466
+ this.status = data?.['status'];
2467
+ this.details = data?.['details'];
2468
+ }
2469
+ }
2470
+
2471
+ export class UserNotFound extends NotFoundError {
2472
+ /**
2473
+ * | Error Code | Description |
2474
+ * | ------------------------- | ------------------------- |
2475
+ * | TRANSACTION_NOT_FOUND | Transaction not found |
2476
+ * | INVITATION_NOT_FOUND | Invitation not found |
2477
+ * | USER_NOT_FOUND | Customer not found |
2478
+ * | QUOTE_NOT_FOUND | Quote not found |
2479
+ * | LOOKUP_REQUEST_NOT_FOUND | Lookup request not found |
2480
+ * | TOKEN_NOT_FOUND | Token not found |
2481
+ * | BULK_UPLOAD_JOB_NOT_FOUND | Bulk upload job not found |
2482
+ * | REFERENCE_NOT_FOUND | Reference not found |
2483
+ */
2484
+ code: 'USER_NOT_FOUND';
2485
+
2486
+ /**
2487
+ * Error message
2488
+ */
2489
+ override message: string;
2490
+
2491
+ /**
2492
+ * HTTP status code
2493
+ */
2494
+ override status: 404;
2495
+
2496
+ /**
2497
+ * Additional error details
2498
+ */
2499
+ details?: { [key: string]: unknown };
2500
+
2501
+ constructor(status: 404, error: Object, message: string | undefined, headers: Headers) {
2502
+ const data = error as Record<string, any>;
2503
+ super(status, error, message, headers);
2504
+
2505
+ this.code = data?.['code'];
2506
+ this.message = data?.['message'];
2507
+ this.status = data?.['status'];
2508
+ this.details = data?.['details'];
2509
+ }
2510
+ }
2511
+
2512
+ export class TransactionNotPendingPlatformApproval extends ConflictError {
2513
+ /**
2514
+ * | Error Code | Description |
2515
+ * | ----------------------------------------- | -------------------------------------------- |
2516
+ * | TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL | Transaction is not pending platform approval |
2517
+ * | UMA_ADDRESS_EXISTS | UMA address already exists |
2518
+ */
2519
+ code: 'TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL';
2520
+
2521
+ /**
2522
+ * Error message
2523
+ */
2524
+ override message: string;
2525
+
2526
+ /**
2527
+ * HTTP status code
2528
+ */
2529
+ override status: 409;
2530
+
2531
+ /**
2532
+ * Additional error details
2533
+ */
2534
+ details?: { [key: string]: unknown };
2535
+
2536
+ constructor(status: 409, error: Object, message: string | undefined, headers: Headers) {
2537
+ const data = error as Record<string, any>;
2538
+ super(status, error, message, headers);
2539
+
2540
+ this.code = data?.['code'];
2541
+ this.message = data?.['message'];
2542
+ this.status = data?.['status'];
2543
+ this.details = data?.['details'];
2544
+ }
2545
+ }
2546
+
2547
+ export class UmaAddressExists extends ConflictError {
2548
+ /**
2549
+ * | Error Code | Description |
2550
+ * | ----------------------------------------- | -------------------------------------------- |
2551
+ * | TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL | Transaction is not pending platform approval |
2552
+ * | UMA_ADDRESS_EXISTS | UMA address already exists |
2553
+ */
2554
+ code: 'UMA_ADDRESS_EXISTS';
2555
+
2556
+ /**
2557
+ * Error message
2558
+ */
2559
+ override message: string;
2560
+
2561
+ /**
2562
+ * HTTP status code
2563
+ */
2564
+ override status: 409;
2565
+
2566
+ /**
2567
+ * Additional error details
2568
+ */
2569
+ details?: { [key: string]: unknown };
2570
+
2571
+ constructor(status: 409, error: Object, message: string | undefined, headers: Headers) {
2572
+ const data = error as Record<string, any>;
2573
+ super(status, error, message, headers);
2574
+
2575
+ this.code = data?.['code'];
2576
+ this.message = data?.['message'];
2577
+ this.status = data?.['status'];
2578
+ this.details = data?.['details'];
2579
+ }
2580
+ }
2581
+
2582
+ export class CustomerDeleted extends APIError {
2583
+ /**
2584
+ * | Error Code | Description |
2585
+ * | ---------------- | ------------------------------------- |
2586
+ * | CUSTOMER_DELETED | Customer has been permanently deleted |
2587
+ */
2588
+ code: 'CUSTOMER_DELETED';
2589
+
2590
+ /**
2591
+ * Error message
2592
+ */
2593
+ override message: string;
2594
+
2595
+ /**
2596
+ * HTTP status code
2597
+ */
2598
+ override status: 410;
2599
+
2600
+ /**
2601
+ * Additional error details
2602
+ */
2603
+ details?: { [key: string]: unknown };
2604
+
2605
+ constructor(status: 410, error: Object, message: string | undefined, headers: Headers) {
2606
+ const data = error as Record<string, any>;
2607
+ super(status, error, message, headers);
2608
+
2609
+ this.code = data?.['code'];
2610
+ this.message = data?.['message'];
2611
+ this.status = data?.['status'];
2612
+ this.details = data?.['details'];
2613
+ }
2614
+ }
2615
+
2616
+ export class UnsupportedUmaVersion extends APIError {
2617
+ /**
2618
+ * | Error Code | Description |
2619
+ * | ----------------------- | ------------------------------------------------- |
2620
+ * | UNSUPPORTED_UMA_VERSION | Counterparty doesn't support the Grid UMA version |
2621
+ */
2622
+ code: 'UNSUPPORTED_UMA_VERSION';
2623
+
2624
+ /**
2625
+ * Error message
2626
+ */
2627
+ override message: string;
2628
+
2629
+ /**
2630
+ * HTTP status code
2631
+ */
2632
+ override status: 412;
2633
+
2634
+ /**
2635
+ * Additional error details
2636
+ */
2637
+ details?: { [key: string]: unknown };
2638
+
2639
+ constructor(status: 412, error: Object, message: string | undefined, headers: Headers) {
2640
+ const data = error as Record<string, any>;
2641
+ super(status, error, message, headers);
2642
+
2643
+ this.code = data?.['code'];
2644
+ this.message = data?.['message'];
2645
+ this.status = data?.['status'];
2646
+ this.details = data?.['details'];
2647
+ }
2648
+ }
2649
+
2650
+ export class CounterpartyPubkeyFetchError extends APIError {
2651
+ /**
2652
+ * | Error Code | Description |
2653
+ * | ------------------------------- | -------------------------------------- |
2654
+ * | PAYREQ_REQUEST_FAILED | Payment request failed |
2655
+ * | COUNTERPARTY_PUBKEY_FETCH_ERROR | Error fetching counterparty public key |
2656
+ * | NO_COMPATIBLE_UMA_VERSION | No compatible UMA version |
2657
+ * | LNURLP_REQUEST_FAILED | LNURLP request failed |
2658
+ */
2659
+ code: 'COUNTERPARTY_PUBKEY_FETCH_ERROR';
2660
+
2661
+ /**
2662
+ * Error message
2663
+ */
2664
+ override message: string;
2665
+
2666
+ /**
2667
+ * HTTP status code
2668
+ */
2669
+ override status: 424;
2670
+
2671
+ /**
2672
+ * Additional error details
2673
+ */
2674
+ details?: { [key: string]: unknown };
2675
+
2676
+ constructor(status: 424, error: Object, message: string | undefined, headers: Headers) {
2677
+ const data = error as Record<string, any>;
2678
+ super(status, error, message, headers);
2679
+
2680
+ this.code = data?.['code'];
2681
+ this.message = data?.['message'];
2682
+ this.status = data?.['status'];
2683
+ this.details = data?.['details'];
2684
+ }
2685
+ }
2686
+
2687
+ export class LnurlpRequestFailed extends APIError {
2688
+ /**
2689
+ * | Error Code | Description |
2690
+ * | ------------------------------- | -------------------------------------- |
2691
+ * | PAYREQ_REQUEST_FAILED | Payment request failed |
2692
+ * | COUNTERPARTY_PUBKEY_FETCH_ERROR | Error fetching counterparty public key |
2693
+ * | NO_COMPATIBLE_UMA_VERSION | No compatible UMA version |
2694
+ * | LNURLP_REQUEST_FAILED | LNURLP request failed |
2695
+ */
2696
+ code: 'LNURLP_REQUEST_FAILED';
2697
+
2698
+ /**
2699
+ * Error message
2700
+ */
2701
+ override message: string;
2702
+
2703
+ /**
2704
+ * HTTP status code
2705
+ */
2706
+ override status: 424;
2707
+
2708
+ /**
2709
+ * Additional error details
2710
+ */
2711
+ details?: { [key: string]: unknown };
2712
+
2713
+ constructor(status: 424, error: Object, message: string | undefined, headers: Headers) {
2714
+ const data = error as Record<string, any>;
2715
+ super(status, error, message, headers);
2716
+
2717
+ this.code = data?.['code'];
2718
+ this.message = data?.['message'];
2719
+ this.status = data?.['status'];
2720
+ this.details = data?.['details'];
2721
+ }
2722
+ }
2723
+
2724
+ export class NoCompatibleUmaVersion extends APIError {
2725
+ /**
2726
+ * | Error Code | Description |
2727
+ * | ------------------------------- | -------------------------------------- |
2728
+ * | PAYREQ_REQUEST_FAILED | Payment request failed |
2729
+ * | COUNTERPARTY_PUBKEY_FETCH_ERROR | Error fetching counterparty public key |
2730
+ * | NO_COMPATIBLE_UMA_VERSION | No compatible UMA version |
2731
+ * | LNURLP_REQUEST_FAILED | LNURLP request failed |
2732
+ */
2733
+ code: 'NO_COMPATIBLE_UMA_VERSION';
2734
+
2735
+ /**
2736
+ * Error message
2737
+ */
2738
+ override message: string;
2739
+
2740
+ /**
2741
+ * HTTP status code
2742
+ */
2743
+ override status: 424;
2744
+
2745
+ /**
2746
+ * Additional error details
2747
+ */
2748
+ details?: { [key: string]: unknown };
2749
+
2750
+ constructor(status: 424, error: Object, message: string | undefined, headers: Headers) {
2751
+ const data = error as Record<string, any>;
2752
+ super(status, error, message, headers);
2753
+
2754
+ this.code = data?.['code'];
2755
+ this.message = data?.['message'];
2756
+ this.status = data?.['status'];
2757
+ this.details = data?.['details'];
2758
+ }
2759
+ }
2760
+
2761
+ export class PayreqRequestFailed extends APIError {
2762
+ /**
2763
+ * | Error Code | Description |
2764
+ * | ------------------------------- | -------------------------------------- |
2765
+ * | PAYREQ_REQUEST_FAILED | Payment request failed |
2766
+ * | COUNTERPARTY_PUBKEY_FETCH_ERROR | Error fetching counterparty public key |
2767
+ * | NO_COMPATIBLE_UMA_VERSION | No compatible UMA version |
2768
+ * | LNURLP_REQUEST_FAILED | LNURLP request failed |
2769
+ */
2770
+ code: 'PAYREQ_REQUEST_FAILED';
2771
+
2772
+ /**
2773
+ * Error message
2774
+ */
2775
+ override message: string;
2776
+
2777
+ /**
2778
+ * HTTP status code
2779
+ */
2780
+ override status: 424;
2781
+
2782
+ /**
2783
+ * Additional error details
2784
+ */
2785
+ details?: { [key: string]: unknown };
2786
+
2787
+ constructor(status: 424, error: Object, message: string | undefined, headers: Headers) {
2788
+ const data = error as Record<string, any>;
2789
+ super(status, error, message, headers);
2790
+
2791
+ this.code = data?.['code'];
2792
+ this.message = data?.['message'];
2793
+ this.status = data?.['status'];
2794
+ this.details = data?.['details'];
2795
+ }
2796
+ }
2797
+
2798
+ export class GridSwitchError extends InternalServerError {
2799
+ /**
2800
+ * | Error Code | Description |
2801
+ * | ----------------- | ---------------------------- |
2802
+ * | GRID_SWITCH_ERROR | Grid switch error |
2803
+ * | INTERNAL_ERROR | Internal server or UMA error |
2804
+ */
2805
+ code: 'GRID_SWITCH_ERROR';
2806
+
2807
+ /**
2808
+ * Error message
2809
+ */
2810
+ override message: string;
2811
+
2812
+ /**
2813
+ * HTTP status code
2814
+ */
2815
+ override status: 500;
2816
+
2817
+ /**
2818
+ * Additional error details
2819
+ */
2820
+ details?: { [key: string]: unknown };
2821
+
2822
+ constructor(status: 500, error: Object, message: string | undefined, headers: Headers) {
2823
+ const data = error as Record<string, any>;
2824
+ super(status, error, message, headers);
2825
+
2826
+ this.code = data?.['code'];
2827
+ this.message = data?.['message'];
2828
+ this.status = data?.['status'];
2829
+ this.details = data?.['details'];
2830
+ }
2831
+ }
2832
+
2833
+ export class InternalError extends InternalServerError {
2834
+ /**
2835
+ * | Error Code | Description |
2836
+ * | ----------------- | ---------------------------- |
2837
+ * | GRID_SWITCH_ERROR | Grid switch error |
2838
+ * | INTERNAL_ERROR | Internal server or UMA error |
2839
+ */
2840
+ code: 'INTERNAL_ERROR';
2841
+
2842
+ /**
2843
+ * Error message
2844
+ */
2845
+ override message: string;
2846
+
2847
+ /**
2848
+ * HTTP status code
2849
+ */
2850
+ override status: 500;
2851
+
2852
+ /**
2853
+ * Additional error details
2854
+ */
2855
+ details?: { [key: string]: unknown };
2856
+
2857
+ constructor(status: 500, error: Object, message: string | undefined, headers: Headers) {
2858
+ const data = error as Record<string, any>;
2859
+ super(status, error, message, headers);
2860
+
2861
+ this.code = data?.['code'];
2862
+ this.message = data?.['message'];
2863
+ this.status = data?.['status'];
2864
+ this.details = data?.['details'];
2865
+ }
2866
+ }
2867
+
2868
+ export class NotImplemented extends APIError {
2869
+ /**
2870
+ * | Error Code | Description |
2871
+ * | ------------------------------------- | ------------------------------------- |
2872
+ * | UNRECOGNIZED_MANDATORY_PAYEE_DATA_KEY | Unrecognized mandatory payee data key |
2873
+ * | NOT_IMPLEMENTED | Feature not implemented |
2874
+ */
2875
+ code: 'NOT_IMPLEMENTED';
2876
+
2877
+ /**
2878
+ * Error message
2879
+ */
2880
+ override message: string;
2881
+
2882
+ /**
2883
+ * HTTP status code
2884
+ */
2885
+ override status: 501;
2886
+
2887
+ /**
2888
+ * Additional error details
2889
+ */
2890
+ details?: { [key: string]: unknown };
2891
+
2892
+ constructor(status: 501, error: Object, message: string | undefined, headers: Headers) {
2893
+ const data = error as Record<string, any>;
2894
+ super(status, error, message, headers);
2895
+
2896
+ this.code = data?.['code'];
2897
+ this.message = data?.['message'];
2898
+ this.status = data?.['status'];
2899
+ this.details = data?.['details'];
2900
+ }
2901
+ }
2902
+
2903
+ export class UnrecognizedMandatoryPayeeDataKey extends APIError {
2904
+ /**
2905
+ * | Error Code | Description |
2906
+ * | ------------------------------------- | ------------------------------------- |
2907
+ * | UNRECOGNIZED_MANDATORY_PAYEE_DATA_KEY | Unrecognized mandatory payee data key |
2908
+ * | NOT_IMPLEMENTED | Feature not implemented |
2909
+ */
2910
+ code: 'UNRECOGNIZED_MANDATORY_PAYEE_DATA_KEY';
2911
+
2912
+ /**
2913
+ * Error message
2914
+ */
2915
+ override message: string;
2916
+
2917
+ /**
2918
+ * HTTP status code
2919
+ */
2920
+ override status: 501;
2921
+
2922
+ /**
2923
+ * Additional error details
2924
+ */
2925
+ details?: { [key: string]: unknown };
2926
+
2927
+ constructor(status: 501, error: Object, message: string | undefined, headers: Headers) {
2928
+ const data = error as Record<string, any>;
2929
+ super(status, error, message, headers);
2930
+
2931
+ this.code = data?.['code'];
2932
+ this.message = data?.['message'];
2933
+ this.status = data?.['status'];
2934
+ this.details = data?.['details'];
2935
+ }
2936
+ }