@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
@@ -11,6 +11,15 @@ import '../query.js';
11
11
  import '../enums/address-type-row-tone.js';
12
12
  import '../enums/address-type-row-create-request-tone.js';
13
13
  import '../enums/address-type-row-update-request-tone.js';
14
+ import '../enums/approval-rule-approver-type.js';
15
+ import '../enums/approval-rule-condition.js';
16
+ import '../enums/approval-rule-effect.js';
17
+ import '../enums/approval-rule-create-request-approver-type.js';
18
+ import '../enums/approval-rule-create-request-condition.js';
19
+ import '../enums/approval-rule-create-request-effect.js';
20
+ import '../enums/approval-rule-update-request-approver-type.js';
21
+ import '../enums/approval-rule-update-request-condition.js';
22
+ import '../enums/approval-rule-update-request-effect.js';
14
23
  import '../enums/assets-source.js';
15
24
  import '../enums/attribute-value-bucket.js';
16
25
  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';
@@ -398,7 +416,7 @@ declare class Orders {
398
416
  * @param {number} params.step - How far the counter moves per draw. 1 is consecutive numbering; a larger step is what a merchant chooses who does not want their order volume readable off an invoice. Defaults to 1.
399
417
  * @param {string} params.suffix - Literal text after the counter — a market or year marker on merchants who number that way. Empty by default, which is what most of them use. Defaults to ''.
400
418
  * @throws {RevenexxException}
401
- * @returns {Promise<Models.Error>}
419
+ * @returns {Promise<Models.NumberRange>}
402
420
  */
403
421
  ordersNumberRangesCreate(params: {
404
422
  code: string;
@@ -410,7 +428,7 @@ declare class Orders {
410
428
  prefix?: string;
411
429
  step?: number;
412
430
  suffix?: string;
413
- }): Promise<Models.Error>;
431
+ }): Promise<Models.NumberRange>;
414
432
  /**
415
433
  * Add a counter beyond the three a tenant is seeded with, and give it the shape a merchant's numbers actually have: {prefix}{counter padded to `padding`}{suffix}, moving by `step` per draw. A new range is what the order_number_range_code / delivery_number_range_code / return_number_range_code settings can then be pointed at — the code is the name those settings use, and a setting naming a code no range carries makes placing an order answer 422. `code` is unique per tenant, so this is a 409 for one that is taken rather than a second counter under the same name. It does not renumber anything that already exists, and setting `counter` to a value already issued re-issues those numbers, which the unique index on the order number then refuses.
416
434
  *
@@ -424,10 +442,10 @@ declare class Orders {
424
442
  * @param {number} step - How far the counter moves per draw. 1 is consecutive numbering; a larger step is what a merchant chooses who does not want their order volume readable off an invoice. Defaults to 1.
425
443
  * @param {string} suffix - Literal text after the counter — a market or year marker on merchants who number that way. Empty by default, which is what most of them use. Defaults to ''.
426
444
  * @throws {RevenexxException}
427
- * @returns {Promise<Models.Error>}
445
+ * @returns {Promise<Models.NumberRange>}
428
446
  * @deprecated Use the object parameter style method for a better developer experience.
429
447
  */
430
- ordersNumberRangesCreate(code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.Error>;
448
+ ordersNumberRangesCreate(code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.NumberRange>;
431
449
  /**
432
450
  * Make sure the three codes this app draws from exist: 'order' (ORD-), 'delivery' (DEL-) and 'return' (RET-), each padded to six digits and stepping by one. The app runs it for you on install, so a fresh tenant needs nothing; call it by hand after a range was deleted, or to check what a tenant has. Idempotent: a code that already exists comes back under 'existing' and is left EXACTLY as it is, counter included, so a merchant who changed the prefix keeps their change. Answers 200, never 201 — it is a reconcile, not a create — and it never repairs or renames a range that is already there.
433
451
  *
@@ -440,39 +458,39 @@ declare class Orders {
440
458
  *
441
459
  * @param {string} params.id - The number range id (uuid).
442
460
  * @throws {RevenexxException}
443
- * @returns {Promise<Models.Error>}
461
+ * @returns {Promise<Models.OrderDeleted>}
444
462
  */
445
463
  ordersNumberRangesDelete(params: {
446
464
  id: string;
447
- }): Promise<Models.Error>;
465
+ }): Promise<Models.OrderDeleted>;
448
466
  /**
449
467
  * Remove a counter a tenant no longer numbers anything from. It touches nothing that was numbered out of it: existing orders, delivery notes and returns keep the numbers they were given, because a number is copied onto the row at place-time and is not a reference to this table. Deleting one of the three standard codes is allowed and is usually a mistake — the next draw against it answers 422 'number_range_missing', unless POST /orders/number-ranges/defaults or a reinstall seeds it again, which starts its counter back at 0.
450
468
  *
451
469
  * @param {string} id - The number range id (uuid).
452
470
  * @throws {RevenexxException}
453
- * @returns {Promise<Models.Error>}
471
+ * @returns {Promise<Models.OrderDeleted>}
454
472
  * @deprecated Use the object parameter style method for a better developer experience.
455
473
  */
456
- ordersNumberRangesDelete(id: string): Promise<Models.Error>;
474
+ ordersNumberRangesDelete(id: string): Promise<Models.OrderDeleted>;
457
475
  /**
458
476
  * One counter with its whole configuration: the prefix and suffix around the number, how wide it is padded, how far each draw moves it, where it currently stands, and the position_step new order lines are numbered in. Reach for it when you hold the id — from the list, or from what a create answered — and want the row as it stands now. Reading does not draw a number and does not move `counter`; the id is the range's uuid, not its `code`, and a code is turned into a range through GET /orders/number-ranges?code=order.
459
477
  *
460
478
  * @param {string} params.id - The number range id (uuid).
461
479
  * @throws {RevenexxException}
462
- * @returns {Promise<Models.Error>}
480
+ * @returns {Promise<Models.NumberRange>}
463
481
  */
464
482
  ordersNumberRangesGet(params: {
465
483
  id: string;
466
- }): Promise<Models.Error>;
484
+ }): Promise<Models.NumberRange>;
467
485
  /**
468
486
  * One counter with its whole configuration: the prefix and suffix around the number, how wide it is padded, how far each draw moves it, where it currently stands, and the position_step new order lines are numbered in. Reach for it when you hold the id — from the list, or from what a create answered — and want the row as it stands now. Reading does not draw a number and does not move `counter`; the id is the range's uuid, not its `code`, and a code is turned into a range through GET /orders/number-ranges?code=order.
469
487
  *
470
488
  * @param {string} id - The number range id (uuid).
471
489
  * @throws {RevenexxException}
472
- * @returns {Promise<Models.Error>}
490
+ * @returns {Promise<Models.NumberRange>}
473
491
  * @deprecated Use the object parameter style method for a better developer experience.
474
492
  */
475
- ordersNumberRangesGet(id: string): Promise<Models.Error>;
493
+ ordersNumberRangesGet(id: string): Promise<Models.NumberRange>;
476
494
  /**
477
495
  * Change the format or the state of an existing counter: a new prefix or suffix, a wider padding, a different step, a different position_step for new order lines — or `counter` itself, which is state rather than configuration. Everything takes effect on the NEXT draw only: nothing that was already numbered is renumbered, so widening the padding leaves ORD-000123 and starts writing ORD-0000124. Moving `counter` forward skips numbers, and moving it back re-issues numbers that exist, which the unique index on the order number answers 409 for at place-time rather than here. Renaming `code` to one another range of this tenant already holds is a 409.
478
496
  *
@@ -487,7 +505,7 @@ declare class Orders {
487
505
  * @param {number} params.step - How far the counter moves per draw. 1 is consecutive numbering; a larger step is what a merchant chooses who does not want their order volume readable off an invoice. Defaults to 1.
488
506
  * @param {string} params.suffix - Literal text after the counter — a market or year marker on merchants who number that way. Empty by default, which is what most of them use. Defaults to ''.
489
507
  * @throws {RevenexxException}
490
- * @returns {Promise<Models.Error>}
508
+ * @returns {Promise<Models.NumberRange>}
491
509
  */
492
510
  ordersNumberRangesUpdate(params: {
493
511
  id: string;
@@ -500,7 +518,7 @@ declare class Orders {
500
518
  prefix?: string;
501
519
  step?: number;
502
520
  suffix?: string;
503
- }): Promise<Models.Error>;
521
+ }): Promise<Models.NumberRange>;
504
522
  /**
505
523
  * Change the format or the state of an existing counter: a new prefix or suffix, a wider padding, a different step, a different position_step for new order lines — or `counter` itself, which is state rather than configuration. Everything takes effect on the NEXT draw only: nothing that was already numbered is renumbered, so widening the padding leaves ORD-000123 and starts writing ORD-0000124. Moving `counter` forward skips numbers, and moving it back re-issues numbers that exist, which the unique index on the order number answers 409 for at place-time rather than here. Renaming `code` to one another range of this tenant already holds is a 409.
506
524
  *
@@ -515,10 +533,10 @@ declare class Orders {
515
533
  * @param {number} step - How far the counter moves per draw. 1 is consecutive numbering; a larger step is what a merchant chooses who does not want their order volume readable off an invoice. Defaults to 1.
516
534
  * @param {string} suffix - Literal text after the counter — a market or year marker on merchants who number that way. Empty by default, which is what most of them use. Defaults to ''.
517
535
  * @throws {RevenexxException}
518
- * @returns {Promise<Models.Error>}
536
+ * @returns {Promise<Models.NumberRange>}
519
537
  * @deprecated Use the object parameter style method for a better developer experience.
520
538
  */
521
- ordersNumberRangesUpdate(id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.Error>;
539
+ ordersNumberRangesUpdate(id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.NumberRange>;
522
540
  /**
523
541
  * The way an order comes into existence — the call a checkout, a punch-out or an ERP import makes once the basket is final. The body is a SNAPSHOT: items with their product copies, plus the buyer, the addresses and the payment and shipping choices frozen as they were at this moment, so the order stays readable when the catalogue or the customer changes underneath it. The app draws the order number from the tenant's order range, numbers the positions, computes subtotal, tax and grand_total from the lines, and writes the order.placed event that carries the order onto the bus. It does not reserve stock, take payment or talk to an ERP: those are separate capabilities, and this route's job ends when the event is on the bus. Two things can turn a placement into a REQUEST awaiting approval, and both still answer 201 — with status='pending' and no placed_at: a principal holding only orders.request, and an order worth more than the tenant's require_approval_above_value (a principal holding orders.approve is exempt from the threshold). The order.requested event says which, in 'approval_reason'. The currency defaults to the market's default_currency setting and the position cap is the tenant's max_items_per_order.
524
542
  *
@@ -539,7 +557,7 @@ declare class Orders {
539
557
  * @param {number} params.shippingTotal - NET shipping cost, taken from shipping.price or, when the snapshot carries no price, from the request's shipping_total. In `currency`. Only read when the shipping snapshot carries no 'price'.
540
558
  * @param {object} params.userData - Free-form data belonging to the ORDERING side — carried through from the storefront or the cart and handed back untouched. One of the few fields PUT /orders/{id} may still change.
541
559
  * @throws {RevenexxException}
542
- * @returns {Promise<Models.Error>}
560
+ * @returns {Promise<Models.OrderPlaced>}
543
561
  */
544
562
  ordersPlace(params: {
545
563
  items: Models.OrderItemCreateRequest[];
@@ -558,7 +576,7 @@ declare class Orders {
558
576
  shippingAddress?: object;
559
577
  shippingTotal?: number;
560
578
  userData?: object;
561
- }): Promise<Models.Error>;
579
+ }): Promise<Models.OrderPlaced>;
562
580
  /**
563
581
  * The way an order comes into existence — the call a checkout, a punch-out or an ERP import makes once the basket is final. The body is a SNAPSHOT: items with their product copies, plus the buyer, the addresses and the payment and shipping choices frozen as they were at this moment, so the order stays readable when the catalogue or the customer changes underneath it. The app draws the order number from the tenant's order range, numbers the positions, computes subtotal, tax and grand_total from the lines, and writes the order.placed event that carries the order onto the bus. It does not reserve stock, take payment or talk to an ERP: those are separate capabilities, and this route's job ends when the event is on the bus. Two things can turn a placement into a REQUEST awaiting approval, and both still answer 201 — with status='pending' and no placed_at: a principal holding only orders.request, and an order worth more than the tenant's require_approval_above_value (a principal holding orders.approve is exempt from the threshold). The order.requested event says which, in 'approval_reason'. The currency defaults to the market's default_currency setting and the position cap is the tenant's max_items_per_order.
564
582
  *
@@ -579,10 +597,10 @@ declare class Orders {
579
597
  * @param {number} shippingTotal - NET shipping cost, taken from shipping.price or, when the snapshot carries no price, from the request's shipping_total. In `currency`. Only read when the shipping snapshot carries no 'price'.
580
598
  * @param {object} userData - Free-form data belonging to the ORDERING side — carried through from the storefront or the cart and handed back untouched. One of the few fields PUT /orders/{id} may still change.
581
599
  * @throws {RevenexxException}
582
- * @returns {Promise<Models.Error>}
600
+ * @returns {Promise<Models.OrderPlaced>}
583
601
  * @deprecated Use the object parameter style method for a better developer experience.
584
602
  */
585
- ordersPlace(items: Models.OrderItemCreateRequest[], billingAddress?: object, buyer?: object, cartId?: string, channelId?: string, contactId?: string, currency?: string, customerOrderNumber?: string, grandTotal?: number, metadata?: object, organizationId?: string, payment?: object, shipping?: object, shippingAddress?: object, shippingTotal?: number, userData?: object): Promise<Models.Error>;
603
+ ordersPlace(items: Models.OrderItemCreateRequest[], billingAddress?: object, buyer?: object, cartId?: string, channelId?: string, contactId?: string, currency?: string, customerOrderNumber?: string, grandTotal?: number, metadata?: object, organizationId?: string, payment?: object, shipping?: object, shippingAddress?: object, shippingTotal?: number, userData?: object): Promise<Models.OrderPlaced>;
586
604
  /**
587
605
  * What each company has bought, as numbers another app can keep: order count, lifetime revenue, first and last order date, and the same count and revenue over the last 30, 90 and 365 days. This is what a customer segment like "bought for more than 100k last year" is built on, and the customers app materialises it into a local projection its segment rules query. It answers about ORGANIZATIONS only — a private or guest order carries none and is counted in orders_without_organization rather than attributed to anybody — and it converts nothing, so an organization that ordered in two currencies gets both listed and one summed number to read with care. Revenue lives in orders, customer segments live in the customers app, and the two may not join (ADR-0055: no cross-app FK, grant or view). This capability is the hand-over. Every number is additive (count/sum/min/max) so partial answers merge; the average order value is deliberately not returned — it is revenue_total / order_count over the merged parts. Windows are anchored at as_of, which is echoed back so a loop measures one consistent picture.
588
606
  *
@@ -623,39 +641,39 @@ declare class Orders {
623
641
  *
624
642
  * @param {OrdersVocabulariesGetName} params.name - The vocabulary name — the part after the dot in the qualified id.
625
643
  * @throws {RevenexxException}
626
- * @returns {Promise<Models.Error>}
644
+ * @returns {Promise<Models.OrderVocabulary>}
627
645
  */
628
646
  ordersVocabulariesGet(params: {
629
647
  name: OrdersVocabulariesGetName;
630
- }): Promise<Models.Error>;
648
+ }): Promise<Models.OrderVocabulary>;
631
649
  /**
632
650
  * Everything a UI needs to render one of this app's value sets without knowing it: every permitted value, in order, each with a title and description in the locales somebody wrote and a badge tone to colour it. Fetch it once and a status filter, a status badge and a resolution picker all stay correct through a lifecycle change, because the set served IS the set enforced. It answers about values, not about rows — nothing here says how many orders are in a status. The values are read out of the column's CHECK constraint, so the served set IS the enforced set and the two cannot drift — a value added to the constraint appears here even before anyone labels it, titled from its own key. Values come back in constraint order, which is lifecycle order for a status, and 'final' marks the values that END the lifecycle (completed, cancelled) so a client can ask "is this order still open?" instead of matching names it guessed. Every set is exhaustive ('closed' is always true); 'source' says who enforces it — 'schema' for a CHECK constraint, 'app' for 'return-resolutions', whose column carries none and whose words the return routes enforce instead. Those values additionally carry 'stage' (complete | reject): the transition that accepts them. 'title' and 'description' are locale maps where the copy was written and plain strings where the key-derived fallback answered, on the vocabulary and on every value alike. Names: cancellation-scopes, comment-visibilities, fulfillment-statuses, item-types, payment-statuses, return-resolutions, return-statuses, statuses.
633
651
  *
634
652
  * @param {OrdersVocabulariesGetName} name - The vocabulary name — the part after the dot in the qualified id.
635
653
  * @throws {RevenexxException}
636
- * @returns {Promise<Models.Error>}
654
+ * @returns {Promise<Models.OrderVocabulary>}
637
655
  * @deprecated Use the object parameter style method for a better developer experience.
638
656
  */
639
- ordersVocabulariesGet(name: OrdersVocabulariesGetName): Promise<Models.Error>;
657
+ ordersVocabulariesGet(name: OrdersVocabulariesGetName): Promise<Models.OrderVocabulary>;
640
658
  /**
641
659
  * The single source of order information, and what an order detail screen is built from: the order row plus its positions, its shipments with the shipment_items each one booked, its returns and its cancellations — one call, no assembling five lists. A cancellation's and a return's 'positions' are ARRAYS of {order_item_id, quantity}; a return's entries additionally carry 'restock'. Two things it does not carry: the comments and the event trail, which are their own paginated routes because both grow without bound. Addressed by uuid — an order number goes through GET /orders?number=… first.
642
660
  *
643
661
  * @param {string} params.id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
644
662
  * @throws {RevenexxException}
645
- * @returns {Promise<Models.Error>}
663
+ * @returns {Promise<Models.OrderDetail>}
646
664
  */
647
665
  ordersGet(params: {
648
666
  id: string;
649
- }): Promise<Models.Error>;
667
+ }): Promise<Models.OrderDetail>;
650
668
  /**
651
669
  * The single source of order information, and what an order detail screen is built from: the order row plus its positions, its shipments with the shipment_items each one booked, its returns and its cancellations — one call, no assembling five lists. A cancellation's and a return's 'positions' are ARRAYS of {order_item_id, quantity}; a return's entries additionally carry 'restock'. Two things it does not carry: the comments and the event trail, which are their own paginated routes because both grow without bound. Addressed by uuid — an order number goes through GET /orders?number=… first.
652
670
  *
653
671
  * @param {string} id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
654
672
  * @throws {RevenexxException}
655
- * @returns {Promise<Models.Error>}
673
+ * @returns {Promise<Models.OrderDetail>}
656
674
  * @deprecated Use the object parameter style method for a better developer experience.
657
675
  */
658
- ordersGet(id: string): Promise<Models.Error>;
676
+ ordersGet(id: string): Promise<Models.OrderDetail>;
659
677
  /**
660
678
  * The narrow correction window a service desk needs: the customer gave the wrong delivery address, the buyer's name is misspelled, their purchase-order number was missing. Six columns and no others — customer_order_number, buyer, billing_address, shipping_address, user_data and metadata — and each is REPLACED whole, not merged, so send the entire address rather than the one line that changed. It moves nothing: status, payment_status, fulfillment_status and the quantities belong to the action routes, and a body carrying them is accepted with those keys quietly dropped. The window closes when the fulfilling system acknowledges the order, because from then on the ERP holds the copy that ships — unless the tenant set allow_modification_after_acknowledge. Every accepted change writes an order.updated event naming the columns it touched.
661
679
  *
@@ -667,7 +685,7 @@ declare class Orders {
667
685
  * @param {object} params.shippingAddress - The delivery address, FROZEN at place-time — what goes on the label of every shipment of this order. Null on an order that is never delivered (a service, a digital item, a collection). Replaced wholesale. This is the one correction that actually matters after placement: the label of every shipment still to go out is printed from it.
668
686
  * @param {object} params.userData - Free-form data belonging to the ORDERING side — carried through from the storefront or the cart and handed back untouched. One of the few fields PUT /orders/{id} may still change. Replaced wholesale.
669
687
  * @throws {RevenexxException}
670
- * @returns {Promise<Models.Error>}
688
+ * @returns {Promise<Models.Order>}
671
689
  */
672
690
  ordersUpdate(params: {
673
691
  id: string;
@@ -677,7 +695,7 @@ declare class Orders {
677
695
  metadata?: object;
678
696
  shippingAddress?: object;
679
697
  userData?: object;
680
- }): Promise<Models.Error>;
698
+ }): Promise<Models.Order>;
681
699
  /**
682
700
  * The narrow correction window a service desk needs: the customer gave the wrong delivery address, the buyer's name is misspelled, their purchase-order number was missing. Six columns and no others — customer_order_number, buyer, billing_address, shipping_address, user_data and metadata — and each is REPLACED whole, not merged, so send the entire address rather than the one line that changed. It moves nothing: status, payment_status, fulfillment_status and the quantities belong to the action routes, and a body carrying them is accepted with those keys quietly dropped. The window closes when the fulfilling system acknowledges the order, because from then on the ERP holds the copy that ships — unless the tenant set allow_modification_after_acknowledge. Every accepted change writes an order.updated event naming the columns it touched.
683
701
  *
@@ -689,32 +707,32 @@ declare class Orders {
689
707
  * @param {object} shippingAddress - The delivery address, FROZEN at place-time — what goes on the label of every shipment of this order. Null on an order that is never delivered (a service, a digital item, a collection). Replaced wholesale. This is the one correction that actually matters after placement: the label of every shipment still to go out is printed from it.
690
708
  * @param {object} userData - Free-form data belonging to the ORDERING side — carried through from the storefront or the cart and handed back untouched. One of the few fields PUT /orders/{id} may still change. Replaced wholesale.
691
709
  * @throws {RevenexxException}
692
- * @returns {Promise<Models.Error>}
710
+ * @returns {Promise<Models.Order>}
693
711
  * @deprecated Use the object parameter style method for a better developer experience.
694
712
  */
695
- ordersUpdate(id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object): Promise<Models.Error>;
713
+ ordersUpdate(id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object): Promise<Models.Order>;
696
714
  /**
697
715
  * The return channel for whatever fulfils the order. An Integration Studio workflow picks up order.placed, books the order into the ERP, and calls this with the id the ERP gave it — which lands in external_ref and makes the two systems mutually findable. It stamps acknowledged_at from the server's clock, and that timestamp is what closes the correction window: PUT /orders/{id} refuses afterwards, because the copy that ships now lives elsewhere. It is a handshake and nothing more — it does not change status, payment_status or fulfillment_status, and it does not ship anything. Once only: a second call is a 422 rather than a silent overwrite of the first system's reference.
698
716
  *
699
717
  * @param {string} params.id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
700
718
  * @param {string} params.externalRef - The FULFILLING system's reference for this order, typically the ERP order number. Written once by POST /orders/{id}/acknowledge and null until an integration acknowledged it. Keeps the existing value when omitted.
701
719
  * @throws {RevenexxException}
702
- * @returns {Promise<Models.Error>}
720
+ * @returns {Promise<Models.Order>}
703
721
  */
704
722
  ordersAcknowledge(params: {
705
723
  id: string;
706
724
  externalRef?: string;
707
- }): Promise<Models.Error>;
725
+ }): Promise<Models.Order>;
708
726
  /**
709
727
  * The return channel for whatever fulfils the order. An Integration Studio workflow picks up order.placed, books the order into the ERP, and calls this with the id the ERP gave it — which lands in external_ref and makes the two systems mutually findable. It stamps acknowledged_at from the server's clock, and that timestamp is what closes the correction window: PUT /orders/{id} refuses afterwards, because the copy that ships now lives elsewhere. It is a handshake and nothing more — it does not change status, payment_status or fulfillment_status, and it does not ship anything. Once only: a second call is a 422 rather than a silent overwrite of the first system's reference.
710
728
  *
711
729
  * @param {string} id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
712
730
  * @param {string} externalRef - The FULFILLING system's reference for this order, typically the ERP order number. Written once by POST /orders/{id}/acknowledge and null until an integration acknowledged it. Keeps the existing value when omitted.
713
731
  * @throws {RevenexxException}
714
- * @returns {Promise<Models.Error>}
732
+ * @returns {Promise<Models.Order>}
715
733
  * @deprecated Use the object parameter style method for a better developer experience.
716
734
  */
717
- ordersAcknowledge(id: string, externalRef?: string): Promise<Models.Error>;
735
+ ordersAcknowledge(id: string, externalRef?: string): Promise<Models.Order>;
718
736
  /**
719
737
  * Call the whole order off: every position's full quantity is booked as cancelled, the order moves to 'cancelled', a cancellation record is written with the reason and who gave it, and an order.cancelled event goes onto the bus. Only while NOTHING has shipped — once a single position has gone out the order is partly real and this answers 422; take the remaining quantities off with POST /orders/{id}/items/cancel instead, and handle what already shipped as a return. It refunds nothing and returns nothing to stock: payment travels through /payment-status and restocking is an explicit inventories call by the orchestrator. A tenant may require a reason (cancel_requires_reason), and a hold may block it (on_hold_blocks = 'shipping_and_cancel').
720
738
  *
@@ -722,13 +740,13 @@ declare class Orders {
722
740
  * @param {string} params.cancelledBy - Who cancelled, as the caller reported it — an operator, a desk, a system. Free text; this app does not resolve it against a user directory.
723
741
  * @param {string} params.reason - Why it was cancelled, free text. Mandatory when the tenant sets cancel_requires_reason — for those merchants an unexplained cancellation is refused with a 400.
724
742
  * @throws {RevenexxException}
725
- * @returns {Promise<Models.Error>}
743
+ * @returns {Promise<Models.Order>}
726
744
  */
727
745
  ordersCancel(params: {
728
746
  id: string;
729
747
  cancelledBy?: string;
730
748
  reason?: string;
731
- }): Promise<Models.Error>;
749
+ }): Promise<Models.Order>;
732
750
  /**
733
751
  * Call the whole order off: every position's full quantity is booked as cancelled, the order moves to 'cancelled', a cancellation record is written with the reason and who gave it, and an order.cancelled event goes onto the bus. Only while NOTHING has shipped — once a single position has gone out the order is partly real and this answers 422; take the remaining quantities off with POST /orders/{id}/items/cancel instead, and handle what already shipped as a return. It refunds nothing and returns nothing to stock: payment travels through /payment-status and restocking is an explicit inventories call by the orchestrator. A tenant may require a reason (cancel_requires_reason), and a hold may block it (on_hold_blocks = 'shipping_and_cancel').
734
752
  *
@@ -736,10 +754,10 @@ declare class Orders {
736
754
  * @param {string} cancelledBy - Who cancelled, as the caller reported it — an operator, a desk, a system. Free text; this app does not resolve it against a user directory.
737
755
  * @param {string} reason - Why it was cancelled, free text. Mandatory when the tenant sets cancel_requires_reason — for those merchants an unexplained cancellation is refused with a 400.
738
756
  * @throws {RevenexxException}
739
- * @returns {Promise<Models.Error>}
757
+ * @returns {Promise<Models.Order>}
740
758
  * @deprecated Use the object parameter style method for a better developer experience.
741
759
  */
742
- ordersCancel(id: string, cancelledBy?: string, reason?: string): Promise<Models.Error>;
760
+ ordersCancel(id: string, cancelledBy?: string, reason?: string): Promise<Models.Order>;
743
761
  /**
744
762
  * What people have written about this order, oldest first: the service desk's own notes and the messages meant for the customer, in one list. Filter by ?visibility=customer to build the version a customer may see, and by ?visibility=internal for the desk's own — the route does NOT decide that for you, so a customer-facing surface has to ask for the customer ones. Comments are prose about the order and never move it; the lifecycle lives in the event trail. Every parameter below is an exact match on the column it names. `order_id` is deliberately absent: the route fixes it from the path AFTER the query filter is read, so sending one is accepted and then overwritten — it filters nothing. DEPRECATED KEY: the response also repeats 'items' under 'comments' for compatibility with the pre-envelope shape. It is the same array; read 'items'. The alias is removed in the next minor version.
745
763
  *
@@ -753,7 +771,7 @@ declare class Orders {
753
771
  * @param {number} params.offset - Row offset for pagination (default 0).
754
772
  * @param {string} params.order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending, the direction is lower case, and the column has to exist — the value reaches the data plane verbatim and anything else is a 400.
755
773
  * @throws {RevenexxException}
756
- * @returns {Promise<Models.Error>}
774
+ * @returns {Promise<{}>}
757
775
  */
758
776
  ordersCommentsList(params: {
759
777
  id: string;
@@ -765,7 +783,7 @@ declare class Orders {
765
783
  limit?: number;
766
784
  offset?: number;
767
785
  order?: string;
768
- }): Promise<Models.Error>;
786
+ }): Promise<{}>;
769
787
  /**
770
788
  * What people have written about this order, oldest first: the service desk's own notes and the messages meant for the customer, in one list. Filter by ?visibility=customer to build the version a customer may see, and by ?visibility=internal for the desk's own — the route does NOT decide that for you, so a customer-facing surface has to ask for the customer ones. Comments are prose about the order and never move it; the lifecycle lives in the event trail. Every parameter below is an exact match on the column it names. `order_id` is deliberately absent: the route fixes it from the path AFTER the query filter is read, so sending one is accepted and then overwritten — it filters nothing. DEPRECATED KEY: the response also repeats 'items' under 'comments' for compatibility with the pre-envelope shape. It is the same array; read 'items'. The alias is removed in the next minor version.
771
789
  *
@@ -779,10 +797,10 @@ declare class Orders {
779
797
  * @param {number} offset - Row offset for pagination (default 0).
780
798
  * @param {string} order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending, the direction is lower case, and the column has to exist — the value reaches the data plane verbatim and anything else is a 400.
781
799
  * @throws {RevenexxException}
782
- * @returns {Promise<Models.Error>}
800
+ * @returns {Promise<{}>}
783
801
  * @deprecated Use the object parameter style method for a better developer experience.
784
802
  */
785
- ordersCommentsList(id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<Models.Error>;
803
+ ordersCommentsList(id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;
786
804
  /**
787
805
  * Write down what happened that the state machine cannot record: what the customer said on the phone, why an exception was made, what the warehouse found in the box. `visibility` decides who the note is for — 'internal' for the service desk, 'customer' for text meant to be shown to the buyer — and it defaults to the tenant's default_comment_visibility, which is 'internal' out of the box, so a note is never accidentally customer-facing. Adding one writes an order.comment.added event, so the trail shows that a note was made and its visibility, without copying the text onto the bus. It changes nothing about the order, and it sends nothing to anybody: this stores a comment, it does not email the customer.
788
806
  *
@@ -791,14 +809,14 @@ declare class Orders {
791
809
  * @param {string} params.author - Who wrote it, as the caller reported it. Free text; not resolved against a user directory.
792
810
  * @param {OrderCommentVisibility} params.visibility - Who may see it: 'internal' is a note between operators, 'customer' is meant to be shown in the customer's order view. Nothing here enforces that — this app labels the comment and the client showing it decides. Defaults to the tenant's default_comment_visibility. Defaults to the tenant's default_comment_visibility setting, which is 'internal' out of the box.
793
811
  * @throws {RevenexxException}
794
- * @returns {Promise<Models.Error>}
812
+ * @returns {Promise<Models.OrderComment>}
795
813
  */
796
814
  ordersCommentsCreate(params: {
797
815
  id: string;
798
816
  body: string;
799
817
  author?: string;
800
818
  visibility?: OrderCommentVisibility;
801
- }): Promise<Models.Error>;
819
+ }): Promise<Models.OrderComment>;
802
820
  /**
803
821
  * Write down what happened that the state machine cannot record: what the customer said on the phone, why an exception was made, what the warehouse found in the box. `visibility` decides who the note is for — 'internal' for the service desk, 'customer' for text meant to be shown to the buyer — and it defaults to the tenant's default_comment_visibility, which is 'internal' out of the box, so a note is never accidentally customer-facing. Adding one writes an order.comment.added event, so the trail shows that a note was made and its visibility, without copying the text onto the bus. It changes nothing about the order, and it sends nothing to anybody: this stores a comment, it does not email the customer.
804
822
  *
@@ -807,32 +825,32 @@ declare class Orders {
807
825
  * @param {string} author - Who wrote it, as the caller reported it. Free text; not resolved against a user directory.
808
826
  * @param {OrderCommentVisibility} visibility - Who may see it: 'internal' is a note between operators, 'customer' is meant to be shown in the customer's order view. Nothing here enforces that — this app labels the comment and the client showing it decides. Defaults to the tenant's default_comment_visibility. Defaults to the tenant's default_comment_visibility setting, which is 'internal' out of the box.
809
827
  * @throws {RevenexxException}
810
- * @returns {Promise<Models.Error>}
828
+ * @returns {Promise<Models.OrderComment>}
811
829
  * @deprecated Use the object parameter style method for a better developer experience.
812
830
  */
813
- ordersCommentsCreate(id: string, body: string, author?: string, visibility?: OrderCommentVisibility): Promise<Models.Error>;
831
+ ordersCommentsCreate(id: string, body: string, author?: string, visibility?: OrderCommentVisibility): Promise<Models.OrderComment>;
814
832
  /**
815
833
  * Declare the order finished, whatever the quantities say — the service was delivered, the download was fetched, or an operator has decided the rest is not coming. status moves to 'completed' and completed_at is stamped from the server's clock. It does NOT ship anything or change the quantities, so fulfillment_status stays whatever the positions make it, and an order completed with lines still open shows exactly that. A completed order is final: modification, shipping and cancellation all refuse afterwards, and only a return may still be registered against it. The counterpart of auto_complete_on = 'payment' | 'manual': something has to close an order that shipping no longer closes by itself, and it is also the honest end for a service or digital order that never ships. Writes an order_events row 'order.completed' with via='manual'.
816
834
  *
817
835
  * @param {string} params.id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
818
836
  * @param {string} params.completedBy - Who closed the order, as the caller reports it. Not stored on the order: it is carried in the order.completed event's payload, which is where the audit trail keeps who did what. Free text, not resolved against a user directory.
819
837
  * @throws {RevenexxException}
820
- * @returns {Promise<Models.Error>}
838
+ * @returns {Promise<Models.Order>}
821
839
  */
822
840
  ordersComplete(params: {
823
841
  id: string;
824
842
  completedBy?: string;
825
- }): Promise<Models.Error>;
843
+ }): Promise<Models.Order>;
826
844
  /**
827
845
  * Declare the order finished, whatever the quantities say — the service was delivered, the download was fetched, or an operator has decided the rest is not coming. status moves to 'completed' and completed_at is stamped from the server's clock. It does NOT ship anything or change the quantities, so fulfillment_status stays whatever the positions make it, and an order completed with lines still open shows exactly that. A completed order is final: modification, shipping and cancellation all refuse afterwards, and only a return may still be registered against it. The counterpart of auto_complete_on = 'payment' | 'manual': something has to close an order that shipping no longer closes by itself, and it is also the honest end for a service or digital order that never ships. Writes an order_events row 'order.completed' with via='manual'.
828
846
  *
829
847
  * @param {string} id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
830
848
  * @param {string} completedBy - Who closed the order, as the caller reports it. Not stored on the order: it is carried in the order.completed event's payload, which is where the audit trail keeps who did what. Free text, not resolved against a user directory.
831
849
  * @throws {RevenexxException}
832
- * @returns {Promise<Models.Error>}
850
+ * @returns {Promise<Models.Order>}
833
851
  * @deprecated Use the object parameter style method for a better developer experience.
834
852
  */
835
- ordersComplete(id: string, completedBy?: string): Promise<Models.Error>;
853
+ ordersComplete(id: string, completedBy?: string): Promise<Models.Order>;
836
854
  /**
837
855
  * Everything that has ever happened to this order, oldest first: placed or requested, updated, acknowledged, shipped, held, paid, returned, completed, cancelled — each with the payload the action carried. This is the audit trail an operator reads to answer "why is this order in this state", and it is the same row the platform publishes as a domain event, so what a workflow reacted to and what a person sees here cannot diverge. It is append-only and this route is read-only: rows are written by the action routes and there is no way to add, edit or remove one. An order's trail grows for as long as the order lives, so it is paginated like every other list — 'page.hasMore' says whether more of it exists. Every parameter below is an exact match on the column it names; `order_id` is deliberately absent, because the route fixes it from the path after the query filter is read and a value sent for it is overwritten rather than honoured. The jsonb column 'payload' is not offered for the same reason it is not offered on the order list: the data plane answers 400 for anything that is not a whole JSON document. DEPRECATED KEY: the response also repeats 'items' under 'events' for compatibility with the pre-envelope shape. It is the same array; read 'items'. The alias is removed in the next minor version.
838
856
  *
@@ -845,7 +863,7 @@ declare class Orders {
845
863
  * @param {number} params.offset - Row offset for pagination (default 0).
846
864
  * @param {string} params.order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending, the direction is lower case, and the column has to exist — the value reaches the data plane verbatim and anything else is a 400.
847
865
  * @throws {RevenexxException}
848
- * @returns {Promise<Models.Error>}
866
+ * @returns {Promise<{}>}
849
867
  */
850
868
  ordersEventsList(params: {
851
869
  id: string;
@@ -856,7 +874,7 @@ declare class Orders {
856
874
  limit?: number;
857
875
  offset?: number;
858
876
  order?: string;
859
- }): Promise<Models.Error>;
877
+ }): Promise<{}>;
860
878
  /**
861
879
  * Everything that has ever happened to this order, oldest first: placed or requested, updated, acknowledged, shipped, held, paid, returned, completed, cancelled — each with the payload the action carried. This is the audit trail an operator reads to answer "why is this order in this state", and it is the same row the platform publishes as a domain event, so what a workflow reacted to and what a person sees here cannot diverge. It is append-only and this route is read-only: rows are written by the action routes and there is no way to add, edit or remove one. An order's trail grows for as long as the order lives, so it is paginated like every other list — 'page.hasMore' says whether more of it exists. Every parameter below is an exact match on the column it names; `order_id` is deliberately absent, because the route fixes it from the path after the query filter is read and a value sent for it is overwritten rather than honoured. The jsonb column 'payload' is not offered for the same reason it is not offered on the order list: the data plane answers 400 for anything that is not a whole JSON document. DEPRECATED KEY: the response also repeats 'items' under 'events' for compatibility with the pre-envelope shape. It is the same array; read 'items'. The alias is removed in the next minor version.
862
880
  *
@@ -869,32 +887,32 @@ declare class Orders {
869
887
  * @param {number} offset - Row offset for pagination (default 0).
870
888
  * @param {string} order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending, the direction is lower case, and the column has to exist — the value reaches the data plane verbatim and anything else is a 400.
871
889
  * @throws {RevenexxException}
872
- * @returns {Promise<Models.Error>}
890
+ * @returns {Promise<{}>}
873
891
  * @deprecated Use the object parameter style method for a better developer experience.
874
892
  */
875
- ordersEventsList(id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<Models.Error>;
893
+ ordersEventsList(id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;
876
894
  /**
877
895
  * Stop an order from moving while a human sorts something out — a credit check, a suspected fraud, an address nobody can deliver to. It sets a flag with the reason attached, and the flag is deliberately ORTHOGONAL to the lifecycle: the order keeps its status, its payment status and its quantities, and appears on a worklist as 'held' rather than being pushed into a state it will have to come back out of. How far the hold reaches is the tenant's setting on_hold_blocks: shipping only, shipping and cancellation (the credit-check case, where the order must move in neither direction), or nothing at all, which leaves the flag advisory. Holding an order twice is allowed and simply replaces the reason; releasing it is POST /orders/{id}/unhold.
878
896
  *
879
897
  * @param {string} params.id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
880
898
  * @param {string} params.reason - Why the order is held, in the words the shipping guard quotes back. Null when it is not held — releasing a hold clears it.
881
899
  * @throws {RevenexxException}
882
- * @returns {Promise<Models.Error>}
900
+ * @returns {Promise<Models.Order>}
883
901
  */
884
902
  ordersHold(params: {
885
903
  id: string;
886
904
  reason?: string;
887
- }): Promise<Models.Error>;
905
+ }): Promise<Models.Order>;
888
906
  /**
889
907
  * Stop an order from moving while a human sorts something out — a credit check, a suspected fraud, an address nobody can deliver to. It sets a flag with the reason attached, and the flag is deliberately ORTHOGONAL to the lifecycle: the order keeps its status, its payment status and its quantities, and appears on a worklist as 'held' rather than being pushed into a state it will have to come back out of. How far the hold reaches is the tenant's setting on_hold_blocks: shipping only, shipping and cancellation (the credit-check case, where the order must move in neither direction), or nothing at all, which leaves the flag advisory. Holding an order twice is allowed and simply replaces the reason; releasing it is POST /orders/{id}/unhold.
890
908
  *
891
909
  * @param {string} id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
892
910
  * @param {string} reason - Why the order is held, in the words the shipping guard quotes back. Null when it is not held — releasing a hold clears it.
893
911
  * @throws {RevenexxException}
894
- * @returns {Promise<Models.Error>}
912
+ * @returns {Promise<Models.Order>}
895
913
  * @deprecated Use the object parameter style method for a better developer experience.
896
914
  */
897
- ordersHold(id: string, reason?: string): Promise<Models.Error>;
915
+ ordersHold(id: string, reason?: string): Promise<Models.Order>;
898
916
  /**
899
917
  * Take quantities off an order that is otherwise going ahead — three of the ten are discontinued, one line is out of stock and the customer would rather not wait. Each named quantity is booked onto its position as cancelled and guarded against the OPEN quantity (ordered − shipped − cancelled), so nothing already shipped can be cancelled away underneath a shipment. The order's fulfillment_status is re-derived afterwards, and when every position ends up fully cancelled the order itself moves to 'cancelled' — which is how this becomes a full cancel by arithmetic rather than by a second call. Positions are REQUIRED here, unlike on /ship and /return: cancelling an entire order by omitting a field is not something anybody should be able to do by accident; that is what POST /orders/{id}/cancel is for. Read GET /orders/{id}/shippable for the open quantity per position before calling.
900
918
  *
@@ -903,14 +921,14 @@ declare class Orders {
903
921
  * @param {string} params.cancelledBy - Who cancelled, as the caller reported it — an operator, a desk, a system. Free text; this app does not resolve it against a user directory.
904
922
  * @param {string} params.reason - Why it was cancelled, free text. Mandatory when the tenant sets cancel_requires_reason — for those merchants an unexplained cancellation is refused with a 400.
905
923
  * @throws {RevenexxException}
906
- * @returns {Promise<Models.Error>}
924
+ * @returns {Promise<Models.Order>}
907
925
  */
908
926
  ordersItemsCancel(params: {
909
927
  id: string;
910
928
  positions: Models.OrderCancelPosition[];
911
929
  cancelledBy?: string;
912
930
  reason?: string;
913
- }): Promise<Models.Error>;
931
+ }): Promise<Models.Order>;
914
932
  /**
915
933
  * Take quantities off an order that is otherwise going ahead — three of the ten are discontinued, one line is out of stock and the customer would rather not wait. Each named quantity is booked onto its position as cancelled and guarded against the OPEN quantity (ordered − shipped − cancelled), so nothing already shipped can be cancelled away underneath a shipment. The order's fulfillment_status is re-derived afterwards, and when every position ends up fully cancelled the order itself moves to 'cancelled' — which is how this becomes a full cancel by arithmetic rather than by a second call. Positions are REQUIRED here, unlike on /ship and /return: cancelling an entire order by omitting a field is not something anybody should be able to do by accident; that is what POST /orders/{id}/cancel is for. Read GET /orders/{id}/shippable for the open quantity per position before calling.
916
934
  *
@@ -919,10 +937,10 @@ declare class Orders {
919
937
  * @param {string} cancelledBy - Who cancelled, as the caller reported it — an operator, a desk, a system. Free text; this app does not resolve it against a user directory.
920
938
  * @param {string} reason - Why it was cancelled, free text. Mandatory when the tenant sets cancel_requires_reason — for those merchants an unexplained cancellation is refused with a 400.
921
939
  * @throws {RevenexxException}
922
- * @returns {Promise<Models.Error>}
940
+ * @returns {Promise<Models.Order>}
923
941
  * @deprecated Use the object parameter style method for a better developer experience.
924
942
  */
925
- ordersItemsCancel(id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string): Promise<Models.Error>;
943
+ ordersItemsCancel(id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string): Promise<Models.Order>;
926
944
  /**
927
945
  * Payment is the one status dimension this app does not decide for itself: it is FED IN from whatever took the money — the payments app, a PSP webhook relayed by a workflow, or a finance clerk marking an invoice settled. This route writes that word onto the order and records the change as an order.payment_status.changed event carrying the previous value, so the trail shows the sequence and not just the current state. Optionally attach the payment_id of the transaction it came from. It takes no money, refunds none and validates nothing about the amount — it records a fact somebody else established, and any of the seven words may follow any other. The other half of auto_complete_on = 'payment': an order that has shipped in full is completed by this call when the status becomes 'paid'.
928
946
  *
@@ -930,13 +948,13 @@ declare class Orders {
930
948
  * @param {OrderPaymentStatus} params.status - The new value of the payment dimension. Whether the order is PAID, and the dimension this app does not decide: it is fed from outside through POST /orders/{id}/payment-status (the payments app or an ERP), and only seeded at place-time from payment.status. Orthogonal to the lifecycle — a completed order can still be open, and a paid one can still be pending.
931
949
  * @param {string} params.paymentId - The reference into the payment system. MERGED into the order's payment snapshot under 'payment_id' — the rest of the snapshot is left alone — and carried in the order.payment_status.changed event. Omitted leaves the snapshot untouched.
932
950
  * @throws {RevenexxException}
933
- * @returns {Promise<Models.Error>}
951
+ * @returns {Promise<Models.Order>}
934
952
  */
935
953
  ordersPaymentStatusUpdate(params: {
936
954
  id: string;
937
955
  status: OrderPaymentStatus;
938
956
  paymentId?: string;
939
- }): Promise<Models.Error>;
957
+ }): Promise<Models.Order>;
940
958
  /**
941
959
  * Payment is the one status dimension this app does not decide for itself: it is FED IN from whatever took the money — the payments app, a PSP webhook relayed by a workflow, or a finance clerk marking an invoice settled. This route writes that word onto the order and records the change as an order.payment_status.changed event carrying the previous value, so the trail shows the sequence and not just the current state. Optionally attach the payment_id of the transaction it came from. It takes no money, refunds none and validates nothing about the amount — it records a fact somebody else established, and any of the seven words may follow any other. The other half of auto_complete_on = 'payment': an order that has shipped in full is completed by this call when the status becomes 'paid'.
942
960
  *
@@ -944,10 +962,10 @@ declare class Orders {
944
962
  * @param {OrderPaymentStatus} status - The new value of the payment dimension. Whether the order is PAID, and the dimension this app does not decide: it is fed from outside through POST /orders/{id}/payment-status (the payments app or an ERP), and only seeded at place-time from payment.status. Orthogonal to the lifecycle — a completed order can still be open, and a paid one can still be pending.
945
963
  * @param {string} paymentId - The reference into the payment system. MERGED into the order's payment snapshot under 'payment_id' — the rest of the snapshot is left alone — and carried in the order.payment_status.changed event. Omitted leaves the snapshot untouched.
946
964
  * @throws {RevenexxException}
947
- * @returns {Promise<Models.Error>}
965
+ * @returns {Promise<Models.Order>}
948
966
  * @deprecated Use the object parameter style method for a better developer experience.
949
967
  */
950
- ordersPaymentStatusUpdate(id: string, status: OrderPaymentStatus, paymentId?: string): Promise<Models.Error>;
968
+ ordersPaymentStatusUpdate(id: string, status: OrderPaymentStatus, paymentId?: string): Promise<Models.Order>;
951
969
  /**
952
970
  * Open a return case: the customer has announced goods are coming back, and this is where that becomes a tracked thing with a return number of its own, drawn from the tenant's return range. Positions are guarded against what actually SHIPPED and has not already come back, so a return cannot exceed the goods that left. Each position carries a `restock` flag saying whether the item is expected to be sellable again — recorded now, acted on only when the return completes. Omitting `positions` registers everything still returnable, the 'the customer sent the whole delivery back' case. Nothing is booked yet: quantity_returned stays where it is and the order does not move — the return starts as 'registered' and travels through receive and complete or reject. Allowed on a completed order, refused on a cancelled one.
953
971
  *
@@ -957,7 +975,7 @@ declare class Orders {
957
975
  * @param {string} params.reason - Why the goods are coming back, free text as the customer or the desk stated it. Also what /reject stores when it is given no resolution out of the published set.
958
976
  * @param {boolean} params.restock - The default restock flag for positions that carry none of their own — and the only way to say "put it all back into stock" when the positions are defaulted. It does not restock anything itself: it decides what the completion REPORTS for the orchestrator's inventories.restock call.
959
977
  * @throws {RevenexxException}
960
- * @returns {Promise<Models.Error>}
978
+ * @returns {Promise<Models.OrderReturn>}
961
979
  */
962
980
  ordersReturn(params: {
963
981
  id: string;
@@ -965,7 +983,7 @@ declare class Orders {
965
983
  positions?: Models.OrderReturnPosition[];
966
984
  reason?: string;
967
985
  restock?: boolean;
968
- }): Promise<Models.Error>;
986
+ }): Promise<Models.OrderReturn>;
969
987
  /**
970
988
  * Open a return case: the customer has announced goods are coming back, and this is where that becomes a tracked thing with a return number of its own, drawn from the tenant's return range. Positions are guarded against what actually SHIPPED and has not already come back, so a return cannot exceed the goods that left. Each position carries a `restock` flag saying whether the item is expected to be sellable again — recorded now, acted on only when the return completes. Omitting `positions` registers everything still returnable, the 'the customer sent the whole delivery back' case. Nothing is booked yet: quantity_returned stays where it is and the order does not move — the return starts as 'registered' and travels through receive and complete or reject. Allowed on a completed order, refused on a cancelled one.
971
989
  *
@@ -975,10 +993,10 @@ declare class Orders {
975
993
  * @param {string} reason - Why the goods are coming back, free text as the customer or the desk stated it. Also what /reject stores when it is given no resolution out of the published set.
976
994
  * @param {boolean} restock - The default restock flag for positions that carry none of their own — and the only way to say "put it all back into stock" when the positions are defaulted. It does not restock anything itself: it decides what the completion REPORTS for the orchestrator's inventories.restock call.
977
995
  * @throws {RevenexxException}
978
- * @returns {Promise<Models.Error>}
996
+ * @returns {Promise<Models.OrderReturn>}
979
997
  * @deprecated Use the object parameter style method for a better developer experience.
980
998
  */
981
- ordersReturn(id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean): Promise<Models.Error>;
999
+ ordersReturn(id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean): Promise<Models.OrderReturn>;
982
1000
  /**
983
1001
  * Accept the return and close the case: the goods are taken back on the order's books and the settlement is recorded as one of the published words — refunded, credited, replaced and so on. This is the step a refund or a credit note hangs off, and the only step that moves quantity_returned. It does not refund money and does not put stock back itself: the answer's 'restock' array names what the orchestrator should hand to inventories.restock, and payment travels through /payment-status. Once completed the return is final — receive, complete and reject all refuse afterwards. The goods accounting moves here and nowhere else: quantity_returned is booked onto each position, completed_at is stamped by the SERVER, and positions flagged restock are reported back in the answer's 'restock' array for the orchestrator's inventories.restock call. 'resolution' is validated against the settlement words this app publishes (refund, partial_refund, replacement, repair, store_credit — see GET /orders/vocabularies/return-resolutions); anything else is refused rather than stored as a word no reader knows. It is checked before the positions are booked, so a rejected value leaves nothing behind.
984
1002
  *
@@ -986,13 +1004,13 @@ declare class Orders {
986
1004
  * @param {string} params.rid - The return id (uuid). It must belong to the order in {id} — a return of another order is a 404, not a cross-order write.
987
1005
  * @param {OrderReturnSettlement} params.resolution - How the return was settled. Omitted = settled without recording how.
988
1006
  * @throws {RevenexxException}
989
- * @returns {Promise<Models.Error>}
1007
+ * @returns {Promise<Models.OrderReturnCompleted>}
990
1008
  */
991
1009
  ordersReturnsComplete(params: {
992
1010
  id: string;
993
1011
  rid: string;
994
1012
  resolution?: OrderReturnSettlement;
995
- }): Promise<Models.Error>;
1013
+ }): Promise<Models.OrderReturnCompleted>;
996
1014
  /**
997
1015
  * Accept the return and close the case: the goods are taken back on the order's books and the settlement is recorded as one of the published words — refunded, credited, replaced and so on. This is the step a refund or a credit note hangs off, and the only step that moves quantity_returned. It does not refund money and does not put stock back itself: the answer's 'restock' array names what the orchestrator should hand to inventories.restock, and payment travels through /payment-status. Once completed the return is final — receive, complete and reject all refuse afterwards. The goods accounting moves here and nowhere else: quantity_returned is booked onto each position, completed_at is stamped by the SERVER, and positions flagged restock are reported back in the answer's 'restock' array for the orchestrator's inventories.restock call. 'resolution' is validated against the settlement words this app publishes (refund, partial_refund, replacement, repair, store_credit — see GET /orders/vocabularies/return-resolutions); anything else is refused rather than stored as a word no reader knows. It is checked before the positions are booked, so a rejected value leaves nothing behind.
998
1016
  *
@@ -1000,10 +1018,10 @@ declare class Orders {
1000
1018
  * @param {string} rid - The return id (uuid). It must belong to the order in {id} — a return of another order is a 404, not a cross-order write.
1001
1019
  * @param {OrderReturnSettlement} resolution - How the return was settled. Omitted = settled without recording how.
1002
1020
  * @throws {RevenexxException}
1003
- * @returns {Promise<Models.Error>}
1021
+ * @returns {Promise<Models.OrderReturnCompleted>}
1004
1022
  * @deprecated Use the object parameter style method for a better developer experience.
1005
1023
  */
1006
- ordersReturnsComplete(id: string, rid: string, resolution?: OrderReturnSettlement): Promise<Models.Error>;
1024
+ ordersReturnsComplete(id: string, rid: string, resolution?: OrderReturnSettlement): Promise<Models.OrderReturnCompleted>;
1007
1025
  /**
1008
1026
  * The goods-in scan: the parcel is physically back, warehouse staff have it in their hands, and nobody has decided yet whether the customer gets their money. It moves the return from 'registered' to 'received' and stamps received_at, which is what separates 'announced' from 'here' on a returns worklist. It books nothing — quantity_returned is written by the complete step and by nothing else — so a return that arrives damaged can still be rejected afterwards. Only a registered return can be received; a second call, or one against a settled return, is a 422. This step is skippable: a return may be completed straight from 'registered' where a merchant does not scan goods in.
1009
1027
  *
@@ -1011,13 +1029,13 @@ declare class Orders {
1011
1029
  * @param {string} params.rid - The return id (uuid). It must belong to the order in {id} — a return of another order is a 404, not a cross-order write.
1012
1030
  * @param {object} params.data - Request body
1013
1031
  * @throws {RevenexxException}
1014
- * @returns {Promise<Models.Error>}
1032
+ * @returns {Promise<Models.OrderReturn>}
1015
1033
  */
1016
1034
  ordersReturnsReceive(params: {
1017
1035
  id: string;
1018
1036
  rid: string;
1019
1037
  data: object;
1020
- }): Promise<Models.Error>;
1038
+ }): Promise<Models.OrderReturn>;
1021
1039
  /**
1022
1040
  * The goods-in scan: the parcel is physically back, warehouse staff have it in their hands, and nobody has decided yet whether the customer gets their money. It moves the return from 'registered' to 'received' and stamps received_at, which is what separates 'announced' from 'here' on a returns worklist. It books nothing — quantity_returned is written by the complete step and by nothing else — so a return that arrives damaged can still be rejected afterwards. Only a registered return can be received; a second call, or one against a settled return, is a 422. This step is skippable: a return may be completed straight from 'registered' where a merchant does not scan goods in.
1023
1041
  *
@@ -1025,10 +1043,10 @@ declare class Orders {
1025
1043
  * @param {string} rid - The return id (uuid). It must belong to the order in {id} — a return of another order is a 404, not a cross-order write.
1026
1044
  * @param {object} data - Request body
1027
1045
  * @throws {RevenexxException}
1028
- * @returns {Promise<Models.Error>}
1046
+ * @returns {Promise<Models.OrderReturn>}
1029
1047
  * @deprecated Use the object parameter style method for a better developer experience.
1030
1048
  */
1031
- ordersReturnsReceive(id: string, rid: string, data: object): Promise<Models.Error>;
1049
+ ordersReturnsReceive(id: string, rid: string, data: object): Promise<Models.OrderReturn>;
1032
1050
  /**
1033
1051
  * Close the case against the customer: the goods came back used, outside the window, or were never covered in the first place. The return moves to 'rejected', rejected_at is stamped, and the refusal is recorded either as one of the published refusal words or as a sentence somebody wrote about this one return. The order is untouched — the quantities still count as shipped and not returned, which is the point: a rejected return must leave the books exactly as they were. Rejection is final, and it says nothing about where the physical goods go. Nothing is booked onto the positions. 'resolution' is validated against the refusal words (wear_and_tear, not_returnable); 'reason' stays free text — a sentence about this one return rather than a value out of a set — and is what is stored when no resolution is named.
1034
1052
  *
@@ -1037,14 +1055,14 @@ declare class Orders {
1037
1055
  * @param {string} params.reason - Free-text fallback for 'resolution' — a sentence about this one return, not a value out of the set.
1038
1056
  * @param {OrderReturnRefusal} params.resolution - Why the return was refused.
1039
1057
  * @throws {RevenexxException}
1040
- * @returns {Promise<Models.Error>}
1058
+ * @returns {Promise<Models.OrderReturn>}
1041
1059
  */
1042
1060
  ordersReturnsReject(params: {
1043
1061
  id: string;
1044
1062
  rid: string;
1045
1063
  reason?: string;
1046
1064
  resolution?: OrderReturnRefusal;
1047
- }): Promise<Models.Error>;
1065
+ }): Promise<Models.OrderReturn>;
1048
1066
  /**
1049
1067
  * Close the case against the customer: the goods came back used, outside the window, or were never covered in the first place. The return moves to 'rejected', rejected_at is stamped, and the refusal is recorded either as one of the published refusal words or as a sentence somebody wrote about this one return. The order is untouched — the quantities still count as shipped and not returned, which is the point: a rejected return must leave the books exactly as they were. Rejection is final, and it says nothing about where the physical goods go. Nothing is booked onto the positions. 'resolution' is validated against the refusal words (wear_and_tear, not_returnable); 'reason' stays free text — a sentence about this one return rather than a value out of a set — and is what is stored when no resolution is named.
1050
1068
  *
@@ -1053,10 +1071,10 @@ declare class Orders {
1053
1071
  * @param {string} reason - Free-text fallback for 'resolution' — a sentence about this one return, not a value out of the set.
1054
1072
  * @param {OrderReturnRefusal} resolution - Why the return was refused.
1055
1073
  * @throws {RevenexxException}
1056
- * @returns {Promise<Models.Error>}
1074
+ * @returns {Promise<Models.OrderReturn>}
1057
1075
  * @deprecated Use the object parameter style method for a better developer experience.
1058
1076
  */
1059
- ordersReturnsReject(id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal): Promise<Models.Error>;
1077
+ ordersReturnsReject(id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal): Promise<Models.OrderReturn>;
1060
1078
  /**
1061
1079
  * Book goods out: which positions and how much of each, with the carrier and the tracking code that go to the customer. It draws a delivery-note number from the tenant's delivery range, books quantity_shipped onto every named position, re-derives the order's fulfillment_status from the arithmetic (unfulfilled → partial → fulfilled) and emits order.shipment.created. Omitting `positions` means everything still open, in full, which is the ordinary 'send the rest' case and the only one a UI without a line editor can express; the answer always names the quantities that actually went out. It does not print a label, buy postage or notify anybody — a shipping workflow reacts to the event. Whether a full shipment CLOSES the order is the tenant's call (setting auto_complete_on): 'shipment' completes it here, 'payment' leaves it in_fulfillment until payment_status becomes paid, 'manual' waits for orders.complete. The order.completed event follows the order, so it is only emitted when the order actually completed.
1062
1080
  *
@@ -1069,7 +1087,7 @@ declare class Orders {
1069
1087
  * @param {string} params.trackingCode - The consignment number the carrier issued. Free text: every carrier formats it differently and this app stores whatever it is given.
1070
1088
  * @param {string} params.trackingUrl - Where a human can follow the parcel. Supplied by the caller — this app does not build it, because only the caller knows the carrier's tracking address.
1071
1089
  * @throws {RevenexxException}
1072
- * @returns {Promise<Models.Error>}
1090
+ * @returns {Promise<Models.OrderShipmentCreated>}
1073
1091
  */
1074
1092
  ordersShip(params: {
1075
1093
  id: string;
@@ -1080,7 +1098,7 @@ declare class Orders {
1080
1098
  shippedAt?: string;
1081
1099
  trackingCode?: string;
1082
1100
  trackingUrl?: string;
1083
- }): Promise<Models.Error>;
1101
+ }): Promise<Models.OrderShipmentCreated>;
1084
1102
  /**
1085
1103
  * Book goods out: which positions and how much of each, with the carrier and the tracking code that go to the customer. It draws a delivery-note number from the tenant's delivery range, books quantity_shipped onto every named position, re-derives the order's fulfillment_status from the arithmetic (unfulfilled → partial → fulfilled) and emits order.shipment.created. Omitting `positions` means everything still open, in full, which is the ordinary 'send the rest' case and the only one a UI without a line editor can express; the answer always names the quantities that actually went out. It does not print a label, buy postage or notify anybody — a shipping workflow reacts to the event. Whether a full shipment CLOSES the order is the tenant's call (setting auto_complete_on): 'shipment' completes it here, 'payment' leaves it in_fulfillment until payment_status becomes paid, 'manual' waits for orders.complete. The order.completed event follows the order, so it is only emitted when the order actually completed.
1086
1104
  *
@@ -1093,51 +1111,51 @@ declare class Orders {
1093
1111
  * @param {string} trackingCode - The consignment number the carrier issued. Free text: every carrier formats it differently and this app stores whatever it is given.
1094
1112
  * @param {string} trackingUrl - Where a human can follow the parcel. Supplied by the caller — this app does not build it, because only the caller knows the carrier's tracking address.
1095
1113
  * @throws {RevenexxException}
1096
- * @returns {Promise<Models.Error>}
1114
+ * @returns {Promise<Models.OrderShipmentCreated>}
1097
1115
  * @deprecated Use the object parameter style method for a better developer experience.
1098
1116
  */
1099
- ordersShip(id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string): Promise<Models.Error>;
1117
+ ordersShip(id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string): Promise<Models.OrderShipmentCreated>;
1100
1118
  /**
1101
1119
  * What a shipment dialog needs before it can offer anything: the open quantity per position, and one boolean saying whether a shipment would be accepted at all. Reach for it to fill a picking screen or to decide whether a 'create shipment' button is enabled, instead of subtracting the quantities client-side. It changes nothing and books nothing — it is the question POST /orders/{id}/ship answers with an action. The read half of orders.ship. The open quantity per position and the two guards (cancelled/completed order, hold) are the SAME code the ship route runs, so what this answers and what that accepts cannot drift — a client subtracting the quantities itself eventually offers a shipment the server refuses, or one it should have refused. 'shippable' is false with a 'blocked_reason' when the order is held, cancelled, completed or has nothing open.
1102
1120
  *
1103
1121
  * @param {string} params.id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
1104
1122
  * @throws {RevenexxException}
1105
- * @returns {Promise<Models.Error>}
1123
+ * @returns {Promise<Models.OrderShippable>}
1106
1124
  */
1107
1125
  ordersShippable(params: {
1108
1126
  id: string;
1109
- }): Promise<Models.Error>;
1127
+ }): Promise<Models.OrderShippable>;
1110
1128
  /**
1111
1129
  * What a shipment dialog needs before it can offer anything: the open quantity per position, and one boolean saying whether a shipment would be accepted at all. Reach for it to fill a picking screen or to decide whether a 'create shipment' button is enabled, instead of subtracting the quantities client-side. It changes nothing and books nothing — it is the question POST /orders/{id}/ship answers with an action. The read half of orders.ship. The open quantity per position and the two guards (cancelled/completed order, hold) are the SAME code the ship route runs, so what this answers and what that accepts cannot drift — a client subtracting the quantities itself eventually offers a shipment the server refuses, or one it should have refused. 'shippable' is false with a 'blocked_reason' when the order is held, cancelled, completed or has nothing open.
1112
1130
  *
1113
1131
  * @param {string} id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
1114
1132
  * @throws {RevenexxException}
1115
- * @returns {Promise<Models.Error>}
1133
+ * @returns {Promise<Models.OrderShippable>}
1116
1134
  * @deprecated Use the object parameter style method for a better developer experience.
1117
1135
  */
1118
- ordersShippable(id: string): Promise<Models.Error>;
1136
+ ordersShippable(id: string): Promise<Models.OrderShippable>;
1119
1137
  /**
1120
1138
  * The whole of the release: the flag comes off, the reason is cleared, and an order.unheld event says the order may move again. Whatever the hold was blocking — shipping, and cancellation on tenants configured that way — is accepted from this call on. It restores nothing else and skips nothing: the order continues from exactly the status and quantities it had when it was held, and any shipping that was due meanwhile still has to be done by hand. An order that is not on hold answers 422 rather than pretending to release one, so this is safe to give to a worklist and not to a loop that calls it blindly.
1121
1139
  *
1122
1140
  * @param {string} params.id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
1123
1141
  * @param {object} params.data - Request body
1124
1142
  * @throws {RevenexxException}
1125
- * @returns {Promise<Models.Error>}
1143
+ * @returns {Promise<Models.Order>}
1126
1144
  */
1127
1145
  ordersUnhold(params: {
1128
1146
  id: string;
1129
1147
  data: object;
1130
- }): Promise<Models.Error>;
1148
+ }): Promise<Models.Order>;
1131
1149
  /**
1132
1150
  * The whole of the release: the flag comes off, the reason is cleared, and an order.unheld event says the order may move again. Whatever the hold was blocking — shipping, and cancellation on tenants configured that way — is accepted from this call on. It restores nothing else and skips nothing: the order continues from exactly the status and quantities it had when it was held, and any shipping that was due meanwhile still has to be done by hand. An order that is not on hold answers 422 rather than pretending to release one, so this is safe to give to a worklist and not to a loop that calls it blindly.
1133
1151
  *
1134
1152
  * @param {string} id - The order id (uuid). This segment reaches a uuid column: an order NUMBER is not accepted here — filter GET /orders by ?number= to resolve one.
1135
1153
  * @param {object} data - Request body
1136
1154
  * @throws {RevenexxException}
1137
- * @returns {Promise<Models.Error>}
1155
+ * @returns {Promise<Models.Order>}
1138
1156
  * @deprecated Use the object parameter style method for a better developer experience.
1139
1157
  */
1140
- ordersUnhold(id: string, data: object): Promise<Models.Error>;
1158
+ ordersUnhold(id: string, data: object): Promise<Models.Order>;
1141
1159
  }
1142
1160
 
1143
1161
  export { Orders };