@naturalpay/sdk 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (507) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/LICENSE +7 -0
  3. package/README.md +340 -26
  4. package/api-promise.d.mts +3 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +3 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +3 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +267 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +267 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +560 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +556 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +3 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +3 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +3 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/qs/formats.d.mts +7 -0
  109. package/internal/qs/formats.d.mts.map +1 -0
  110. package/internal/qs/formats.d.ts +7 -0
  111. package/internal/qs/formats.d.ts.map +1 -0
  112. package/internal/qs/formats.js +13 -0
  113. package/internal/qs/formats.js.map +1 -0
  114. package/internal/qs/formats.mjs +9 -0
  115. package/internal/qs/formats.mjs.map +1 -0
  116. package/internal/qs/index.d.mts +10 -0
  117. package/internal/qs/index.d.mts.map +1 -0
  118. package/internal/qs/index.d.ts +10 -0
  119. package/internal/qs/index.d.ts.map +1 -0
  120. package/internal/qs/index.js +14 -0
  121. package/internal/qs/index.js.map +1 -0
  122. package/internal/qs/index.mjs +10 -0
  123. package/internal/qs/index.mjs.map +1 -0
  124. package/internal/qs/stringify.d.mts +3 -0
  125. package/internal/qs/stringify.d.mts.map +1 -0
  126. package/internal/qs/stringify.d.ts +3 -0
  127. package/internal/qs/stringify.d.ts.map +1 -0
  128. package/internal/qs/stringify.js +277 -0
  129. package/internal/qs/stringify.js.map +1 -0
  130. package/internal/qs/stringify.mjs +274 -0
  131. package/internal/qs/stringify.mjs.map +1 -0
  132. package/internal/qs/types.d.mts +57 -0
  133. package/internal/qs/types.d.mts.map +1 -0
  134. package/internal/qs/types.d.ts +57 -0
  135. package/internal/qs/types.d.ts.map +1 -0
  136. package/internal/qs/types.js +3 -0
  137. package/internal/qs/types.js.map +1 -0
  138. package/internal/qs/types.mjs +2 -0
  139. package/internal/qs/types.mjs.map +1 -0
  140. package/internal/qs/utils.d.mts +15 -0
  141. package/internal/qs/utils.d.mts.map +1 -0
  142. package/internal/qs/utils.d.ts +15 -0
  143. package/internal/qs/utils.d.ts.map +1 -0
  144. package/internal/qs/utils.js +230 -0
  145. package/internal/qs/utils.js.map +1 -0
  146. package/internal/qs/utils.mjs +217 -0
  147. package/internal/qs/utils.mjs.map +1 -0
  148. package/internal/request-options.d.mts +75 -0
  149. package/internal/request-options.d.mts.map +1 -0
  150. package/internal/request-options.d.ts +75 -0
  151. package/internal/request-options.d.ts.map +1 -0
  152. package/internal/request-options.js +14 -0
  153. package/internal/request-options.js.map +1 -0
  154. package/internal/request-options.mjs +10 -0
  155. package/internal/request-options.mjs.map +1 -0
  156. package/internal/shim-types.d.mts +17 -0
  157. package/internal/shim-types.d.mts.map +1 -0
  158. package/internal/shim-types.d.ts +17 -0
  159. package/internal/shim-types.d.ts.map +1 -0
  160. package/internal/shim-types.js +4 -0
  161. package/internal/shim-types.js.map +1 -0
  162. package/internal/shim-types.mjs +3 -0
  163. package/internal/shim-types.mjs.map +1 -0
  164. package/internal/shims.d.mts +26 -0
  165. package/internal/shims.d.mts.map +1 -0
  166. package/internal/shims.d.ts +26 -0
  167. package/internal/shims.d.ts.map +1 -0
  168. package/internal/shims.js +92 -0
  169. package/internal/shims.js.map +1 -0
  170. package/internal/shims.mjs +85 -0
  171. package/internal/shims.mjs.map +1 -0
  172. package/internal/to-file.d.mts +45 -0
  173. package/internal/to-file.d.mts.map +1 -0
  174. package/internal/to-file.d.ts +45 -0
  175. package/internal/to-file.d.ts.map +1 -0
  176. package/internal/to-file.js +91 -0
  177. package/internal/to-file.js.map +1 -0
  178. package/internal/to-file.mjs +88 -0
  179. package/internal/to-file.mjs.map +1 -0
  180. package/internal/tslib.js +81 -0
  181. package/internal/tslib.mjs +17 -0
  182. package/internal/types.d.mts +69 -0
  183. package/internal/types.d.mts.map +1 -0
  184. package/internal/types.d.ts +69 -0
  185. package/internal/types.d.ts.map +1 -0
  186. package/internal/types.js +4 -0
  187. package/internal/types.js.map +1 -0
  188. package/internal/types.mjs +3 -0
  189. package/internal/types.mjs.map +1 -0
  190. package/internal/uploads.d.mts +42 -0
  191. package/internal/uploads.d.mts.map +1 -0
  192. package/internal/uploads.d.ts +42 -0
  193. package/internal/uploads.d.ts.map +1 -0
  194. package/internal/uploads.js +141 -0
  195. package/internal/uploads.js.map +1 -0
  196. package/internal/uploads.mjs +131 -0
  197. package/internal/uploads.mjs.map +1 -0
  198. package/internal/utils/base64.d.mts +3 -0
  199. package/internal/utils/base64.d.mts.map +1 -0
  200. package/internal/utils/base64.d.ts +3 -0
  201. package/internal/utils/base64.d.ts.map +1 -0
  202. package/internal/utils/base64.js +38 -0
  203. package/internal/utils/base64.js.map +1 -0
  204. package/internal/utils/base64.mjs +33 -0
  205. package/internal/utils/base64.mjs.map +1 -0
  206. package/internal/utils/bytes.d.mts +4 -0
  207. package/internal/utils/bytes.d.mts.map +1 -0
  208. package/internal/utils/bytes.d.ts +4 -0
  209. package/internal/utils/bytes.d.ts.map +1 -0
  210. package/internal/utils/bytes.js +31 -0
  211. package/internal/utils/bytes.js.map +1 -0
  212. package/internal/utils/bytes.mjs +26 -0
  213. package/internal/utils/bytes.mjs.map +1 -0
  214. package/internal/utils/env.d.mts +9 -0
  215. package/internal/utils/env.d.mts.map +1 -0
  216. package/internal/utils/env.d.ts +9 -0
  217. package/internal/utils/env.d.ts.map +1 -0
  218. package/internal/utils/env.js +22 -0
  219. package/internal/utils/env.js.map +1 -0
  220. package/internal/utils/env.mjs +18 -0
  221. package/internal/utils/env.mjs.map +1 -0
  222. package/internal/utils/log.d.mts +37 -0
  223. package/internal/utils/log.d.mts.map +1 -0
  224. package/internal/utils/log.d.ts +37 -0
  225. package/internal/utils/log.d.ts.map +1 -0
  226. package/internal/utils/log.js +87 -0
  227. package/internal/utils/log.js.map +1 -0
  228. package/internal/utils/log.mjs +81 -0
  229. package/internal/utils/log.mjs.map +1 -0
  230. package/internal/utils/path.d.mts +15 -0
  231. package/internal/utils/path.d.mts.map +1 -0
  232. package/internal/utils/path.d.ts +15 -0
  233. package/internal/utils/path.d.ts.map +1 -0
  234. package/internal/utils/path.js +79 -0
  235. package/internal/utils/path.js.map +1 -0
  236. package/internal/utils/path.mjs +74 -0
  237. package/internal/utils/path.mjs.map +1 -0
  238. package/internal/utils/query.d.mts +2 -0
  239. package/internal/utils/query.d.mts.map +1 -0
  240. package/internal/utils/query.d.ts +2 -0
  241. package/internal/utils/query.d.ts.map +1 -0
  242. package/internal/utils/query.js +10 -0
  243. package/internal/utils/query.js.map +1 -0
  244. package/internal/utils/query.mjs +6 -0
  245. package/internal/utils/query.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +8 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +8 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +12 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +9 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/lib/envelope.d.mts +4 -0
  279. package/lib/envelope.d.mts.map +1 -0
  280. package/lib/envelope.d.ts +4 -0
  281. package/lib/envelope.d.ts.map +1 -0
  282. package/lib/envelope.js +43 -0
  283. package/lib/envelope.js.map +1 -0
  284. package/lib/envelope.mjs +39 -0
  285. package/lib/envelope.mjs.map +1 -0
  286. package/package.json +142 -76
  287. package/resource.d.mts +3 -0
  288. package/resource.d.mts.map +1 -0
  289. package/resource.d.ts +3 -0
  290. package/resource.d.ts.map +1 -0
  291. package/resource.js +6 -0
  292. package/resource.js.map +1 -0
  293. package/resource.mjs +3 -0
  294. package/resource.mjs.map +1 -0
  295. package/resources/agents.d.mts +1243 -0
  296. package/resources/agents.d.mts.map +1 -0
  297. package/resources/agents.d.ts +1243 -0
  298. package/resources/agents.d.ts.map +1 -0
  299. package/resources/agents.js +192 -0
  300. package/resources/agents.js.map +1 -0
  301. package/resources/agents.mjs +188 -0
  302. package/resources/agents.mjs.map +1 -0
  303. package/resources/api-keys.d.mts +539 -0
  304. package/resources/api-keys.d.mts.map +1 -0
  305. package/resources/api-keys.d.ts +539 -0
  306. package/resources/api-keys.d.ts.map +1 -0
  307. package/resources/api-keys.js +100 -0
  308. package/resources/api-keys.js.map +1 -0
  309. package/resources/api-keys.mjs +96 -0
  310. package/resources/api-keys.mjs.map +1 -0
  311. package/resources/counterparties.d.mts +89 -0
  312. package/resources/counterparties.d.mts.map +1 -0
  313. package/resources/counterparties.d.ts +89 -0
  314. package/resources/counterparties.d.ts.map +1 -0
  315. package/resources/counterparties.js +30 -0
  316. package/resources/counterparties.js.map +1 -0
  317. package/resources/counterparties.mjs +26 -0
  318. package/resources/counterparties.mjs.map +1 -0
  319. package/resources/customers.d.mts +272 -0
  320. package/resources/customers.d.mts.map +1 -0
  321. package/resources/customers.d.ts +272 -0
  322. package/resources/customers.d.ts.map +1 -0
  323. package/resources/customers.js +48 -0
  324. package/resources/customers.js.map +1 -0
  325. package/resources/customers.mjs +44 -0
  326. package/resources/customers.mjs.map +1 -0
  327. package/resources/delegations.d.mts +458 -0
  328. package/resources/delegations.d.mts.map +1 -0
  329. package/resources/delegations.d.ts +458 -0
  330. package/resources/delegations.d.ts.map +1 -0
  331. package/resources/delegations.js +47 -0
  332. package/resources/delegations.js.map +1 -0
  333. package/resources/delegations.mjs +43 -0
  334. package/resources/delegations.mjs.map +1 -0
  335. package/resources/external-accounts.d.mts +239 -0
  336. package/resources/external-accounts.d.mts.map +1 -0
  337. package/resources/external-accounts.d.ts +239 -0
  338. package/resources/external-accounts.d.ts.map +1 -0
  339. package/resources/external-accounts.js +47 -0
  340. package/resources/external-accounts.js.map +1 -0
  341. package/resources/external-accounts.mjs +43 -0
  342. package/resources/external-accounts.mjs.map +1 -0
  343. package/resources/index.d.mts +14 -0
  344. package/resources/index.d.mts.map +1 -0
  345. package/resources/index.d.ts +14 -0
  346. package/resources/index.d.ts.map +1 -0
  347. package/resources/index.js +31 -0
  348. package/resources/index.js.map +1 -0
  349. package/resources/index.mjs +15 -0
  350. package/resources/index.mjs.map +1 -0
  351. package/resources/invitations.d.mts +304 -0
  352. package/resources/invitations.d.mts.map +1 -0
  353. package/resources/invitations.d.ts +304 -0
  354. package/resources/invitations.d.ts.map +1 -0
  355. package/resources/invitations.js +85 -0
  356. package/resources/invitations.js.map +1 -0
  357. package/resources/invitations.mjs +81 -0
  358. package/resources/invitations.mjs.map +1 -0
  359. package/resources/parties.d.mts +364 -0
  360. package/resources/parties.d.mts.map +1 -0
  361. package/resources/parties.d.ts +364 -0
  362. package/resources/parties.d.ts.map +1 -0
  363. package/resources/parties.js +78 -0
  364. package/resources/parties.js.map +1 -0
  365. package/resources/parties.mjs +74 -0
  366. package/resources/parties.mjs.map +1 -0
  367. package/resources/payment-requests.d.mts +449 -0
  368. package/resources/payment-requests.d.mts.map +1 -0
  369. package/resources/payment-requests.d.ts +449 -0
  370. package/resources/payment-requests.d.ts.map +1 -0
  371. package/resources/payment-requests.js +86 -0
  372. package/resources/payment-requests.js.map +1 -0
  373. package/resources/payment-requests.mjs +82 -0
  374. package/resources/payment-requests.mjs.map +1 -0
  375. package/resources/payments.d.mts +174 -0
  376. package/resources/payments.d.mts.map +1 -0
  377. package/resources/payments.d.ts +174 -0
  378. package/resources/payments.d.ts.map +1 -0
  379. package/resources/payments.js +40 -0
  380. package/resources/payments.js.map +1 -0
  381. package/resources/payments.mjs +36 -0
  382. package/resources/payments.mjs.map +1 -0
  383. package/resources/transactions.d.mts +486 -0
  384. package/resources/transactions.d.mts.map +1 -0
  385. package/resources/transactions.d.ts +486 -0
  386. package/resources/transactions.d.ts.map +1 -0
  387. package/resources/transactions.js +48 -0
  388. package/resources/transactions.js.map +1 -0
  389. package/resources/transactions.mjs +44 -0
  390. package/resources/transactions.mjs.map +1 -0
  391. package/resources/wallet.d.mts +496 -0
  392. package/resources/wallet.d.mts.map +1 -0
  393. package/resources/wallet.d.ts +496 -0
  394. package/resources/wallet.d.ts.map +1 -0
  395. package/resources/wallet.js +114 -0
  396. package/resources/wallet.js.map +1 -0
  397. package/resources/wallet.mjs +110 -0
  398. package/resources/wallet.mjs.map +1 -0
  399. package/resources/webhooks.d.mts +775 -0
  400. package/resources/webhooks.d.mts.map +1 -0
  401. package/resources/webhooks.d.ts +775 -0
  402. package/resources/webhooks.d.ts.map +1 -0
  403. package/resources/webhooks.js +163 -0
  404. package/resources/webhooks.js.map +1 -0
  405. package/resources/webhooks.mjs +159 -0
  406. package/resources/webhooks.mjs.map +1 -0
  407. package/resources.d.mts +2 -0
  408. package/resources.d.mts.map +1 -0
  409. package/resources.d.ts +2 -0
  410. package/resources.d.ts.map +1 -0
  411. package/resources.js +5 -0
  412. package/resources.js.map +1 -0
  413. package/resources.mjs +2 -0
  414. package/resources.mjs.map +1 -0
  415. package/src/api-promise.ts +2 -0
  416. package/src/client.ts +1068 -0
  417. package/src/core/README.md +3 -0
  418. package/src/core/api-promise.ts +92 -0
  419. package/src/core/error.ts +130 -0
  420. package/src/core/resource.ts +11 -0
  421. package/src/core/uploads.ts +2 -0
  422. package/src/error.ts +2 -0
  423. package/src/index.ts +22 -0
  424. package/src/internal/README.md +3 -0
  425. package/src/internal/builtin-types.ts +93 -0
  426. package/src/internal/detect-platform.ts +196 -0
  427. package/src/internal/errors.ts +33 -0
  428. package/src/internal/headers.ts +97 -0
  429. package/src/internal/parse.ts +56 -0
  430. package/src/internal/qs/LICENSE.md +13 -0
  431. package/src/internal/qs/README.md +3 -0
  432. package/src/internal/qs/formats.ts +10 -0
  433. package/src/internal/qs/index.ts +13 -0
  434. package/src/internal/qs/stringify.ts +385 -0
  435. package/src/internal/qs/types.ts +71 -0
  436. package/src/internal/qs/utils.ts +265 -0
  437. package/src/internal/request-options.ts +91 -0
  438. package/src/internal/shim-types.ts +26 -0
  439. package/src/internal/shims.ts +107 -0
  440. package/src/internal/to-file.ts +154 -0
  441. package/src/internal/types.ts +93 -0
  442. package/src/internal/uploads.ts +187 -0
  443. package/src/internal/utils/base64.ts +40 -0
  444. package/src/internal/utils/bytes.ts +32 -0
  445. package/src/internal/utils/env.ts +18 -0
  446. package/src/internal/utils/log.ts +128 -0
  447. package/src/internal/utils/path.ts +88 -0
  448. package/src/internal/utils/query.ts +7 -0
  449. package/src/internal/utils/sleep.ts +3 -0
  450. package/src/internal/utils/uuid.ts +17 -0
  451. package/src/internal/utils/values.ts +105 -0
  452. package/src/internal/utils.ts +9 -0
  453. package/src/lib/.keep +4 -0
  454. package/src/lib/envelope.ts +32 -0
  455. package/src/resource.ts +2 -0
  456. package/src/resources/agents.ts +1605 -0
  457. package/src/resources/api-keys.ts +743 -0
  458. package/src/resources/counterparties.ts +128 -0
  459. package/src/resources/customers.ts +365 -0
  460. package/src/resources/delegations.ts +580 -0
  461. package/src/resources/external-accounts.ts +324 -0
  462. package/src/resources/index.ts +113 -0
  463. package/src/resources/invitations.ts +414 -0
  464. package/src/resources/parties.ts +493 -0
  465. package/src/resources/payment-requests.ts +611 -0
  466. package/src/resources/payments.ts +228 -0
  467. package/src/resources/transactions.ts +620 -0
  468. package/src/resources/wallet.ts +668 -0
  469. package/src/resources/webhooks.ts +1225 -0
  470. package/src/resources.ts +1 -0
  471. package/src/tsconfig.json +11 -0
  472. package/src/uploads.ts +2 -0
  473. package/src/version.ts +1 -0
  474. package/uploads.d.mts +3 -0
  475. package/uploads.d.mts.map +1 -0
  476. package/uploads.d.ts +3 -0
  477. package/uploads.d.ts.map +1 -0
  478. package/uploads.js +6 -0
  479. package/uploads.js.map +1 -0
  480. package/uploads.mjs +3 -0
  481. package/uploads.mjs.map +1 -0
  482. package/version.d.mts +2 -0
  483. package/version.d.mts.map +1 -0
  484. package/version.d.ts +2 -0
  485. package/version.d.ts.map +1 -0
  486. package/version.js +5 -0
  487. package/version.js.map +1 -0
  488. package/version.mjs +2 -0
  489. package/version.mjs.map +1 -0
  490. package/dist/index.cjs +0 -1737
  491. package/dist/index.cjs.map +0 -1
  492. package/dist/index.d.cts +0 -929
  493. package/dist/index.d.ts +0 -929
  494. package/dist/index.js +0 -1705
  495. package/dist/index.js.map +0 -1
  496. package/dist/mcp/cli.cjs +0 -166
  497. package/dist/mcp/cli.cjs.map +0 -1
  498. package/dist/mcp/cli.d.cts +0 -1
  499. package/dist/mcp/cli.d.ts +0 -1
  500. package/dist/mcp/cli.js +0 -164
  501. package/dist/mcp/cli.js.map +0 -1
  502. package/dist/mcp/index.cjs +0 -8
  503. package/dist/mcp/index.cjs.map +0 -1
  504. package/dist/mcp/index.d.cts +0 -9
  505. package/dist/mcp/index.d.ts +0 -9
  506. package/dist/mcp/index.js +0 -6
  507. package/dist/mcp/index.js.map +0 -1
@@ -0,0 +1,1243 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ /**
5
+ * Agent management
6
+ */
7
+ export declare class Agents extends APIResource {
8
+ /**
9
+ * Create a new agent for your party.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const agent = await client.agents.create({
14
+ * name: 'x',
15
+ * 'Idempotency-Key': 'Idempotency-Key',
16
+ * });
17
+ * ```
18
+ */
19
+ create(params: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
20
+ /**
21
+ * Update an existing agent's mutable fields.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const agent = await client.agents.update(
26
+ * 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
27
+ * { 'Idempotency-Key': 'Idempotency-Key' },
28
+ * );
29
+ * ```
30
+ */
31
+ update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentUpdateResponse>;
32
+ /**
33
+ * List agents in your party.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const agents = await client.agents.list();
38
+ * ```
39
+ */
40
+ list(params?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
41
+ /**
42
+ * Developer-only. Creates one invitation per agent and sends a single Resend email
43
+ * to the customer.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const response = await client.agents.createInvitations({
48
+ * agents: [
49
+ * {
50
+ * agentId: 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
51
+ * permissions: ['string'],
52
+ * },
53
+ * ],
54
+ * customerEmail: 'dev@stainless.com',
55
+ * 'Idempotency-Key': 'Idempotency-Key',
56
+ * });
57
+ * ```
58
+ */
59
+ createInvitations(params: AgentCreateInvitationsParams, options?: RequestOptions): APIPromise<AgentCreateInvitationsResponse>;
60
+ /**
61
+ * Get agent details by its unique ID.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const agent = await client.agents.get(
66
+ * 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
67
+ * );
68
+ * ```
69
+ */
70
+ get(agentID: string, params?: AgentGetParams | null | undefined, options?: RequestOptions): APIPromise<AgentGetResponse>;
71
+ /**
72
+ * List agent delegation invitations
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response =
77
+ * await client.agents.listInvitationsForDeveloper();
78
+ * ```
79
+ */
80
+ listInvitationsForDeveloper(params?: AgentListInvitationsForDeveloperParams | null | undefined, options?: RequestOptions): APIPromise<AgentListInvitationsForDeveloperResponse>;
81
+ /**
82
+ * Revoke an agent.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const agent = await client.agents.remove(
87
+ * 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
88
+ * { 'Idempotency-Key': 'Idempotency-Key' },
89
+ * );
90
+ * ```
91
+ */
92
+ remove(agentID: string, params: AgentRemoveParams, options?: RequestOptions): APIPromise<AgentRemoveResponse>;
93
+ }
94
+ export interface AgentCreateResponse {
95
+ data: AgentCreateResponse.Data;
96
+ }
97
+ export declare namespace AgentCreateResponse {
98
+ interface Data {
99
+ /**
100
+ * Resource ID
101
+ */
102
+ id: string;
103
+ /**
104
+ * Resource attributes
105
+ */
106
+ attributes: Data.Attributes;
107
+ /**
108
+ * Resource relationships
109
+ */
110
+ relationships: Data.Relationships;
111
+ /**
112
+ * Resource type
113
+ */
114
+ type: string;
115
+ }
116
+ namespace Data {
117
+ /**
118
+ * Resource attributes
119
+ */
120
+ interface Attributes {
121
+ /**
122
+ * When this agent was created
123
+ */
124
+ createdAt: string | null;
125
+ /**
126
+ * User who created this agent (usr\_\*)
127
+ */
128
+ createdBy: string | null;
129
+ /**
130
+ * Agent description
131
+ */
132
+ description: string | null;
133
+ /**
134
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
135
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
136
+ */
137
+ limits: Attributes.Limits | null;
138
+ /**
139
+ * Agent display name
140
+ */
141
+ name: string;
142
+ /**
143
+ * Agent status
144
+ */
145
+ status: 'ACTIVE' | 'REVOKED';
146
+ }
147
+ namespace Attributes {
148
+ /**
149
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
150
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
151
+ */
152
+ interface Limits {
153
+ /**
154
+ * Positive per-transaction limit in cents. null means no per-payment limit.
155
+ */
156
+ perTransaction?: number | null;
157
+ }
158
+ }
159
+ /**
160
+ * Resource relationships
161
+ */
162
+ interface Relationships {
163
+ /**
164
+ * Party that owns the agent
165
+ */
166
+ party: Relationships.Party;
167
+ }
168
+ namespace Relationships {
169
+ /**
170
+ * Party that owns the agent
171
+ */
172
+ interface Party {
173
+ /**
174
+ * Related resource identifier
175
+ */
176
+ data: Party.Data;
177
+ }
178
+ namespace Party {
179
+ /**
180
+ * Related resource identifier
181
+ */
182
+ interface Data {
183
+ id: string;
184
+ /**
185
+ * Resource type
186
+ */
187
+ type: string;
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ export interface AgentUpdateResponse {
194
+ data: AgentUpdateResponse.Data;
195
+ }
196
+ export declare namespace AgentUpdateResponse {
197
+ interface Data {
198
+ /**
199
+ * Resource ID
200
+ */
201
+ id: string;
202
+ /**
203
+ * Resource attributes
204
+ */
205
+ attributes: Data.Attributes;
206
+ /**
207
+ * Resource relationships
208
+ */
209
+ relationships: Data.Relationships;
210
+ /**
211
+ * Resource type
212
+ */
213
+ type: string;
214
+ }
215
+ namespace Data {
216
+ /**
217
+ * Resource attributes
218
+ */
219
+ interface Attributes {
220
+ /**
221
+ * When this agent was created
222
+ */
223
+ createdAt: string | null;
224
+ /**
225
+ * User who created this agent (usr\_\*)
226
+ */
227
+ createdBy: string | null;
228
+ /**
229
+ * Agent description
230
+ */
231
+ description: string | null;
232
+ /**
233
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
234
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
235
+ */
236
+ limits: Attributes.Limits | null;
237
+ /**
238
+ * Agent display name
239
+ */
240
+ name: string;
241
+ /**
242
+ * Agent status
243
+ */
244
+ status: 'ACTIVE' | 'REVOKED';
245
+ }
246
+ namespace Attributes {
247
+ /**
248
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
249
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
250
+ */
251
+ interface Limits {
252
+ /**
253
+ * Positive per-transaction limit in cents. null means no per-payment limit.
254
+ */
255
+ perTransaction?: number | null;
256
+ }
257
+ }
258
+ /**
259
+ * Resource relationships
260
+ */
261
+ interface Relationships {
262
+ /**
263
+ * Party that owns the agent
264
+ */
265
+ party: Relationships.Party;
266
+ }
267
+ namespace Relationships {
268
+ /**
269
+ * Party that owns the agent
270
+ */
271
+ interface Party {
272
+ /**
273
+ * Related resource identifier
274
+ */
275
+ data: Party.Data;
276
+ }
277
+ namespace Party {
278
+ /**
279
+ * Related resource identifier
280
+ */
281
+ interface Data {
282
+ id: string;
283
+ /**
284
+ * Resource type
285
+ */
286
+ type: string;
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
292
+ export interface AgentListResponse {
293
+ data: Array<AgentListResponse.Data>;
294
+ meta: AgentListResponse.Meta;
295
+ }
296
+ export declare namespace AgentListResponse {
297
+ interface Data {
298
+ /**
299
+ * Resource ID
300
+ */
301
+ id: string;
302
+ /**
303
+ * Resource attributes
304
+ */
305
+ attributes: Data.Attributes;
306
+ /**
307
+ * Resource relationships
308
+ */
309
+ relationships: Data.Relationships;
310
+ /**
311
+ * Resource type
312
+ */
313
+ type: string;
314
+ }
315
+ namespace Data {
316
+ /**
317
+ * Resource attributes
318
+ */
319
+ interface Attributes {
320
+ /**
321
+ * When this agent was created
322
+ */
323
+ createdAt: string | null;
324
+ /**
325
+ * User who created this agent (usr\_\*)
326
+ */
327
+ createdBy: string | null;
328
+ /**
329
+ * Agent description
330
+ */
331
+ description: string | null;
332
+ /**
333
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
334
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
335
+ */
336
+ limits: Attributes.Limits | null;
337
+ /**
338
+ * Agent display name
339
+ */
340
+ name: string;
341
+ /**
342
+ * Agent status
343
+ */
344
+ status: 'ACTIVE' | 'REVOKED';
345
+ }
346
+ namespace Attributes {
347
+ /**
348
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
349
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
350
+ */
351
+ interface Limits {
352
+ /**
353
+ * Positive per-transaction limit in cents. null means no per-payment limit.
354
+ */
355
+ perTransaction?: number | null;
356
+ }
357
+ }
358
+ /**
359
+ * Resource relationships
360
+ */
361
+ interface Relationships {
362
+ /**
363
+ * Party that owns the agent
364
+ */
365
+ party: Relationships.Party;
366
+ }
367
+ namespace Relationships {
368
+ /**
369
+ * Party that owns the agent
370
+ */
371
+ interface Party {
372
+ /**
373
+ * Related resource identifier
374
+ */
375
+ data: Party.Data;
376
+ }
377
+ namespace Party {
378
+ /**
379
+ * Related resource identifier
380
+ */
381
+ interface Data {
382
+ id: string;
383
+ /**
384
+ * Resource type
385
+ */
386
+ type: string;
387
+ }
388
+ }
389
+ }
390
+ }
391
+ interface Meta {
392
+ pagination: Meta.Pagination;
393
+ }
394
+ namespace Meta {
395
+ interface Pagination {
396
+ hasMore: boolean;
397
+ nextCursor: string | null;
398
+ }
399
+ }
400
+ }
401
+ export interface AgentCreateInvitationsResponse {
402
+ /**
403
+ * Successfully created invitation resources
404
+ */
405
+ data: Array<AgentCreateInvitationsResponse.Data>;
406
+ /**
407
+ * Batch invitation metadata
408
+ */
409
+ meta: AgentCreateInvitationsResponse.Meta;
410
+ }
411
+ export declare namespace AgentCreateInvitationsResponse {
412
+ interface Data {
413
+ /**
414
+ * Invitation ID (adi\_\*)
415
+ */
416
+ id: string;
417
+ /**
418
+ * Resource attributes
419
+ */
420
+ attributes: Data.Attributes;
421
+ /**
422
+ * Related resource identifiers
423
+ */
424
+ relationships: Data.Relationships;
425
+ /**
426
+ * Resource type
427
+ */
428
+ type: string;
429
+ }
430
+ namespace Data {
431
+ /**
432
+ * Resource attributes
433
+ */
434
+ interface Attributes {
435
+ /**
436
+ * When this invitation was accepted
437
+ */
438
+ acceptedAt: string | null;
439
+ /**
440
+ * Display name of the agent being delegated
441
+ */
442
+ agentName: string;
443
+ /**
444
+ * Why the invitation was cancelled
445
+ */
446
+ cancelReason: 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | null;
447
+ /**
448
+ * When this invitation was created
449
+ */
450
+ createdAt: string;
451
+ /**
452
+ * When this invitation was declined
453
+ */
454
+ declinedAt: string | null;
455
+ /**
456
+ * Display name of the developer party
457
+ */
458
+ developerName: string;
459
+ /**
460
+ * Status after applying expiry and cancel-reason overlays
461
+ */
462
+ effectiveStatus: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
463
+ /**
464
+ * Customer email the invitation was sent to
465
+ */
466
+ email: string;
467
+ /**
468
+ * When this invitation expires
469
+ */
470
+ expiresAt: string;
471
+ /**
472
+ * Per-agent transaction limits
473
+ */
474
+ limits: Attributes.Limits | null;
475
+ /**
476
+ * Permissions the agent will hold on accept
477
+ */
478
+ permissions: Array<string>;
479
+ /**
480
+ * Raw persisted status
481
+ */
482
+ status: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
483
+ /**
484
+ * When this invitation was last updated
485
+ */
486
+ updatedAt: string;
487
+ }
488
+ namespace Attributes {
489
+ /**
490
+ * Per-agent transaction limits
491
+ */
492
+ interface Limits {
493
+ /**
494
+ * Per-transaction cap, integer cents (USD).
495
+ */
496
+ perTransaction?: number | null;
497
+ }
498
+ }
499
+ /**
500
+ * Related resource identifiers
501
+ */
502
+ interface Relationships {
503
+ /**
504
+ * Agent being delegated
505
+ */
506
+ agent: Relationships.Agent;
507
+ /**
508
+ * Resulting agent delegation once accepted; currently null on public create/list
509
+ * responses
510
+ */
511
+ agentDelegation: Relationships.AgentDelegation;
512
+ /**
513
+ * Customer party the invitation was accepted on (null until accept)
514
+ */
515
+ customerParty: Relationships.CustomerParty;
516
+ /**
517
+ * Developer party that issued the invitation
518
+ */
519
+ developerParty: Relationships.DeveloperParty;
520
+ }
521
+ namespace Relationships {
522
+ /**
523
+ * Agent being delegated
524
+ */
525
+ interface Agent {
526
+ /**
527
+ * Related resource identifier
528
+ */
529
+ data: Agent.Data;
530
+ }
531
+ namespace Agent {
532
+ /**
533
+ * Related resource identifier
534
+ */
535
+ interface Data {
536
+ id: string;
537
+ /**
538
+ * Resource type
539
+ */
540
+ type: string;
541
+ }
542
+ }
543
+ /**
544
+ * Resulting agent delegation once accepted; currently null on public create/list
545
+ * responses
546
+ */
547
+ interface AgentDelegation {
548
+ /**
549
+ * Related resource identifier
550
+ */
551
+ data: AgentDelegation.Data | null;
552
+ }
553
+ namespace AgentDelegation {
554
+ /**
555
+ * Related resource identifier
556
+ */
557
+ interface Data {
558
+ id: string;
559
+ /**
560
+ * Resource type
561
+ */
562
+ type: string;
563
+ }
564
+ }
565
+ /**
566
+ * Customer party the invitation was accepted on (null until accept)
567
+ */
568
+ interface CustomerParty {
569
+ /**
570
+ * Related resource identifier
571
+ */
572
+ data: CustomerParty.Data | null;
573
+ }
574
+ namespace CustomerParty {
575
+ /**
576
+ * Related resource identifier
577
+ */
578
+ interface Data {
579
+ id: string;
580
+ /**
581
+ * Resource type
582
+ */
583
+ type: string;
584
+ }
585
+ }
586
+ /**
587
+ * Developer party that issued the invitation
588
+ */
589
+ interface DeveloperParty {
590
+ /**
591
+ * Related resource identifier
592
+ */
593
+ data: DeveloperParty.Data;
594
+ }
595
+ namespace DeveloperParty {
596
+ /**
597
+ * Related resource identifier
598
+ */
599
+ interface Data {
600
+ id: string;
601
+ /**
602
+ * Resource type
603
+ */
604
+ type: string;
605
+ }
606
+ }
607
+ }
608
+ }
609
+ /**
610
+ * Batch invitation metadata
611
+ */
612
+ interface Meta {
613
+ /**
614
+ * Invitation IDs whose welcome-email send failed. Invitations are still persisted;
615
+ * use the resend-email flow to retry.
616
+ */
617
+ emailFailures: Array<string>;
618
+ }
619
+ }
620
+ export interface AgentGetResponse {
621
+ data: AgentGetResponse.Data;
622
+ }
623
+ export declare namespace AgentGetResponse {
624
+ interface Data {
625
+ /**
626
+ * Resource ID
627
+ */
628
+ id: string;
629
+ /**
630
+ * Resource attributes
631
+ */
632
+ attributes: Data.Attributes;
633
+ /**
634
+ * Resource relationships
635
+ */
636
+ relationships: Data.Relationships;
637
+ /**
638
+ * Resource type
639
+ */
640
+ type: string;
641
+ }
642
+ namespace Data {
643
+ /**
644
+ * Resource attributes
645
+ */
646
+ interface Attributes {
647
+ /**
648
+ * When this agent was created
649
+ */
650
+ createdAt: string | null;
651
+ /**
652
+ * User who created this agent (usr\_\*)
653
+ */
654
+ createdBy: string | null;
655
+ /**
656
+ * Agent description
657
+ */
658
+ description: string | null;
659
+ /**
660
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
661
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
662
+ */
663
+ limits: Attributes.Limits | null;
664
+ /**
665
+ * Agent display name
666
+ */
667
+ name: string;
668
+ /**
669
+ * Agent status
670
+ */
671
+ status: 'ACTIVE' | 'REVOKED';
672
+ }
673
+ namespace Attributes {
674
+ /**
675
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
676
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
677
+ */
678
+ interface Limits {
679
+ /**
680
+ * Positive per-transaction limit in cents. null means no per-payment limit.
681
+ */
682
+ perTransaction?: number | null;
683
+ }
684
+ }
685
+ /**
686
+ * Resource relationships
687
+ */
688
+ interface Relationships {
689
+ /**
690
+ * Party that owns the agent
691
+ */
692
+ party: Relationships.Party;
693
+ }
694
+ namespace Relationships {
695
+ /**
696
+ * Party that owns the agent
697
+ */
698
+ interface Party {
699
+ /**
700
+ * Related resource identifier
701
+ */
702
+ data: Party.Data;
703
+ }
704
+ namespace Party {
705
+ /**
706
+ * Related resource identifier
707
+ */
708
+ interface Data {
709
+ id: string;
710
+ /**
711
+ * Resource type
712
+ */
713
+ type: string;
714
+ }
715
+ }
716
+ }
717
+ }
718
+ }
719
+ export interface AgentListInvitationsForDeveloperResponse {
720
+ data: Array<AgentListInvitationsForDeveloperResponse.Data>;
721
+ meta: AgentListInvitationsForDeveloperResponse.Meta;
722
+ }
723
+ export declare namespace AgentListInvitationsForDeveloperResponse {
724
+ interface Data {
725
+ /**
726
+ * Invitation ID (adi\_\*)
727
+ */
728
+ id: string;
729
+ /**
730
+ * Resource attributes
731
+ */
732
+ attributes: Data.Attributes;
733
+ /**
734
+ * Related resource identifiers
735
+ */
736
+ relationships: Data.Relationships;
737
+ /**
738
+ * Resource type
739
+ */
740
+ type: string;
741
+ }
742
+ namespace Data {
743
+ /**
744
+ * Resource attributes
745
+ */
746
+ interface Attributes {
747
+ /**
748
+ * When this invitation was accepted
749
+ */
750
+ acceptedAt: string | null;
751
+ /**
752
+ * Display name of the agent being delegated
753
+ */
754
+ agentName: string;
755
+ /**
756
+ * Why the invitation was cancelled
757
+ */
758
+ cancelReason: 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | null;
759
+ /**
760
+ * When this invitation was created
761
+ */
762
+ createdAt: string;
763
+ /**
764
+ * When this invitation was declined
765
+ */
766
+ declinedAt: string | null;
767
+ /**
768
+ * Display name of the developer party
769
+ */
770
+ developerName: string;
771
+ /**
772
+ * Status after applying expiry and cancel-reason overlays
773
+ */
774
+ effectiveStatus: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
775
+ /**
776
+ * Customer email the invitation was sent to
777
+ */
778
+ email: string;
779
+ /**
780
+ * When this invitation expires
781
+ */
782
+ expiresAt: string;
783
+ /**
784
+ * Per-agent transaction limits
785
+ */
786
+ limits: Attributes.Limits | null;
787
+ /**
788
+ * Permissions the agent will hold on accept
789
+ */
790
+ permissions: Array<string>;
791
+ /**
792
+ * Raw persisted status
793
+ */
794
+ status: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
795
+ /**
796
+ * When this invitation was last updated
797
+ */
798
+ updatedAt: string;
799
+ }
800
+ namespace Attributes {
801
+ /**
802
+ * Per-agent transaction limits
803
+ */
804
+ interface Limits {
805
+ /**
806
+ * Per-transaction cap, integer cents (USD).
807
+ */
808
+ perTransaction?: number | null;
809
+ }
810
+ }
811
+ /**
812
+ * Related resource identifiers
813
+ */
814
+ interface Relationships {
815
+ /**
816
+ * Agent being delegated
817
+ */
818
+ agent: Relationships.Agent;
819
+ /**
820
+ * Resulting agent delegation once accepted; currently null on public create/list
821
+ * responses
822
+ */
823
+ agentDelegation: Relationships.AgentDelegation;
824
+ /**
825
+ * Customer party the invitation was accepted on (null until accept)
826
+ */
827
+ customerParty: Relationships.CustomerParty;
828
+ /**
829
+ * Developer party that issued the invitation
830
+ */
831
+ developerParty: Relationships.DeveloperParty;
832
+ }
833
+ namespace Relationships {
834
+ /**
835
+ * Agent being delegated
836
+ */
837
+ interface Agent {
838
+ /**
839
+ * Related resource identifier
840
+ */
841
+ data: Agent.Data;
842
+ }
843
+ namespace Agent {
844
+ /**
845
+ * Related resource identifier
846
+ */
847
+ interface Data {
848
+ id: string;
849
+ /**
850
+ * Resource type
851
+ */
852
+ type: string;
853
+ }
854
+ }
855
+ /**
856
+ * Resulting agent delegation once accepted; currently null on public create/list
857
+ * responses
858
+ */
859
+ interface AgentDelegation {
860
+ /**
861
+ * Related resource identifier
862
+ */
863
+ data: AgentDelegation.Data | null;
864
+ }
865
+ namespace AgentDelegation {
866
+ /**
867
+ * Related resource identifier
868
+ */
869
+ interface Data {
870
+ id: string;
871
+ /**
872
+ * Resource type
873
+ */
874
+ type: string;
875
+ }
876
+ }
877
+ /**
878
+ * Customer party the invitation was accepted on (null until accept)
879
+ */
880
+ interface CustomerParty {
881
+ /**
882
+ * Related resource identifier
883
+ */
884
+ data: CustomerParty.Data | null;
885
+ }
886
+ namespace CustomerParty {
887
+ /**
888
+ * Related resource identifier
889
+ */
890
+ interface Data {
891
+ id: string;
892
+ /**
893
+ * Resource type
894
+ */
895
+ type: string;
896
+ }
897
+ }
898
+ /**
899
+ * Developer party that issued the invitation
900
+ */
901
+ interface DeveloperParty {
902
+ /**
903
+ * Related resource identifier
904
+ */
905
+ data: DeveloperParty.Data;
906
+ }
907
+ namespace DeveloperParty {
908
+ /**
909
+ * Related resource identifier
910
+ */
911
+ interface Data {
912
+ id: string;
913
+ /**
914
+ * Resource type
915
+ */
916
+ type: string;
917
+ }
918
+ }
919
+ }
920
+ }
921
+ interface Meta {
922
+ pagination: Meta.Pagination;
923
+ }
924
+ namespace Meta {
925
+ interface Pagination {
926
+ hasMore: boolean;
927
+ nextCursor: string | null;
928
+ }
929
+ }
930
+ }
931
+ export interface AgentRemoveResponse {
932
+ data: AgentRemoveResponse.Data;
933
+ meta: AgentRemoveResponse.Meta;
934
+ }
935
+ export declare namespace AgentRemoveResponse {
936
+ interface Data {
937
+ /**
938
+ * Resource ID
939
+ */
940
+ id: string;
941
+ /**
942
+ * Resource attributes
943
+ */
944
+ attributes: Data.Attributes;
945
+ /**
946
+ * Resource relationships
947
+ */
948
+ relationships: Data.Relationships;
949
+ /**
950
+ * Resource type
951
+ */
952
+ type: string;
953
+ }
954
+ namespace Data {
955
+ /**
956
+ * Resource attributes
957
+ */
958
+ interface Attributes {
959
+ /**
960
+ * When this agent was created
961
+ */
962
+ createdAt: string | null;
963
+ /**
964
+ * User who created this agent (usr\_\*)
965
+ */
966
+ createdBy: string | null;
967
+ /**
968
+ * Agent description
969
+ */
970
+ description: string | null;
971
+ /**
972
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
973
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
974
+ */
975
+ limits: Attributes.Limits | null;
976
+ /**
977
+ * Agent display name
978
+ */
979
+ name: string;
980
+ /**
981
+ * Agent status
982
+ */
983
+ status: 'ACTIVE' | 'REVOKED';
984
+ }
985
+ namespace Attributes {
986
+ /**
987
+ * Per-transaction spend cap for actions this agent initiates on its owner's party.
988
+ * null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
989
+ */
990
+ interface Limits {
991
+ /**
992
+ * Positive per-transaction limit in cents. null means no per-payment limit.
993
+ */
994
+ perTransaction?: number | null;
995
+ }
996
+ }
997
+ /**
998
+ * Resource relationships
999
+ */
1000
+ interface Relationships {
1001
+ /**
1002
+ * Party that owns the agent
1003
+ */
1004
+ party: Relationships.Party;
1005
+ }
1006
+ namespace Relationships {
1007
+ /**
1008
+ * Party that owns the agent
1009
+ */
1010
+ interface Party {
1011
+ /**
1012
+ * Related resource identifier
1013
+ */
1014
+ data: Party.Data;
1015
+ }
1016
+ namespace Party {
1017
+ /**
1018
+ * Related resource identifier
1019
+ */
1020
+ interface Data {
1021
+ id: string;
1022
+ /**
1023
+ * Resource type
1024
+ */
1025
+ type: string;
1026
+ }
1027
+ }
1028
+ }
1029
+ }
1030
+ interface Meta {
1031
+ /**
1032
+ * Indicates the resource was deleted
1033
+ */
1034
+ deleted: true;
1035
+ }
1036
+ }
1037
+ export interface AgentCreateParams {
1038
+ /**
1039
+ * Body param: Agent display name
1040
+ */
1041
+ name: string;
1042
+ /**
1043
+ * Header param: Unique key for idempotent request handling. If a request with the
1044
+ * same key was already processed, the original response is returned.
1045
+ */
1046
+ 'Idempotency-Key': string;
1047
+ /**
1048
+ * Body param: Agent description
1049
+ */
1050
+ description?: string;
1051
+ /**
1052
+ * Body param: Optional per-transaction limit for the agent
1053
+ */
1054
+ limits?: AgentCreateParams.Limits;
1055
+ /**
1056
+ * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1057
+ */
1058
+ 'X-Agent-ID'?: string;
1059
+ /**
1060
+ * Header param: Required when X-Agent-ID is present. Session or conversation ID
1061
+ * for agent observability.
1062
+ */
1063
+ 'X-Instance-ID'?: string;
1064
+ }
1065
+ export declare namespace AgentCreateParams {
1066
+ /**
1067
+ * Optional per-transaction limit for the agent
1068
+ */
1069
+ interface Limits {
1070
+ /**
1071
+ * Positive per-transaction limit in cents. null means no per-payment limit.
1072
+ */
1073
+ perTransaction?: number | null;
1074
+ }
1075
+ }
1076
+ export interface AgentUpdateParams {
1077
+ /**
1078
+ * Header param: Unique key for idempotent request handling. If a request with the
1079
+ * same key was already processed, the original response is returned.
1080
+ */
1081
+ 'Idempotency-Key': string;
1082
+ /**
1083
+ * Body param: Updated description
1084
+ */
1085
+ description?: string | null;
1086
+ /**
1087
+ * Body param: Per-transaction spend cap. null clears the limit; omitted leaves it
1088
+ * unchanged.
1089
+ */
1090
+ limits?: AgentUpdateParams.Limits | null;
1091
+ /**
1092
+ * Body param: Updated name for the agent
1093
+ */
1094
+ name?: string | null;
1095
+ /**
1096
+ * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1097
+ */
1098
+ 'X-Agent-ID'?: string;
1099
+ /**
1100
+ * Header param: Required when X-Agent-ID is present. Session or conversation ID
1101
+ * for agent observability.
1102
+ */
1103
+ 'X-Instance-ID'?: string;
1104
+ }
1105
+ export declare namespace AgentUpdateParams {
1106
+ /**
1107
+ * Per-transaction spend cap. null clears the limit; omitted leaves it unchanged.
1108
+ */
1109
+ interface Limits {
1110
+ /**
1111
+ * Positive per-transaction limit in cents. null means no per-payment limit.
1112
+ */
1113
+ perTransaction?: number | null;
1114
+ }
1115
+ }
1116
+ export interface AgentListParams {
1117
+ /**
1118
+ * Query param: Cursor for the next page
1119
+ */
1120
+ cursor?: string;
1121
+ /**
1122
+ * Query param: Maximum number of agents to return
1123
+ */
1124
+ limit?: number;
1125
+ /**
1126
+ * Query param: Filter by status
1127
+ */
1128
+ status?: 'ACTIVE' | 'REVOKED';
1129
+ /**
1130
+ * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1131
+ */
1132
+ 'X-Agent-ID'?: string;
1133
+ /**
1134
+ * Header param: Required when X-Agent-ID is present. Session or conversation ID
1135
+ * for agent observability.
1136
+ */
1137
+ 'X-Instance-ID'?: string;
1138
+ }
1139
+ export interface AgentCreateInvitationsParams {
1140
+ /**
1141
+ * Body param: Per-agent delegation requests (1-50)
1142
+ */
1143
+ agents: Array<AgentCreateInvitationsParams.Agent>;
1144
+ /**
1145
+ * Body param: Email address of the customer to invite
1146
+ */
1147
+ customerEmail: string;
1148
+ /**
1149
+ * Header param: Unique key for idempotent request handling. If a request with the
1150
+ * same key was already processed, the original response is returned.
1151
+ */
1152
+ 'Idempotency-Key': string;
1153
+ /**
1154
+ * Body param: Optional explicit expiry timestamp; server defaults to 7 days
1155
+ */
1156
+ expiresAt?: string;
1157
+ /**
1158
+ * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1159
+ */
1160
+ 'X-Agent-ID'?: string;
1161
+ /**
1162
+ * Header param: Required when X-Agent-ID is present. Session or conversation ID
1163
+ * for agent observability.
1164
+ */
1165
+ 'X-Instance-ID'?: string;
1166
+ }
1167
+ export declare namespace AgentCreateInvitationsParams {
1168
+ interface Agent {
1169
+ agentId: string;
1170
+ permissions: Array<string>;
1171
+ limits?: Agent.Limits;
1172
+ }
1173
+ namespace Agent {
1174
+ interface Limits {
1175
+ /**
1176
+ * Per-transaction cap, integer cents (USD).
1177
+ */
1178
+ perTransaction?: number | null;
1179
+ }
1180
+ }
1181
+ }
1182
+ export interface AgentGetParams {
1183
+ /**
1184
+ * Agent ID (agt_xxx) identifying which agent is making the request.
1185
+ */
1186
+ 'X-Agent-ID'?: string;
1187
+ /**
1188
+ * Required when X-Agent-ID is present. Session or conversation ID for agent
1189
+ * observability.
1190
+ */
1191
+ 'X-Instance-ID'?: string;
1192
+ }
1193
+ export interface AgentListInvitationsForDeveloperParams {
1194
+ /**
1195
+ * Query param
1196
+ */
1197
+ agentId?: string;
1198
+ /**
1199
+ * Query param
1200
+ */
1201
+ cursor?: string;
1202
+ /**
1203
+ * Query param
1204
+ */
1205
+ customerEmail?: string;
1206
+ /**
1207
+ * Query param
1208
+ */
1209
+ limit?: number;
1210
+ /**
1211
+ * Query param
1212
+ */
1213
+ status?: Array<'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED'>;
1214
+ /**
1215
+ * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1216
+ */
1217
+ 'X-Agent-ID'?: string;
1218
+ /**
1219
+ * Header param: Required when X-Agent-ID is present. Session or conversation ID
1220
+ * for agent observability.
1221
+ */
1222
+ 'X-Instance-ID'?: string;
1223
+ }
1224
+ export interface AgentRemoveParams {
1225
+ /**
1226
+ * Unique key for idempotent request handling. If a request with the same key was
1227
+ * already processed, the original response is returned.
1228
+ */
1229
+ 'Idempotency-Key': string;
1230
+ /**
1231
+ * Agent ID (agt_xxx) identifying which agent is making the request.
1232
+ */
1233
+ 'X-Agent-ID'?: string;
1234
+ /**
1235
+ * Required when X-Agent-ID is present. Session or conversation ID for agent
1236
+ * observability.
1237
+ */
1238
+ 'X-Instance-ID'?: string;
1239
+ }
1240
+ export declare namespace Agents {
1241
+ export { type AgentCreateResponse as AgentCreateResponse, type AgentUpdateResponse as AgentUpdateResponse, type AgentListResponse as AgentListResponse, type AgentCreateInvitationsResponse as AgentCreateInvitationsResponse, type AgentGetResponse as AgentGetResponse, type AgentListInvitationsForDeveloperResponse as AgentListInvitationsForDeveloperResponse, type AgentRemoveResponse as AgentRemoveResponse, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, type AgentCreateInvitationsParams as AgentCreateInvitationsParams, type AgentGetParams as AgentGetParams, type AgentListInvitationsForDeveloperParams as AgentListInvitationsForDeveloperParams, type AgentRemoveParams as AgentRemoveParams, };
1242
+ }
1243
+ //# sourceMappingURL=agents.d.mts.map