@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
@@ -1 +1 @@
1
- {"version":3,"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UAAM,aAAsB,CAAC;AAC7B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EAqBA,aACI,kBACG,MACkB;AACrB,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACvF,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,IAAI;AAAA,QACJ,MAAM,KAAK,CAAC;AAAA,MAChB;AAAA,IACJ;AAEA,UAAM,KAAK,OAAO;AAClB,UAAM,OAAO,OAAO;AAEpB,QAAI,OAAO,OAAO,aAAa;AAC3B,YAAM,IAAI,kBAAkB,kCAAkC;AAAA,IAClE;AACA,QAAI,OAAO,SAAS,aAAa;AAC7B,YAAM,IAAI,kBAAkB,oCAAoC;AAAA,IACpE;AAEA,UAAM,UAAU,yBAAyB,QAAQ,QAAQ,EAAE;AAC3D,UAAM,aAAsB,CAAC;AAC7B,QAAI,OAAO,SAAS,aAAa;AAC7B,aAAO,OAAO,YAAY,IAAI;AAAA,IAClC;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { RevenexxException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { OrderStatus } from '../enums/order-status';\nimport { OrderPaymentStatus } from '../enums/order-payment-status';\nimport { OrderFulfillmentStatus } from '../enums/order-fulfillment-status';\nimport { OrdersVocabulariesGetName } from '../enums/orders-vocabularies-get-name';\nimport { OrderCommentVisibility } from '../enums/order-comment-visibility';\nimport { OrderReturnSettlement } from '../enums/order-return-settlement';\nimport { OrderReturnRefusal } from '../enums/order-return-refusal';\n\nexport class Orders {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * The route behind every order overview: the open orders of one customer, everything on hold, everything a market placed last week, or the one order somebody is quoting a number for (?number=ORD-000123 — the number is not the id, and this is how one becomes the other). The order LIST: the order rows without their positions, shipments, returns or cancellations — read GET /orders/{id} for the aggregate of one. Every parameter below is an exact match on the column it names, and combining them is an AND. Two kinds of key are not offered: one that names NO column is dropped silently, so a mistyped ?stauts=placed answers 200 with the whole list (compare the 'filter' echo against what you sent — no status code reports it), and the jsonb columns buyer, billing_address, shipping_address, payment, shipping, user_data and metadata reach the database as a text comparison and answer 400 invalid_value for anything that is not a whole JSON document.\n *\n * @param {string} params.id - Filter to exactly one order. GET /orders/{id} is the direct form and answers the aggregate; this exists because the list honours it too. Primary key of the order, and the id every other route takes. Not the order number.\n * @param {string} params.number - Look an order up by its NUMBER — the one filter a service desk starts from, and the way to turn the number a customer quotes into the uuid every other route wants. Exact match; there is no substring search on this API. The order number a human quotes — drawn from the tenant's order range at place-time, unique per tenant and never reused. It is NOT the id: every route addresses an order by uuid, and GET /orders?number=… is how a number becomes one.\n * @param {string} params.customerOrderNumber - Look an order up by the BUYER's own PO number. Not unique: the same buyer reference can legitimately sit on several orders. The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {string} params.externalRef - Find the order behind a reference in the fulfilling system — the ERP order number. Exact match, and null on everything not yet acknowledged. 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.\n * @param {string} params.acknowledgedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the fulfilling system took the order over. Written once. While it is null the order can still be modified here; afterwards modification goes through that system, unless the tenant sets allow_modification_after_acknowledge.\n * @param {string} params.cartId - Find the order a given cart became. The reverse of the carts hand-over, and how a storefront checks whether a checkout already went through. The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created.\n * @param {string} params.contactId - Filter to one person's orders — their order history. The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout.\n * @param {string} params.organizationId - Filter to one company's orders, across everyone who ordered for it. The B2B view, and the same attribution orders.reports.customer-rollup aggregates by. The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it.\n * @param {string} params.channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} params.currency - Filter by ISO 4217 code. Worth remembering before summing `grand_total` over a mixed list: nothing on an order is ever converted. ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting.\n * @param {OrderStatus} params.status - Filter by lifecycle status. `pending` IS the approval queue — there is no second entity for it. Where the order stands in its LIFECYCLE, and one of three independent status dimensions. 'pending' = created but not placed, an order waiting for approval; 'placed' = accepted, nothing shipped; 'in_fulfillment' = part of it has gone out, or all of it has and the tenant does not close on shipment; 'completed' and 'cancelled' end it. Moved by the action routes only — it is not writable through PUT /orders/{id}.\n * @param {OrderPaymentStatus} params.paymentStatus - Filter by the payment dimension, independently of the lifecycle: `payment_status=open&status=completed` is the delivered-but-unpaid list. 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.\n * @param {OrderFulfillmentStatus} params.fulfillmentStatus - Filter by the derived shipping dimension. `unfulfilled` with `status=placed` is the work queue a warehouse picks from. Whether the order has SHIPPED, and the one dimension nobody writes: it is DERIVED after every quantity change from the positions' own bookkeeping. 'fulfilled' means shipped >= ordered − cancelled across all positions, 'partial' means something went out. Sending it has no effect; ship, cancel or return something and it moves.\n * @param {boolean} params.onHold - Filter to the held orders — the list somebody has to work through before anything of theirs can ship. A business stop, ORTHOGONAL to status: a held order keeps its lifecycle state and is refused at the guards. How far the hold reaches is the tenant's call (on_hold_blocks: shipping only, shipping and cancellation, or nothing at all).\n * @param {string} params.holdReason - Filter to rows whose `hold_reason` is exactly this value. Why the order is held, in the words the shipping guard quotes back. Null when it is not held — releasing a hold clears it.\n * @param {number} params.itemCount - Filter to rows whose `item_count` is exactly this value. The summed ORDERED quantity over all positions, rounded to a whole number — a headline figure for a list, computed once at place-time. It is deliberately not reduced when something is cancelled or returned; the positions carry that arithmetic.\n * @param {number} params.subtotal - Filter to rows whose `subtotal` is exactly this value. NET total of the positions (the sum of their line_total), COMPUTED here at place-time. In `currency`, four decimal places. A caller cannot set it.\n * @param {number} params.shippingTotal - Filter to rows whose `shipping_total` is exactly this value. NET shipping cost, taken from shipping.price or, when the snapshot carries no price, from the request's shipping_total. In `currency`.\n * @param {number} params.taxTotal - Filter to rows whose `tax_total` is exactly this value. All tax on this order: the positions' tax_amount plus the tax on shipping (shipping_total × shipping.tax_rate). COMPUTED here — a caller cannot set it.\n * @param {number} params.grandTotal - Filter to rows whose `grand_total` is exactly this value. What the buyer owes: subtotal + shipping_total + tax_total, COMPUTED by this app and NEVER taken from the caller — trusting a supplied total is how inconsistent orders happened. This is the number the approval threshold is compared against and the number the revenue rollup sums.\n * @param {string} params.placedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was PLACED. Null while it is pending approval: an order awaiting sign-off exists but was never placed, and that is exactly the difference this field records.\n * @param {string} params.completedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was closed — by a full shipment, by payment or by hand, depending on the tenant's auto_complete_on. Null until then.\n * @param {string} params.cancelledAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was cancelled, whether by a full cancel or by the last open quantity being cancelled position by position. Null otherwise.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order row was written. For a placed order this is placed_at; for a requested one it is when the request was submitted.\n * @param {string} params.updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When any column of the order last changed — every status move, every re-derived fulfillment, every modification.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n ordersList(params?: { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * The route behind every order overview: the open orders of one customer, everything on hold, everything a market placed last week, or the one order somebody is quoting a number for (?number=ORD-000123 — the number is not the id, and this is how one becomes the other). The order LIST: the order rows without their positions, shipments, returns or cancellations — read GET /orders/{id} for the aggregate of one. Every parameter below is an exact match on the column it names, and combining them is an AND. Two kinds of key are not offered: one that names NO column is dropped silently, so a mistyped ?stauts=placed answers 200 with the whole list (compare the 'filter' echo against what you sent — no status code reports it), and the jsonb columns buyer, billing_address, shipping_address, payment, shipping, user_data and metadata reach the database as a text comparison and answer 400 invalid_value for anything that is not a whole JSON document.\n *\n * @param {string} id - Filter to exactly one order. GET /orders/{id} is the direct form and answers the aggregate; this exists because the list honours it too. Primary key of the order, and the id every other route takes. Not the order number.\n * @param {string} number - Look an order up by its NUMBER — the one filter a service desk starts from, and the way to turn the number a customer quotes into the uuid every other route wants. Exact match; there is no substring search on this API. The order number a human quotes — drawn from the tenant's order range at place-time, unique per tenant and never reused. It is NOT the id: every route addresses an order by uuid, and GET /orders?number=… is how a number becomes one.\n * @param {string} customerOrderNumber - Look an order up by the BUYER's own PO number. Not unique: the same buyer reference can legitimately sit on several orders. The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {string} externalRef - Find the order behind a reference in the fulfilling system — the ERP order number. Exact match, and null on everything not yet acknowledged. 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.\n * @param {string} acknowledgedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the fulfilling system took the order over. Written once. While it is null the order can still be modified here; afterwards modification goes through that system, unless the tenant sets allow_modification_after_acknowledge.\n * @param {string} cartId - Find the order a given cart became. The reverse of the carts hand-over, and how a storefront checks whether a checkout already went through. The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created.\n * @param {string} contactId - Filter to one person's orders — their order history. The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout.\n * @param {string} organizationId - Filter to one company's orders, across everyone who ordered for it. The B2B view, and the same attribution orders.reports.customer-rollup aggregates by. The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it.\n * @param {string} channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} currency - Filter by ISO 4217 code. Worth remembering before summing `grand_total` over a mixed list: nothing on an order is ever converted. ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting.\n * @param {OrderStatus} status - Filter by lifecycle status. `pending` IS the approval queue — there is no second entity for it. Where the order stands in its LIFECYCLE, and one of three independent status dimensions. 'pending' = created but not placed, an order waiting for approval; 'placed' = accepted, nothing shipped; 'in_fulfillment' = part of it has gone out, or all of it has and the tenant does not close on shipment; 'completed' and 'cancelled' end it. Moved by the action routes only — it is not writable through PUT /orders/{id}.\n * @param {OrderPaymentStatus} paymentStatus - Filter by the payment dimension, independently of the lifecycle: `payment_status=open&status=completed` is the delivered-but-unpaid list. 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.\n * @param {OrderFulfillmentStatus} fulfillmentStatus - Filter by the derived shipping dimension. `unfulfilled` with `status=placed` is the work queue a warehouse picks from. Whether the order has SHIPPED, and the one dimension nobody writes: it is DERIVED after every quantity change from the positions' own bookkeeping. 'fulfilled' means shipped >= ordered − cancelled across all positions, 'partial' means something went out. Sending it has no effect; ship, cancel or return something and it moves.\n * @param {boolean} onHold - Filter to the held orders — the list somebody has to work through before anything of theirs can ship. A business stop, ORTHOGONAL to status: a held order keeps its lifecycle state and is refused at the guards. How far the hold reaches is the tenant's call (on_hold_blocks: shipping only, shipping and cancellation, or nothing at all).\n * @param {string} holdReason - Filter to rows whose `hold_reason` is exactly this value. Why the order is held, in the words the shipping guard quotes back. Null when it is not held — releasing a hold clears it.\n * @param {number} itemCount - Filter to rows whose `item_count` is exactly this value. The summed ORDERED quantity over all positions, rounded to a whole number — a headline figure for a list, computed once at place-time. It is deliberately not reduced when something is cancelled or returned; the positions carry that arithmetic.\n * @param {number} subtotal - Filter to rows whose `subtotal` is exactly this value. NET total of the positions (the sum of their line_total), COMPUTED here at place-time. In `currency`, four decimal places. A caller cannot set it.\n * @param {number} shippingTotal - Filter to rows whose `shipping_total` is exactly this value. NET shipping cost, taken from shipping.price or, when the snapshot carries no price, from the request's shipping_total. In `currency`.\n * @param {number} taxTotal - Filter to rows whose `tax_total` is exactly this value. All tax on this order: the positions' tax_amount plus the tax on shipping (shipping_total × shipping.tax_rate). COMPUTED here — a caller cannot set it.\n * @param {number} grandTotal - Filter to rows whose `grand_total` is exactly this value. What the buyer owes: subtotal + shipping_total + tax_total, COMPUTED by this app and NEVER taken from the caller — trusting a supplied total is how inconsistent orders happened. This is the number the approval threshold is compared against and the number the revenue rollup sums.\n * @param {string} placedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was PLACED. Null while it is pending approval: an order awaiting sign-off exists but was never placed, and that is exactly the difference this field records.\n * @param {string} completedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was closed — by a full shipment, by payment or by hand, depending on the tenant's auto_complete_on. Null until then.\n * @param {string} cancelledAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was cancelled, whether by a full cancel or by the last open quantity being cancelled position by position. Null otherwise.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order row was written. For a placed order this is placed_at; for a requested one it is when the request was submitted.\n * @param {string} updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When any column of the order last changed — every status move, every re-derived fulfillment, every modification.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersList(id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n ordersList(\n paramsOrFirst?: { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (OrderStatus)?, (OrderPaymentStatus)?, (OrderFulfillmentStatus)?, (boolean)?, (string)?, (number)?, (number)?, (number)?, (number)?, (number)?, (string)?, (string)?, (string)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n number: rest[0] as string,\n customerOrderNumber: rest[1] as string,\n externalRef: rest[2] as string,\n acknowledgedAt: rest[3] as string,\n cartId: rest[4] as string,\n contactId: rest[5] as string,\n organizationId: rest[6] as string,\n channelId: rest[7] as string,\n currency: rest[8] as string,\n status: rest[9] as OrderStatus,\n paymentStatus: rest[10] as OrderPaymentStatus,\n fulfillmentStatus: rest[11] as OrderFulfillmentStatus,\n onHold: rest[12] as boolean,\n holdReason: rest[13] as string,\n itemCount: rest[14] as number,\n subtotal: rest[15] as number,\n shippingTotal: rest[16] as number,\n taxTotal: rest[17] as number,\n grandTotal: rest[18] as number,\n placedAt: rest[19] as string,\n completedAt: rest[20] as string,\n cancelledAt: rest[21] as string,\n createdAt: rest[22] as string,\n updatedAt: rest[23] as string,\n limit: rest[24] as number,\n offset: rest[25] as number,\n order: rest[26] as string \n };\n }\n \n const id = params.id;\n const number = params.number;\n const customerOrderNumber = params.customerOrderNumber;\n const externalRef = params.externalRef;\n const acknowledgedAt = params.acknowledgedAt;\n const cartId = params.cartId;\n const contactId = params.contactId;\n const organizationId = params.organizationId;\n const channelId = params.channelId;\n const currency = params.currency;\n const status = params.status;\n const paymentStatus = params.paymentStatus;\n const fulfillmentStatus = params.fulfillmentStatus;\n const onHold = params.onHold;\n const holdReason = params.holdReason;\n const itemCount = params.itemCount;\n const subtotal = params.subtotal;\n const shippingTotal = params.shippingTotal;\n const taxTotal = params.taxTotal;\n const grandTotal = params.grandTotal;\n const placedAt = params.placedAt;\n const completedAt = params.completedAt;\n const cancelledAt = params.cancelledAt;\n const createdAt = params.createdAt;\n const updatedAt = params.updatedAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n\n const apiPath = '/v1/orders';\n const apiPayload: Payload = {};\n if (typeof id !== 'undefined') {\n apiPayload['id'] = id;\n }\n if (typeof number !== 'undefined') {\n apiPayload['number'] = number;\n }\n if (typeof customerOrderNumber !== 'undefined') {\n apiPayload['customer_order_number'] = customerOrderNumber;\n }\n if (typeof externalRef !== 'undefined') {\n apiPayload['external_ref'] = externalRef;\n }\n if (typeof acknowledgedAt !== 'undefined') {\n apiPayload['acknowledged_at'] = acknowledgedAt;\n }\n if (typeof cartId !== 'undefined') {\n apiPayload['cart_id'] = cartId;\n }\n if (typeof contactId !== 'undefined') {\n apiPayload['contact_id'] = contactId;\n }\n if (typeof organizationId !== 'undefined') {\n apiPayload['organization_id'] = organizationId;\n }\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof currency !== 'undefined') {\n apiPayload['currency'] = currency;\n }\n if (typeof status !== 'undefined') {\n apiPayload['status'] = status;\n }\n if (typeof paymentStatus !== 'undefined') {\n apiPayload['payment_status'] = paymentStatus;\n }\n if (typeof fulfillmentStatus !== 'undefined') {\n apiPayload['fulfillment_status'] = fulfillmentStatus;\n }\n if (typeof onHold !== 'undefined') {\n apiPayload['on_hold'] = onHold;\n }\n if (typeof holdReason !== 'undefined') {\n apiPayload['hold_reason'] = holdReason;\n }\n if (typeof itemCount !== 'undefined') {\n apiPayload['item_count'] = itemCount;\n }\n if (typeof subtotal !== 'undefined') {\n apiPayload['subtotal'] = subtotal;\n }\n if (typeof shippingTotal !== 'undefined') {\n apiPayload['shipping_total'] = shippingTotal;\n }\n if (typeof taxTotal !== 'undefined') {\n apiPayload['tax_total'] = taxTotal;\n }\n if (typeof grandTotal !== 'undefined') {\n apiPayload['grand_total'] = grandTotal;\n }\n if (typeof placedAt !== 'undefined') {\n apiPayload['placed_at'] = placedAt;\n }\n if (typeof completedAt !== 'undefined') {\n apiPayload['completed_at'] = completedAt;\n }\n if (typeof cancelledAt !== 'undefined') {\n apiPayload['cancelled_at'] = cancelledAt;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof updatedAt !== 'undefined') {\n apiPayload['updated_at'] = updatedAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * The counters this tenant numbers its orders, delivery notes and returns from — what an operator sees on the Number ranges settings page, and what a migration reads to check the prefixes and the padding before it imports anything. Every parameter below is an exact-match filter on the column it names (?code=order finds the order counter). Two things are not: a key that names NO column is dropped silently — the call answers 200 with the unfiltered page, so compare the 'filter' echo against what you sent — and the jsonb column 'metadata' is honoured by the router but refused by the database (400 invalid_value) unless the value is a whole JSON document, which is why it is not offered here. It does not draw a number: `counter` is the last number DRAWN, and only placing an order, a shipment or a return moves it.\n *\n * @param {string} params.id - Filter to rows whose `id` is exactly this value. Primary key of the number range.\n * @param {string} params.code - Look a range up by its code — 'order', 'delivery', 'return', or whatever a settings key points at. Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} params.prefix - Filter to rows whose `prefix` is exactly this value. Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default.\n * @param {string} params.suffix - Filter to rows whose `suffix` is exactly this value. 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.\n * @param {number} params.padding - Filter to rows whose `padding` is exactly this value. How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn.\n * @param {number} params.counter - Filter to rows whose `counter` is exactly this value. The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409).\n * @param {number} params.step - Filter to rows whose `step` is exactly this value. 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.\n * @param {number} params.positionStep - Filter to rows whose `position_step` is exactly this value. The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only.\n * @param {string} params.channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range was created.\n * @param {string} params.updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range last changed — which includes every single number draw, because a draw writes the counter.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n ordersNumberRangesList(params?: { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * The counters this tenant numbers its orders, delivery notes and returns from — what an operator sees on the Number ranges settings page, and what a migration reads to check the prefixes and the padding before it imports anything. Every parameter below is an exact-match filter on the column it names (?code=order finds the order counter). Two things are not: a key that names NO column is dropped silently — the call answers 200 with the unfiltered page, so compare the 'filter' echo against what you sent — and the jsonb column 'metadata' is honoured by the router but refused by the database (400 invalid_value) unless the value is a whole JSON document, which is why it is not offered here. It does not draw a number: `counter` is the last number DRAWN, and only placing an order, a shipment or a return moves it.\n *\n * @param {string} id - Filter to rows whose `id` is exactly this value. Primary key of the number range.\n * @param {string} code - Look a range up by its code — 'order', 'delivery', 'return', or whatever a settings key points at. Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} prefix - Filter to rows whose `prefix` is exactly this value. Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default.\n * @param {string} suffix - Filter to rows whose `suffix` is exactly this value. 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.\n * @param {number} padding - Filter to rows whose `padding` is exactly this value. How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn.\n * @param {number} counter - Filter to rows whose `counter` is exactly this value. The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409).\n * @param {number} step - Filter to rows whose `step` is exactly this value. 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.\n * @param {number} positionStep - Filter to rows whose `position_step` is exactly this value. The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only.\n * @param {string} channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range was created.\n * @param {string} updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range last changed — which includes every single number draw, because a draw writes the counter.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesList(id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n ordersNumberRangesList(\n paramsOrFirst?: { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (number)?, (number)?, (string)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n code: rest[0] as string,\n prefix: rest[1] as string,\n suffix: rest[2] as string,\n padding: rest[3] as number,\n counter: rest[4] as number,\n step: rest[5] as number,\n positionStep: rest[6] as number,\n channelId: rest[7] as string,\n createdAt: rest[8] as string,\n updatedAt: rest[9] as string,\n limit: rest[10] as number,\n offset: rest[11] as number,\n order: rest[12] as string \n };\n }\n \n const id = params.id;\n const code = params.code;\n const prefix = params.prefix;\n const suffix = params.suffix;\n const padding = params.padding;\n const counter = params.counter;\n const step = params.step;\n const positionStep = params.positionStep;\n const channelId = params.channelId;\n const createdAt = params.createdAt;\n const updatedAt = params.updatedAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n\n const apiPath = '/v1/orders/number-ranges';\n const apiPayload: Payload = {};\n if (typeof id !== 'undefined') {\n apiPayload['id'] = id;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof prefix !== 'undefined') {\n apiPayload['prefix'] = prefix;\n }\n if (typeof suffix !== 'undefined') {\n apiPayload['suffix'] = suffix;\n }\n if (typeof padding !== 'undefined') {\n apiPayload['padding'] = padding;\n }\n if (typeof counter !== 'undefined') {\n apiPayload['counter'] = counter;\n }\n if (typeof step !== 'undefined') {\n apiPayload['step'] = step;\n }\n if (typeof positionStep !== 'undefined') {\n apiPayload['position_step'] = positionStep;\n }\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof updatedAt !== 'undefined') {\n apiPayload['updated_at'] = updatedAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} params.channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {number} params.counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} params.metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} params.padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} params.positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} params.prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersNumberRangesCreate(params: { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @param {string} code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {number} counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesCreate(code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.Error>;\n ordersNumberRangesCreate(\n paramsOrFirst: { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string } | string,\n ...rest: [(string)?, (number)?, (object)?, (number)?, (number)?, (string)?, (number)?, (string)?] \n ): Promise<Models.Error> {\n let params: { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n } else {\n params = {\n code: paramsOrFirst as string,\n channelId: rest[0] as string,\n counter: rest[1] as number,\n metadata: rest[2] as object,\n padding: rest[3] as number,\n positionStep: rest[4] as number,\n prefix: rest[5] as string,\n step: rest[6] as number,\n suffix: rest[7] as string \n };\n }\n \n const code = params.code;\n const channelId = params.channelId;\n const counter = params.counter;\n const metadata = params.metadata;\n const padding = params.padding;\n const positionStep = params.positionStep;\n const prefix = params.prefix;\n const step = params.step;\n const suffix = params.suffix;\n\n if (typeof code === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/v1/orders/number-ranges';\n const apiPayload: Payload = {};\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof counter !== 'undefined') {\n apiPayload['counter'] = counter;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof padding !== 'undefined') {\n apiPayload['padding'] = padding;\n }\n if (typeof positionStep !== 'undefined') {\n apiPayload['position_step'] = positionStep;\n }\n if (typeof prefix !== 'undefined') {\n apiPayload['prefix'] = prefix;\n }\n if (typeof step !== 'undefined') {\n apiPayload['step'] = step;\n }\n if (typeof suffix !== 'undefined') {\n apiPayload['suffix'] = suffix;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderNumberRangesSeeded>}\n */\n ordersNumberRangesDefaults(): Promise<Models.OrderNumberRangesSeeded> {\n\n const apiPath = '/v1/orders/number-ranges/defaults';\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersNumberRangesDelete(params: { id: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @param {string} id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesDelete(id: string): Promise<Models.Error>;\n ordersNumberRangesDelete(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.Error> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/number-ranges/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersNumberRangesGet(params: { id: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @param {string} id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesGet(id: string): Promise<Models.Error>;\n ordersNumberRangesGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.Error> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/number-ranges/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.id - The number range id (uuid).\n * @param {string} params.channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} params.code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {number} params.counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} params.metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} params.padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} params.positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} params.prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersNumberRangesUpdate(params: { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @param {string} id - The number range id (uuid).\n * @param {string} channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {number} counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesUpdate(id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.Error>;\n ordersNumberRangesUpdate(\n paramsOrFirst: { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string } | string,\n ...rest: [(string)?, (string)?, (number)?, (object)?, (number)?, (number)?, (string)?, (number)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n channelId: rest[0] as string,\n code: rest[1] as string,\n counter: rest[2] as number,\n metadata: rest[3] as object,\n padding: rest[4] as number,\n positionStep: rest[5] as number,\n prefix: rest[6] as string,\n step: rest[7] as number,\n suffix: rest[8] as string \n };\n }\n \n const id = params.id;\n const channelId = params.channelId;\n const code = params.code;\n const counter = params.counter;\n const metadata = params.metadata;\n const padding = params.padding;\n const positionStep = params.positionStep;\n const prefix = params.prefix;\n const step = params.step;\n const suffix = params.suffix;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/number-ranges/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof counter !== 'undefined') {\n apiPayload['counter'] = counter;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof padding !== 'undefined') {\n apiPayload['padding'] = padding;\n }\n if (typeof positionStep !== 'undefined') {\n apiPayload['position_step'] = positionStep;\n }\n if (typeof prefix !== 'undefined') {\n apiPayload['prefix'] = prefix;\n }\n if (typeof step !== 'undefined') {\n apiPayload['step'] = step;\n }\n if (typeof suffix !== 'undefined') {\n apiPayload['suffix'] = suffix;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {Models.OrderItemCreateRequest[]} params.items - The order positions — at least one, and at most the tenant's max_items_per_order (500 out of the box; a longer list is a 400 naming the limit).\n * @param {object} params.billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to.\n * @param {object} params.buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it.\n * @param {string} params.cartId - The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created. The carts.order hand-over sets it.\n * @param {string} params.channelId - The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} params.contactId - The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout. Ignored when the caller carries a principal — the RESOLVED contact wins, and a body value that disagrees is a 400 rather than a silent override.\n * @param {string} params.currency - ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting. Defaults to the market's default_currency setting.\n * @param {string} params.customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {number} params.grandTotal - Optional, and CHECKED rather than used: the order always computes its own total from the positions, the shipping cost and the tax. Send it as a checksum on that arithmetic — if it agrees the order is placed, and if it disagrees the call is refused with 400 naming both numbers, yours and the computed one. The comparison is at 2 decimal places (this app stores 4, ERPs work to 2, so a difference below a cent is agreement). It is never taken as the order value: the approval threshold and the revenue rollup read the computed number, which is why a total that disagrees is an error rather than an override.\n * @param {object} params.metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it.\n * @param {string} params.organizationId - The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it. A principal's own organization wins over this when it has one.\n * @param {object} params.payment - The payment arrangement as it was chosen, FROZEN. This app reads exactly two keys and stores the rest untouched: 'status' seeds payment_status at place-time when it names one of the permitted values (anything else is ignored and the order starts 'open'), and 'payment_id' is merged in by POST /orders/{id}/payment-status. The method itself, its provider fields and any redirect state belong to the payments app.\n * @param {object} params.shipping - The shipping arrangement as it was chosen, FROZEN. Two keys are READ at place-time and feed the totals: 'price' becomes shipping_total (the shipping_total field is only the fallback when this is absent) and 'tax_rate' is what shipping is taxed at, because shipping is a Nebenleistung and is taxed too. Everything else — the carrier product, the delivery window, the pickup point — is stored untouched and belongs to the shipping app.\n * @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).\n * @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'.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersPlace(params: { 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>;\n /**\n * 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.\n *\n * @param {Models.OrderItemCreateRequest[]} items - The order positions — at least one, and at most the tenant's max_items_per_order (500 out of the box; a longer list is a 400 naming the limit).\n * @param {object} billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to.\n * @param {object} buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it.\n * @param {string} cartId - The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created. The carts.order hand-over sets it.\n * @param {string} channelId - The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} contactId - The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout. Ignored when the caller carries a principal — the RESOLVED contact wins, and a body value that disagrees is a 400 rather than a silent override.\n * @param {string} currency - ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting. Defaults to the market's default_currency setting.\n * @param {string} customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {number} grandTotal - Optional, and CHECKED rather than used: the order always computes its own total from the positions, the shipping cost and the tax. Send it as a checksum on that arithmetic — if it agrees the order is placed, and if it disagrees the call is refused with 400 naming both numbers, yours and the computed one. The comparison is at 2 decimal places (this app stores 4, ERPs work to 2, so a difference below a cent is agreement). It is never taken as the order value: the approval threshold and the revenue rollup read the computed number, which is why a total that disagrees is an error rather than an override.\n * @param {object} metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it.\n * @param {string} organizationId - The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it. A principal's own organization wins over this when it has one.\n * @param {object} payment - The payment arrangement as it was chosen, FROZEN. This app reads exactly two keys and stores the rest untouched: 'status' seeds payment_status at place-time when it names one of the permitted values (anything else is ignored and the order starts 'open'), and 'payment_id' is merged in by POST /orders/{id}/payment-status. The method itself, its provider fields and any redirect state belong to the payments app.\n * @param {object} shipping - The shipping arrangement as it was chosen, FROZEN. Two keys are READ at place-time and feed the totals: 'price' becomes shipping_total (the shipping_total field is only the fallback when this is absent) and 'tax_rate' is what shipping is taxed at, because shipping is a Nebenleistung and is taxed too. Everything else — the carrier product, the delivery window, the pickup point — is stored untouched and belongs to the shipping app.\n * @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).\n * @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'.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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>;\n ordersPlace(\n paramsOrFirst: { 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 } | Models.OrderItemCreateRequest[],\n ...rest: [(object)?, (object)?, (string)?, (string)?, (string)?, (string)?, (string)?, (number)?, (object)?, (string)?, (object)?, (object)?, (object)?, (number)?, (object)?] \n ): Promise<Models.Error> {\n let params: { 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 };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('items' in paramsOrFirst || 'billingAddress' in paramsOrFirst || 'buyer' in paramsOrFirst || 'cartId' in paramsOrFirst || 'channelId' in paramsOrFirst || 'contactId' in paramsOrFirst || 'currency' in paramsOrFirst || 'customerOrderNumber' in paramsOrFirst || 'grandTotal' in paramsOrFirst || 'metadata' in paramsOrFirst || 'organizationId' in paramsOrFirst || 'payment' in paramsOrFirst || 'shipping' in paramsOrFirst || 'shippingAddress' in paramsOrFirst || 'shippingTotal' in paramsOrFirst || 'userData' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { 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 };\n } else {\n params = {\n items: paramsOrFirst as Models.OrderItemCreateRequest[],\n billingAddress: rest[0] as object,\n buyer: rest[1] as object,\n cartId: rest[2] as string,\n channelId: rest[3] as string,\n contactId: rest[4] as string,\n currency: rest[5] as string,\n customerOrderNumber: rest[6] as string,\n grandTotal: rest[7] as number,\n metadata: rest[8] as object,\n organizationId: rest[9] as string,\n payment: rest[10] as object,\n shipping: rest[11] as object,\n shippingAddress: rest[12] as object,\n shippingTotal: rest[13] as number,\n userData: rest[14] as object \n };\n }\n \n const items = params.items;\n const billingAddress = params.billingAddress;\n const buyer = params.buyer;\n const cartId = params.cartId;\n const channelId = params.channelId;\n const contactId = params.contactId;\n const currency = params.currency;\n const customerOrderNumber = params.customerOrderNumber;\n const grandTotal = params.grandTotal;\n const metadata = params.metadata;\n const organizationId = params.organizationId;\n const payment = params.payment;\n const shipping = params.shipping;\n const shippingAddress = params.shippingAddress;\n const shippingTotal = params.shippingTotal;\n const userData = params.userData;\n\n if (typeof items === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"items\"');\n }\n\n const apiPath = '/v1/orders/place';\n const apiPayload: Payload = {};\n if (typeof billingAddress !== 'undefined') {\n apiPayload['billing_address'] = billingAddress;\n }\n if (typeof buyer !== 'undefined') {\n apiPayload['buyer'] = buyer;\n }\n if (typeof cartId !== 'undefined') {\n apiPayload['cart_id'] = cartId;\n }\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof contactId !== 'undefined') {\n apiPayload['contact_id'] = contactId;\n }\n if (typeof currency !== 'undefined') {\n apiPayload['currency'] = currency;\n }\n if (typeof customerOrderNumber !== 'undefined') {\n apiPayload['customer_order_number'] = customerOrderNumber;\n }\n if (typeof grandTotal !== 'undefined') {\n apiPayload['grand_total'] = grandTotal;\n }\n if (typeof items !== 'undefined') {\n apiPayload['items'] = items;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof organizationId !== 'undefined') {\n apiPayload['organization_id'] = organizationId;\n }\n if (typeof payment !== 'undefined') {\n apiPayload['payment'] = payment;\n }\n if (typeof shipping !== 'undefined') {\n apiPayload['shipping'] = shipping;\n }\n if (typeof shippingAddress !== 'undefined') {\n apiPayload['shipping_address'] = shippingAddress;\n }\n if (typeof shippingTotal !== 'undefined') {\n apiPayload['shipping_total'] = shippingTotal;\n }\n if (typeof userData !== 'undefined') {\n apiPayload['user_data'] = userData;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.asOf - Anchor for the rolling windows (default now). Pin it and send it back on every call of a loop, otherwise the windows drift by the duration of the loop.\n * @param {string} params.cursor - Continue an unfinished scan: the exact value the previous call returned, which is the id of the last order it read. Do not construct one — it is a resume point, not an offset. Omit it on the first call. It is honoured in BOTH call shapes, organization_ids included: send the whole batch again alongside it whenever `done` came back false, or the part of the batch after the cursor is simply never read.\n * @param {string[]} params.organizationIds - Roll up exactly these organizations and no others — at most 200, because the ids travel to the data plane as one in.() filter. Naming them does NOT make the answer complete by itself: the scan is the same paged, time-budgeted loop either way, so a batch with more orders than one page can still stop early with `done: false` and a cursor. Small batches finish in one call, which is the normal case, but check `done` rather than assume it. Omitted = scan every order and answer for every organization that appears on one.\n * @param {OrderStatus[]} params.statuses - Which lifecycle statuses count as revenue. Defaults to placed, in_fulfillment and completed: a pending order was never placed, and a cancelled one is not revenue. Widening this is how a merchant who books on approval gets their own definition of the same numbers.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderCustomerRollupResponse>}\n */\n ordersReportsCustomerRollup(params?: { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] }): Promise<Models.OrderCustomerRollupResponse>;\n /**\n * 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.\n *\n * @param {string} asOf - Anchor for the rolling windows (default now). Pin it and send it back on every call of a loop, otherwise the windows drift by the duration of the loop.\n * @param {string} cursor - Continue an unfinished scan: the exact value the previous call returned, which is the id of the last order it read. Do not construct one — it is a resume point, not an offset. Omit it on the first call. It is honoured in BOTH call shapes, organization_ids included: send the whole batch again alongside it whenever `done` came back false, or the part of the batch after the cursor is simply never read.\n * @param {string[]} organizationIds - Roll up exactly these organizations and no others — at most 200, because the ids travel to the data plane as one in.() filter. Naming them does NOT make the answer complete by itself: the scan is the same paged, time-budgeted loop either way, so a batch with more orders than one page can still stop early with `done: false` and a cursor. Small batches finish in one call, which is the normal case, but check `done` rather than assume it. Omitted = scan every order and answer for every organization that appears on one.\n * @param {OrderStatus[]} statuses - Which lifecycle statuses count as revenue. Defaults to placed, in_fulfillment and completed: a pending order was never placed, and a cancelled one is not revenue. Widening this is how a merchant who books on approval gets their own definition of the same numbers.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderCustomerRollupResponse>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReportsCustomerRollup(asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[]): Promise<Models.OrderCustomerRollupResponse>;\n ordersReportsCustomerRollup(\n paramsOrFirst?: { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] } | string,\n ...rest: [(string)?, (string[])?, (OrderStatus[])?] \n ): Promise<Models.OrderCustomerRollupResponse> {\n let params: { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] };\n } else {\n params = {\n asOf: paramsOrFirst as string,\n cursor: rest[0] as string,\n organizationIds: rest[1] as string[],\n statuses: rest[2] as OrderStatus[] \n };\n }\n \n const asOf = params.asOf;\n const cursor = params.cursor;\n const organizationIds = params.organizationIds;\n const statuses = params.statuses;\n\n\n const apiPath = '/v1/orders/reports/customer-rollup';\n const apiPayload: Payload = {};\n if (typeof asOf !== 'undefined') {\n apiPayload['as_of'] = asOf;\n }\n if (typeof cursor !== 'undefined') {\n apiPayload['cursor'] = cursor;\n }\n if (typeof organizationIds !== 'undefined') {\n apiPayload['organization_ids'] = organizationIds;\n }\n if (typeof statuses !== 'undefined') {\n apiPayload['statuses'] = statuses;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * Which value sets this app will describe for you, by name — order statuses, payment statuses, fulfillment statuses, item types, return statuses and return resolutions — so a client can discover them instead of shipping its own copy of five statuses that goes stale one release later. The values themselves are deliberately NOT here: this is the index, and each set is fetched on its own. Discovery for the vocabulary routes. Names: cancellation-scopes, comment-visibilities, fulfillment-statuses, item-types, payment-statuses, return-resolutions, return-statuses, statuses. Fetch one with GET /orders/vocabularies/{name}; a client holding the qualified pair 'orders.<name>' builds that URL from the pair alone. 'title' and 'description' are locale maps wherever somebody wrote the copy and plain strings where the fallback did — read both forms.\n *\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderVocabularyIndex>}\n */\n ordersVocabulariesList(): Promise<Models.OrderVocabularyIndex> {\n\n const apiPath = '/v1/orders/vocabularies';\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {OrdersVocabulariesGetName} params.name - The vocabulary name — the part after the dot in the qualified id.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersVocabulariesGet(params: { name: OrdersVocabulariesGetName }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @param {OrdersVocabulariesGetName} name - The vocabulary name — the part after the dot in the qualified id.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersVocabulariesGet(name: OrdersVocabulariesGetName): Promise<Models.Error>;\n ordersVocabulariesGet(\n paramsOrFirst: { name: OrdersVocabulariesGetName } | OrdersVocabulariesGetName \n ): Promise<Models.Error> {\n let params: { name: OrdersVocabulariesGetName };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name: OrdersVocabulariesGetName };\n } else {\n params = {\n name: paramsOrFirst as OrdersVocabulariesGetName \n };\n }\n \n const name = params.name;\n\n if (typeof name === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/v1/orders/vocabularies/{name}'.replace('{name}', name);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersGet(params: { id: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersGet(id: string): Promise<Models.Error>;\n ordersGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.Error> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {object} params.billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to. Replaced wholesale — send the whole address, not a patch of it.\n * @param {object} params.buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it. Replaced wholesale — send the whole snapshot, not a patch of it.\n * @param {string} params.customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {object} params.metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it. Replaced wholesale.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersUpdate(params: { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {object} billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to. Replaced wholesale — send the whole address, not a patch of it.\n * @param {object} buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it. Replaced wholesale — send the whole snapshot, not a patch of it.\n * @param {string} customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {object} metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it. Replaced wholesale.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersUpdate(id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object): Promise<Models.Error>;\n ordersUpdate(\n paramsOrFirst: { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object } | string,\n ...rest: [(object)?, (object)?, (string)?, (object)?, (object)?, (object)?] \n ): Promise<Models.Error> {\n let params: { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n billingAddress: rest[0] as object,\n buyer: rest[1] as object,\n customerOrderNumber: rest[2] as string,\n metadata: rest[3] as object,\n shippingAddress: rest[4] as object,\n userData: rest[5] as object \n };\n }\n \n const id = params.id;\n const billingAddress = params.billingAddress;\n const buyer = params.buyer;\n const customerOrderNumber = params.customerOrderNumber;\n const metadata = params.metadata;\n const shippingAddress = params.shippingAddress;\n const userData = params.userData;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof billingAddress !== 'undefined') {\n apiPayload['billing_address'] = billingAddress;\n }\n if (typeof buyer !== 'undefined') {\n apiPayload['buyer'] = buyer;\n }\n if (typeof customerOrderNumber !== 'undefined') {\n apiPayload['customer_order_number'] = customerOrderNumber;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof shippingAddress !== 'undefined') {\n apiPayload['shipping_address'] = shippingAddress;\n }\n if (typeof userData !== 'undefined') {\n apiPayload['user_data'] = userData;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersAcknowledge(params: { id: string, externalRef?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersAcknowledge(id: string, externalRef?: string): Promise<Models.Error>;\n ordersAcknowledge(\n paramsOrFirst: { id: string, externalRef?: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Error> {\n let params: { id: string, externalRef?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, externalRef?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n externalRef: rest[0] as string \n };\n }\n \n const id = params.id;\n const externalRef = params.externalRef;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/acknowledge'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof externalRef !== 'undefined') {\n apiPayload['external_ref'] = externalRef;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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').\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersCancel(params: { id: string, cancelledBy?: string, reason?: string }): Promise<Models.Error>;\n /**\n * 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').\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersCancel(id: string, cancelledBy?: string, reason?: string): Promise<Models.Error>;\n ordersCancel(\n paramsOrFirst: { id: string, cancelledBy?: string, reason?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, cancelledBy?: string, reason?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, cancelledBy?: string, reason?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n cancelledBy: rest[0] as string,\n reason: rest[1] as string \n };\n }\n \n const id = params.id;\n const cancelledBy = params.cancelledBy;\n const reason = params.reason;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/cancel'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof cancelledBy !== 'undefined') {\n apiPayload['cancelled_by'] = cancelledBy;\n }\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.idQuery - Filter to rows whose `id` is exactly this value. Primary key of the comment.\n * @param {string} params.body - Filter to rows whose `body` is exactly this value. The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {OrderCommentVisibility} params.visibility - Filter to internal notes or to the customer-visible ones. `visibility=customer` is what a customer order view should read. 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.\n * @param {string} params.author - Filter by exact author, as it was reported. Free text — this is not resolved against a user directory, so it matches only what was written. Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the comment was written. Comments come back oldest first.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersCommentsList(params: { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {string} idQuery - Filter to rows whose `id` is exactly this value. Primary key of the comment.\n * @param {string} body - Filter to rows whose `body` is exactly this value. The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {OrderCommentVisibility} visibility - Filter to internal notes or to the customer-visible ones. `visibility=customer` is what a customer order view should read. 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.\n * @param {string} author - Filter by exact author, as it was reported. Free text — this is not resolved against a user directory, so it matches only what was written. Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the comment was written. Comments come back oldest first.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersCommentsList(id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<Models.Error>;\n ordersCommentsList(\n paramsOrFirst: { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (OrderCommentVisibility)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n idQuery: rest[0] as string,\n body: rest[1] as string,\n visibility: rest[2] as OrderCommentVisibility,\n author: rest[3] as string,\n createdAt: rest[4] as string,\n limit: rest[5] as number,\n offset: rest[6] as number,\n order: rest[7] as string \n };\n }\n \n const id = params.id;\n const idQuery = params.idQuery;\n const body = params.body;\n const visibility = params.visibility;\n const author = params.author;\n const createdAt = params.createdAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/comments'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof idQuery !== 'undefined') {\n apiPayload['id'] = idQuery;\n }\n if (typeof body !== 'undefined') {\n apiPayload['body'] = body;\n }\n if (typeof visibility !== 'undefined') {\n apiPayload['visibility'] = visibility;\n }\n if (typeof author !== 'undefined') {\n apiPayload['author'] = author;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.body - The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {string} params.author - Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersCommentsCreate(params: { id: string, body: string, author?: string, visibility?: OrderCommentVisibility }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {string} body - The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {string} author - Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersCommentsCreate(id: string, body: string, author?: string, visibility?: OrderCommentVisibility): Promise<Models.Error>;\n ordersCommentsCreate(\n paramsOrFirst: { id: string, body: string, author?: string, visibility?: OrderCommentVisibility } | string,\n ...rest: [(string)?, (string)?, (OrderCommentVisibility)?] \n ): Promise<Models.Error> {\n let params: { id: string, body: string, author?: string, visibility?: OrderCommentVisibility };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, body: string, author?: string, visibility?: OrderCommentVisibility };\n } else {\n params = {\n id: paramsOrFirst as string,\n body: rest[0] as string,\n author: rest[1] as string,\n visibility: rest[2] as OrderCommentVisibility \n };\n }\n \n const id = params.id;\n const body = params.body;\n const author = params.author;\n const visibility = params.visibility;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof body === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"body\"');\n }\n\n const apiPath = '/v1/orders/{id}/comments'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof author !== 'undefined') {\n apiPayload['author'] = author;\n }\n if (typeof body !== 'undefined') {\n apiPayload['body'] = body;\n }\n if (typeof visibility !== 'undefined') {\n apiPayload['visibility'] = visibility;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersComplete(params: { id: string, completedBy?: string }): Promise<Models.Error>;\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersComplete(id: string, completedBy?: string): Promise<Models.Error>;\n ordersComplete(\n paramsOrFirst: { id: string, completedBy?: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Error> {\n let params: { id: string, completedBy?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, completedBy?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n completedBy: rest[0] as string \n };\n }\n \n const id = params.id;\n const completedBy = params.completedBy;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/complete'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof completedBy !== 'undefined') {\n apiPayload['completed_by'] = completedBy;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.idQuery - Filter to rows whose `id` is exactly this value. Primary key of the event row.\n * @param {string} params.name - Filter the trail to one kind of event — `order.shipment.created` for the dispatch history, `order.return.completed` for the settled returns. WHAT happened, and this is the domain event: the manifest emits order_event.created on insert and this value is the event name on the bus. The names this app writes are order.placed, order.requested, order.updated, order.acknowledged, order.cancelled, order.item.cancelled, order.shipment.created, order.completed, order.held, order.unheld, order.payment_status.changed, order.comment.added, order.return.registered, order.return.received, order.return.completed and order.return.rejected.\n * @param {string} params.actor - Filter to the events one principal caused. Only order.placed and order.requested carry an actor, so this filters to those two names by construction. Who caused it: the resolved contact id of the acting principal. Only order.placed and order.requested carry one today — every other row is null — so filtering on it filters to those two names. The database constrains nothing here (the column is text); the uuid shape is what this app WRITES, which is also why no example is published: no id an app invents names a row a tenant holds.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When it happened. The trail comes back oldest first, which is the order a human reads a history in.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersEventsList(params: { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {string} idQuery - Filter to rows whose `id` is exactly this value. Primary key of the event row.\n * @param {string} name - Filter the trail to one kind of event — `order.shipment.created` for the dispatch history, `order.return.completed` for the settled returns. WHAT happened, and this is the domain event: the manifest emits order_event.created on insert and this value is the event name on the bus. The names this app writes are order.placed, order.requested, order.updated, order.acknowledged, order.cancelled, order.item.cancelled, order.shipment.created, order.completed, order.held, order.unheld, order.payment_status.changed, order.comment.added, order.return.registered, order.return.received, order.return.completed and order.return.rejected.\n * @param {string} actor - Filter to the events one principal caused. Only order.placed and order.requested carry an actor, so this filters to those two names by construction. Who caused it: the resolved contact id of the acting principal. Only order.placed and order.requested carry one today — every other row is null — so filtering on it filters to those two names. The database constrains nothing here (the column is text); the uuid shape is what this app WRITES, which is also why no example is published: no id an app invents names a row a tenant holds.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When it happened. The trail comes back oldest first, which is the order a human reads a history in.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersEventsList(id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<Models.Error>;\n ordersEventsList(\n paramsOrFirst: { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n idQuery: rest[0] as string,\n name: rest[1] as string,\n actor: rest[2] as string,\n createdAt: rest[3] as string,\n limit: rest[4] as number,\n offset: rest[5] as number,\n order: rest[6] as string \n };\n }\n \n const id = params.id;\n const idQuery = params.idQuery;\n const name = params.name;\n const actor = params.actor;\n const createdAt = params.createdAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/events'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof idQuery !== 'undefined') {\n apiPayload['id'] = idQuery;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof actor !== 'undefined') {\n apiPayload['actor'] = actor;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersHold(params: { id: string, reason?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersHold(id: string, reason?: string): Promise<Models.Error>;\n ordersHold(\n paramsOrFirst: { id: string, reason?: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Error> {\n let params: { id: string, reason?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, reason?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n reason: rest[0] as string \n };\n }\n \n const id = params.id;\n const reason = params.reason;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/hold'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {Models.OrderCancelPosition[]} params.positions - The quantities to take off the order. Required here, unlike on /ship and /return: cancelling everything by default is not a thing anybody should be able to do by omission — that is what /cancel is for.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersItemsCancel(params: { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {Models.OrderCancelPosition[]} positions - The quantities to take off the order. Required here, unlike on /ship and /return: cancelling everything by default is not a thing anybody should be able to do by omission — that is what /cancel is for.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersItemsCancel(id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string): Promise<Models.Error>;\n ordersItemsCancel(\n paramsOrFirst: { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string } | string,\n ...rest: [(Models.OrderCancelPosition[])?, (string)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n positions: rest[0] as Models.OrderCancelPosition[],\n cancelledBy: rest[1] as string,\n reason: rest[2] as string \n };\n }\n \n const id = params.id;\n const positions = params.positions;\n const cancelledBy = params.cancelledBy;\n const reason = params.reason;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof positions === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"positions\"');\n }\n\n const apiPath = '/v1/orders/{id}/items/cancel'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof cancelledBy !== 'undefined') {\n apiPayload['cancelled_by'] = cancelledBy;\n }\n if (typeof positions !== 'undefined') {\n apiPayload['positions'] = positions;\n }\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersPaymentStatusUpdate(params: { id: string, status: OrderPaymentStatus, paymentId?: string }): Promise<Models.Error>;\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersPaymentStatusUpdate(id: string, status: OrderPaymentStatus, paymentId?: string): Promise<Models.Error>;\n ordersPaymentStatusUpdate(\n paramsOrFirst: { id: string, status: OrderPaymentStatus, paymentId?: string } | string,\n ...rest: [(OrderPaymentStatus)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, status: OrderPaymentStatus, paymentId?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, status: OrderPaymentStatus, paymentId?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n status: rest[0] as OrderPaymentStatus,\n paymentId: rest[1] as string \n };\n }\n \n const id = params.id;\n const status = params.status;\n const paymentId = params.paymentId;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof status === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"status\"');\n }\n\n const apiPath = '/v1/orders/{id}/payment-status'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof paymentId !== 'undefined') {\n apiPayload['payment_id'] = paymentId;\n }\n if (typeof status !== 'undefined') {\n apiPayload['status'] = status;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {object} params.metadata - Free-form data for the caller — the returns portal's own reference. Stored and returned untouched.\n * @param {Models.OrderReturnPosition[]} params.positions - What is coming back. Omitted = every position with a returnable (shipped, not yet returned) quantity, in full.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersReturn(params: { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {object} metadata - Free-form data for the caller — the returns portal's own reference. Stored and returned untouched.\n * @param {Models.OrderReturnPosition[]} positions - What is coming back. Omitted = every position with a returnable (shipped, not yet returned) quantity, in full.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturn(id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean): Promise<Models.Error>;\n ordersReturn(\n paramsOrFirst: { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean } | string,\n ...rest: [(object)?, (Models.OrderReturnPosition[])?, (string)?, (boolean)?] \n ): Promise<Models.Error> {\n let params: { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean };\n } else {\n params = {\n id: paramsOrFirst as string,\n metadata: rest[0] as object,\n positions: rest[1] as Models.OrderReturnPosition[],\n reason: rest[2] as string,\n restock: rest[3] as boolean \n };\n }\n \n const id = params.id;\n const metadata = params.metadata;\n const positions = params.positions;\n const reason = params.reason;\n const restock = params.restock;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/return'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof positions !== 'undefined') {\n apiPayload['positions'] = positions;\n }\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n if (typeof restock !== 'undefined') {\n apiPayload['restock'] = restock;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {OrderReturnSettlement} params.resolution - How the return was settled. Omitted = settled without recording how.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersReturnsComplete(params: { id: string, rid: string, resolution?: OrderReturnSettlement }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {OrderReturnSettlement} resolution - How the return was settled. Omitted = settled without recording how.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturnsComplete(id: string, rid: string, resolution?: OrderReturnSettlement): Promise<Models.Error>;\n ordersReturnsComplete(\n paramsOrFirst: { id: string, rid: string, resolution?: OrderReturnSettlement } | string,\n ...rest: [(string)?, (OrderReturnSettlement)?] \n ): Promise<Models.Error> {\n let params: { id: string, rid: string, resolution?: OrderReturnSettlement };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, rid: string, resolution?: OrderReturnSettlement };\n } else {\n params = {\n id: paramsOrFirst as string,\n rid: rest[0] as string,\n resolution: rest[1] as OrderReturnSettlement \n };\n }\n \n const id = params.id;\n const rid = params.rid;\n const resolution = params.resolution;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof rid === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"rid\"');\n }\n\n const apiPath = '/v1/orders/{id}/returns/{rid}/complete'.replace('{id}', id).replace('{rid}', rid);\n const apiPayload: Payload = {};\n if (typeof resolution !== 'undefined') {\n apiPayload['resolution'] = resolution;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {object} params.data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersReturnsReceive(params: { id: string, rid: string, data: object }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {object} data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturnsReceive(id: string, rid: string, data: object): Promise<Models.Error>;\n ordersReturnsReceive(\n paramsOrFirst: { id: string, rid: string, data: object } | string,\n ...rest: [(string)?, (object)?] \n ): Promise<Models.Error> {\n let params: { id: string, rid: string, data: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, rid: string, data: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n rid: rest[0] as string,\n data: rest[1] as object \n };\n }\n \n const id = params.id;\n const rid = params.rid;\n const data = params.data;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof rid === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"rid\"');\n }\n if (typeof data === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"data\"');\n }\n\n const apiPath = '/v1/orders/{id}/returns/{rid}/receive'.replace('{id}', id).replace('{rid}', rid);\n const apiPayload: Payload = {};\n if (typeof data !== 'undefined') {\n Object.assign(apiPayload, data);\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {string} params.reason - Free-text fallback for 'resolution' — a sentence about this one return, not a value out of the set.\n * @param {OrderReturnRefusal} params.resolution - Why the return was refused.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersReturnsReject(params: { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {string} reason - Free-text fallback for 'resolution' — a sentence about this one return, not a value out of the set.\n * @param {OrderReturnRefusal} resolution - Why the return was refused.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturnsReject(id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal): Promise<Models.Error>;\n ordersReturnsReject(\n paramsOrFirst: { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal } | string,\n ...rest: [(string)?, (string)?, (OrderReturnRefusal)?] \n ): Promise<Models.Error> {\n let params: { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal };\n } else {\n params = {\n id: paramsOrFirst as string,\n rid: rest[0] as string,\n reason: rest[1] as string,\n resolution: rest[2] as OrderReturnRefusal \n };\n }\n \n const id = params.id;\n const rid = params.rid;\n const reason = params.reason;\n const resolution = params.resolution;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof rid === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"rid\"');\n }\n\n const apiPath = '/v1/orders/{id}/returns/{rid}/reject'.replace('{id}', id).replace('{rid}', rid);\n const apiPayload: Payload = {};\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n if (typeof resolution !== 'undefined') {\n apiPayload['resolution'] = resolution;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.carrier - Who is carrying it, in the merchant's own words. Free text — this app neither validates it nor knows the carrier's API.\n * @param {object} params.metadata - Free-form data for the caller — the warehouse system's own reference for this handover. Stored and returned untouched.\n * @param {string} params.number - The DELIVERY NOTE number — drawn from the tenant's delivery range, unique per tenant, and a different series from the order number. A caller may supply its own when the number is issued by the warehouse system instead. Drawn from the 'delivery' range when omitted; supply one only when the number is issued elsewhere.\n * @param {Models.OrderShipmentPosition[]} params.positions - What this shipment carries. Omitted = every position with an open quantity, in full. GET /orders/{id}/shippable answers exactly the budget each one is guarded against.\n * @param {string} params.shippedAt - When the goods actually left. Defaults to now, and a caller may backdate it — a shipment booked on Monday for a Friday handover says Friday.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersShip(params: { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {string} carrier - Who is carrying it, in the merchant's own words. Free text — this app neither validates it nor knows the carrier's API.\n * @param {object} metadata - Free-form data for the caller — the warehouse system's own reference for this handover. Stored and returned untouched.\n * @param {string} number - The DELIVERY NOTE number — drawn from the tenant's delivery range, unique per tenant, and a different series from the order number. A caller may supply its own when the number is issued by the warehouse system instead. Drawn from the 'delivery' range when omitted; supply one only when the number is issued elsewhere.\n * @param {Models.OrderShipmentPosition[]} positions - What this shipment carries. Omitted = every position with an open quantity, in full. GET /orders/{id}/shippable answers exactly the budget each one is guarded against.\n * @param {string} shippedAt - When the goods actually left. Defaults to now, and a caller may backdate it — a shipment booked on Monday for a Friday handover says Friday.\n * @param {string} trackingCode - The consignment number the carrier issued. Free text: every carrier formats it differently and this app stores whatever it is given.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersShip(id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string): Promise<Models.Error>;\n ordersShip(\n paramsOrFirst: { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string } | string,\n ...rest: [(string)?, (object)?, (string)?, (Models.OrderShipmentPosition[])?, (string)?, (string)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n carrier: rest[0] as string,\n metadata: rest[1] as object,\n number: rest[2] as string,\n positions: rest[3] as Models.OrderShipmentPosition[],\n shippedAt: rest[4] as string,\n trackingCode: rest[5] as string,\n trackingUrl: rest[6] as string \n };\n }\n \n const id = params.id;\n const carrier = params.carrier;\n const metadata = params.metadata;\n const number = params.number;\n const positions = params.positions;\n const shippedAt = params.shippedAt;\n const trackingCode = params.trackingCode;\n const trackingUrl = params.trackingUrl;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/ship'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof carrier !== 'undefined') {\n apiPayload['carrier'] = carrier;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof number !== 'undefined') {\n apiPayload['number'] = number;\n }\n if (typeof positions !== 'undefined') {\n apiPayload['positions'] = positions;\n }\n if (typeof shippedAt !== 'undefined') {\n apiPayload['shipped_at'] = shippedAt;\n }\n if (typeof trackingCode !== 'undefined') {\n apiPayload['tracking_code'] = trackingCode;\n }\n if (typeof trackingUrl !== 'undefined') {\n apiPayload['tracking_url'] = trackingUrl;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersShippable(params: { id: string }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersShippable(id: string): Promise<Models.Error>;\n ordersShippable(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.Error> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/shippable'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {object} params.data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n ordersUnhold(params: { id: string, data: object }): Promise<Models.Error>;\n /**\n * 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.\n *\n * @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.\n * @param {object} data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersUnhold(id: string, data: object): Promise<Models.Error>;\n ordersUnhold(\n paramsOrFirst: { id: string, data: object } | string,\n ...rest: [(object)?] \n ): Promise<Models.Error> {\n let params: { id: string, data: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, data: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n data: rest[0] as object \n };\n }\n \n const id = params.id;\n const data = params.data;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof data === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"data\"');\n }\n\n const apiPath = '/v1/orders/{id}/unhold'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof data !== 'undefined') {\n Object.assign(apiPayload, data);\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/orders.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAWjE,IAAM,SAAN,MAAa;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAyEA,WACI,kBACG,MACQ;AACX,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,IAAI;AAAA,QACJ,QAAQ,KAAK,CAAC;AAAA,QACd,qBAAqB,KAAK,CAAC;AAAA,QAC3B,aAAa,KAAK,CAAC;AAAA,QACnB,gBAAgB,KAAK,CAAC;AAAA,QACt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AK,OAAO;AAClB,UAAM,OAAO,OAAO;AAEpB,QAAI,OAAO,OAAO,aAAa;AAC3B,YAAM,IAAI,kBAAkB,kCAAkC;AAAA,IAClE;AACA,QAAI,OAAO,SAAS,aAAa;AAC7B,YAAM,IAAI,kBAAkB,oCAAoC;AAAA,IACpE;AAEA,UAAM,UAAU,yBAAyB,QAAQ,QAAQ,EAAE;AAC3D,UAAM,aAAsB,CAAC;AAC7B,QAAI,OAAO,SAAS,aAAa;AAC7B,aAAO,OAAO,YAAY,IAAI;AAAA,IAClC;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { RevenexxException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { OrderStatus } from '../enums/order-status';\nimport { OrderPaymentStatus } from '../enums/order-payment-status';\nimport { OrderFulfillmentStatus } from '../enums/order-fulfillment-status';\nimport { OrdersVocabulariesGetName } from '../enums/orders-vocabularies-get-name';\nimport { OrderCommentVisibility } from '../enums/order-comment-visibility';\nimport { OrderReturnSettlement } from '../enums/order-return-settlement';\nimport { OrderReturnRefusal } from '../enums/order-return-refusal';\n\nexport class Orders {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * The route behind every order overview: the open orders of one customer, everything on hold, everything a market placed last week, or the one order somebody is quoting a number for (?number=ORD-000123 — the number is not the id, and this is how one becomes the other). The order LIST: the order rows without their positions, shipments, returns or cancellations — read GET /orders/{id} for the aggregate of one. Every parameter below is an exact match on the column it names, and combining them is an AND. Two kinds of key are not offered: one that names NO column is dropped silently, so a mistyped ?stauts=placed answers 200 with the whole list (compare the 'filter' echo against what you sent — no status code reports it), and the jsonb columns buyer, billing_address, shipping_address, payment, shipping, user_data and metadata reach the database as a text comparison and answer 400 invalid_value for anything that is not a whole JSON document.\n *\n * @param {string} params.id - Filter to exactly one order. GET /orders/{id} is the direct form and answers the aggregate; this exists because the list honours it too. Primary key of the order, and the id every other route takes. Not the order number.\n * @param {string} params.number - Look an order up by its NUMBER — the one filter a service desk starts from, and the way to turn the number a customer quotes into the uuid every other route wants. Exact match; there is no substring search on this API. The order number a human quotes — drawn from the tenant's order range at place-time, unique per tenant and never reused. It is NOT the id: every route addresses an order by uuid, and GET /orders?number=… is how a number becomes one.\n * @param {string} params.customerOrderNumber - Look an order up by the BUYER's own PO number. Not unique: the same buyer reference can legitimately sit on several orders. The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {string} params.externalRef - Find the order behind a reference in the fulfilling system — the ERP order number. Exact match, and null on everything not yet acknowledged. 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.\n * @param {string} params.acknowledgedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the fulfilling system took the order over. Written once. While it is null the order can still be modified here; afterwards modification goes through that system, unless the tenant sets allow_modification_after_acknowledge.\n * @param {string} params.cartId - Find the order a given cart became. The reverse of the carts hand-over, and how a storefront checks whether a checkout already went through. The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created.\n * @param {string} params.contactId - Filter to one person's orders — their order history. The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout.\n * @param {string} params.organizationId - Filter to one company's orders, across everyone who ordered for it. The B2B view, and the same attribution orders.reports.customer-rollup aggregates by. The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it.\n * @param {string} params.channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} params.currency - Filter by ISO 4217 code. Worth remembering before summing `grand_total` over a mixed list: nothing on an order is ever converted. ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting.\n * @param {OrderStatus} params.status - Filter by lifecycle status. `pending` IS the approval queue — there is no second entity for it. Where the order stands in its LIFECYCLE, and one of three independent status dimensions. 'pending' = created but not placed, an order waiting for approval; 'placed' = accepted, nothing shipped; 'in_fulfillment' = part of it has gone out, or all of it has and the tenant does not close on shipment; 'completed' and 'cancelled' end it. Moved by the action routes only — it is not writable through PUT /orders/{id}.\n * @param {OrderPaymentStatus} params.paymentStatus - Filter by the payment dimension, independently of the lifecycle: `payment_status=open&status=completed` is the delivered-but-unpaid list. 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.\n * @param {OrderFulfillmentStatus} params.fulfillmentStatus - Filter by the derived shipping dimension. `unfulfilled` with `status=placed` is the work queue a warehouse picks from. Whether the order has SHIPPED, and the one dimension nobody writes: it is DERIVED after every quantity change from the positions' own bookkeeping. 'fulfilled' means shipped >= ordered − cancelled across all positions, 'partial' means something went out. Sending it has no effect; ship, cancel or return something and it moves.\n * @param {boolean} params.onHold - Filter to the held orders — the list somebody has to work through before anything of theirs can ship. A business stop, ORTHOGONAL to status: a held order keeps its lifecycle state and is refused at the guards. How far the hold reaches is the tenant's call (on_hold_blocks: shipping only, shipping and cancellation, or nothing at all).\n * @param {string} params.holdReason - Filter to rows whose `hold_reason` is exactly this value. Why the order is held, in the words the shipping guard quotes back. Null when it is not held — releasing a hold clears it.\n * @param {number} params.itemCount - Filter to rows whose `item_count` is exactly this value. The summed ORDERED quantity over all positions, rounded to a whole number — a headline figure for a list, computed once at place-time. It is deliberately not reduced when something is cancelled or returned; the positions carry that arithmetic.\n * @param {number} params.subtotal - Filter to rows whose `subtotal` is exactly this value. NET total of the positions (the sum of their line_total), COMPUTED here at place-time. In `currency`, four decimal places. A caller cannot set it.\n * @param {number} params.shippingTotal - Filter to rows whose `shipping_total` is exactly this value. NET shipping cost, taken from shipping.price or, when the snapshot carries no price, from the request's shipping_total. In `currency`.\n * @param {number} params.taxTotal - Filter to rows whose `tax_total` is exactly this value. All tax on this order: the positions' tax_amount plus the tax on shipping (shipping_total × shipping.tax_rate). COMPUTED here — a caller cannot set it.\n * @param {number} params.grandTotal - Filter to rows whose `grand_total` is exactly this value. What the buyer owes: subtotal + shipping_total + tax_total, COMPUTED by this app and NEVER taken from the caller — trusting a supplied total is how inconsistent orders happened. This is the number the approval threshold is compared against and the number the revenue rollup sums.\n * @param {string} params.placedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was PLACED. Null while it is pending approval: an order awaiting sign-off exists but was never placed, and that is exactly the difference this field records.\n * @param {string} params.completedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was closed — by a full shipment, by payment or by hand, depending on the tenant's auto_complete_on. Null until then.\n * @param {string} params.cancelledAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was cancelled, whether by a full cancel or by the last open quantity being cancelled position by position. Null otherwise.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order row was written. For a placed order this is placed_at; for a requested one it is when the request was submitted.\n * @param {string} params.updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When any column of the order last changed — every status move, every re-derived fulfillment, every modification.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n ordersList(params?: { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * The route behind every order overview: the open orders of one customer, everything on hold, everything a market placed last week, or the one order somebody is quoting a number for (?number=ORD-000123 — the number is not the id, and this is how one becomes the other). The order LIST: the order rows without their positions, shipments, returns or cancellations — read GET /orders/{id} for the aggregate of one. Every parameter below is an exact match on the column it names, and combining them is an AND. Two kinds of key are not offered: one that names NO column is dropped silently, so a mistyped ?stauts=placed answers 200 with the whole list (compare the 'filter' echo against what you sent — no status code reports it), and the jsonb columns buyer, billing_address, shipping_address, payment, shipping, user_data and metadata reach the database as a text comparison and answer 400 invalid_value for anything that is not a whole JSON document.\n *\n * @param {string} id - Filter to exactly one order. GET /orders/{id} is the direct form and answers the aggregate; this exists because the list honours it too. Primary key of the order, and the id every other route takes. Not the order number.\n * @param {string} number - Look an order up by its NUMBER — the one filter a service desk starts from, and the way to turn the number a customer quotes into the uuid every other route wants. Exact match; there is no substring search on this API. The order number a human quotes — drawn from the tenant's order range at place-time, unique per tenant and never reused. It is NOT the id: every route addresses an order by uuid, and GET /orders?number=… is how a number becomes one.\n * @param {string} customerOrderNumber - Look an order up by the BUYER's own PO number. Not unique: the same buyer reference can legitimately sit on several orders. The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {string} externalRef - Find the order behind a reference in the fulfilling system — the ERP order number. Exact match, and null on everything not yet acknowledged. 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.\n * @param {string} acknowledgedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the fulfilling system took the order over. Written once. While it is null the order can still be modified here; afterwards modification goes through that system, unless the tenant sets allow_modification_after_acknowledge.\n * @param {string} cartId - Find the order a given cart became. The reverse of the carts hand-over, and how a storefront checks whether a checkout already went through. The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created.\n * @param {string} contactId - Filter to one person's orders — their order history. The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout.\n * @param {string} organizationId - Filter to one company's orders, across everyone who ordered for it. The B2B view, and the same attribution orders.reports.customer-rollup aggregates by. The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it.\n * @param {string} channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} currency - Filter by ISO 4217 code. Worth remembering before summing `grand_total` over a mixed list: nothing on an order is ever converted. ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting.\n * @param {OrderStatus} status - Filter by lifecycle status. `pending` IS the approval queue — there is no second entity for it. Where the order stands in its LIFECYCLE, and one of three independent status dimensions. 'pending' = created but not placed, an order waiting for approval; 'placed' = accepted, nothing shipped; 'in_fulfillment' = part of it has gone out, or all of it has and the tenant does not close on shipment; 'completed' and 'cancelled' end it. Moved by the action routes only — it is not writable through PUT /orders/{id}.\n * @param {OrderPaymentStatus} paymentStatus - Filter by the payment dimension, independently of the lifecycle: `payment_status=open&status=completed` is the delivered-but-unpaid list. 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.\n * @param {OrderFulfillmentStatus} fulfillmentStatus - Filter by the derived shipping dimension. `unfulfilled` with `status=placed` is the work queue a warehouse picks from. Whether the order has SHIPPED, and the one dimension nobody writes: it is DERIVED after every quantity change from the positions' own bookkeeping. 'fulfilled' means shipped >= ordered − cancelled across all positions, 'partial' means something went out. Sending it has no effect; ship, cancel or return something and it moves.\n * @param {boolean} onHold - Filter to the held orders — the list somebody has to work through before anything of theirs can ship. A business stop, ORTHOGONAL to status: a held order keeps its lifecycle state and is refused at the guards. How far the hold reaches is the tenant's call (on_hold_blocks: shipping only, shipping and cancellation, or nothing at all).\n * @param {string} holdReason - Filter to rows whose `hold_reason` is exactly this value. Why the order is held, in the words the shipping guard quotes back. Null when it is not held — releasing a hold clears it.\n * @param {number} itemCount - Filter to rows whose `item_count` is exactly this value. The summed ORDERED quantity over all positions, rounded to a whole number — a headline figure for a list, computed once at place-time. It is deliberately not reduced when something is cancelled or returned; the positions carry that arithmetic.\n * @param {number} subtotal - Filter to rows whose `subtotal` is exactly this value. NET total of the positions (the sum of their line_total), COMPUTED here at place-time. In `currency`, four decimal places. A caller cannot set it.\n * @param {number} shippingTotal - Filter to rows whose `shipping_total` is exactly this value. NET shipping cost, taken from shipping.price or, when the snapshot carries no price, from the request's shipping_total. In `currency`.\n * @param {number} taxTotal - Filter to rows whose `tax_total` is exactly this value. All tax on this order: the positions' tax_amount plus the tax on shipping (shipping_total × shipping.tax_rate). COMPUTED here — a caller cannot set it.\n * @param {number} grandTotal - Filter to rows whose `grand_total` is exactly this value. What the buyer owes: subtotal + shipping_total + tax_total, COMPUTED by this app and NEVER taken from the caller — trusting a supplied total is how inconsistent orders happened. This is the number the approval threshold is compared against and the number the revenue rollup sums.\n * @param {string} placedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was PLACED. Null while it is pending approval: an order awaiting sign-off exists but was never placed, and that is exactly the difference this field records.\n * @param {string} completedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was closed — by a full shipment, by payment or by hand, depending on the tenant's auto_complete_on. Null until then.\n * @param {string} cancelledAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order was cancelled, whether by a full cancel or by the last open quantity being cancelled position by position. Null otherwise.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the order row was written. For a placed order this is placed_at; for a requested one it is when the request was submitted.\n * @param {string} updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When any column of the order last changed — every status move, every re-derived fulfillment, every modification.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersList(id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n ordersList(\n paramsOrFirst?: { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (OrderStatus)?, (OrderPaymentStatus)?, (OrderFulfillmentStatus)?, (boolean)?, (string)?, (number)?, (number)?, (number)?, (number)?, (number)?, (string)?, (string)?, (string)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id?: string, number?: string, customerOrderNumber?: string, externalRef?: string, acknowledgedAt?: string, cartId?: string, contactId?: string, organizationId?: string, channelId?: string, currency?: string, status?: OrderStatus, paymentStatus?: OrderPaymentStatus, fulfillmentStatus?: OrderFulfillmentStatus, onHold?: boolean, holdReason?: string, itemCount?: number, subtotal?: number, shippingTotal?: number, taxTotal?: number, grandTotal?: number, placedAt?: string, completedAt?: string, cancelledAt?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n number: rest[0] as string,\n customerOrderNumber: rest[1] as string,\n externalRef: rest[2] as string,\n acknowledgedAt: rest[3] as string,\n cartId: rest[4] as string,\n contactId: rest[5] as string,\n organizationId: rest[6] as string,\n channelId: rest[7] as string,\n currency: rest[8] as string,\n status: rest[9] as OrderStatus,\n paymentStatus: rest[10] as OrderPaymentStatus,\n fulfillmentStatus: rest[11] as OrderFulfillmentStatus,\n onHold: rest[12] as boolean,\n holdReason: rest[13] as string,\n itemCount: rest[14] as number,\n subtotal: rest[15] as number,\n shippingTotal: rest[16] as number,\n taxTotal: rest[17] as number,\n grandTotal: rest[18] as number,\n placedAt: rest[19] as string,\n completedAt: rest[20] as string,\n cancelledAt: rest[21] as string,\n createdAt: rest[22] as string,\n updatedAt: rest[23] as string,\n limit: rest[24] as number,\n offset: rest[25] as number,\n order: rest[26] as string \n };\n }\n \n const id = params.id;\n const number = params.number;\n const customerOrderNumber = params.customerOrderNumber;\n const externalRef = params.externalRef;\n const acknowledgedAt = params.acknowledgedAt;\n const cartId = params.cartId;\n const contactId = params.contactId;\n const organizationId = params.organizationId;\n const channelId = params.channelId;\n const currency = params.currency;\n const status = params.status;\n const paymentStatus = params.paymentStatus;\n const fulfillmentStatus = params.fulfillmentStatus;\n const onHold = params.onHold;\n const holdReason = params.holdReason;\n const itemCount = params.itemCount;\n const subtotal = params.subtotal;\n const shippingTotal = params.shippingTotal;\n const taxTotal = params.taxTotal;\n const grandTotal = params.grandTotal;\n const placedAt = params.placedAt;\n const completedAt = params.completedAt;\n const cancelledAt = params.cancelledAt;\n const createdAt = params.createdAt;\n const updatedAt = params.updatedAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n\n const apiPath = '/v1/orders';\n const apiPayload: Payload = {};\n if (typeof id !== 'undefined') {\n apiPayload['id'] = id;\n }\n if (typeof number !== 'undefined') {\n apiPayload['number'] = number;\n }\n if (typeof customerOrderNumber !== 'undefined') {\n apiPayload['customer_order_number'] = customerOrderNumber;\n }\n if (typeof externalRef !== 'undefined') {\n apiPayload['external_ref'] = externalRef;\n }\n if (typeof acknowledgedAt !== 'undefined') {\n apiPayload['acknowledged_at'] = acknowledgedAt;\n }\n if (typeof cartId !== 'undefined') {\n apiPayload['cart_id'] = cartId;\n }\n if (typeof contactId !== 'undefined') {\n apiPayload['contact_id'] = contactId;\n }\n if (typeof organizationId !== 'undefined') {\n apiPayload['organization_id'] = organizationId;\n }\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof currency !== 'undefined') {\n apiPayload['currency'] = currency;\n }\n if (typeof status !== 'undefined') {\n apiPayload['status'] = status;\n }\n if (typeof paymentStatus !== 'undefined') {\n apiPayload['payment_status'] = paymentStatus;\n }\n if (typeof fulfillmentStatus !== 'undefined') {\n apiPayload['fulfillment_status'] = fulfillmentStatus;\n }\n if (typeof onHold !== 'undefined') {\n apiPayload['on_hold'] = onHold;\n }\n if (typeof holdReason !== 'undefined') {\n apiPayload['hold_reason'] = holdReason;\n }\n if (typeof itemCount !== 'undefined') {\n apiPayload['item_count'] = itemCount;\n }\n if (typeof subtotal !== 'undefined') {\n apiPayload['subtotal'] = subtotal;\n }\n if (typeof shippingTotal !== 'undefined') {\n apiPayload['shipping_total'] = shippingTotal;\n }\n if (typeof taxTotal !== 'undefined') {\n apiPayload['tax_total'] = taxTotal;\n }\n if (typeof grandTotal !== 'undefined') {\n apiPayload['grand_total'] = grandTotal;\n }\n if (typeof placedAt !== 'undefined') {\n apiPayload['placed_at'] = placedAt;\n }\n if (typeof completedAt !== 'undefined') {\n apiPayload['completed_at'] = completedAt;\n }\n if (typeof cancelledAt !== 'undefined') {\n apiPayload['cancelled_at'] = cancelledAt;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof updatedAt !== 'undefined') {\n apiPayload['updated_at'] = updatedAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * The counters this tenant numbers its orders, delivery notes and returns from — what an operator sees on the Number ranges settings page, and what a migration reads to check the prefixes and the padding before it imports anything. Every parameter below is an exact-match filter on the column it names (?code=order finds the order counter). Two things are not: a key that names NO column is dropped silently — the call answers 200 with the unfiltered page, so compare the 'filter' echo against what you sent — and the jsonb column 'metadata' is honoured by the router but refused by the database (400 invalid_value) unless the value is a whole JSON document, which is why it is not offered here. It does not draw a number: `counter` is the last number DRAWN, and only placing an order, a shipment or a return moves it.\n *\n * @param {string} params.id - Filter to rows whose `id` is exactly this value. Primary key of the number range.\n * @param {string} params.code - Look a range up by its code — 'order', 'delivery', 'return', or whatever a settings key points at. Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} params.prefix - Filter to rows whose `prefix` is exactly this value. Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default.\n * @param {string} params.suffix - Filter to rows whose `suffix` is exactly this value. 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.\n * @param {number} params.padding - Filter to rows whose `padding` is exactly this value. How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn.\n * @param {number} params.counter - Filter to rows whose `counter` is exactly this value. The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409).\n * @param {number} params.step - Filter to rows whose `step` is exactly this value. 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.\n * @param {number} params.positionStep - Filter to rows whose `position_step` is exactly this value. The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only.\n * @param {string} params.channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range was created.\n * @param {string} params.updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range last changed — which includes every single number draw, because a draw writes the counter.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n ordersNumberRangesList(params?: { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * The counters this tenant numbers its orders, delivery notes and returns from — what an operator sees on the Number ranges settings page, and what a migration reads to check the prefixes and the padding before it imports anything. Every parameter below is an exact-match filter on the column it names (?code=order finds the order counter). Two things are not: a key that names NO column is dropped silently — the call answers 200 with the unfiltered page, so compare the 'filter' echo against what you sent — and the jsonb column 'metadata' is honoured by the router but refused by the database (400 invalid_value) unless the value is a whole JSON document, which is why it is not offered here. It does not draw a number: `counter` is the last number DRAWN, and only placing an order, a shipment or a return moves it.\n *\n * @param {string} id - Filter to rows whose `id` is exactly this value. Primary key of the number range.\n * @param {string} code - Look a range up by its code — 'order', 'delivery', 'return', or whatever a settings key points at. Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} prefix - Filter to rows whose `prefix` is exactly this value. Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default.\n * @param {string} suffix - Filter to rows whose `suffix` is exactly this value. 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.\n * @param {number} padding - Filter to rows whose `padding` is exactly this value. How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn.\n * @param {number} counter - Filter to rows whose `counter` is exactly this value. The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409).\n * @param {number} step - Filter to rows whose `step` is exactly this value. 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.\n * @param {number} positionStep - Filter to rows whose `position_step` is exactly this value. The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only.\n * @param {string} channelId - Filter to rows whose `channel_id` is exactly this value. The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range was created.\n * @param {string} updatedAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the range last changed — which includes every single number draw, because a draw writes the counter.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesList(id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n ordersNumberRangesList(\n paramsOrFirst?: { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (number)?, (number)?, (string)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id?: string, code?: string, prefix?: string, suffix?: string, padding?: number, counter?: number, step?: number, positionStep?: number, channelId?: string, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n code: rest[0] as string,\n prefix: rest[1] as string,\n suffix: rest[2] as string,\n padding: rest[3] as number,\n counter: rest[4] as number,\n step: rest[5] as number,\n positionStep: rest[6] as number,\n channelId: rest[7] as string,\n createdAt: rest[8] as string,\n updatedAt: rest[9] as string,\n limit: rest[10] as number,\n offset: rest[11] as number,\n order: rest[12] as string \n };\n }\n \n const id = params.id;\n const code = params.code;\n const prefix = params.prefix;\n const suffix = params.suffix;\n const padding = params.padding;\n const counter = params.counter;\n const step = params.step;\n const positionStep = params.positionStep;\n const channelId = params.channelId;\n const createdAt = params.createdAt;\n const updatedAt = params.updatedAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n\n const apiPath = '/v1/orders/number-ranges';\n const apiPayload: Payload = {};\n if (typeof id !== 'undefined') {\n apiPayload['id'] = id;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof prefix !== 'undefined') {\n apiPayload['prefix'] = prefix;\n }\n if (typeof suffix !== 'undefined') {\n apiPayload['suffix'] = suffix;\n }\n if (typeof padding !== 'undefined') {\n apiPayload['padding'] = padding;\n }\n if (typeof counter !== 'undefined') {\n apiPayload['counter'] = counter;\n }\n if (typeof step !== 'undefined') {\n apiPayload['step'] = step;\n }\n if (typeof positionStep !== 'undefined') {\n apiPayload['position_step'] = positionStep;\n }\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof updatedAt !== 'undefined') {\n apiPayload['updated_at'] = updatedAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} params.channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {number} params.counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} params.metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} params.padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} params.positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} params.prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.NumberRange>}\n */\n ordersNumberRangesCreate(params: { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string }): Promise<Models.NumberRange>;\n /**\n * 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.\n *\n * @param {string} code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {string} channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {number} counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.NumberRange>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesCreate(code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.NumberRange>;\n ordersNumberRangesCreate(\n paramsOrFirst: { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string } | string,\n ...rest: [(string)?, (number)?, (object)?, (number)?, (number)?, (string)?, (number)?, (string)?] \n ): Promise<Models.NumberRange> {\n let params: { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { code: string, channelId?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n } else {\n params = {\n code: paramsOrFirst as string,\n channelId: rest[0] as string,\n counter: rest[1] as number,\n metadata: rest[2] as object,\n padding: rest[3] as number,\n positionStep: rest[4] as number,\n prefix: rest[5] as string,\n step: rest[6] as number,\n suffix: rest[7] as string \n };\n }\n \n const code = params.code;\n const channelId = params.channelId;\n const counter = params.counter;\n const metadata = params.metadata;\n const padding = params.padding;\n const positionStep = params.positionStep;\n const prefix = params.prefix;\n const step = params.step;\n const suffix = params.suffix;\n\n if (typeof code === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/v1/orders/number-ranges';\n const apiPayload: Payload = {};\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof counter !== 'undefined') {\n apiPayload['counter'] = counter;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof padding !== 'undefined') {\n apiPayload['padding'] = padding;\n }\n if (typeof positionStep !== 'undefined') {\n apiPayload['position_step'] = positionStep;\n }\n if (typeof prefix !== 'undefined') {\n apiPayload['prefix'] = prefix;\n }\n if (typeof step !== 'undefined') {\n apiPayload['step'] = step;\n }\n if (typeof suffix !== 'undefined') {\n apiPayload['suffix'] = suffix;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderNumberRangesSeeded>}\n */\n ordersNumberRangesDefaults(): Promise<Models.OrderNumberRangesSeeded> {\n\n const apiPath = '/v1/orders/number-ranges/defaults';\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderDeleted>}\n */\n ordersNumberRangesDelete(params: { id: string }): Promise<Models.OrderDeleted>;\n /**\n * 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.\n *\n * @param {string} id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderDeleted>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesDelete(id: string): Promise<Models.OrderDeleted>;\n ordersNumberRangesDelete(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.OrderDeleted> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/number-ranges/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.NumberRange>}\n */\n ordersNumberRangesGet(params: { id: string }): Promise<Models.NumberRange>;\n /**\n * 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.\n *\n * @param {string} id - The number range id (uuid).\n * @throws {RevenexxException}\n * @returns {Promise<Models.NumberRange>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesGet(id: string): Promise<Models.NumberRange>;\n ordersNumberRangesGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.NumberRange> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/number-ranges/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.id - The number range id (uuid).\n * @param {string} params.channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} params.code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {number} params.counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} params.metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} params.padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} params.positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} params.prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.NumberRange>}\n */\n ordersNumberRangesUpdate(params: { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string }): Promise<Models.NumberRange>;\n /**\n * 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.\n *\n * @param {string} id - The number range id (uuid).\n * @param {string} channelId - The sales channel this range was created for, as a label. It does NOT select the range: a draw finds the range by `code` alone, and the unique index (tenant, code) means one code is one range per tenant — so an order on another channel draws from the same range this one names. Null on the three seeded ranges, which is every tenant-wide range.\n * @param {string} code - Which counter this is, in the app's own words: 'order' numbers orders, 'delivery' numbers delivery notes, 'return' numbers returns. Unique per tenant, and the value the order_number_range_code / delivery_number_range_code / return_number_range_code settings point at — a setting naming a code no range carries is the 422 'number_range_missing'.\n * @param {number} counter - The last number DRAWN — state, not configuration. The next draw is counter + step and writes the new value back, so moving this forward skips numbers and moving it back re-issues them (and the unique index then answers 409). Defaults to 0, so the first number drawn is step.\n * @param {object} metadata - Free-form data for the caller. This app stores it and returns it, and reads nothing out of it.\n * @param {number} padding - How wide the counter is written, zero-padded: 6 makes 123 into 000123. 0 writes the bare number. Widening it later does not renumber what was already drawn. Defaults to 6.\n * @param {number} positionStep - The gap between the position numbers of a new order: 10 numbers the lines 10, 20, 30 — room to slot a line in between later without renumbering the rest. Read from the ORDER range only. Defaults to 10.\n * @param {string} prefix - Literal text in front of the counter: 'ORD-' turns counter 123 into ORD-000123. Empty by default. Defaults to ''.\n * @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.\n * @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 ''.\n * @throws {RevenexxException}\n * @returns {Promise<Models.NumberRange>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersNumberRangesUpdate(id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string): Promise<Models.NumberRange>;\n ordersNumberRangesUpdate(\n paramsOrFirst: { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string } | string,\n ...rest: [(string)?, (string)?, (number)?, (object)?, (number)?, (number)?, (string)?, (number)?, (string)?] \n ): Promise<Models.NumberRange> {\n let params: { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, channelId?: string, code?: string, counter?: number, metadata?: object, padding?: number, positionStep?: number, prefix?: string, step?: number, suffix?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n channelId: rest[0] as string,\n code: rest[1] as string,\n counter: rest[2] as number,\n metadata: rest[3] as object,\n padding: rest[4] as number,\n positionStep: rest[5] as number,\n prefix: rest[6] as string,\n step: rest[7] as number,\n suffix: rest[8] as string \n };\n }\n \n const id = params.id;\n const channelId = params.channelId;\n const code = params.code;\n const counter = params.counter;\n const metadata = params.metadata;\n const padding = params.padding;\n const positionStep = params.positionStep;\n const prefix = params.prefix;\n const step = params.step;\n const suffix = params.suffix;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/number-ranges/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof counter !== 'undefined') {\n apiPayload['counter'] = counter;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof padding !== 'undefined') {\n apiPayload['padding'] = padding;\n }\n if (typeof positionStep !== 'undefined') {\n apiPayload['position_step'] = positionStep;\n }\n if (typeof prefix !== 'undefined') {\n apiPayload['prefix'] = prefix;\n }\n if (typeof step !== 'undefined') {\n apiPayload['step'] = step;\n }\n if (typeof suffix !== 'undefined') {\n apiPayload['suffix'] = suffix;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {Models.OrderItemCreateRequest[]} params.items - The order positions — at least one, and at most the tenant's max_items_per_order (500 out of the box; a longer list is a 400 naming the limit).\n * @param {object} params.billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to.\n * @param {object} params.buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it.\n * @param {string} params.cartId - The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created. The carts.order hand-over sets it.\n * @param {string} params.channelId - The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} params.contactId - The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout. Ignored when the caller carries a principal — the RESOLVED contact wins, and a body value that disagrees is a 400 rather than a silent override.\n * @param {string} params.currency - ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting. Defaults to the market's default_currency setting.\n * @param {string} params.customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {number} params.grandTotal - Optional, and CHECKED rather than used: the order always computes its own total from the positions, the shipping cost and the tax. Send it as a checksum on that arithmetic — if it agrees the order is placed, and if it disagrees the call is refused with 400 naming both numbers, yours and the computed one. The comparison is at 2 decimal places (this app stores 4, ERPs work to 2, so a difference below a cent is agreement). It is never taken as the order value: the approval threshold and the revenue rollup read the computed number, which is why a total that disagrees is an error rather than an override.\n * @param {object} params.metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it.\n * @param {string} params.organizationId - The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it. A principal's own organization wins over this when it has one.\n * @param {object} params.payment - The payment arrangement as it was chosen, FROZEN. This app reads exactly two keys and stores the rest untouched: 'status' seeds payment_status at place-time when it names one of the permitted values (anything else is ignored and the order starts 'open'), and 'payment_id' is merged in by POST /orders/{id}/payment-status. The method itself, its provider fields and any redirect state belong to the payments app.\n * @param {object} params.shipping - The shipping arrangement as it was chosen, FROZEN. Two keys are READ at place-time and feed the totals: 'price' becomes shipping_total (the shipping_total field is only the fallback when this is absent) and 'tax_rate' is what shipping is taxed at, because shipping is a Nebenleistung and is taxed too. Everything else — the carrier product, the delivery window, the pickup point — is stored untouched and belongs to the shipping app.\n * @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).\n * @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'.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderPlaced>}\n */\n ordersPlace(params: { 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>;\n /**\n * 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.\n *\n * @param {Models.OrderItemCreateRequest[]} items - The order positions — at least one, and at most the tenant's max_items_per_order (500 out of the box; a longer list is a 400 naming the limit).\n * @param {object} billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to.\n * @param {object} buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it.\n * @param {string} cartId - The cart this order was placed from, when a storefront handed one over. A reference across an app boundary (the carts app), not a foreign key — nothing here checks that it resolves. Null for an order an integration or an operator created. The carts.order hand-over sets it.\n * @param {string} channelId - The sales channel the order arrived through — webshop, app, phone desk, EDI. Null when the caller named none.\n * @param {string} contactId - The PERSON who ordered — a contact in the customers app. Resolved from the acting principal whenever the caller carries one, and a body value that disagrees is refused rather than silently overridden. Null for a guest checkout. Ignored when the caller carries a principal — the RESOLVED contact wins, and a body value that disagrees is a 400 rather than a silent override.\n * @param {string} currency - ISO 4217 code of EVERY amount on this order. Frozen at place-time from the market's default_currency unless the caller named one. Nothing on this order is ever converted, and the approval threshold is read in this currency — which is why the threshold is a per-market setting. Defaults to the market's default_currency setting.\n * @param {string} customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {number} grandTotal - Optional, and CHECKED rather than used: the order always computes its own total from the positions, the shipping cost and the tax. Send it as a checksum on that arithmetic — if it agrees the order is placed, and if it disagrees the call is refused with 400 naming both numbers, yours and the computed one. The comparison is at 2 decimal places (this app stores 4, ERPs work to 2, so a difference below a cent is agreement). It is never taken as the order value: the approval threshold and the revenue rollup read the computed number, which is why a total that disagrees is an error rather than an override.\n * @param {object} metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it.\n * @param {string} organizationId - The COMPANY the order is booked on — an organization in the customers app, and the B2B half of who ordered. This is what orders.reports.customer-rollup aggregates by and what makes an order visible to a buyer's colleagues. Null on a private or guest order, which the rollup counts separately because it cannot attribute it. A principal's own organization wins over this when it has one.\n * @param {object} payment - The payment arrangement as it was chosen, FROZEN. This app reads exactly two keys and stores the rest untouched: 'status' seeds payment_status at place-time when it names one of the permitted values (anything else is ignored and the order starts 'open'), and 'payment_id' is merged in by POST /orders/{id}/payment-status. The method itself, its provider fields and any redirect state belong to the payments app.\n * @param {object} shipping - The shipping arrangement as it was chosen, FROZEN. Two keys are READ at place-time and feed the totals: 'price' becomes shipping_total (the shipping_total field is only the fallback when this is absent) and 'tax_rate' is what shipping is taxed at, because shipping is a Nebenleistung and is taxed too. Everything else — the carrier product, the delivery window, the pickup point — is stored untouched and belongs to the shipping app.\n * @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).\n * @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'.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderPlaced>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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>;\n ordersPlace(\n paramsOrFirst: { 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 } | Models.OrderItemCreateRequest[],\n ...rest: [(object)?, (object)?, (string)?, (string)?, (string)?, (string)?, (string)?, (number)?, (object)?, (string)?, (object)?, (object)?, (object)?, (number)?, (object)?] \n ): Promise<Models.OrderPlaced> {\n let params: { 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 };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('items' in paramsOrFirst || 'billingAddress' in paramsOrFirst || 'buyer' in paramsOrFirst || 'cartId' in paramsOrFirst || 'channelId' in paramsOrFirst || 'contactId' in paramsOrFirst || 'currency' in paramsOrFirst || 'customerOrderNumber' in paramsOrFirst || 'grandTotal' in paramsOrFirst || 'metadata' in paramsOrFirst || 'organizationId' in paramsOrFirst || 'payment' in paramsOrFirst || 'shipping' in paramsOrFirst || 'shippingAddress' in paramsOrFirst || 'shippingTotal' in paramsOrFirst || 'userData' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { 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 };\n } else {\n params = {\n items: paramsOrFirst as Models.OrderItemCreateRequest[],\n billingAddress: rest[0] as object,\n buyer: rest[1] as object,\n cartId: rest[2] as string,\n channelId: rest[3] as string,\n contactId: rest[4] as string,\n currency: rest[5] as string,\n customerOrderNumber: rest[6] as string,\n grandTotal: rest[7] as number,\n metadata: rest[8] as object,\n organizationId: rest[9] as string,\n payment: rest[10] as object,\n shipping: rest[11] as object,\n shippingAddress: rest[12] as object,\n shippingTotal: rest[13] as number,\n userData: rest[14] as object \n };\n }\n \n const items = params.items;\n const billingAddress = params.billingAddress;\n const buyer = params.buyer;\n const cartId = params.cartId;\n const channelId = params.channelId;\n const contactId = params.contactId;\n const currency = params.currency;\n const customerOrderNumber = params.customerOrderNumber;\n const grandTotal = params.grandTotal;\n const metadata = params.metadata;\n const organizationId = params.organizationId;\n const payment = params.payment;\n const shipping = params.shipping;\n const shippingAddress = params.shippingAddress;\n const shippingTotal = params.shippingTotal;\n const userData = params.userData;\n\n if (typeof items === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"items\"');\n }\n\n const apiPath = '/v1/orders/place';\n const apiPayload: Payload = {};\n if (typeof billingAddress !== 'undefined') {\n apiPayload['billing_address'] = billingAddress;\n }\n if (typeof buyer !== 'undefined') {\n apiPayload['buyer'] = buyer;\n }\n if (typeof cartId !== 'undefined') {\n apiPayload['cart_id'] = cartId;\n }\n if (typeof channelId !== 'undefined') {\n apiPayload['channel_id'] = channelId;\n }\n if (typeof contactId !== 'undefined') {\n apiPayload['contact_id'] = contactId;\n }\n if (typeof currency !== 'undefined') {\n apiPayload['currency'] = currency;\n }\n if (typeof customerOrderNumber !== 'undefined') {\n apiPayload['customer_order_number'] = customerOrderNumber;\n }\n if (typeof grandTotal !== 'undefined') {\n apiPayload['grand_total'] = grandTotal;\n }\n if (typeof items !== 'undefined') {\n apiPayload['items'] = items;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof organizationId !== 'undefined') {\n apiPayload['organization_id'] = organizationId;\n }\n if (typeof payment !== 'undefined') {\n apiPayload['payment'] = payment;\n }\n if (typeof shipping !== 'undefined') {\n apiPayload['shipping'] = shipping;\n }\n if (typeof shippingAddress !== 'undefined') {\n apiPayload['shipping_address'] = shippingAddress;\n }\n if (typeof shippingTotal !== 'undefined') {\n apiPayload['shipping_total'] = shippingTotal;\n }\n if (typeof userData !== 'undefined') {\n apiPayload['user_data'] = userData;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.asOf - Anchor for the rolling windows (default now). Pin it and send it back on every call of a loop, otherwise the windows drift by the duration of the loop.\n * @param {string} params.cursor - Continue an unfinished scan: the exact value the previous call returned, which is the id of the last order it read. Do not construct one — it is a resume point, not an offset. Omit it on the first call. It is honoured in BOTH call shapes, organization_ids included: send the whole batch again alongside it whenever `done` came back false, or the part of the batch after the cursor is simply never read.\n * @param {string[]} params.organizationIds - Roll up exactly these organizations and no others — at most 200, because the ids travel to the data plane as one in.() filter. Naming them does NOT make the answer complete by itself: the scan is the same paged, time-budgeted loop either way, so a batch with more orders than one page can still stop early with `done: false` and a cursor. Small batches finish in one call, which is the normal case, but check `done` rather than assume it. Omitted = scan every order and answer for every organization that appears on one.\n * @param {OrderStatus[]} params.statuses - Which lifecycle statuses count as revenue. Defaults to placed, in_fulfillment and completed: a pending order was never placed, and a cancelled one is not revenue. Widening this is how a merchant who books on approval gets their own definition of the same numbers.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderCustomerRollupResponse>}\n */\n ordersReportsCustomerRollup(params?: { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] }): Promise<Models.OrderCustomerRollupResponse>;\n /**\n * 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.\n *\n * @param {string} asOf - Anchor for the rolling windows (default now). Pin it and send it back on every call of a loop, otherwise the windows drift by the duration of the loop.\n * @param {string} cursor - Continue an unfinished scan: the exact value the previous call returned, which is the id of the last order it read. Do not construct one — it is a resume point, not an offset. Omit it on the first call. It is honoured in BOTH call shapes, organization_ids included: send the whole batch again alongside it whenever `done` came back false, or the part of the batch after the cursor is simply never read.\n * @param {string[]} organizationIds - Roll up exactly these organizations and no others — at most 200, because the ids travel to the data plane as one in.() filter. Naming them does NOT make the answer complete by itself: the scan is the same paged, time-budgeted loop either way, so a batch with more orders than one page can still stop early with `done: false` and a cursor. Small batches finish in one call, which is the normal case, but check `done` rather than assume it. Omitted = scan every order and answer for every organization that appears on one.\n * @param {OrderStatus[]} statuses - Which lifecycle statuses count as revenue. Defaults to placed, in_fulfillment and completed: a pending order was never placed, and a cancelled one is not revenue. Widening this is how a merchant who books on approval gets their own definition of the same numbers.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderCustomerRollupResponse>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReportsCustomerRollup(asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[]): Promise<Models.OrderCustomerRollupResponse>;\n ordersReportsCustomerRollup(\n paramsOrFirst?: { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] } | string,\n ...rest: [(string)?, (string[])?, (OrderStatus[])?] \n ): Promise<Models.OrderCustomerRollupResponse> {\n let params: { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { asOf?: string, cursor?: string, organizationIds?: string[], statuses?: OrderStatus[] };\n } else {\n params = {\n asOf: paramsOrFirst as string,\n cursor: rest[0] as string,\n organizationIds: rest[1] as string[],\n statuses: rest[2] as OrderStatus[] \n };\n }\n \n const asOf = params.asOf;\n const cursor = params.cursor;\n const organizationIds = params.organizationIds;\n const statuses = params.statuses;\n\n\n const apiPath = '/v1/orders/reports/customer-rollup';\n const apiPayload: Payload = {};\n if (typeof asOf !== 'undefined') {\n apiPayload['as_of'] = asOf;\n }\n if (typeof cursor !== 'undefined') {\n apiPayload['cursor'] = cursor;\n }\n if (typeof organizationIds !== 'undefined') {\n apiPayload['organization_ids'] = organizationIds;\n }\n if (typeof statuses !== 'undefined') {\n apiPayload['statuses'] = statuses;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * Which value sets this app will describe for you, by name — order statuses, payment statuses, fulfillment statuses, item types, return statuses and return resolutions — so a client can discover them instead of shipping its own copy of five statuses that goes stale one release later. The values themselves are deliberately NOT here: this is the index, and each set is fetched on its own. Discovery for the vocabulary routes. Names: cancellation-scopes, comment-visibilities, fulfillment-statuses, item-types, payment-statuses, return-resolutions, return-statuses, statuses. Fetch one with GET /orders/vocabularies/{name}; a client holding the qualified pair 'orders.<name>' builds that URL from the pair alone. 'title' and 'description' are locale maps wherever somebody wrote the copy and plain strings where the fallback did — read both forms.\n *\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderVocabularyIndex>}\n */\n ordersVocabulariesList(): Promise<Models.OrderVocabularyIndex> {\n\n const apiPath = '/v1/orders/vocabularies';\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @param {OrdersVocabulariesGetName} params.name - The vocabulary name — the part after the dot in the qualified id.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderVocabulary>}\n */\n ordersVocabulariesGet(params: { name: OrdersVocabulariesGetName }): Promise<Models.OrderVocabulary>;\n /**\n * 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.\n *\n * @param {OrdersVocabulariesGetName} name - The vocabulary name — the part after the dot in the qualified id.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderVocabulary>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersVocabulariesGet(name: OrdersVocabulariesGetName): Promise<Models.OrderVocabulary>;\n ordersVocabulariesGet(\n paramsOrFirst: { name: OrdersVocabulariesGetName } | OrdersVocabulariesGetName \n ): Promise<Models.OrderVocabulary> {\n let params: { name: OrdersVocabulariesGetName };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('name' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name: OrdersVocabulariesGetName };\n } else {\n params = {\n name: paramsOrFirst as OrdersVocabulariesGetName \n };\n }\n \n const name = params.name;\n\n if (typeof name === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/v1/orders/vocabularies/{name}'.replace('{name}', name);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderDetail>}\n */\n ordersGet(params: { id: string }): Promise<Models.OrderDetail>;\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderDetail>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersGet(id: string): Promise<Models.OrderDetail>;\n ordersGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.OrderDetail> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {object} params.billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to. Replaced wholesale — send the whole address, not a patch of it.\n * @param {object} params.buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it. Replaced wholesale — send the whole snapshot, not a patch of it.\n * @param {string} params.customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {object} params.metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it. Replaced wholesale.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersUpdate(params: { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object }): Promise<Models.Order>;\n /**\n * 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.\n *\n * @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.\n * @param {object} billingAddress - The invoice address, FROZEN at place-time. Changing the customer's address afterwards does not change what this order was billed to. Replaced wholesale — send the whole address, not a patch of it.\n * @param {object} buyer - The ordering party as it was at place-time, FROZEN: a copy, not a reference, so the order still reads correctly after the customer record is renamed, merged or deleted. The caller decides what goes in; this app stores it and reads nothing out of it. Replaced wholesale — send the whole snapshot, not a patch of it.\n * @param {string} customerOrderNumber - The BUYER's own reference — their purchase-order number. Free text, not unique, never generated here: it exists so the paperwork can carry the number the buyer's accounts payable will look for. One of the few fields PUT /orders/{id} may still change.\n * @param {object} metadata - Free-form data belonging to the INTEGRATION side — an ERP's own bookkeeping about this order. Stored and returned untouched; nothing here reads it. Replaced wholesale.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersUpdate(id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object): Promise<Models.Order>;\n ordersUpdate(\n paramsOrFirst: { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object } | string,\n ...rest: [(object)?, (object)?, (string)?, (object)?, (object)?, (object)?] \n ): Promise<Models.Order> {\n let params: { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, billingAddress?: object, buyer?: object, customerOrderNumber?: string, metadata?: object, shippingAddress?: object, userData?: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n billingAddress: rest[0] as object,\n buyer: rest[1] as object,\n customerOrderNumber: rest[2] as string,\n metadata: rest[3] as object,\n shippingAddress: rest[4] as object,\n userData: rest[5] as object \n };\n }\n \n const id = params.id;\n const billingAddress = params.billingAddress;\n const buyer = params.buyer;\n const customerOrderNumber = params.customerOrderNumber;\n const metadata = params.metadata;\n const shippingAddress = params.shippingAddress;\n const userData = params.userData;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof billingAddress !== 'undefined') {\n apiPayload['billing_address'] = billingAddress;\n }\n if (typeof buyer !== 'undefined') {\n apiPayload['buyer'] = buyer;\n }\n if (typeof customerOrderNumber !== 'undefined') {\n apiPayload['customer_order_number'] = customerOrderNumber;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof shippingAddress !== 'undefined') {\n apiPayload['shipping_address'] = shippingAddress;\n }\n if (typeof userData !== 'undefined') {\n apiPayload['user_data'] = userData;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersAcknowledge(params: { id: string, externalRef?: string }): Promise<Models.Order>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersAcknowledge(id: string, externalRef?: string): Promise<Models.Order>;\n ordersAcknowledge(\n paramsOrFirst: { id: string, externalRef?: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Order> {\n let params: { id: string, externalRef?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, externalRef?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n externalRef: rest[0] as string \n };\n }\n \n const id = params.id;\n const externalRef = params.externalRef;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/acknowledge'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof externalRef !== 'undefined') {\n apiPayload['external_ref'] = externalRef;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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').\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersCancel(params: { id: string, cancelledBy?: string, reason?: string }): Promise<Models.Order>;\n /**\n * 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').\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersCancel(id: string, cancelledBy?: string, reason?: string): Promise<Models.Order>;\n ordersCancel(\n paramsOrFirst: { id: string, cancelledBy?: string, reason?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<Models.Order> {\n let params: { id: string, cancelledBy?: string, reason?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, cancelledBy?: string, reason?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n cancelledBy: rest[0] as string,\n reason: rest[1] as string \n };\n }\n \n const id = params.id;\n const cancelledBy = params.cancelledBy;\n const reason = params.reason;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/cancel'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof cancelledBy !== 'undefined') {\n apiPayload['cancelled_by'] = cancelledBy;\n }\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.idQuery - Filter to rows whose `id` is exactly this value. Primary key of the comment.\n * @param {string} params.body - Filter to rows whose `body` is exactly this value. The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {OrderCommentVisibility} params.visibility - Filter to internal notes or to the customer-visible ones. `visibility=customer` is what a customer order view should read. 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.\n * @param {string} params.author - Filter by exact author, as it was reported. Free text — this is not resolved against a user directory, so it matches only what was written. Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the comment was written. Comments come back oldest first.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n ordersCommentsList(params: { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * 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.\n *\n * @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.\n * @param {string} idQuery - Filter to rows whose `id` is exactly this value. Primary key of the comment.\n * @param {string} body - Filter to rows whose `body` is exactly this value. The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {OrderCommentVisibility} visibility - Filter to internal notes or to the customer-visible ones. `visibility=customer` is what a customer order view should read. 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.\n * @param {string} author - Filter by exact author, as it was reported. Free text — this is not resolved against a user directory, so it matches only what was written. Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When the comment was written. Comments come back oldest first.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersCommentsList(id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n ordersCommentsList(\n paramsOrFirst: { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (OrderCommentVisibility)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, idQuery?: string, body?: string, visibility?: OrderCommentVisibility, author?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n idQuery: rest[0] as string,\n body: rest[1] as string,\n visibility: rest[2] as OrderCommentVisibility,\n author: rest[3] as string,\n createdAt: rest[4] as string,\n limit: rest[5] as number,\n offset: rest[6] as number,\n order: rest[7] as string \n };\n }\n \n const id = params.id;\n const idQuery = params.idQuery;\n const body = params.body;\n const visibility = params.visibility;\n const author = params.author;\n const createdAt = params.createdAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/comments'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof idQuery !== 'undefined') {\n apiPayload['id'] = idQuery;\n }\n if (typeof body !== 'undefined') {\n apiPayload['body'] = body;\n }\n if (typeof visibility !== 'undefined') {\n apiPayload['visibility'] = visibility;\n }\n if (typeof author !== 'undefined') {\n apiPayload['author'] = author;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.body - The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {string} params.author - Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderComment>}\n */\n ordersCommentsCreate(params: { id: string, body: string, author?: string, visibility?: OrderCommentVisibility }): Promise<Models.OrderComment>;\n /**\n * 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.\n *\n * @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.\n * @param {string} body - The comment itself. Plain text; this app neither renders nor sanitizes it.\n * @param {string} author - Who wrote it, as the caller reported it. Free text; not resolved against a user directory.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderComment>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersCommentsCreate(id: string, body: string, author?: string, visibility?: OrderCommentVisibility): Promise<Models.OrderComment>;\n ordersCommentsCreate(\n paramsOrFirst: { id: string, body: string, author?: string, visibility?: OrderCommentVisibility } | string,\n ...rest: [(string)?, (string)?, (OrderCommentVisibility)?] \n ): Promise<Models.OrderComment> {\n let params: { id: string, body: string, author?: string, visibility?: OrderCommentVisibility };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, body: string, author?: string, visibility?: OrderCommentVisibility };\n } else {\n params = {\n id: paramsOrFirst as string,\n body: rest[0] as string,\n author: rest[1] as string,\n visibility: rest[2] as OrderCommentVisibility \n };\n }\n \n const id = params.id;\n const body = params.body;\n const author = params.author;\n const visibility = params.visibility;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof body === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"body\"');\n }\n\n const apiPath = '/v1/orders/{id}/comments'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof author !== 'undefined') {\n apiPayload['author'] = author;\n }\n if (typeof body !== 'undefined') {\n apiPayload['body'] = body;\n }\n if (typeof visibility !== 'undefined') {\n apiPayload['visibility'] = visibility;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersComplete(params: { id: string, completedBy?: string }): Promise<Models.Order>;\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersComplete(id: string, completedBy?: string): Promise<Models.Order>;\n ordersComplete(\n paramsOrFirst: { id: string, completedBy?: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Order> {\n let params: { id: string, completedBy?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, completedBy?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n completedBy: rest[0] as string \n };\n }\n \n const id = params.id;\n const completedBy = params.completedBy;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/complete'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof completedBy !== 'undefined') {\n apiPayload['completed_by'] = completedBy;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.idQuery - Filter to rows whose `id` is exactly this value. Primary key of the event row.\n * @param {string} params.name - Filter the trail to one kind of event — `order.shipment.created` for the dispatch history, `order.return.completed` for the settled returns. WHAT happened, and this is the domain event: the manifest emits order_event.created on insert and this value is the event name on the bus. The names this app writes are order.placed, order.requested, order.updated, order.acknowledged, order.cancelled, order.item.cancelled, order.shipment.created, order.completed, order.held, order.unheld, order.payment_status.changed, order.comment.added, order.return.registered, order.return.received, order.return.completed and order.return.rejected.\n * @param {string} params.actor - Filter to the events one principal caused. Only order.placed and order.requested carry an actor, so this filters to those two names by construction. Who caused it: the resolved contact id of the acting principal. Only order.placed and order.requested carry one today — every other row is null — so filtering on it filters to those two names. The database constrains nothing here (the column is text); the uuid shape is what this app WRITES, which is also why no example is published: no id an app invents names a row a tenant holds.\n * @param {string} params.createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When it happened. The trail comes back oldest first, which is the order a human reads a history in.\n * @param {number} params.limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n ordersEventsList(params: { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * 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.\n *\n * @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.\n * @param {string} idQuery - Filter to rows whose `id` is exactly this value. Primary key of the event row.\n * @param {string} name - Filter the trail to one kind of event — `order.shipment.created` for the dispatch history, `order.return.completed` for the settled returns. WHAT happened, and this is the domain event: the manifest emits order_event.created on insert and this value is the event name on the bus. The names this app writes are order.placed, order.requested, order.updated, order.acknowledged, order.cancelled, order.item.cancelled, order.shipment.created, order.completed, order.held, order.unheld, order.payment_status.changed, order.comment.added, order.return.registered, order.return.received, order.return.completed and order.return.rejected.\n * @param {string} actor - Filter to the events one principal caused. Only order.placed and order.requested carry an actor, so this filters to those two names by construction. Who caused it: the resolved contact id of the acting principal. Only order.placed and order.requested carry one today — every other row is null — so filtering on it filters to those two names. The database constrains nothing here (the column is text); the uuid shape is what this app WRITES, which is also why no example is published: no id an app invents names a row a tenant holds.\n * @param {string} createdAt - Exact timestamp equality — this API has no range filter. To bound a period, sort with `order` and page. When it happened. The trail comes back oldest first, which is the order a human reads a history in.\n * @param {number} limit - Page size (default 50, max 200). A larger value is clamped to 200 rather than refused.\n * @param {number} offset - Row offset for pagination (default 0).\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersEventsList(id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n ordersEventsList(\n paramsOrFirst: { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (string)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, idQuery?: string, name?: string, actor?: string, createdAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n idQuery: rest[0] as string,\n name: rest[1] as string,\n actor: rest[2] as string,\n createdAt: rest[3] as string,\n limit: rest[4] as number,\n offset: rest[5] as number,\n order: rest[6] as string \n };\n }\n \n const id = params.id;\n const idQuery = params.idQuery;\n const name = params.name;\n const actor = params.actor;\n const createdAt = params.createdAt;\n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/events'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof idQuery !== 'undefined') {\n apiPayload['id'] = idQuery;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof actor !== 'undefined') {\n apiPayload['actor'] = actor;\n }\n if (typeof createdAt !== 'undefined') {\n apiPayload['created_at'] = createdAt;\n }\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersHold(params: { id: string, reason?: string }): Promise<Models.Order>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersHold(id: string, reason?: string): Promise<Models.Order>;\n ordersHold(\n paramsOrFirst: { id: string, reason?: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Order> {\n let params: { id: string, reason?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, reason?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n reason: rest[0] as string \n };\n }\n \n const id = params.id;\n const reason = params.reason;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/hold'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {Models.OrderCancelPosition[]} params.positions - The quantities to take off the order. Required here, unlike on /ship and /return: cancelling everything by default is not a thing anybody should be able to do by omission — that is what /cancel is for.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersItemsCancel(params: { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string }): Promise<Models.Order>;\n /**\n * 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.\n *\n * @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.\n * @param {Models.OrderCancelPosition[]} positions - The quantities to take off the order. Required here, unlike on /ship and /return: cancelling everything by default is not a thing anybody should be able to do by omission — that is what /cancel is for.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersItemsCancel(id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string): Promise<Models.Order>;\n ordersItemsCancel(\n paramsOrFirst: { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string } | string,\n ...rest: [(Models.OrderCancelPosition[])?, (string)?, (string)?] \n ): Promise<Models.Order> {\n let params: { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, positions: Models.OrderCancelPosition[], cancelledBy?: string, reason?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n positions: rest[0] as Models.OrderCancelPosition[],\n cancelledBy: rest[1] as string,\n reason: rest[2] as string \n };\n }\n \n const id = params.id;\n const positions = params.positions;\n const cancelledBy = params.cancelledBy;\n const reason = params.reason;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof positions === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"positions\"');\n }\n\n const apiPath = '/v1/orders/{id}/items/cancel'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof cancelledBy !== 'undefined') {\n apiPayload['cancelled_by'] = cancelledBy;\n }\n if (typeof positions !== 'undefined') {\n apiPayload['positions'] = positions;\n }\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersPaymentStatusUpdate(params: { id: string, status: OrderPaymentStatus, paymentId?: string }): Promise<Models.Order>;\n /**\n * 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'.\n *\n * @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.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersPaymentStatusUpdate(id: string, status: OrderPaymentStatus, paymentId?: string): Promise<Models.Order>;\n ordersPaymentStatusUpdate(\n paramsOrFirst: { id: string, status: OrderPaymentStatus, paymentId?: string } | string,\n ...rest: [(OrderPaymentStatus)?, (string)?] \n ): Promise<Models.Order> {\n let params: { id: string, status: OrderPaymentStatus, paymentId?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, status: OrderPaymentStatus, paymentId?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n status: rest[0] as OrderPaymentStatus,\n paymentId: rest[1] as string \n };\n }\n \n const id = params.id;\n const status = params.status;\n const paymentId = params.paymentId;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof status === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"status\"');\n }\n\n const apiPath = '/v1/orders/{id}/payment-status'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof paymentId !== 'undefined') {\n apiPayload['payment_id'] = paymentId;\n }\n if (typeof status !== 'undefined') {\n apiPayload['status'] = status;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {object} params.metadata - Free-form data for the caller — the returns portal's own reference. Stored and returned untouched.\n * @param {Models.OrderReturnPosition[]} params.positions - What is coming back. Omitted = every position with a returnable (shipped, not yet returned) quantity, in full.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturn>}\n */\n ordersReturn(params: { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean }): Promise<Models.OrderReturn>;\n /**\n * 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.\n *\n * @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.\n * @param {object} metadata - Free-form data for the caller — the returns portal's own reference. Stored and returned untouched.\n * @param {Models.OrderReturnPosition[]} positions - What is coming back. Omitted = every position with a returnable (shipped, not yet returned) quantity, in full.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturn>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturn(id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean): Promise<Models.OrderReturn>;\n ordersReturn(\n paramsOrFirst: { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean } | string,\n ...rest: [(object)?, (Models.OrderReturnPosition[])?, (string)?, (boolean)?] \n ): Promise<Models.OrderReturn> {\n let params: { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, metadata?: object, positions?: Models.OrderReturnPosition[], reason?: string, restock?: boolean };\n } else {\n params = {\n id: paramsOrFirst as string,\n metadata: rest[0] as object,\n positions: rest[1] as Models.OrderReturnPosition[],\n reason: rest[2] as string,\n restock: rest[3] as boolean \n };\n }\n \n const id = params.id;\n const metadata = params.metadata;\n const positions = params.positions;\n const reason = params.reason;\n const restock = params.restock;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/return'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof positions !== 'undefined') {\n apiPayload['positions'] = positions;\n }\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n if (typeof restock !== 'undefined') {\n apiPayload['restock'] = restock;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {OrderReturnSettlement} params.resolution - How the return was settled. Omitted = settled without recording how.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturnCompleted>}\n */\n ordersReturnsComplete(params: { id: string, rid: string, resolution?: OrderReturnSettlement }): Promise<Models.OrderReturnCompleted>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {OrderReturnSettlement} resolution - How the return was settled. Omitted = settled without recording how.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturnCompleted>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturnsComplete(id: string, rid: string, resolution?: OrderReturnSettlement): Promise<Models.OrderReturnCompleted>;\n ordersReturnsComplete(\n paramsOrFirst: { id: string, rid: string, resolution?: OrderReturnSettlement } | string,\n ...rest: [(string)?, (OrderReturnSettlement)?] \n ): Promise<Models.OrderReturnCompleted> {\n let params: { id: string, rid: string, resolution?: OrderReturnSettlement };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, rid: string, resolution?: OrderReturnSettlement };\n } else {\n params = {\n id: paramsOrFirst as string,\n rid: rest[0] as string,\n resolution: rest[1] as OrderReturnSettlement \n };\n }\n \n const id = params.id;\n const rid = params.rid;\n const resolution = params.resolution;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof rid === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"rid\"');\n }\n\n const apiPath = '/v1/orders/{id}/returns/{rid}/complete'.replace('{id}', id).replace('{rid}', rid);\n const apiPayload: Payload = {};\n if (typeof resolution !== 'undefined') {\n apiPayload['resolution'] = resolution;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {object} params.data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturn>}\n */\n ordersReturnsReceive(params: { id: string, rid: string, data: object }): Promise<Models.OrderReturn>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {object} data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturn>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturnsReceive(id: string, rid: string, data: object): Promise<Models.OrderReturn>;\n ordersReturnsReceive(\n paramsOrFirst: { id: string, rid: string, data: object } | string,\n ...rest: [(string)?, (object)?] \n ): Promise<Models.OrderReturn> {\n let params: { id: string, rid: string, data: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, rid: string, data: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n rid: rest[0] as string,\n data: rest[1] as object \n };\n }\n \n const id = params.id;\n const rid = params.rid;\n const data = params.data;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof rid === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"rid\"');\n }\n if (typeof data === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"data\"');\n }\n\n const apiPath = '/v1/orders/{id}/returns/{rid}/receive'.replace('{id}', id).replace('{rid}', rid);\n const apiPayload: Payload = {};\n if (typeof data !== 'undefined') {\n Object.assign(apiPayload, data);\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {string} params.reason - Free-text fallback for 'resolution' — a sentence about this one return, not a value out of the set.\n * @param {OrderReturnRefusal} params.resolution - Why the return was refused.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturn>}\n */\n ordersReturnsReject(params: { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal }): Promise<Models.OrderReturn>;\n /**\n * 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.\n *\n * @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.\n * @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.\n * @param {string} reason - Free-text fallback for 'resolution' — a sentence about this one return, not a value out of the set.\n * @param {OrderReturnRefusal} resolution - Why the return was refused.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderReturn>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersReturnsReject(id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal): Promise<Models.OrderReturn>;\n ordersReturnsReject(\n paramsOrFirst: { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal } | string,\n ...rest: [(string)?, (string)?, (OrderReturnRefusal)?] \n ): Promise<Models.OrderReturn> {\n let params: { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, rid: string, reason?: string, resolution?: OrderReturnRefusal };\n } else {\n params = {\n id: paramsOrFirst as string,\n rid: rest[0] as string,\n reason: rest[1] as string,\n resolution: rest[2] as OrderReturnRefusal \n };\n }\n \n const id = params.id;\n const rid = params.rid;\n const reason = params.reason;\n const resolution = params.resolution;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof rid === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"rid\"');\n }\n\n const apiPath = '/v1/orders/{id}/returns/{rid}/reject'.replace('{id}', id).replace('{rid}', rid);\n const apiPayload: Payload = {};\n if (typeof reason !== 'undefined') {\n apiPayload['reason'] = reason;\n }\n if (typeof resolution !== 'undefined') {\n apiPayload['resolution'] = resolution;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.carrier - Who is carrying it, in the merchant's own words. Free text — this app neither validates it nor knows the carrier's API.\n * @param {object} params.metadata - Free-form data for the caller — the warehouse system's own reference for this handover. Stored and returned untouched.\n * @param {string} params.number - The DELIVERY NOTE number — drawn from the tenant's delivery range, unique per tenant, and a different series from the order number. A caller may supply its own when the number is issued by the warehouse system instead. Drawn from the 'delivery' range when omitted; supply one only when the number is issued elsewhere.\n * @param {Models.OrderShipmentPosition[]} params.positions - What this shipment carries. Omitted = every position with an open quantity, in full. GET /orders/{id}/shippable answers exactly the budget each one is guarded against.\n * @param {string} params.shippedAt - When the goods actually left. Defaults to now, and a caller may backdate it — a shipment booked on Monday for a Friday handover says Friday.\n * @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.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderShipmentCreated>}\n */\n ordersShip(params: { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string }): Promise<Models.OrderShipmentCreated>;\n /**\n * 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.\n *\n * @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.\n * @param {string} carrier - Who is carrying it, in the merchant's own words. Free text — this app neither validates it nor knows the carrier's API.\n * @param {object} metadata - Free-form data for the caller — the warehouse system's own reference for this handover. Stored and returned untouched.\n * @param {string} number - The DELIVERY NOTE number — drawn from the tenant's delivery range, unique per tenant, and a different series from the order number. A caller may supply its own when the number is issued by the warehouse system instead. Drawn from the 'delivery' range when omitted; supply one only when the number is issued elsewhere.\n * @param {Models.OrderShipmentPosition[]} positions - What this shipment carries. Omitted = every position with an open quantity, in full. GET /orders/{id}/shippable answers exactly the budget each one is guarded against.\n * @param {string} shippedAt - When the goods actually left. Defaults to now, and a caller may backdate it — a shipment booked on Monday for a Friday handover says Friday.\n * @param {string} trackingCode - The consignment number the carrier issued. Free text: every carrier formats it differently and this app stores whatever it is given.\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderShipmentCreated>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersShip(id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string): Promise<Models.OrderShipmentCreated>;\n ordersShip(\n paramsOrFirst: { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string } | string,\n ...rest: [(string)?, (object)?, (string)?, (Models.OrderShipmentPosition[])?, (string)?, (string)?, (string)?] \n ): Promise<Models.OrderShipmentCreated> {\n let params: { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, carrier?: string, metadata?: object, number?: string, positions?: Models.OrderShipmentPosition[], shippedAt?: string, trackingCode?: string, trackingUrl?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n carrier: rest[0] as string,\n metadata: rest[1] as object,\n number: rest[2] as string,\n positions: rest[3] as Models.OrderShipmentPosition[],\n shippedAt: rest[4] as string,\n trackingCode: rest[5] as string,\n trackingUrl: rest[6] as string \n };\n }\n \n const id = params.id;\n const carrier = params.carrier;\n const metadata = params.metadata;\n const number = params.number;\n const positions = params.positions;\n const shippedAt = params.shippedAt;\n const trackingCode = params.trackingCode;\n const trackingUrl = params.trackingUrl;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/ship'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof carrier !== 'undefined') {\n apiPayload['carrier'] = carrier;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof number !== 'undefined') {\n apiPayload['number'] = number;\n }\n if (typeof positions !== 'undefined') {\n apiPayload['positions'] = positions;\n }\n if (typeof shippedAt !== 'undefined') {\n apiPayload['shipped_at'] = shippedAt;\n }\n if (typeof trackingCode !== 'undefined') {\n apiPayload['tracking_code'] = trackingCode;\n }\n if (typeof trackingUrl !== 'undefined') {\n apiPayload['tracking_url'] = trackingUrl;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderShippable>}\n */\n ordersShippable(params: { id: string }): Promise<Models.OrderShippable>;\n /**\n * 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.\n *\n * @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.\n * @throws {RevenexxException}\n * @returns {Promise<Models.OrderShippable>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersShippable(id: string): Promise<Models.OrderShippable>;\n ordersShippable(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.OrderShippable> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/orders/{id}/shippable'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {object} params.data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n */\n ordersUnhold(params: { id: string, data: object }): Promise<Models.Order>;\n /**\n * 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.\n *\n * @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.\n * @param {object} data - Request body\n * @throws {RevenexxException}\n * @returns {Promise<Models.Order>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n ordersUnhold(id: string, data: object): Promise<Models.Order>;\n ordersUnhold(\n paramsOrFirst: { id: string, data: object } | string,\n ...rest: [(object)?] \n ): Promise<Models.Order> {\n let params: { id: string, data: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, data: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n data: rest[0] as object \n };\n }\n \n const id = params.id;\n const data = params.data;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n if (typeof data === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"data\"');\n }\n\n const apiPath = '/v1/orders/{id}/unhold'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof data !== 'undefined') {\n Object.assign(apiPayload, data);\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n}\n"]}