@revenexx/node 0.1.0 → 0.1.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 (342) hide show
  1. package/README.md +3 -0
  2. package/dist/client.d.mts +25 -0
  3. package/dist/client.d.ts +25 -0
  4. package/dist/client.js +39 -18
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +35 -14
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/enums/approval-rule-approver-type.d.mts +7 -0
  9. package/dist/enums/approval-rule-approver-type.d.ts +7 -0
  10. package/dist/enums/approval-rule-approver-type.js +12 -0
  11. package/dist/enums/approval-rule-approver-type.js.map +1 -0
  12. package/dist/enums/approval-rule-approver-type.mjs +11 -0
  13. package/dist/enums/approval-rule-approver-type.mjs.map +1 -0
  14. package/dist/enums/approval-rule-condition.d.mts +10 -0
  15. package/dist/enums/approval-rule-condition.d.ts +10 -0
  16. package/dist/enums/approval-rule-condition.js +15 -0
  17. package/dist/enums/approval-rule-condition.js.map +1 -0
  18. package/dist/enums/approval-rule-condition.mjs +14 -0
  19. package/dist/enums/approval-rule-condition.mjs.map +1 -0
  20. package/dist/enums/approval-rule-create-request-approver-type.d.mts +7 -0
  21. package/dist/enums/approval-rule-create-request-approver-type.d.ts +7 -0
  22. package/dist/enums/approval-rule-create-request-approver-type.js +12 -0
  23. package/dist/enums/approval-rule-create-request-approver-type.js.map +1 -0
  24. package/dist/enums/approval-rule-create-request-approver-type.mjs +11 -0
  25. package/dist/enums/approval-rule-create-request-approver-type.mjs.map +1 -0
  26. package/dist/enums/approval-rule-create-request-condition.d.mts +10 -0
  27. package/dist/enums/approval-rule-create-request-condition.d.ts +10 -0
  28. package/dist/enums/approval-rule-create-request-condition.js +15 -0
  29. package/dist/enums/approval-rule-create-request-condition.js.map +1 -0
  30. package/dist/enums/approval-rule-create-request-condition.mjs +14 -0
  31. package/dist/enums/approval-rule-create-request-condition.mjs.map +1 -0
  32. package/dist/enums/approval-rule-create-request-effect.d.mts +7 -0
  33. package/dist/enums/approval-rule-create-request-effect.d.ts +7 -0
  34. package/dist/enums/approval-rule-create-request-effect.js +12 -0
  35. package/dist/enums/approval-rule-create-request-effect.js.map +1 -0
  36. package/dist/enums/approval-rule-create-request-effect.mjs +11 -0
  37. package/dist/enums/approval-rule-create-request-effect.mjs.map +1 -0
  38. package/dist/enums/approval-rule-effect.d.mts +7 -0
  39. package/dist/enums/approval-rule-effect.d.ts +7 -0
  40. package/dist/enums/approval-rule-effect.js +12 -0
  41. package/dist/enums/approval-rule-effect.js.map +1 -0
  42. package/dist/enums/approval-rule-effect.mjs +11 -0
  43. package/dist/enums/approval-rule-effect.mjs.map +1 -0
  44. package/dist/enums/approval-rule-update-request-approver-type.d.mts +7 -0
  45. package/dist/enums/approval-rule-update-request-approver-type.d.ts +7 -0
  46. package/dist/enums/approval-rule-update-request-approver-type.js +12 -0
  47. package/dist/enums/approval-rule-update-request-approver-type.js.map +1 -0
  48. package/dist/enums/approval-rule-update-request-approver-type.mjs +11 -0
  49. package/dist/enums/approval-rule-update-request-approver-type.mjs.map +1 -0
  50. package/dist/enums/approval-rule-update-request-condition.d.mts +10 -0
  51. package/dist/enums/approval-rule-update-request-condition.d.ts +10 -0
  52. package/dist/enums/approval-rule-update-request-condition.js +15 -0
  53. package/dist/enums/approval-rule-update-request-condition.js.map +1 -0
  54. package/dist/enums/approval-rule-update-request-condition.mjs +14 -0
  55. package/dist/enums/approval-rule-update-request-condition.mjs.map +1 -0
  56. package/dist/enums/approval-rule-update-request-effect.d.mts +7 -0
  57. package/dist/enums/approval-rule-update-request-effect.d.ts +7 -0
  58. package/dist/enums/approval-rule-update-request-effect.js +12 -0
  59. package/dist/enums/approval-rule-update-request-effect.js.map +1 -0
  60. package/dist/enums/approval-rule-update-request-effect.mjs +11 -0
  61. package/dist/enums/approval-rule-update-request-effect.mjs.map +1 -0
  62. package/dist/enums/approver-type.d.mts +7 -0
  63. package/dist/enums/approver-type.d.ts +7 -0
  64. package/dist/enums/approver-type.js +12 -0
  65. package/dist/enums/approver-type.js.map +1 -0
  66. package/dist/enums/approver-type.mjs +11 -0
  67. package/dist/enums/approver-type.mjs.map +1 -0
  68. package/dist/enums/condition.d.mts +10 -0
  69. package/dist/enums/condition.d.ts +10 -0
  70. package/dist/enums/condition.js +15 -0
  71. package/dist/enums/condition.js.map +1 -0
  72. package/dist/enums/condition.mjs +14 -0
  73. package/dist/enums/condition.mjs.map +1 -0
  74. package/dist/enums/effect.d.mts +7 -0
  75. package/dist/enums/effect.d.ts +7 -0
  76. package/dist/enums/effect.js +12 -0
  77. package/dist/enums/effect.js.map +1 -0
  78. package/dist/enums/effect.mjs +11 -0
  79. package/dist/enums/effect.mjs.map +1 -0
  80. package/dist/enums/pending-approval-approver-type.d.mts +7 -0
  81. package/dist/enums/pending-approval-approver-type.d.ts +7 -0
  82. package/dist/enums/pending-approval-approver-type.js +12 -0
  83. package/dist/enums/pending-approval-approver-type.js.map +1 -0
  84. package/dist/enums/pending-approval-approver-type.mjs +11 -0
  85. package/dist/enums/pending-approval-approver-type.mjs.map +1 -0
  86. package/dist/enums/pending-approval-status.d.mts +7 -0
  87. package/dist/enums/pending-approval-status.d.ts +7 -0
  88. package/dist/enums/pending-approval-status.js +12 -0
  89. package/dist/enums/pending-approval-status.js.map +1 -0
  90. package/dist/enums/pending-approval-status.mjs +11 -0
  91. package/dist/enums/pending-approval-status.mjs.map +1 -0
  92. package/dist/enums/procurement-purchase-request-items-create-type.d.mts +7 -0
  93. package/dist/enums/procurement-purchase-request-items-create-type.d.ts +7 -0
  94. package/dist/enums/procurement-purchase-request-items-create-type.js +12 -0
  95. package/dist/enums/procurement-purchase-request-items-create-type.js.map +1 -0
  96. package/dist/enums/procurement-purchase-request-items-create-type.mjs +11 -0
  97. package/dist/enums/procurement-purchase-request-items-create-type.mjs.map +1 -0
  98. package/dist/enums/purchase-request-event-name.d.mts +12 -0
  99. package/dist/enums/purchase-request-event-name.d.ts +12 -0
  100. package/dist/enums/purchase-request-event-name.js +17 -0
  101. package/dist/enums/purchase-request-event-name.js.map +1 -0
  102. package/dist/enums/purchase-request-event-name.mjs +16 -0
  103. package/dist/enums/purchase-request-event-name.mjs.map +1 -0
  104. package/dist/enums/purchase-request-item-create-request-type.d.mts +7 -0
  105. package/dist/enums/purchase-request-item-create-request-type.d.ts +7 -0
  106. package/dist/enums/purchase-request-item-create-request-type.js +12 -0
  107. package/dist/enums/purchase-request-item-create-request-type.js.map +1 -0
  108. package/dist/enums/purchase-request-item-create-request-type.mjs +11 -0
  109. package/dist/enums/purchase-request-item-create-request-type.mjs.map +1 -0
  110. package/dist/enums/purchase-request-item-type.d.mts +7 -0
  111. package/dist/enums/purchase-request-item-type.d.ts +7 -0
  112. package/dist/enums/purchase-request-item-type.js +12 -0
  113. package/dist/enums/purchase-request-item-type.js.map +1 -0
  114. package/dist/enums/purchase-request-item-type.mjs +11 -0
  115. package/dist/enums/purchase-request-item-type.mjs.map +1 -0
  116. package/dist/enums/purchase-request-item-update-request-type.d.mts +7 -0
  117. package/dist/enums/purchase-request-item-update-request-type.d.ts +7 -0
  118. package/dist/enums/purchase-request-item-update-request-type.js +12 -0
  119. package/dist/enums/purchase-request-item-update-request-type.js.map +1 -0
  120. package/dist/enums/purchase-request-item-update-request-type.mjs +11 -0
  121. package/dist/enums/purchase-request-item-update-request-type.mjs.map +1 -0
  122. package/dist/enums/purchase-request-status.d.mts +9 -0
  123. package/dist/enums/purchase-request-status.d.ts +9 -0
  124. package/dist/enums/purchase-request-status.js +14 -0
  125. package/dist/enums/purchase-request-status.js.map +1 -0
  126. package/dist/enums/purchase-request-status.mjs +13 -0
  127. package/dist/enums/purchase-request-status.mjs.map +1 -0
  128. package/dist/enums/submit-item-type.d.mts +7 -0
  129. package/dist/enums/submit-item-type.d.ts +7 -0
  130. package/dist/enums/submit-item-type.js +12 -0
  131. package/dist/enums/submit-item-type.js.map +1 -0
  132. package/dist/enums/submit-item-type.mjs +11 -0
  133. package/dist/enums/submit-item-type.mjs.map +1 -0
  134. package/dist/enums/submit-result-outcome.d.mts +9 -0
  135. package/dist/enums/submit-result-outcome.d.ts +9 -0
  136. package/dist/enums/submit-result-outcome.js +14 -0
  137. package/dist/enums/submit-result-outcome.js.map +1 -0
  138. package/dist/enums/submit-result-outcome.mjs +13 -0
  139. package/dist/enums/submit-result-outcome.mjs.map +1 -0
  140. package/dist/index.d.mts +23 -0
  141. package/dist/index.d.ts +23 -0
  142. package/dist/index.js +115 -0
  143. package/dist/index.js.map +1 -1
  144. package/dist/index.mjs +23 -0
  145. package/dist/index.mjs.map +1 -1
  146. package/dist/inputFile.js +1 -2
  147. package/dist/inputFile.js.map +1 -1
  148. package/dist/inputFile.mjs +0 -1
  149. package/dist/inputFile.mjs.map +1 -1
  150. package/dist/models.d.mts +1027 -36
  151. package/dist/models.d.ts +1027 -36
  152. package/dist/operator.js +243 -204
  153. package/dist/operator.js.map +1 -1
  154. package/dist/operator.mjs +242 -203
  155. package/dist/operator.mjs.map +1 -1
  156. package/dist/permission.js +58 -48
  157. package/dist/permission.js.map +1 -1
  158. package/dist/permission.mjs +58 -48
  159. package/dist/permission.mjs.map +1 -1
  160. package/dist/query.js +525 -422
  161. package/dist/query.js.map +1 -1
  162. package/dist/query.mjs +524 -421
  163. package/dist/query.mjs.map +1 -1
  164. package/dist/services/apps.d.mts +18 -0
  165. package/dist/services/apps.d.ts +18 -0
  166. package/dist/services/avatars.d.mts +18 -0
  167. package/dist/services/avatars.d.ts +18 -0
  168. package/dist/services/carts-io.d.mts +46 -28
  169. package/dist/services/carts-io.d.ts +46 -28
  170. package/dist/services/carts-io.js.map +1 -1
  171. package/dist/services/carts-io.mjs.map +1 -1
  172. package/dist/services/carts-items.d.mts +42 -24
  173. package/dist/services/carts-items.d.ts +42 -24
  174. package/dist/services/carts-items.js.map +1 -1
  175. package/dist/services/carts-items.mjs.map +1 -1
  176. package/dist/services/carts.d.mts +70 -52
  177. package/dist/services/carts.d.ts +70 -52
  178. package/dist/services/carts.js.map +1 -1
  179. package/dist/services/carts.mjs.map +1 -1
  180. package/dist/services/channels.d.mts +64 -46
  181. package/dist/services/channels.d.ts +64 -46
  182. package/dist/services/channels.js +1 -1
  183. package/dist/services/channels.js.map +1 -1
  184. package/dist/services/channels.mjs +1 -1
  185. package/dist/services/channels.mjs.map +1 -1
  186. package/dist/services/cost-centers.d.mts +18 -0
  187. package/dist/services/cost-centers.d.ts +18 -0
  188. package/dist/services/customers-contacts.d.mts +62 -44
  189. package/dist/services/customers-contacts.d.ts +62 -44
  190. package/dist/services/customers-contacts.js.map +1 -1
  191. package/dist/services/customers-contacts.mjs.map +1 -1
  192. package/dist/services/customers-organizations.d.mts +58 -40
  193. package/dist/services/customers-organizations.d.ts +58 -40
  194. package/dist/services/customers-organizations.js.map +1 -1
  195. package/dist/services/customers-organizations.mjs.map +1 -1
  196. package/dist/services/customers-roles.d.mts +26 -8
  197. package/dist/services/customers-roles.d.ts +26 -8
  198. package/dist/services/customers-roles.js.map +1 -1
  199. package/dist/services/customers-roles.mjs.map +1 -1
  200. package/dist/services/customers-segments.d.mts +62 -44
  201. package/dist/services/customers-segments.d.ts +62 -44
  202. package/dist/services/customers-segments.js.map +1 -1
  203. package/dist/services/customers-segments.mjs.map +1 -1
  204. package/dist/services/customers-value-lists.d.mts +90 -72
  205. package/dist/services/customers-value-lists.d.ts +90 -72
  206. package/dist/services/customers-value-lists.js.map +1 -1
  207. package/dist/services/customers-value-lists.mjs.map +1 -1
  208. package/dist/services/customers.d.mts +78 -60
  209. package/dist/services/customers.d.ts +78 -60
  210. package/dist/services/customers.js.map +1 -1
  211. package/dist/services/customers.mjs.map +1 -1
  212. package/dist/services/events.d.mts +18 -0
  213. package/dist/services/events.d.ts +18 -0
  214. package/dist/services/forms.d.mts +66 -48
  215. package/dist/services/forms.d.ts +66 -48
  216. package/dist/services/forms.js.map +1 -1
  217. package/dist/services/forms.mjs.map +1 -1
  218. package/dist/services/health.d.mts +18 -0
  219. package/dist/services/health.d.ts +18 -0
  220. package/dist/services/inventories-locations.d.mts +38 -20
  221. package/dist/services/inventories-locations.d.ts +38 -20
  222. package/dist/services/inventories-locations.js.map +1 -1
  223. package/dist/services/inventories-locations.mjs.map +1 -1
  224. package/dist/services/inventories-reservations.d.mts +38 -20
  225. package/dist/services/inventories-reservations.d.ts +38 -20
  226. package/dist/services/inventories-reservations.js.map +1 -1
  227. package/dist/services/inventories-reservations.mjs.map +1 -1
  228. package/dist/services/inventories-stock.d.mts +70 -52
  229. package/dist/services/inventories-stock.d.ts +70 -52
  230. package/dist/services/inventories-stock.js.map +1 -1
  231. package/dist/services/inventories-stock.mjs.map +1 -1
  232. package/dist/services/io.d.mts +66 -48
  233. package/dist/services/io.d.ts +66 -48
  234. package/dist/services/io.js +2 -2
  235. package/dist/services/io.js.map +1 -1
  236. package/dist/services/io.mjs +2 -2
  237. package/dist/services/io.mjs.map +1 -1
  238. package/dist/services/locale.d.mts +18 -0
  239. package/dist/services/locale.d.ts +18 -0
  240. package/dist/services/markets.d.mts +122 -104
  241. package/dist/services/markets.d.ts +122 -104
  242. package/dist/services/markets.js.map +1 -1
  243. package/dist/services/markets.mjs.map +1 -1
  244. package/dist/services/messaging.d.mts +194 -176
  245. package/dist/services/messaging.d.ts +194 -176
  246. package/dist/services/messaging.js +3 -3
  247. package/dist/services/messaging.js.map +1 -1
  248. package/dist/services/messaging.mjs +3 -3
  249. package/dist/services/messaging.mjs.map +1 -1
  250. package/dist/services/orderlists.d.mts +96 -78
  251. package/dist/services/orderlists.d.ts +96 -78
  252. package/dist/services/orderlists.js +1 -1
  253. package/dist/services/orderlists.js.map +1 -1
  254. package/dist/services/orderlists.mjs +1 -1
  255. package/dist/services/orderlists.mjs.map +1 -1
  256. package/dist/services/orders.d.mts +114 -96
  257. package/dist/services/orders.d.ts +114 -96
  258. package/dist/services/orders.js.map +1 -1
  259. package/dist/services/orders.mjs.map +1 -1
  260. package/dist/services/pages-collaboration.d.mts +34 -16
  261. package/dist/services/pages-collaboration.d.ts +34 -16
  262. package/dist/services/pages-collaboration.js.map +1 -1
  263. package/dist/services/pages-collaboration.mjs.map +1 -1
  264. package/dist/services/pages-delivery.d.mts +26 -8
  265. package/dist/services/pages-delivery.d.ts +26 -8
  266. package/dist/services/pages-delivery.js.map +1 -1
  267. package/dist/services/pages-delivery.mjs.map +1 -1
  268. package/dist/services/pages-editor.d.mts +34 -16
  269. package/dist/services/pages-editor.d.ts +34 -16
  270. package/dist/services/pages-editor.js.map +1 -1
  271. package/dist/services/pages-editor.mjs.map +1 -1
  272. package/dist/services/pages.d.mts +82 -64
  273. package/dist/services/pages.d.ts +82 -64
  274. package/dist/services/pages.js.map +1 -1
  275. package/dist/services/pages.mjs.map +1 -1
  276. package/dist/services/payments-ledger.d.mts +54 -36
  277. package/dist/services/payments-ledger.d.ts +54 -36
  278. package/dist/services/payments-ledger.js.map +1 -1
  279. package/dist/services/payments-ledger.mjs.map +1 -1
  280. package/dist/services/payments-methods.d.mts +34 -16
  281. package/dist/services/payments-methods.d.ts +34 -16
  282. package/dist/services/payments-methods.js.map +1 -1
  283. package/dist/services/payments-methods.mjs.map +1 -1
  284. package/dist/services/payments-providers.d.mts +38 -20
  285. package/dist/services/payments-providers.d.ts +38 -20
  286. package/dist/services/payments-providers.js.map +1 -1
  287. package/dist/services/payments-providers.mjs.map +1 -1
  288. package/dist/services/prices.d.mts +86 -68
  289. package/dist/services/prices.d.ts +86 -68
  290. package/dist/services/prices.js.map +1 -1
  291. package/dist/services/prices.mjs.map +1 -1
  292. package/dist/services/procurement.d.mts +991 -0
  293. package/dist/services/procurement.d.ts +991 -0
  294. package/dist/services/procurement.js +1185 -0
  295. package/dist/services/procurement.js.map +1 -0
  296. package/dist/services/procurement.mjs +1184 -0
  297. package/dist/services/procurement.mjs.map +1 -0
  298. package/dist/services/products-assets.d.mts +34 -16
  299. package/dist/services/products-assets.d.ts +34 -16
  300. package/dist/services/products-assets.js.map +1 -1
  301. package/dist/services/products-assets.mjs.map +1 -1
  302. package/dist/services/products-categories.d.mts +66 -48
  303. package/dist/services/products-categories.d.ts +66 -48
  304. package/dist/services/products-categories.js.map +1 -1
  305. package/dist/services/products-categories.mjs.map +1 -1
  306. package/dist/services/products-data-model.d.mts +166 -148
  307. package/dist/services/products-data-model.d.ts +166 -148
  308. package/dist/services/products-data-model.js.map +1 -1
  309. package/dist/services/products-data-model.mjs.map +1 -1
  310. package/dist/services/products-references.d.mts +50 -32
  311. package/dist/services/products-references.d.ts +50 -32
  312. package/dist/services/products-references.js.map +1 -1
  313. package/dist/services/products-references.mjs.map +1 -1
  314. package/dist/services/products.d.mts +70 -52
  315. package/dist/services/products.d.ts +70 -52
  316. package/dist/services/products.js.map +1 -1
  317. package/dist/services/products.mjs.map +1 -1
  318. package/dist/services/search.d.mts +40 -22
  319. package/dist/services/search.d.ts +40 -22
  320. package/dist/services/search.js +1 -1
  321. package/dist/services/search.js.map +1 -1
  322. package/dist/services/search.mjs +1 -1
  323. package/dist/services/search.mjs.map +1 -1
  324. package/dist/services/settings.d.mts +18 -0
  325. package/dist/services/settings.d.ts +18 -0
  326. package/dist/services/shipping-carriers.d.mts +42 -24
  327. package/dist/services/shipping-carriers.d.ts +42 -24
  328. package/dist/services/shipping-carriers.js.map +1 -1
  329. package/dist/services/shipping-carriers.mjs.map +1 -1
  330. package/dist/services/shipping-methods.d.mts +70 -52
  331. package/dist/services/shipping-methods.d.ts +70 -52
  332. package/dist/services/shipping-methods.js.map +1 -1
  333. package/dist/services/shipping-methods.mjs.map +1 -1
  334. package/dist/services/shipping-value-lists.d.mts +62 -44
  335. package/dist/services/shipping-value-lists.d.ts +62 -44
  336. package/dist/services/shipping-value-lists.js.map +1 -1
  337. package/dist/services/shipping-value-lists.mjs.map +1 -1
  338. package/dist/services/sites.d.mts +18 -0
  339. package/dist/services/sites.d.ts +18 -0
  340. package/dist/services/storage.d.mts +18 -0
  341. package/dist/services/storage.d.ts +18 -0
  342. package/package.json +6 -3
@@ -8,6 +8,15 @@ import '../query.mjs';
8
8
  import '../enums/address-type-row-tone.mjs';
9
9
  import '../enums/address-type-row-create-request-tone.mjs';
10
10
  import '../enums/address-type-row-update-request-tone.mjs';
11
+ import '../enums/approval-rule-approver-type.mjs';
12
+ import '../enums/approval-rule-condition.mjs';
13
+ import '../enums/approval-rule-effect.mjs';
14
+ import '../enums/approval-rule-create-request-approver-type.mjs';
15
+ import '../enums/approval-rule-create-request-condition.mjs';
16
+ import '../enums/approval-rule-create-request-effect.mjs';
17
+ import '../enums/approval-rule-update-request-approver-type.mjs';
18
+ import '../enums/approval-rule-update-request-condition.mjs';
19
+ import '../enums/approval-rule-update-request-effect.mjs';
11
20
  import '../enums/assets-source.mjs';
12
21
  import '../enums/attribute-value-bucket.mjs';
13
22
  import '../enums/auth-mail-source.mjs';
@@ -118,6 +127,8 @@ import '../enums/payment-term-tone.mjs';
118
127
  import '../enums/payment-term-create-request-tone.mjs';
119
128
  import '../enums/payment-term-update-request-tone.mjs';
120
129
  import '../enums/payment-vocabulary-tone.mjs';
130
+ import '../enums/pending-approval-approver-type.mjs';
131
+ import '../enums/pending-approval-status.mjs';
121
132
  import '../enums/price-ending-rule.mjs';
122
133
  import '../enums/price-entries-adjust-response-rounding.mjs';
123
134
  import '../enums/price-entries-adjust-response-rounding-mode.mjs';
@@ -140,6 +151,11 @@ import '../enums/product-grid-column-source.mjs';
140
151
  import '../enums/product-label-source.mjs';
141
152
  import '../enums/product-label-attribute-source.mjs';
142
153
  import '../enums/products-kind.mjs';
154
+ import '../enums/purchase-request-status.mjs';
155
+ import '../enums/purchase-request-event-name.mjs';
156
+ import '../enums/purchase-request-item-type.mjs';
157
+ import '../enums/purchase-request-item-create-request-type.mjs';
158
+ import '../enums/purchase-request-item-update-request-type.mjs';
143
159
  import '../enums/reorder-point-source.mjs';
144
160
  import '../enums/reservation-status.mjs';
145
161
  import '../enums/price-on-request-reason.mjs';
@@ -177,6 +193,8 @@ import '../enums/shipping-weight-unit-row-tone.mjs';
177
193
  import '../enums/shipping-weight-unit-update-request-tone.mjs';
178
194
  import '../enums/stock-movement-type.mjs';
179
195
  import '../enums/store-asset-request-visibility.mjs';
196
+ import '../enums/submit-item-type.mjs';
197
+ import '../enums/submit-result-outcome.mjs';
180
198
  import '../enums/validation-failed-response-status.mjs';
181
199
  import '../enums/vocabulary-default-tone.mjs';
182
200
  import '../enums/vocabulary-source.mjs';
@@ -293,7 +311,7 @@ declare class PaymentsLedger {
293
311
  * @param {string} params.orderRef - The external order reference the checkout wrote onto the payment. It is what POST /payments/orders/{order_ref}/capture resolves and the fallback key a PSP webhook is matched on when it carries no transaction id — so an integration that leaves it null gives up both. Free text with no uniqueness: several payments may share one reference.
294
312
  * @param {string} params.returnUrl - Where the PSP sends the buyer back after a redirect or a 3-D Secure challenge. Kept in `metadata.return_url` and handed to the driver — a PSP method that needs a redirect and has none leaves the buyer stranded at the provider.
295
313
  * @throws {RevenexxException}
296
- * @returns {Promise<Models.Error>}
314
+ * @returns {Promise<Models.Payment>}
297
315
  */
298
316
  paymentsCreate(params: {
299
317
  amount: number;
@@ -306,7 +324,7 @@ declare class PaymentsLedger {
306
324
  metadata?: object;
307
325
  orderRef?: string;
308
326
  returnUrl?: string;
309
- }): Promise<Models.Error>;
327
+ }): Promise<Models.Payment>;
310
328
  /**
311
329
  * The checkout's write: it opens the ledger row and takes it as far as the named method allows, in one call. A create cannot omit `method_code` and `amount`; every other column is optional or defaulted by the database. Nothing else about the money is the caller's to choose: `kind`, `provider` and `fee_amount` are read off the method that `method_code` names, so a caller can neither pick an acquirer nor discount its own fee. `amount: 0` is legal (free orders); negative is 400. Eligibility is enforced HERE and not only in the checkout UI — the same country and order-value rules POST /payments/methods/eligible applies answer 422 if the method does not apply to this buyer. What comes back depends on the method: a self-managed one (invoice, prepayment) is `authorized` at once with the dunning clock already started, and a PSP one is `captured` or `authorized`, or `requires_action` with `next_action` — the instruction the storefront must carry out, typically a redirect, set at that status and at no other. Send an `idempotency_key` and a repeat of the same call answers 200 with the payment that key already named, unchanged and not re-authorized. What is never stored: the `instrument`, `token` or `card` is handed to the driver in-process and no token or PAN is written to the row.
312
330
  *
@@ -321,10 +339,10 @@ declare class PaymentsLedger {
321
339
  * @param {string} orderRef - The external order reference the checkout wrote onto the payment. It is what POST /payments/orders/{order_ref}/capture resolves and the fallback key a PSP webhook is matched on when it carries no transaction id — so an integration that leaves it null gives up both. Free text with no uniqueness: several payments may share one reference.
322
340
  * @param {string} returnUrl - Where the PSP sends the buyer back after a redirect or a 3-D Secure challenge. Kept in `metadata.return_url` and handed to the driver — a PSP method that needs a redirect and has none leaves the buyer stranded at the provider.
323
341
  * @throws {RevenexxException}
324
- * @returns {Promise<Models.Error>}
342
+ * @returns {Promise<Models.Payment>}
325
343
  * @deprecated Use the object parameter style method for a better developer experience.
326
344
  */
327
- paymentsCreate(amount: number, methodCode: string, cartId?: string, contactId?: string, country?: string, currency?: string, idempotencyKey?: string, metadata?: object, orderRef?: string, returnUrl?: string): Promise<Models.Error>;
345
+ paymentsCreate(amount: number, methodCode: string, cartId?: string, contactId?: string, country?: string, currency?: string, idempotencyKey?: string, metadata?: object, orderRef?: string, returnUrl?: string): Promise<Models.Payment>;
328
346
  /**
329
347
  * Classifies every unpaid self-managed payment (invoice, prepayment) as on time / reminder due / overdue from payment_reminder_after_days and overdue_after_days, writes the stage and the next due date, and reports PSP payments still waiting on a callback longer than webhook_stale_after_minutes. Pure function of each payment's age, so it is idempotent — it also runs daily as the 'dunning-scan' schedule. It classifies and does not send: a stage change emits payment.updated, and what a reminder looks like is the merchant's workflow.
330
348
  *
@@ -359,20 +377,20 @@ declare class PaymentsLedger {
359
377
  *
360
378
  * @param {string} params.orderRef - The external order reference the checkout wrote onto the payment, trimmed before it is resolved. Free text — the example is an invented shape, not a reference any tenant holds, and one no payment carries answers 404.
361
379
  * @throws {RevenexxException}
362
- * @returns {Promise<Models.Error>}
380
+ * @returns {Promise<{}>}
363
381
  */
364
382
  paymentsOrdersCapture(params: {
365
383
  orderRef: string;
366
- }): Promise<Models.Error>;
384
+ }): Promise<{}>;
367
385
  /**
368
386
  * This is the hook the tenant's `auto_capture_policy: 'on_ship'` was written for: fulfilment knows the order it shipped and not the payment ids behind it, so the shipment calls this one route with the reference it already holds and the money for that order is collected in a single request. Resolves payments by their order_ref (the same key the PSP webhooks fall back to), captures every authorized one and reports the rest instead of failing — an order whose payment was already captured is a successful no-op, and a provider that refuses one payment lands in `skipped` rather than failing the call. Note that payments.order_ref is nullable with no foreign key: this route is exactly as good as the reference the checkout writes onto the payment.
369
387
  *
370
388
  * @param {string} orderRef - The external order reference the checkout wrote onto the payment, trimmed before it is resolved. Free text — the example is an invented shape, not a reference any tenant holds, and one no payment carries answers 404.
371
389
  * @throws {RevenexxException}
372
- * @returns {Promise<Models.Error>}
390
+ * @returns {Promise<{}>}
373
391
  * @deprecated Use the object parameter style method for a better developer experience.
374
392
  */
375
- paymentsOrdersCapture(orderRef: string): Promise<Models.Error>;
393
+ paymentsOrdersCapture(orderRef: string): Promise<{}>;
376
394
  /**
377
395
  * The enums this app owns, four of them: statuses, method kinds, fee types and dunning stages. This is the index and carries a name and a title per set and nothing more — the values themselves, with their labels and badge tones, are one call further down at GET /payments/vocabularies/{name}, so a client that only needs to know which sets exist does not pay for all of them. Values come out of the CHECK constraints, so what is served is what the database enforces — a client renders a status this app adds without a release of its own.
378
396
  *
@@ -385,20 +403,20 @@ declare class PaymentsLedger {
385
403
  *
386
404
  * @param {PaymentsVocabulariesGetName} params.name - Which vocabulary to read. The set is closed: GET /payments/vocabularies lists exactly these.
387
405
  * @throws {RevenexxException}
388
- * @returns {Promise<Models.Error>}
406
+ * @returns {Promise<Models.PaymentVocabulary>}
389
407
  */
390
408
  paymentsVocabulariesGet(params: {
391
409
  name: PaymentsVocabulariesGetName;
392
- }): Promise<Models.Error>;
410
+ }): Promise<Models.PaymentVocabulary>;
393
411
  /**
394
412
  * One set in full: every value it permits, the label to show for each and the badge tone to render it in, which is what a client needs to draw a status chip without hard-coding this app's enums. The value set is parsed out of the CHECK constraint in schema.json, so what is served IS what the database enforces. Labels are curated on top and can only add words and colour — a permitted value nobody labelled still appears, titled from its own key, which is why `title` and `description` are a locale map on a labelled value and a plain string on an unlabelled one.
395
413
  *
396
414
  * @param {PaymentsVocabulariesGetName} name - Which vocabulary to read. The set is closed: GET /payments/vocabularies lists exactly these.
397
415
  * @throws {RevenexxException}
398
- * @returns {Promise<Models.Error>}
416
+ * @returns {Promise<Models.PaymentVocabulary>}
399
417
  * @deprecated Use the object parameter style method for a better developer experience.
400
418
  */
401
- paymentsVocabulariesGet(name: PaymentsVocabulariesGetName): Promise<Models.Error>;
419
+ paymentsVocabulariesGet(name: PaymentsVocabulariesGetName): Promise<Models.PaymentVocabulary>;
402
420
  /**
403
421
  * The sink a PSP callback ends up in, and an inbound ingress endpoint in the sense of ADR-0066: the provider never posts here directly, it posts to webhooks.revenexx.com, which verifies and captures the delivery and dispatches its envelope to this route through the gateway. That indirection is also what makes this the one override point for PSP callback handling — everything a callback does to the ledger happens here and nowhere else, so a deployment that needs a provider's callbacks normalized differently replaces this operation instead of touching the lifecycle routes. Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.
404
422
  *
@@ -407,14 +425,14 @@ declare class PaymentsLedger {
407
425
  * @param {object} params.request - The captured HTTP request as the PSP sent it.
408
426
  * @param {any} params.verified - Whether the ingress verified the callback signature against the provider's `webhook_secret`. An explicit false is refused with 422: an endpoint may run in annotate mode, and the ledger stays sovereign over one that does.
409
427
  * @throws {RevenexxException}
410
- * @returns {Promise<Models.Error>}
428
+ * @returns {Promise<{}>}
411
429
  */
412
430
  paymentsWebhooksIngest(params: {
413
431
  provider: string;
414
432
  id?: any;
415
433
  request?: object;
416
434
  verified?: any;
417
- }): Promise<Models.Error>;
435
+ }): Promise<{}>;
418
436
  /**
419
437
  * The sink a PSP callback ends up in, and an inbound ingress endpoint in the sense of ADR-0066: the provider never posts here directly, it posts to webhooks.revenexx.com, which verifies and captures the delivery and dispatches its envelope to this route through the gateway. That indirection is also what makes this the one override point for PSP callback handling — everything a callback does to the ledger happens here and nowhere else, so a deployment that needs a provider's callbacks normalized differently replaces this operation instead of touching the lifecycle routes. Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.
420
438
  *
@@ -423,111 +441,111 @@ declare class PaymentsLedger {
423
441
  * @param {object} request - The captured HTTP request as the PSP sent it.
424
442
  * @param {any} verified - Whether the ingress verified the callback signature against the provider's `webhook_secret`. An explicit false is refused with 422: an endpoint may run in annotate mode, and the ledger stays sovereign over one that does.
425
443
  * @throws {RevenexxException}
426
- * @returns {Promise<Models.Error>}
444
+ * @returns {Promise<{}>}
427
445
  * @deprecated Use the object parameter style method for a better developer experience.
428
446
  */
429
- paymentsWebhooksIngest(provider: string, id?: any, request?: object, verified?: any): Promise<Models.Error>;
447
+ paymentsWebhooksIngest(provider: string, id?: any, request?: object, verified?: any): Promise<{}>;
430
448
  /**
431
449
  * One ledger row in full: the amount and the fee that were computed at creation, the method code and PSP it was made through, where it stands in the lifecycle, the timestamp of each transition it has been through (`authorized_at`, `captured_at`, `failed_at`, `refunded_at`), the dunning columns the daily scan maintains and, while the buyer still has something to do, `next_action`. This is the call to poll after sending a buyer to a PSP redirect. Two things it does not do: `error_message` is answered from the failure taxonomy and never carries the provider's or the runtime's own words, and there is no route that resolves a payment by `order_ref` — that column is nullable and not unique, so it is a filter on the list (`GET /payments?order_ref=…`) which may legitimately answer several rows.
432
450
  *
433
451
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
434
452
  * @throws {RevenexxException}
435
- * @returns {Promise<Models.Error>}
453
+ * @returns {Promise<Models.Payment>}
436
454
  */
437
455
  paymentsGet(params: {
438
456
  id: string;
439
- }): Promise<Models.Error>;
457
+ }): Promise<Models.Payment>;
440
458
  /**
441
459
  * One ledger row in full: the amount and the fee that were computed at creation, the method code and PSP it was made through, where it stands in the lifecycle, the timestamp of each transition it has been through (`authorized_at`, `captured_at`, `failed_at`, `refunded_at`), the dunning columns the daily scan maintains and, while the buyer still has something to do, `next_action`. This is the call to poll after sending a buyer to a PSP redirect. Two things it does not do: `error_message` is answered from the failure taxonomy and never carries the provider's or the runtime's own words, and there is no route that resolves a payment by `order_ref` — that column is nullable and not unique, so it is a filter on the list (`GET /payments?order_ref=…`) which may legitimately answer several rows.
442
460
  *
443
461
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
444
462
  * @throws {RevenexxException}
445
- * @returns {Promise<Models.Error>}
463
+ * @returns {Promise<Models.Payment>}
446
464
  * @deprecated Use the object parameter style method for a better developer experience.
447
465
  */
448
- paymentsGet(id: string): Promise<Models.Error>;
466
+ paymentsGet(id: string): Promise<Models.Payment>;
449
467
  /**
450
468
  * Drops the claim before any money has been taken — the abandoned basket, the buyer who never came back from the redirect, the invoice an operator writes off. It is the only transition that starts from three statuses rather than one, because everything short of captured can still be released. A captured payment is not cancellable at all: that is a refund, and the lattice answers 400 rather than pretending. Unlike capture and refund this transition has no time window — the merchant's `capture_expiry_days` and `refund_window_days` do not apply, so a stale authorization can always be released even once it is too old to collect. On a PSP payment the provider is called and the `reason` in the body is passed to it, so it reaches the PSP's own cancellation-reason field as well as being stored under `metadata.cancel_reason`. Cancelling stops the dunning clock: the stage goes back to `none` and the due date is cleared.
451
469
  *
452
470
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
453
471
  * @param {string} params.reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
454
472
  * @throws {RevenexxException}
455
- * @returns {Promise<Models.Error>}
473
+ * @returns {Promise<Models.Payment>}
456
474
  */
457
475
  paymentsCancel(params: {
458
476
  id: string;
459
477
  reason?: string;
460
- }): Promise<Models.Error>;
478
+ }): Promise<Models.Payment>;
461
479
  /**
462
480
  * Drops the claim before any money has been taken — the abandoned basket, the buyer who never came back from the redirect, the invoice an operator writes off. It is the only transition that starts from three statuses rather than one, because everything short of captured can still be released. A captured payment is not cancellable at all: that is a refund, and the lattice answers 400 rather than pretending. Unlike capture and refund this transition has no time window — the merchant's `capture_expiry_days` and `refund_window_days` do not apply, so a stale authorization can always be released even once it is too old to collect. On a PSP payment the provider is called and the `reason` in the body is passed to it, so it reaches the PSP's own cancellation-reason field as well as being stored under `metadata.cancel_reason`. Cancelling stops the dunning clock: the stage goes back to `none` and the due date is cleared.
463
481
  *
464
482
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
465
483
  * @param {string} reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
466
484
  * @throws {RevenexxException}
467
- * @returns {Promise<Models.Error>}
485
+ * @returns {Promise<Models.Payment>}
468
486
  * @deprecated Use the object parameter style method for a better developer experience.
469
487
  */
470
- paymentsCancel(id: string, reason?: string): Promise<Models.Error>;
488
+ paymentsCancel(id: string, reason?: string): Promise<Models.Payment>;
471
489
  /**
472
490
  * Collects money that is currently only reserved. It starts from `authorized` and from nothing else — under `auto_capture_policy: 'immediate'` a payment is captured in the same request that created it and never passes through here, so this is the route for the 'manual' and 'on_ship' policies, and POST /payments/orders/{order_ref}/capture is the same operation addressed by the order reference a warehouse actually holds. There is no request body and no amount: the ledger carries one amount and one status, so a capture is the whole authorization or nothing. On a self-managed payment it takes no PSP anywhere near it — it records that an invoice or a prepayment was paid, and stops the dunning clock. Refused with 422 once the authorization is older than the tenant's `capture_expiry_days` (the message carries both numbers), because an expired authorization is declined by the provider anyway and a 422 here is the cheap version of finding out later.
473
491
  *
474
492
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
475
493
  * @throws {RevenexxException}
476
- * @returns {Promise<Models.Error>}
494
+ * @returns {Promise<Models.Payment>}
477
495
  */
478
496
  paymentsCapture(params: {
479
497
  id: string;
480
- }): Promise<Models.Error>;
498
+ }): Promise<Models.Payment>;
481
499
  /**
482
500
  * Collects money that is currently only reserved. It starts from `authorized` and from nothing else — under `auto_capture_policy: 'immediate'` a payment is captured in the same request that created it and never passes through here, so this is the route for the 'manual' and 'on_ship' policies, and POST /payments/orders/{order_ref}/capture is the same operation addressed by the order reference a warehouse actually holds. There is no request body and no amount: the ledger carries one amount and one status, so a capture is the whole authorization or nothing. On a self-managed payment it takes no PSP anywhere near it — it records that an invoice or a prepayment was paid, and stops the dunning clock. Refused with 422 once the authorization is older than the tenant's `capture_expiry_days` (the message carries both numbers), because an expired authorization is declined by the provider anyway and a 422 here is the cheap version of finding out later.
483
501
  *
484
502
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
485
503
  * @throws {RevenexxException}
486
- * @returns {Promise<Models.Error>}
504
+ * @returns {Promise<Models.Payment>}
487
505
  * @deprecated Use the object parameter style method for a better developer experience.
488
506
  */
489
- paymentsCapture(id: string): Promise<Models.Error>;
507
+ paymentsCapture(id: string): Promise<Models.Payment>;
490
508
  /**
491
509
  * The other half of a redirect. POST /payments answered `requires_action` with a `next_action` the storefront carried out — a 3-D Secure step, a wallet approval, a bank login — and this is the call that asks the PSP how it went and writes the answer to the ledger. It starts from `requires_action` and from nothing else, so a payment that already came back authorized needs no confirm and the lattice answers 400 rather than repeating one. `next_action` is cleared by this call whatever the outcome. Where the tenant's `auto_capture_policy` is 'immediate' the money is taken straight after the authorization, in the same request, so a successful confirm can come back `captured` rather than `authorized`; a failed auto-capture does not fail the confirm, because a good authorization is worth more than a tidy status.
492
510
  *
493
511
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
494
512
  * @throws {RevenexxException}
495
- * @returns {Promise<Models.Error>}
513
+ * @returns {Promise<Models.Payment>}
496
514
  */
497
515
  paymentsConfirm(params: {
498
516
  id: string;
499
- }): Promise<Models.Error>;
517
+ }): Promise<Models.Payment>;
500
518
  /**
501
519
  * The other half of a redirect. POST /payments answered `requires_action` with a `next_action` the storefront carried out — a 3-D Secure step, a wallet approval, a bank login — and this is the call that asks the PSP how it went and writes the answer to the ledger. It starts from `requires_action` and from nothing else, so a payment that already came back authorized needs no confirm and the lattice answers 400 rather than repeating one. `next_action` is cleared by this call whatever the outcome. Where the tenant's `auto_capture_policy` is 'immediate' the money is taken straight after the authorization, in the same request, so a successful confirm can come back `captured` rather than `authorized`; a failed auto-capture does not fail the confirm, because a good authorization is worth more than a tidy status.
502
520
  *
503
521
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
504
522
  * @throws {RevenexxException}
505
- * @returns {Promise<Models.Error>}
523
+ * @returns {Promise<Models.Payment>}
506
524
  * @deprecated Use the object parameter style method for a better developer experience.
507
525
  */
508
- paymentsConfirm(id: string): Promise<Models.Error>;
526
+ paymentsConfirm(id: string): Promise<Models.Payment>;
509
527
  /**
510
528
  * Gives captured money back. It starts from `captured` and from nothing else — money that was only authorized is cancelled, not refunded, and the lattice answers 400 rather than guessing which was meant. All or nothing: the ledger carries one amount and one status, so there is no partial refund and no second one to express — a refunded payment is refunded in full, and a repeat is a 400 because `refunded` is not a status a refund starts from. The `reason` in the body is handed to the driver in the same call, so it reaches the PSP's own refund-reason field rather than being a note only this database ever sees, and it is stored under `metadata.refund_reason`. On a self-managed payment nothing is sent anywhere: it records that the merchant paid the buyer back by their own means. Refused with 422 once the capture is older than the tenant's `refund_window_days` (the message carries both numbers) — past that the provider stops accepting a refund against the transaction and it has to be made by bank transfer.
511
529
  *
512
530
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
513
531
  * @param {string} params.reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
514
532
  * @throws {RevenexxException}
515
- * @returns {Promise<Models.Error>}
533
+ * @returns {Promise<Models.Payment>}
516
534
  */
517
535
  paymentsRefund(params: {
518
536
  id: string;
519
537
  reason?: string;
520
- }): Promise<Models.Error>;
538
+ }): Promise<Models.Payment>;
521
539
  /**
522
540
  * Gives captured money back. It starts from `captured` and from nothing else — money that was only authorized is cancelled, not refunded, and the lattice answers 400 rather than guessing which was meant. All or nothing: the ledger carries one amount and one status, so there is no partial refund and no second one to express — a refunded payment is refunded in full, and a repeat is a 400 because `refunded` is not a status a refund starts from. The `reason` in the body is handed to the driver in the same call, so it reaches the PSP's own refund-reason field rather than being a note only this database ever sees, and it is stored under `metadata.refund_reason`. On a self-managed payment nothing is sent anywhere: it records that the merchant paid the buyer back by their own means. Refused with 422 once the capture is older than the tenant's `refund_window_days` (the message carries both numbers) — past that the provider stops accepting a refund against the transaction and it has to be made by bank transfer.
523
541
  *
524
542
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
525
543
  * @param {string} reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
526
544
  * @throws {RevenexxException}
527
- * @returns {Promise<Models.Error>}
545
+ * @returns {Promise<Models.Payment>}
528
546
  * @deprecated Use the object parameter style method for a better developer experience.
529
547
  */
530
- paymentsRefund(id: string, reason?: string): Promise<Models.Error>;
548
+ paymentsRefund(id: string, reason?: string): Promise<Models.Payment>;
531
549
  }
532
550
 
533
551
  export { PaymentsLedger };
@@ -8,6 +8,15 @@ import '../query.js';
8
8
  import '../enums/address-type-row-tone.js';
9
9
  import '../enums/address-type-row-create-request-tone.js';
10
10
  import '../enums/address-type-row-update-request-tone.js';
11
+ import '../enums/approval-rule-approver-type.js';
12
+ import '../enums/approval-rule-condition.js';
13
+ import '../enums/approval-rule-effect.js';
14
+ import '../enums/approval-rule-create-request-approver-type.js';
15
+ import '../enums/approval-rule-create-request-condition.js';
16
+ import '../enums/approval-rule-create-request-effect.js';
17
+ import '../enums/approval-rule-update-request-approver-type.js';
18
+ import '../enums/approval-rule-update-request-condition.js';
19
+ import '../enums/approval-rule-update-request-effect.js';
11
20
  import '../enums/assets-source.js';
12
21
  import '../enums/attribute-value-bucket.js';
13
22
  import '../enums/auth-mail-source.js';
@@ -118,6 +127,8 @@ import '../enums/payment-term-tone.js';
118
127
  import '../enums/payment-term-create-request-tone.js';
119
128
  import '../enums/payment-term-update-request-tone.js';
120
129
  import '../enums/payment-vocabulary-tone.js';
130
+ import '../enums/pending-approval-approver-type.js';
131
+ import '../enums/pending-approval-status.js';
121
132
  import '../enums/price-ending-rule.js';
122
133
  import '../enums/price-entries-adjust-response-rounding.js';
123
134
  import '../enums/price-entries-adjust-response-rounding-mode.js';
@@ -140,6 +151,11 @@ import '../enums/product-grid-column-source.js';
140
151
  import '../enums/product-label-source.js';
141
152
  import '../enums/product-label-attribute-source.js';
142
153
  import '../enums/products-kind.js';
154
+ import '../enums/purchase-request-status.js';
155
+ import '../enums/purchase-request-event-name.js';
156
+ import '../enums/purchase-request-item-type.js';
157
+ import '../enums/purchase-request-item-create-request-type.js';
158
+ import '../enums/purchase-request-item-update-request-type.js';
143
159
  import '../enums/reorder-point-source.js';
144
160
  import '../enums/reservation-status.js';
145
161
  import '../enums/price-on-request-reason.js';
@@ -177,6 +193,8 @@ import '../enums/shipping-weight-unit-row-tone.js';
177
193
  import '../enums/shipping-weight-unit-update-request-tone.js';
178
194
  import '../enums/stock-movement-type.js';
179
195
  import '../enums/store-asset-request-visibility.js';
196
+ import '../enums/submit-item-type.js';
197
+ import '../enums/submit-result-outcome.js';
180
198
  import '../enums/validation-failed-response-status.js';
181
199
  import '../enums/vocabulary-default-tone.js';
182
200
  import '../enums/vocabulary-source.js';
@@ -293,7 +311,7 @@ declare class PaymentsLedger {
293
311
  * @param {string} params.orderRef - The external order reference the checkout wrote onto the payment. It is what POST /payments/orders/{order_ref}/capture resolves and the fallback key a PSP webhook is matched on when it carries no transaction id — so an integration that leaves it null gives up both. Free text with no uniqueness: several payments may share one reference.
294
312
  * @param {string} params.returnUrl - Where the PSP sends the buyer back after a redirect or a 3-D Secure challenge. Kept in `metadata.return_url` and handed to the driver — a PSP method that needs a redirect and has none leaves the buyer stranded at the provider.
295
313
  * @throws {RevenexxException}
296
- * @returns {Promise<Models.Error>}
314
+ * @returns {Promise<Models.Payment>}
297
315
  */
298
316
  paymentsCreate(params: {
299
317
  amount: number;
@@ -306,7 +324,7 @@ declare class PaymentsLedger {
306
324
  metadata?: object;
307
325
  orderRef?: string;
308
326
  returnUrl?: string;
309
- }): Promise<Models.Error>;
327
+ }): Promise<Models.Payment>;
310
328
  /**
311
329
  * The checkout's write: it opens the ledger row and takes it as far as the named method allows, in one call. A create cannot omit `method_code` and `amount`; every other column is optional or defaulted by the database. Nothing else about the money is the caller's to choose: `kind`, `provider` and `fee_amount` are read off the method that `method_code` names, so a caller can neither pick an acquirer nor discount its own fee. `amount: 0` is legal (free orders); negative is 400. Eligibility is enforced HERE and not only in the checkout UI — the same country and order-value rules POST /payments/methods/eligible applies answer 422 if the method does not apply to this buyer. What comes back depends on the method: a self-managed one (invoice, prepayment) is `authorized` at once with the dunning clock already started, and a PSP one is `captured` or `authorized`, or `requires_action` with `next_action` — the instruction the storefront must carry out, typically a redirect, set at that status and at no other. Send an `idempotency_key` and a repeat of the same call answers 200 with the payment that key already named, unchanged and not re-authorized. What is never stored: the `instrument`, `token` or `card` is handed to the driver in-process and no token or PAN is written to the row.
312
330
  *
@@ -321,10 +339,10 @@ declare class PaymentsLedger {
321
339
  * @param {string} orderRef - The external order reference the checkout wrote onto the payment. It is what POST /payments/orders/{order_ref}/capture resolves and the fallback key a PSP webhook is matched on when it carries no transaction id — so an integration that leaves it null gives up both. Free text with no uniqueness: several payments may share one reference.
322
340
  * @param {string} returnUrl - Where the PSP sends the buyer back after a redirect or a 3-D Secure challenge. Kept in `metadata.return_url` and handed to the driver — a PSP method that needs a redirect and has none leaves the buyer stranded at the provider.
323
341
  * @throws {RevenexxException}
324
- * @returns {Promise<Models.Error>}
342
+ * @returns {Promise<Models.Payment>}
325
343
  * @deprecated Use the object parameter style method for a better developer experience.
326
344
  */
327
- paymentsCreate(amount: number, methodCode: string, cartId?: string, contactId?: string, country?: string, currency?: string, idempotencyKey?: string, metadata?: object, orderRef?: string, returnUrl?: string): Promise<Models.Error>;
345
+ paymentsCreate(amount: number, methodCode: string, cartId?: string, contactId?: string, country?: string, currency?: string, idempotencyKey?: string, metadata?: object, orderRef?: string, returnUrl?: string): Promise<Models.Payment>;
328
346
  /**
329
347
  * Classifies every unpaid self-managed payment (invoice, prepayment) as on time / reminder due / overdue from payment_reminder_after_days and overdue_after_days, writes the stage and the next due date, and reports PSP payments still waiting on a callback longer than webhook_stale_after_minutes. Pure function of each payment's age, so it is idempotent — it also runs daily as the 'dunning-scan' schedule. It classifies and does not send: a stage change emits payment.updated, and what a reminder looks like is the merchant's workflow.
330
348
  *
@@ -359,20 +377,20 @@ declare class PaymentsLedger {
359
377
  *
360
378
  * @param {string} params.orderRef - The external order reference the checkout wrote onto the payment, trimmed before it is resolved. Free text — the example is an invented shape, not a reference any tenant holds, and one no payment carries answers 404.
361
379
  * @throws {RevenexxException}
362
- * @returns {Promise<Models.Error>}
380
+ * @returns {Promise<{}>}
363
381
  */
364
382
  paymentsOrdersCapture(params: {
365
383
  orderRef: string;
366
- }): Promise<Models.Error>;
384
+ }): Promise<{}>;
367
385
  /**
368
386
  * This is the hook the tenant's `auto_capture_policy: 'on_ship'` was written for: fulfilment knows the order it shipped and not the payment ids behind it, so the shipment calls this one route with the reference it already holds and the money for that order is collected in a single request. Resolves payments by their order_ref (the same key the PSP webhooks fall back to), captures every authorized one and reports the rest instead of failing — an order whose payment was already captured is a successful no-op, and a provider that refuses one payment lands in `skipped` rather than failing the call. Note that payments.order_ref is nullable with no foreign key: this route is exactly as good as the reference the checkout writes onto the payment.
369
387
  *
370
388
  * @param {string} orderRef - The external order reference the checkout wrote onto the payment, trimmed before it is resolved. Free text — the example is an invented shape, not a reference any tenant holds, and one no payment carries answers 404.
371
389
  * @throws {RevenexxException}
372
- * @returns {Promise<Models.Error>}
390
+ * @returns {Promise<{}>}
373
391
  * @deprecated Use the object parameter style method for a better developer experience.
374
392
  */
375
- paymentsOrdersCapture(orderRef: string): Promise<Models.Error>;
393
+ paymentsOrdersCapture(orderRef: string): Promise<{}>;
376
394
  /**
377
395
  * The enums this app owns, four of them: statuses, method kinds, fee types and dunning stages. This is the index and carries a name and a title per set and nothing more — the values themselves, with their labels and badge tones, are one call further down at GET /payments/vocabularies/{name}, so a client that only needs to know which sets exist does not pay for all of them. Values come out of the CHECK constraints, so what is served is what the database enforces — a client renders a status this app adds without a release of its own.
378
396
  *
@@ -385,20 +403,20 @@ declare class PaymentsLedger {
385
403
  *
386
404
  * @param {PaymentsVocabulariesGetName} params.name - Which vocabulary to read. The set is closed: GET /payments/vocabularies lists exactly these.
387
405
  * @throws {RevenexxException}
388
- * @returns {Promise<Models.Error>}
406
+ * @returns {Promise<Models.PaymentVocabulary>}
389
407
  */
390
408
  paymentsVocabulariesGet(params: {
391
409
  name: PaymentsVocabulariesGetName;
392
- }): Promise<Models.Error>;
410
+ }): Promise<Models.PaymentVocabulary>;
393
411
  /**
394
412
  * One set in full: every value it permits, the label to show for each and the badge tone to render it in, which is what a client needs to draw a status chip without hard-coding this app's enums. The value set is parsed out of the CHECK constraint in schema.json, so what is served IS what the database enforces. Labels are curated on top and can only add words and colour — a permitted value nobody labelled still appears, titled from its own key, which is why `title` and `description` are a locale map on a labelled value and a plain string on an unlabelled one.
395
413
  *
396
414
  * @param {PaymentsVocabulariesGetName} name - Which vocabulary to read. The set is closed: GET /payments/vocabularies lists exactly these.
397
415
  * @throws {RevenexxException}
398
- * @returns {Promise<Models.Error>}
416
+ * @returns {Promise<Models.PaymentVocabulary>}
399
417
  * @deprecated Use the object parameter style method for a better developer experience.
400
418
  */
401
- paymentsVocabulariesGet(name: PaymentsVocabulariesGetName): Promise<Models.Error>;
419
+ paymentsVocabulariesGet(name: PaymentsVocabulariesGetName): Promise<Models.PaymentVocabulary>;
402
420
  /**
403
421
  * The sink a PSP callback ends up in, and an inbound ingress endpoint in the sense of ADR-0066: the provider never posts here directly, it posts to webhooks.revenexx.com, which verifies and captures the delivery and dispatches its envelope to this route through the gateway. That indirection is also what makes this the one override point for PSP callback handling — everything a callback does to the ledger happens here and nowhere else, so a deployment that needs a provider's callbacks normalized differently replaces this operation instead of touching the lifecycle routes. Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.
404
422
  *
@@ -407,14 +425,14 @@ declare class PaymentsLedger {
407
425
  * @param {object} params.request - The captured HTTP request as the PSP sent it.
408
426
  * @param {any} params.verified - Whether the ingress verified the callback signature against the provider's `webhook_secret`. An explicit false is refused with 422: an endpoint may run in annotate mode, and the ledger stays sovereign over one that does.
409
427
  * @throws {RevenexxException}
410
- * @returns {Promise<Models.Error>}
428
+ * @returns {Promise<{}>}
411
429
  */
412
430
  paymentsWebhooksIngest(params: {
413
431
  provider: string;
414
432
  id?: any;
415
433
  request?: object;
416
434
  verified?: any;
417
- }): Promise<Models.Error>;
435
+ }): Promise<{}>;
418
436
  /**
419
437
  * The sink a PSP callback ends up in, and an inbound ingress endpoint in the sense of ADR-0066: the provider never posts here directly, it posts to webhooks.revenexx.com, which verifies and captures the delivery and dispatches its envelope to this route through the gateway. That indirection is also what makes this the one override point for PSP callback handling — everything a callback does to the ledger happens here and nowhere else, so a deployment that needs a provider's callbacks normalized differently replaces this operation instead of touching the lifecycle routes. Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward — provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.
420
438
  *
@@ -423,111 +441,111 @@ declare class PaymentsLedger {
423
441
  * @param {object} request - The captured HTTP request as the PSP sent it.
424
442
  * @param {any} verified - Whether the ingress verified the callback signature against the provider's `webhook_secret`. An explicit false is refused with 422: an endpoint may run in annotate mode, and the ledger stays sovereign over one that does.
425
443
  * @throws {RevenexxException}
426
- * @returns {Promise<Models.Error>}
444
+ * @returns {Promise<{}>}
427
445
  * @deprecated Use the object parameter style method for a better developer experience.
428
446
  */
429
- paymentsWebhooksIngest(provider: string, id?: any, request?: object, verified?: any): Promise<Models.Error>;
447
+ paymentsWebhooksIngest(provider: string, id?: any, request?: object, verified?: any): Promise<{}>;
430
448
  /**
431
449
  * One ledger row in full: the amount and the fee that were computed at creation, the method code and PSP it was made through, where it stands in the lifecycle, the timestamp of each transition it has been through (`authorized_at`, `captured_at`, `failed_at`, `refunded_at`), the dunning columns the daily scan maintains and, while the buyer still has something to do, `next_action`. This is the call to poll after sending a buyer to a PSP redirect. Two things it does not do: `error_message` is answered from the failure taxonomy and never carries the provider's or the runtime's own words, and there is no route that resolves a payment by `order_ref` — that column is nullable and not unique, so it is a filter on the list (`GET /payments?order_ref=…`) which may legitimately answer several rows.
432
450
  *
433
451
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
434
452
  * @throws {RevenexxException}
435
- * @returns {Promise<Models.Error>}
453
+ * @returns {Promise<Models.Payment>}
436
454
  */
437
455
  paymentsGet(params: {
438
456
  id: string;
439
- }): Promise<Models.Error>;
457
+ }): Promise<Models.Payment>;
440
458
  /**
441
459
  * One ledger row in full: the amount and the fee that were computed at creation, the method code and PSP it was made through, where it stands in the lifecycle, the timestamp of each transition it has been through (`authorized_at`, `captured_at`, `failed_at`, `refunded_at`), the dunning columns the daily scan maintains and, while the buyer still has something to do, `next_action`. This is the call to poll after sending a buyer to a PSP redirect. Two things it does not do: `error_message` is answered from the failure taxonomy and never carries the provider's or the runtime's own words, and there is no route that resolves a payment by `order_ref` — that column is nullable and not unique, so it is a filter on the list (`GET /payments?order_ref=…`) which may legitimately answer several rows.
442
460
  *
443
461
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
444
462
  * @throws {RevenexxException}
445
- * @returns {Promise<Models.Error>}
463
+ * @returns {Promise<Models.Payment>}
446
464
  * @deprecated Use the object parameter style method for a better developer experience.
447
465
  */
448
- paymentsGet(id: string): Promise<Models.Error>;
466
+ paymentsGet(id: string): Promise<Models.Payment>;
449
467
  /**
450
468
  * Drops the claim before any money has been taken — the abandoned basket, the buyer who never came back from the redirect, the invoice an operator writes off. It is the only transition that starts from three statuses rather than one, because everything short of captured can still be released. A captured payment is not cancellable at all: that is a refund, and the lattice answers 400 rather than pretending. Unlike capture and refund this transition has no time window — the merchant's `capture_expiry_days` and `refund_window_days` do not apply, so a stale authorization can always be released even once it is too old to collect. On a PSP payment the provider is called and the `reason` in the body is passed to it, so it reaches the PSP's own cancellation-reason field as well as being stored under `metadata.cancel_reason`. Cancelling stops the dunning clock: the stage goes back to `none` and the due date is cleared.
451
469
  *
452
470
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
453
471
  * @param {string} params.reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
454
472
  * @throws {RevenexxException}
455
- * @returns {Promise<Models.Error>}
473
+ * @returns {Promise<Models.Payment>}
456
474
  */
457
475
  paymentsCancel(params: {
458
476
  id: string;
459
477
  reason?: string;
460
- }): Promise<Models.Error>;
478
+ }): Promise<Models.Payment>;
461
479
  /**
462
480
  * Drops the claim before any money has been taken — the abandoned basket, the buyer who never came back from the redirect, the invoice an operator writes off. It is the only transition that starts from three statuses rather than one, because everything short of captured can still be released. A captured payment is not cancellable at all: that is a refund, and the lattice answers 400 rather than pretending. Unlike capture and refund this transition has no time window — the merchant's `capture_expiry_days` and `refund_window_days` do not apply, so a stale authorization can always be released even once it is too old to collect. On a PSP payment the provider is called and the `reason` in the body is passed to it, so it reaches the PSP's own cancellation-reason field as well as being stored under `metadata.cancel_reason`. Cancelling stops the dunning clock: the stage goes back to `none` and the due date is cleared.
463
481
  *
464
482
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
465
483
  * @param {string} reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
466
484
  * @throws {RevenexxException}
467
- * @returns {Promise<Models.Error>}
485
+ * @returns {Promise<Models.Payment>}
468
486
  * @deprecated Use the object parameter style method for a better developer experience.
469
487
  */
470
- paymentsCancel(id: string, reason?: string): Promise<Models.Error>;
488
+ paymentsCancel(id: string, reason?: string): Promise<Models.Payment>;
471
489
  /**
472
490
  * Collects money that is currently only reserved. It starts from `authorized` and from nothing else — under `auto_capture_policy: 'immediate'` a payment is captured in the same request that created it and never passes through here, so this is the route for the 'manual' and 'on_ship' policies, and POST /payments/orders/{order_ref}/capture is the same operation addressed by the order reference a warehouse actually holds. There is no request body and no amount: the ledger carries one amount and one status, so a capture is the whole authorization or nothing. On a self-managed payment it takes no PSP anywhere near it — it records that an invoice or a prepayment was paid, and stops the dunning clock. Refused with 422 once the authorization is older than the tenant's `capture_expiry_days` (the message carries both numbers), because an expired authorization is declined by the provider anyway and a 422 here is the cheap version of finding out later.
473
491
  *
474
492
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
475
493
  * @throws {RevenexxException}
476
- * @returns {Promise<Models.Error>}
494
+ * @returns {Promise<Models.Payment>}
477
495
  */
478
496
  paymentsCapture(params: {
479
497
  id: string;
480
- }): Promise<Models.Error>;
498
+ }): Promise<Models.Payment>;
481
499
  /**
482
500
  * Collects money that is currently only reserved. It starts from `authorized` and from nothing else — under `auto_capture_policy: 'immediate'` a payment is captured in the same request that created it and never passes through here, so this is the route for the 'manual' and 'on_ship' policies, and POST /payments/orders/{order_ref}/capture is the same operation addressed by the order reference a warehouse actually holds. There is no request body and no amount: the ledger carries one amount and one status, so a capture is the whole authorization or nothing. On a self-managed payment it takes no PSP anywhere near it — it records that an invoice or a prepayment was paid, and stops the dunning clock. Refused with 422 once the authorization is older than the tenant's `capture_expiry_days` (the message carries both numbers), because an expired authorization is declined by the provider anyway and a 422 here is the cheap version of finding out later.
483
501
  *
484
502
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
485
503
  * @throws {RevenexxException}
486
- * @returns {Promise<Models.Error>}
504
+ * @returns {Promise<Models.Payment>}
487
505
  * @deprecated Use the object parameter style method for a better developer experience.
488
506
  */
489
- paymentsCapture(id: string): Promise<Models.Error>;
507
+ paymentsCapture(id: string): Promise<Models.Payment>;
490
508
  /**
491
509
  * The other half of a redirect. POST /payments answered `requires_action` with a `next_action` the storefront carried out — a 3-D Secure step, a wallet approval, a bank login — and this is the call that asks the PSP how it went and writes the answer to the ledger. It starts from `requires_action` and from nothing else, so a payment that already came back authorized needs no confirm and the lattice answers 400 rather than repeating one. `next_action` is cleared by this call whatever the outcome. Where the tenant's `auto_capture_policy` is 'immediate' the money is taken straight after the authorization, in the same request, so a successful confirm can come back `captured` rather than `authorized`; a failed auto-capture does not fail the confirm, because a good authorization is worth more than a tidy status.
492
510
  *
493
511
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
494
512
  * @throws {RevenexxException}
495
- * @returns {Promise<Models.Error>}
513
+ * @returns {Promise<Models.Payment>}
496
514
  */
497
515
  paymentsConfirm(params: {
498
516
  id: string;
499
- }): Promise<Models.Error>;
517
+ }): Promise<Models.Payment>;
500
518
  /**
501
519
  * The other half of a redirect. POST /payments answered `requires_action` with a `next_action` the storefront carried out — a 3-D Secure step, a wallet approval, a bank login — and this is the call that asks the PSP how it went and writes the answer to the ledger. It starts from `requires_action` and from nothing else, so a payment that already came back authorized needs no confirm and the lattice answers 400 rather than repeating one. `next_action` is cleared by this call whatever the outcome. Where the tenant's `auto_capture_policy` is 'immediate' the money is taken straight after the authorization, in the same request, so a successful confirm can come back `captured` rather than `authorized`; a failed auto-capture does not fail the confirm, because a good authorization is worth more than a tidy status.
502
520
  *
503
521
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
504
522
  * @throws {RevenexxException}
505
- * @returns {Promise<Models.Error>}
523
+ * @returns {Promise<Models.Payment>}
506
524
  * @deprecated Use the object parameter style method for a better developer experience.
507
525
  */
508
- paymentsConfirm(id: string): Promise<Models.Error>;
526
+ paymentsConfirm(id: string): Promise<Models.Payment>;
509
527
  /**
510
528
  * Gives captured money back. It starts from `captured` and from nothing else — money that was only authorized is cancelled, not refunded, and the lattice answers 400 rather than guessing which was meant. All or nothing: the ledger carries one amount and one status, so there is no partial refund and no second one to express — a refunded payment is refunded in full, and a repeat is a 400 because `refunded` is not a status a refund starts from. The `reason` in the body is handed to the driver in the same call, so it reaches the PSP's own refund-reason field rather than being a note only this database ever sees, and it is stored under `metadata.refund_reason`. On a self-managed payment nothing is sent anywhere: it records that the merchant paid the buyer back by their own means. Refused with 422 once the capture is older than the tenant's `refund_window_days` (the message carries both numbers) — past that the provider stops accepting a refund against the transaction and it has to be made by bank transfer.
511
529
  *
512
530
  * @param {string} params.id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
513
531
  * @param {string} params.reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
514
532
  * @throws {RevenexxException}
515
- * @returns {Promise<Models.Error>}
533
+ * @returns {Promise<Models.Payment>}
516
534
  */
517
535
  paymentsRefund(params: {
518
536
  id: string;
519
537
  reason?: string;
520
- }): Promise<Models.Error>;
538
+ }): Promise<Models.Payment>;
521
539
  /**
522
540
  * Gives captured money back. It starts from `captured` and from nothing else — money that was only authorized is cancelled, not refunded, and the lattice answers 400 rather than guessing which was meant. All or nothing: the ledger carries one amount and one status, so there is no partial refund and no second one to express — a refunded payment is refunded in full, and a repeat is a 400 because `refunded` is not a status a refund starts from. The `reason` in the body is handed to the driver in the same call, so it reaches the PSP's own refund-reason field rather than being a note only this database ever sees, and it is stored under `metadata.refund_reason`. On a self-managed payment nothing is sent anywhere: it records that the merchant paid the buyer back by their own means. Refused with 422 once the capture is older than the tenant's `refund_window_days` (the message carries both numbers) — past that the provider stops accepting a refund against the transaction and it has to be made by bank transfer.
523
541
  *
524
542
  * @param {string} id - The payment. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
525
543
  * @param {string} reason - The operator's own words for why. Kept on the payment (`metadata.cancel_reason` / `metadata.refund_reason`) AND handed to the provider's own cancellation or refund reason field, so it is readable in the PSP's dashboard too. Trimmed and cut at 500 characters.
526
544
  * @throws {RevenexxException}
527
- * @returns {Promise<Models.Error>}
545
+ * @returns {Promise<Models.Payment>}
528
546
  * @deprecated Use the object parameter style method for a better developer experience.
529
547
  */
530
- paymentsRefund(id: string, reason?: string): Promise<Models.Error>;
548
+ paymentsRefund(id: string, reason?: string): Promise<Models.Payment>;
531
549
  }
532
550
 
533
551
  export { PaymentsLedger };