@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,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 { CartIoDirection } from '../enums/cart-io-direction';\nimport { CartIoEntity } from '../enums/cart-io-entity';\nimport { CartIoFormat } from '../enums/cart-io-format';\nimport { CartIoApplyMode } from '../enums/cart-io-apply-mode';\nimport { CartExportFormat } from '../enums/cart-export-format';\n\nexport class CartsIo {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Reads a payload of lines into a cart — the bulk-order path a buyer pastes a spreadsheet into. With `target_cart_id` the lines land in that cart, which must be active, and the profile's `apply_mode` decides what happens to the lines already there: 'replace' clears them first, 'insert' and 'append' both add. Without a target a new cart is created, and an OWNER is then required — `contact_id` or `session_key` — because a cart with neither cannot exist. `profile_id` names an IMPORT profile; without one the payload is read ad hoc, as CSV when `csv` is present and as JSON otherwise. The lines fold into identical product lines exactly as carts.items.create does, so `imported_lines` counts the lines READ and the cart may have gained fewer rows than that. A payload that parses to no line at all is a 400 rather than a quiet no-op.\n *\n * @param {string} params.contactId - Owner of the cart this import creates. Ignored when target_cart_id is sent.\n * @param {string} params.csv - The CSV rows, when that is easier than putting them in `payload`. First line is the header, and its names are the ones the profile's mapping expects (the bundled quick-order template reads sku, name, quantity, unit_price). Numbers are coerced; a JSON column survives as a JSON string.\n * @param {string} params.name - Name for the cart this import creates. A name in the payload's own `cart` block wins over it; without either the cart is called 'Imported cart'.\n * @param {object} params.payload - The import itself. As an object: `{ \"cart\": { name, status, currency, channel_id, metadata }, \"items\": [ … ] }` — the same document carts.export produces, so an export round-trips. As a string: that document as raw JSON, or CSV rows when the profile is a csv one. A line with neither `name` nor `sku` is dropped, and a payload that leaves no line at all is a 400.\n * @param {string} params.profileId - The import profile to run — one of the ids `GET /carts/io/profiles?direction=import` lists. Omit it for an ad-hoc import: the payload is then read in the canonical shape, and as CSV if `csv` is what carried it.\n * @param {string} params.sessionKey - Guest owner of the cart this import creates — the storefront's own session key. Ignored when target_cart_id is sent.\n * @param {string} params.targetCartId - An existing ACTIVE cart to import into. The lines are added to it (merging identical product lines), unless the profile says `apply_mode: replace`, which clears it first. Without this a new cart is created and an owner is required.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsImport(params?: { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string }): Promise<Models.Error>;\n /**\n * Reads a payload of lines into a cart — the bulk-order path a buyer pastes a spreadsheet into. With `target_cart_id` the lines land in that cart, which must be active, and the profile's `apply_mode` decides what happens to the lines already there: 'replace' clears them first, 'insert' and 'append' both add. Without a target a new cart is created, and an OWNER is then required — `contact_id` or `session_key` — because a cart with neither cannot exist. `profile_id` names an IMPORT profile; without one the payload is read ad hoc, as CSV when `csv` is present and as JSON otherwise. The lines fold into identical product lines exactly as carts.items.create does, so `imported_lines` counts the lines READ and the cart may have gained fewer rows than that. A payload that parses to no line at all is a 400 rather than a quiet no-op.\n *\n * @param {string} contactId - Owner of the cart this import creates. Ignored when target_cart_id is sent.\n * @param {string} csv - The CSV rows, when that is easier than putting them in `payload`. First line is the header, and its names are the ones the profile's mapping expects (the bundled quick-order template reads sku, name, quantity, unit_price). Numbers are coerced; a JSON column survives as a JSON string.\n * @param {string} name - Name for the cart this import creates. A name in the payload's own `cart` block wins over it; without either the cart is called 'Imported cart'.\n * @param {object} payload - The import itself. As an object: `{ \"cart\": { name, status, currency, channel_id, metadata }, \"items\": [ … ] }` — the same document carts.export produces, so an export round-trips. As a string: that document as raw JSON, or CSV rows when the profile is a csv one. A line with neither `name` nor `sku` is dropped, and a payload that leaves no line at all is a 400.\n * @param {string} profileId - The import profile to run — one of the ids `GET /carts/io/profiles?direction=import` lists. Omit it for an ad-hoc import: the payload is then read in the canonical shape, and as CSV if `csv` is what carried it.\n * @param {string} sessionKey - Guest owner of the cart this import creates — the storefront's own session key. Ignored when target_cart_id is sent.\n * @param {string} targetCartId - An existing ACTIVE cart to import into. The lines are added to it (merging identical product lines), unless the profile says `apply_mode: replace`, which clears it first. Without this a new cart is created and an owner is required.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsImport(contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string): Promise<Models.Error>;\n cartsImport(\n paramsOrFirst?: { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string } | string,\n ...rest: [(string)?, (string)?, (object)?, (string)?, (string)?, (string)?] \n ): Promise<Models.Error> {\n let params: { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string };\n } else {\n params = {\n contactId: paramsOrFirst as string,\n csv: rest[0] as string,\n name: rest[1] as string,\n payload: rest[2] as object,\n profileId: rest[3] as string,\n sessionKey: rest[4] as string,\n targetCartId: rest[5] as string \n };\n }\n \n const contactId = params.contactId;\n const csv = params.csv;\n const name = params.name;\n const payload = params.payload;\n const profileId = params.profileId;\n const sessionKey = params.sessionKey;\n const targetCartId = params.targetCartId;\n\n\n const apiPath = '/v1/carts/import';\n const apiPayload: Payload = {};\n if (typeof contactId !== 'undefined') {\n apiPayload['contact_id'] = contactId;\n }\n if (typeof csv !== 'undefined') {\n apiPayload['csv'] = csv;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof payload !== 'undefined') {\n apiPayload['payload'] = payload;\n }\n if (typeof profileId !== 'undefined') {\n apiPayload['profile_id'] = profileId;\n }\n if (typeof sessionKey !== 'undefined') {\n apiPayload['session_key'] = sessionKey;\n }\n if (typeof targetCartId !== 'undefined') {\n apiPayload['target_cart_id'] = targetCartId;\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 filters are what make this list usable: `?direction=export` is how a client offers the profiles that carts.export will accept, and `?is_template=true` separates the four bundled templates from what a merchant wrote. An unknown column is dropped rather than refused — `filter` echoes what was understood.\n *\n * @param {string} params.id - One profile, in list form.\n * @param {string} params.name - Exact profile name — how the bundled templates are addressed, since they are identified by name.\n * @param {CartIoDirection} params.direction - Import or export profiles. `?direction=export` is how a client offers exactly the profiles carts.export will accept — the other half is a 400.\n * @param {CartIoEntity} params.entity - Profiles that carry whole carts, or profiles that carry lines.\n * @param {CartIoFormat} params.format - JSON profiles or CSV profiles.\n * @param {CartIoApplyMode} params.applyMode - Profiles that replace a target cart's lines, as against those that add to them.\n * @param {boolean} params.isTemplate - The four bundled templates, or everything a merchant wrote.\n * @param {string} params.createdAt - Exact instant, not a range.\n * @param {string} params.updatedAt - Exact instant, not a range.\n * @param {number} params.limit - Page size (default 50, max 200).\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. Anything else is refused with 400.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsIoProfilesList(params?: { id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string }): Promise<Models.Error>;\n /**\n * The filters are what make this list usable: `?direction=export` is how a client offers the profiles that carts.export will accept, and `?is_template=true` separates the four bundled templates from what a merchant wrote. An unknown column is dropped rather than refused — `filter` echoes what was understood.\n *\n * @param {string} id - One profile, in list form.\n * @param {string} name - Exact profile name — how the bundled templates are addressed, since they are identified by name.\n * @param {CartIoDirection} direction - Import or export profiles. `?direction=export` is how a client offers exactly the profiles carts.export will accept — the other half is a 400.\n * @param {CartIoEntity} entity - Profiles that carry whole carts, or profiles that carry lines.\n * @param {CartIoFormat} format - JSON profiles or CSV profiles.\n * @param {CartIoApplyMode} applyMode - Profiles that replace a target cart's lines, as against those that add to them.\n * @param {boolean} isTemplate - The four bundled templates, or everything a merchant wrote.\n * @param {string} createdAt - Exact instant, not a range.\n * @param {string} updatedAt - Exact instant, not a range.\n * @param {number} limit - Page size (default 50, max 200).\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. Anything else is refused with 400.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesList(id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<Models.Error>;\n cartsIoProfilesList(\n paramsOrFirst?: { id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (CartIoDirection)?, (CartIoEntity)?, (CartIoFormat)?, (CartIoApplyMode)?, (boolean)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, 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, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n name: rest[0] as string,\n direction: rest[1] as CartIoDirection,\n entity: rest[2] as CartIoEntity,\n format: rest[3] as CartIoFormat,\n applyMode: rest[4] as CartIoApplyMode,\n isTemplate: rest[5] as boolean,\n createdAt: rest[6] as string,\n updatedAt: rest[7] as string,\n limit: rest[8] as number,\n offset: rest[9] as number,\n order: rest[10] as string \n };\n }\n \n const id = params.id;\n const name = params.name;\n const direction = params.direction;\n const entity = params.entity;\n const format = params.format;\n const applyMode = params.applyMode;\n const isTemplate = params.isTemplate;\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/carts/io/profiles';\n const apiPayload: Payload = {};\n if (typeof id !== 'undefined') {\n apiPayload['id'] = id;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof direction !== 'undefined') {\n apiPayload['direction'] = direction;\n }\n if (typeof entity !== 'undefined') {\n apiPayload['entity'] = entity;\n }\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof applyMode !== 'undefined') {\n apiPayload['apply_mode'] = applyMode;\n }\n if (typeof isTemplate !== 'undefined') {\n apiPayload['is_template'] = isTemplate;\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 * Defines a new import/export profile. Two fields are required and have no default — `name`, which must be unique within the tenant, and `direction`, which fixes the one way this profile will ever run. Everything else defaults to the common case: whole carts, JSON, `apply_mode` 'insert', not a template. The uniqueness of the name is a unique index rather than a check in this app, so a reused name is a 409 no matter which route wrote the other one, including the four bundled templates. The shape is Baseline-IO-compatible, so a mapping written for another app's import reads the same way here. Creating a profile does not move any data: carts.export and carts.import are what execute one, and each refuses a profile pointed the wrong way.\n *\n * @param {CartIoDirection} params.direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {string} params.name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {CartIoApplyMode} params.applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoEntity} params.entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} params.format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} params.isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} params.mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {object} params.options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsIoProfilesCreate(params: { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object }): Promise<Models.Error>;\n /**\n * Defines a new import/export profile. Two fields are required and have no default — `name`, which must be unique within the tenant, and `direction`, which fixes the one way this profile will ever run. Everything else defaults to the common case: whole carts, JSON, `apply_mode` 'insert', not a template. The uniqueness of the name is a unique index rather than a check in this app, so a reused name is a 409 no matter which route wrote the other one, including the four bundled templates. The shape is Baseline-IO-compatible, so a mapping written for another app's import reads the same way here. Creating a profile does not move any data: carts.export and carts.import are what execute one, and each refuses a profile pointed the wrong way.\n *\n * @param {CartIoDirection} direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {string} name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {CartIoApplyMode} applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoEntity} entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {object} options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesCreate(direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object): Promise<Models.Error>;\n cartsIoProfilesCreate(\n paramsOrFirst: { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object } | CartIoDirection,\n ...rest: [(string)?, (CartIoApplyMode)?, (CartIoEntity)?, (CartIoFormat)?, (boolean)?, (object)?, (object)?] \n ): Promise<Models.Error> {\n let params: { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('direction' in paramsOrFirst || 'name' in paramsOrFirst || 'applyMode' in paramsOrFirst || 'entity' in paramsOrFirst || 'format' in paramsOrFirst || 'isTemplate' in paramsOrFirst || 'mapping' in paramsOrFirst || 'options' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object };\n } else {\n params = {\n direction: paramsOrFirst as CartIoDirection,\n name: rest[0] as string,\n applyMode: rest[1] as CartIoApplyMode,\n entity: rest[2] as CartIoEntity,\n format: rest[3] as CartIoFormat,\n isTemplate: rest[4] as boolean,\n mapping: rest[5] as object,\n options: rest[6] as object \n };\n }\n \n const direction = params.direction;\n const name = params.name;\n const applyMode = params.applyMode;\n const entity = params.entity;\n const format = params.format;\n const isTemplate = params.isTemplate;\n const mapping = params.mapping;\n const options = params.options;\n\n if (typeof direction === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"direction\"');\n }\n if (typeof name === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/v1/carts/io/profiles';\n const apiPayload: Payload = {};\n if (typeof applyMode !== 'undefined') {\n apiPayload['apply_mode'] = applyMode;\n }\n if (typeof direction !== 'undefined') {\n apiPayload['direction'] = direction;\n }\n if (typeof entity !== 'undefined') {\n apiPayload['entity'] = entity;\n }\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof isTemplate !== 'undefined') {\n apiPayload['is_template'] = isTemplate;\n }\n if (typeof mapping !== 'undefined') {\n apiPayload['mapping'] = mapping;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof options !== 'undefined') {\n apiPayload['options'] = options;\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 * Seeds the 4 bundled templates and reports which of them it had to create — the call that gives a fresh tenant something to export through before anybody has written a profile. Idempotent and matched by NAME, so a second call answers with everything under 'existing' and writes nothing, and a template a merchant has edited is left exactly as they left it rather than reset. It also runs by itself on app.installed; call it by hand where that event cannot be relied on, and after deleting a template to get it back.\n *\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n cartsIoProfilesDefaults(): Promise<{}> {\n\n const apiPath = '/v1/carts/io/profiles/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 * Removes a profile. Nothing in this app points at one — no cart and no line stores the profile it was imported through — so no foreign key holds the delete up and nothing is orphaned by it; what breaks is the caller still holding that `profile_id`, which answers 404 on its next run. Deleting one of the four bundled templates is not permanent either: the next carts.io.profiles.defaults, and the next install of this app, seeds it again by name, in the shape it ships with rather than the shape a merchant had edited it into.\n *\n * @param {string} params.id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsIoProfilesDelete(params: { id: string }): Promise<Models.Error>;\n /**\n * Removes a profile. Nothing in this app points at one — no cart and no line stores the profile it was imported through — so no foreign key holds the delete up and nothing is orphaned by it; what breaks is the caller still holding that `profile_id`, which answers 404 on its next run. Deleting one of the four bundled templates is not permanent either: the next carts.io.profiles.defaults, and the next install of this app, seeds it again by name, in the shape it ships with rather than the shape a merchant had edited it into.\n *\n * @param {string} id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesDelete(id: string): Promise<Models.Error>;\n cartsIoProfilesDelete(\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/carts/io/profiles/{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 profile by id — the id carts.export and carts.import name in `profile_id`. Read it to see what a run will do before starting one: `direction`, because a profile only ever runs the way it declares; `entity`, whole carts or bare lines; `format`, where json round-trips and csv carries line fields only; `mapping`, what the external columns are called; and `apply_mode`, which decides what an import does with the lines a target cart already has. `is_template` says whether this is one of the four the app ships with or something a merchant wrote. Reading a profile runs nothing and changes nothing.\n *\n * @param {string} params.id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsIoProfilesGet(params: { id: string }): Promise<Models.Error>;\n /**\n * One profile by id — the id carts.export and carts.import name in `profile_id`. Read it to see what a run will do before starting one: `direction`, because a profile only ever runs the way it declares; `entity`, whole carts or bare lines; `format`, where json round-trips and csv carries line fields only; `mapping`, what the external columns are called; and `apply_mode`, which decides what an import does with the lines a target cart already has. `is_template` says whether this is one of the four the app ships with or something a merchant wrote. Reading a profile runs nothing and changes nothing.\n *\n * @param {string} id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesGet(id: string): Promise<Models.Error>;\n cartsIoProfilesGet(\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/carts/io/profiles/{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 * Edits a profile in place, the four bundled templates included — seeding matches on name and never rewrites what it finds, so an edit made here survives every later call to carts.io.profiles.defaults and every reinstall of the app. The name stays unique in the tenant, so renaming onto another profile's name is a 409, and a payload carrying no updatable field answers 400 rather than storing nothing quietly. Runs that already happened are unaffected: a profile is read at the moment carts.export or carts.import executes and nothing is kept pointing back at it, so changing a mapping changes the next run and no earlier one.\n *\n * @param {string} params.id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @param {CartIoApplyMode} params.applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoDirection} params.direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {CartIoEntity} params.entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} params.format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} params.isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} params.mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {string} params.name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {object} params.options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsIoProfilesUpdate(params: { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object }): Promise<Models.Error>;\n /**\n * Edits a profile in place, the four bundled templates included — seeding matches on name and never rewrites what it finds, so an edit made here survives every later call to carts.io.profiles.defaults and every reinstall of the app. The name stays unique in the tenant, so renaming onto another profile's name is a 409, and a payload carrying no updatable field answers 400 rather than storing nothing quietly. Runs that already happened are unaffected: a profile is read at the moment carts.export or carts.import executes and nothing is kept pointing back at it, so changing a mapping changes the next run and no earlier one.\n *\n * @param {string} id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @param {CartIoApplyMode} applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoDirection} direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {CartIoEntity} entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {string} name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {object} options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesUpdate(id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object): Promise<Models.Error>;\n cartsIoProfilesUpdate(\n paramsOrFirst: { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object } | string,\n ...rest: [(CartIoApplyMode)?, (CartIoDirection)?, (CartIoEntity)?, (CartIoFormat)?, (boolean)?, (object)?, (string)?, (object)?] \n ): Promise<Models.Error> {\n let params: { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n applyMode: rest[0] as CartIoApplyMode,\n direction: rest[1] as CartIoDirection,\n entity: rest[2] as CartIoEntity,\n format: rest[3] as CartIoFormat,\n isTemplate: rest[4] as boolean,\n mapping: rest[5] as object,\n name: rest[6] as string,\n options: rest[7] as object \n };\n }\n \n const id = params.id;\n const applyMode = params.applyMode;\n const direction = params.direction;\n const entity = params.entity;\n const format = params.format;\n const isTemplate = params.isTemplate;\n const mapping = params.mapping;\n const name = params.name;\n const options = params.options;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/carts/io/profiles/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof applyMode !== 'undefined') {\n apiPayload['apply_mode'] = applyMode;\n }\n if (typeof direction !== 'undefined') {\n apiPayload['direction'] = direction;\n }\n if (typeof entity !== 'undefined') {\n apiPayload['entity'] = entity;\n }\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof isTemplate !== 'undefined') {\n apiPayload['is_template'] = isTemplate;\n }\n if (typeof mapping !== 'undefined') {\n apiPayload['mapping'] = mapping;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof options !== 'undefined') {\n apiPayload['options'] = options;\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 * Renders one cart as a document somebody can take away. With `profile_id` the named EXPORT profile decides the format, the entity and the column names; handing it an import profile is a 400, because a profile only runs the way it declares. Without one the call runs ad hoc — JSON, unless `format: 'csv'` says otherwise. The JSON form is `{cart: {…}, items: […]}` and is exactly what carts.import takes back, so an export round-trips; the CSV form is the lines only, header first, and drops everything that lives on the cart rather than on a line. Nothing is stored and nothing about the cart changes — `filename` is a suggestion for a browser download, not a file this app keeps — and a cart of any status can be exported, including one already ordered.\n *\n * @param {string} params.id - The cart, by its id — the `id` every cart answer carries. A uuid: the data plane casts the segment, so a code or a slug is refused before the cart is looked up.\n * @param {CartExportFormat} params.format - Format of an ad-hoc export, read only when no profile_id is sent. 'json' returns the whole `{cart, items}` document, 'csv' the lines alone. Default 'json'.\n * @param {string} params.profileId - The export profile to run — one of the ids `GET /carts/io/profiles?direction=export` lists. Omit it for an ad-hoc export in the canonical shape, which is what `format` is for.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n cartsExport(params: { id: string, format?: CartExportFormat, profileId?: string }): Promise<Models.Error>;\n /**\n * Renders one cart as a document somebody can take away. With `profile_id` the named EXPORT profile decides the format, the entity and the column names; handing it an import profile is a 400, because a profile only runs the way it declares. Without one the call runs ad hoc — JSON, unless `format: 'csv'` says otherwise. The JSON form is `{cart: {…}, items: […]}` and is exactly what carts.import takes back, so an export round-trips; the CSV form is the lines only, header first, and drops everything that lives on the cart rather than on a line. Nothing is stored and nothing about the cart changes — `filename` is a suggestion for a browser download, not a file this app keeps — and a cart of any status can be exported, including one already ordered.\n *\n * @param {string} id - The cart, by its id — the `id` every cart answer carries. A uuid: the data plane casts the segment, so a code or a slug is refused before the cart is looked up.\n * @param {CartExportFormat} format - Format of an ad-hoc export, read only when no profile_id is sent. 'json' returns the whole `{cart, items}` document, 'csv' the lines alone. Default 'json'.\n * @param {string} profileId - The export profile to run — one of the ids `GET /carts/io/profiles?direction=export` lists. Omit it for an ad-hoc export in the canonical shape, which is what `format` is for.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsExport(id: string, format?: CartExportFormat, profileId?: string): Promise<Models.Error>;\n cartsExport(\n paramsOrFirst: { id: string, format?: CartExportFormat, profileId?: string } | string,\n ...rest: [(CartExportFormat)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, format?: CartExportFormat, profileId?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, format?: CartExportFormat, profileId?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n format: rest[0] as CartExportFormat,\n profileId: rest[1] as string \n };\n }\n \n const id = params.id;\n const format = params.format;\n const profileId = params.profileId;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/carts/{id}/export'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof profileId !== 'undefined') {\n apiPayload['profile_id'] = profileId;\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/carts-io.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AASjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EA+BA,YACI,kBACG,MACuB;AAC1B,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,WAAW;AAAA,QACX,KAAK,KAAK,CAAC;AAAA,QACX,MAAM,KAAK,CAAC;AAAA,QACZ,SAAS,KAAK,CAAC;AAAA,QACf,WAAW,KAAK,CAAC;AAAA,QACjB,YAAY,KAAK,CAAC;AAAA,QAClB,cAAc,KAAK,CAAC;AAAA,MACxB;AAAA,IACJ;AAEA,UAAM,YAAY,OAAO;AACzB,UAAM,MAAM,OAAO;AACnB,UAAM,OAAO,OAAO;AACpB,UAAM,UAAU,OAAO;AACvB,UAAM,YAAY,OAAO;AACzB,UAAM,aAAa,OAAO;AAC1B,UAAM,eAAe,OAAO;AAG5B,UAAM,UAAU;AAChB,UAAM,aAAsB,CAAC;AAC7B,QAAI,OAAO,cAAc,aAAa;AAClC,iBAAW,YAAY,IAAI;AAAA,IAC/B;AACA,QAAI,OAAO,QAAQ,aAAa;AAC5B,iBAAW,KAAK,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,SAAS,aAAa;AAC7B,iBAAW,MAAM,IAAI;AAAA,IACzB;AACA,QAAI,OAAO,YAAY,aAAa;AAChC,iBAAW,SAAS,IAAI;AAAA,IAC5B;AACA,QAAI,OAAO,cAAc,aAAa;AAClC,iBAAW,YAAY,IAAI;AAAA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AC7B,QAAI,OAAO,WAAW,aAAa;AAC/B,iBAAW,QAAQ,IAAI;AAAA,IAC3B;AACA,QAAI,OAAO,cAAc,aAAa;AAClC,iBAAW,YAAY,IAAI;AAAA,IAC/B;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 { CartIoDirection } from '../enums/cart-io-direction';\nimport { CartIoEntity } from '../enums/cart-io-entity';\nimport { CartIoFormat } from '../enums/cart-io-format';\nimport { CartIoApplyMode } from '../enums/cart-io-apply-mode';\nimport { CartExportFormat } from '../enums/cart-export-format';\n\nexport class CartsIo {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Reads a payload of lines into a cart — the bulk-order path a buyer pastes a spreadsheet into. With `target_cart_id` the lines land in that cart, which must be active, and the profile's `apply_mode` decides what happens to the lines already there: 'replace' clears them first, 'insert' and 'append' both add. Without a target a new cart is created, and an OWNER is then required — `contact_id` or `session_key` — because a cart with neither cannot exist. `profile_id` names an IMPORT profile; without one the payload is read ad hoc, as CSV when `csv` is present and as JSON otherwise. The lines fold into identical product lines exactly as carts.items.create does, so `imported_lines` counts the lines READ and the cart may have gained fewer rows than that. A payload that parses to no line at all is a 400 rather than a quiet no-op.\n *\n * @param {string} params.contactId - Owner of the cart this import creates. Ignored when target_cart_id is sent.\n * @param {string} params.csv - The CSV rows, when that is easier than putting them in `payload`. First line is the header, and its names are the ones the profile's mapping expects (the bundled quick-order template reads sku, name, quantity, unit_price). Numbers are coerced; a JSON column survives as a JSON string.\n * @param {string} params.name - Name for the cart this import creates. A name in the payload's own `cart` block wins over it; without either the cart is called 'Imported cart'.\n * @param {object} params.payload - The import itself. As an object: `{ \"cart\": { name, status, currency, channel_id, metadata }, \"items\": [ … ] }` — the same document carts.export produces, so an export round-trips. As a string: that document as raw JSON, or CSV rows when the profile is a csv one. A line with neither `name` nor `sku` is dropped, and a payload that leaves no line at all is a 400.\n * @param {string} params.profileId - The import profile to run — one of the ids `GET /carts/io/profiles?direction=import` lists. Omit it for an ad-hoc import: the payload is then read in the canonical shape, and as CSV if `csv` is what carried it.\n * @param {string} params.sessionKey - Guest owner of the cart this import creates — the storefront's own session key. Ignored when target_cart_id is sent.\n * @param {string} params.targetCartId - An existing ACTIVE cart to import into. The lines are added to it (merging identical product lines), unless the profile says `apply_mode: replace`, which clears it first. Without this a new cart is created and an owner is required.\n * @throws {RevenexxException}\n * @returns {Promise<Models.CartImport>}\n */\n cartsImport(params?: { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string }): Promise<Models.CartImport>;\n /**\n * Reads a payload of lines into a cart — the bulk-order path a buyer pastes a spreadsheet into. With `target_cart_id` the lines land in that cart, which must be active, and the profile's `apply_mode` decides what happens to the lines already there: 'replace' clears them first, 'insert' and 'append' both add. Without a target a new cart is created, and an OWNER is then required — `contact_id` or `session_key` — because a cart with neither cannot exist. `profile_id` names an IMPORT profile; without one the payload is read ad hoc, as CSV when `csv` is present and as JSON otherwise. The lines fold into identical product lines exactly as carts.items.create does, so `imported_lines` counts the lines READ and the cart may have gained fewer rows than that. A payload that parses to no line at all is a 400 rather than a quiet no-op.\n *\n * @param {string} contactId - Owner of the cart this import creates. Ignored when target_cart_id is sent.\n * @param {string} csv - The CSV rows, when that is easier than putting them in `payload`. First line is the header, and its names are the ones the profile's mapping expects (the bundled quick-order template reads sku, name, quantity, unit_price). Numbers are coerced; a JSON column survives as a JSON string.\n * @param {string} name - Name for the cart this import creates. A name in the payload's own `cart` block wins over it; without either the cart is called 'Imported cart'.\n * @param {object} payload - The import itself. As an object: `{ \"cart\": { name, status, currency, channel_id, metadata }, \"items\": [ … ] }` — the same document carts.export produces, so an export round-trips. As a string: that document as raw JSON, or CSV rows when the profile is a csv one. A line with neither `name` nor `sku` is dropped, and a payload that leaves no line at all is a 400.\n * @param {string} profileId - The import profile to run — one of the ids `GET /carts/io/profiles?direction=import` lists. Omit it for an ad-hoc import: the payload is then read in the canonical shape, and as CSV if `csv` is what carried it.\n * @param {string} sessionKey - Guest owner of the cart this import creates — the storefront's own session key. Ignored when target_cart_id is sent.\n * @param {string} targetCartId - An existing ACTIVE cart to import into. The lines are added to it (merging identical product lines), unless the profile says `apply_mode: replace`, which clears it first. Without this a new cart is created and an owner is required.\n * @throws {RevenexxException}\n * @returns {Promise<Models.CartImport>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsImport(contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string): Promise<Models.CartImport>;\n cartsImport(\n paramsOrFirst?: { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string } | string,\n ...rest: [(string)?, (string)?, (object)?, (string)?, (string)?, (string)?] \n ): Promise<Models.CartImport> {\n let params: { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { contactId?: string, csv?: string, name?: string, payload?: object, profileId?: string, sessionKey?: string, targetCartId?: string };\n } else {\n params = {\n contactId: paramsOrFirst as string,\n csv: rest[0] as string,\n name: rest[1] as string,\n payload: rest[2] as object,\n profileId: rest[3] as string,\n sessionKey: rest[4] as string,\n targetCartId: rest[5] as string \n };\n }\n \n const contactId = params.contactId;\n const csv = params.csv;\n const name = params.name;\n const payload = params.payload;\n const profileId = params.profileId;\n const sessionKey = params.sessionKey;\n const targetCartId = params.targetCartId;\n\n\n const apiPath = '/v1/carts/import';\n const apiPayload: Payload = {};\n if (typeof contactId !== 'undefined') {\n apiPayload['contact_id'] = contactId;\n }\n if (typeof csv !== 'undefined') {\n apiPayload['csv'] = csv;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof payload !== 'undefined') {\n apiPayload['payload'] = payload;\n }\n if (typeof profileId !== 'undefined') {\n apiPayload['profile_id'] = profileId;\n }\n if (typeof sessionKey !== 'undefined') {\n apiPayload['session_key'] = sessionKey;\n }\n if (typeof targetCartId !== 'undefined') {\n apiPayload['target_cart_id'] = targetCartId;\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 filters are what make this list usable: `?direction=export` is how a client offers the profiles that carts.export will accept, and `?is_template=true` separates the four bundled templates from what a merchant wrote. An unknown column is dropped rather than refused — `filter` echoes what was understood.\n *\n * @param {string} params.id - One profile, in list form.\n * @param {string} params.name - Exact profile name — how the bundled templates are addressed, since they are identified by name.\n * @param {CartIoDirection} params.direction - Import or export profiles. `?direction=export` is how a client offers exactly the profiles carts.export will accept — the other half is a 400.\n * @param {CartIoEntity} params.entity - Profiles that carry whole carts, or profiles that carry lines.\n * @param {CartIoFormat} params.format - JSON profiles or CSV profiles.\n * @param {CartIoApplyMode} params.applyMode - Profiles that replace a target cart's lines, as against those that add to them.\n * @param {boolean} params.isTemplate - The four bundled templates, or everything a merchant wrote.\n * @param {string} params.createdAt - Exact instant, not a range.\n * @param {string} params.updatedAt - Exact instant, not a range.\n * @param {number} params.limit - Page size (default 50, max 200).\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. Anything else is refused with 400.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n cartsIoProfilesList(params?: { id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;\n /**\n * The filters are what make this list usable: `?direction=export` is how a client offers the profiles that carts.export will accept, and `?is_template=true` separates the four bundled templates from what a merchant wrote. An unknown column is dropped rather than refused — `filter` echoes what was understood.\n *\n * @param {string} id - One profile, in list form.\n * @param {string} name - Exact profile name — how the bundled templates are addressed, since they are identified by name.\n * @param {CartIoDirection} direction - Import or export profiles. `?direction=export` is how a client offers exactly the profiles carts.export will accept — the other half is a 400.\n * @param {CartIoEntity} entity - Profiles that carry whole carts, or profiles that carry lines.\n * @param {CartIoFormat} format - JSON profiles or CSV profiles.\n * @param {CartIoApplyMode} applyMode - Profiles that replace a target cart's lines, as against those that add to them.\n * @param {boolean} isTemplate - The four bundled templates, or everything a merchant wrote.\n * @param {string} createdAt - Exact instant, not a range.\n * @param {string} updatedAt - Exact instant, not a range.\n * @param {number} limit - Page size (default 50, max 200).\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. Anything else is refused with 400.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesList(id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;\n cartsIoProfilesList(\n paramsOrFirst?: { id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string } | string,\n ...rest: [(string)?, (CartIoDirection)?, (CartIoEntity)?, (CartIoFormat)?, (CartIoApplyMode)?, (boolean)?, (string)?, (string)?, (number)?, (number)?, (string)?] \n ): Promise<{}> {\n let params: { id?: string, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, 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, name?: string, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, applyMode?: CartIoApplyMode, isTemplate?: boolean, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n name: rest[0] as string,\n direction: rest[1] as CartIoDirection,\n entity: rest[2] as CartIoEntity,\n format: rest[3] as CartIoFormat,\n applyMode: rest[4] as CartIoApplyMode,\n isTemplate: rest[5] as boolean,\n createdAt: rest[6] as string,\n updatedAt: rest[7] as string,\n limit: rest[8] as number,\n offset: rest[9] as number,\n order: rest[10] as string \n };\n }\n \n const id = params.id;\n const name = params.name;\n const direction = params.direction;\n const entity = params.entity;\n const format = params.format;\n const applyMode = params.applyMode;\n const isTemplate = params.isTemplate;\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/carts/io/profiles';\n const apiPayload: Payload = {};\n if (typeof id !== 'undefined') {\n apiPayload['id'] = id;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof direction !== 'undefined') {\n apiPayload['direction'] = direction;\n }\n if (typeof entity !== 'undefined') {\n apiPayload['entity'] = entity;\n }\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof applyMode !== 'undefined') {\n apiPayload['apply_mode'] = applyMode;\n }\n if (typeof isTemplate !== 'undefined') {\n apiPayload['is_template'] = isTemplate;\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 * Defines a new import/export profile. Two fields are required and have no default — `name`, which must be unique within the tenant, and `direction`, which fixes the one way this profile will ever run. Everything else defaults to the common case: whole carts, JSON, `apply_mode` 'insert', not a template. The uniqueness of the name is a unique index rather than a check in this app, so a reused name is a 409 no matter which route wrote the other one, including the four bundled templates. The shape is Baseline-IO-compatible, so a mapping written for another app's import reads the same way here. Creating a profile does not move any data: carts.export and carts.import are what execute one, and each refuses a profile pointed the wrong way.\n *\n * @param {CartIoDirection} params.direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {string} params.name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {CartIoApplyMode} params.applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoEntity} params.entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} params.format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} params.isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} params.mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {object} params.options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.IoProfile>}\n */\n cartsIoProfilesCreate(params: { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object }): Promise<Models.IoProfile>;\n /**\n * Defines a new import/export profile. Two fields are required and have no default — `name`, which must be unique within the tenant, and `direction`, which fixes the one way this profile will ever run. Everything else defaults to the common case: whole carts, JSON, `apply_mode` 'insert', not a template. The uniqueness of the name is a unique index rather than a check in this app, so a reused name is a 409 no matter which route wrote the other one, including the four bundled templates. The shape is Baseline-IO-compatible, so a mapping written for another app's import reads the same way here. Creating a profile does not move any data: carts.export and carts.import are what execute one, and each refuses a profile pointed the wrong way.\n *\n * @param {CartIoDirection} direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {string} name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {CartIoApplyMode} applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoEntity} entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {object} options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.IoProfile>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesCreate(direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object): Promise<Models.IoProfile>;\n cartsIoProfilesCreate(\n paramsOrFirst: { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object } | CartIoDirection,\n ...rest: [(string)?, (CartIoApplyMode)?, (CartIoEntity)?, (CartIoFormat)?, (boolean)?, (object)?, (object)?] \n ): Promise<Models.IoProfile> {\n let params: { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('direction' in paramsOrFirst || 'name' in paramsOrFirst || 'applyMode' in paramsOrFirst || 'entity' in paramsOrFirst || 'format' in paramsOrFirst || 'isTemplate' in paramsOrFirst || 'mapping' in paramsOrFirst || 'options' in paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { direction: CartIoDirection, name: string, applyMode?: CartIoApplyMode, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, options?: object };\n } else {\n params = {\n direction: paramsOrFirst as CartIoDirection,\n name: rest[0] as string,\n applyMode: rest[1] as CartIoApplyMode,\n entity: rest[2] as CartIoEntity,\n format: rest[3] as CartIoFormat,\n isTemplate: rest[4] as boolean,\n mapping: rest[5] as object,\n options: rest[6] as object \n };\n }\n \n const direction = params.direction;\n const name = params.name;\n const applyMode = params.applyMode;\n const entity = params.entity;\n const format = params.format;\n const isTemplate = params.isTemplate;\n const mapping = params.mapping;\n const options = params.options;\n\n if (typeof direction === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"direction\"');\n }\n if (typeof name === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/v1/carts/io/profiles';\n const apiPayload: Payload = {};\n if (typeof applyMode !== 'undefined') {\n apiPayload['apply_mode'] = applyMode;\n }\n if (typeof direction !== 'undefined') {\n apiPayload['direction'] = direction;\n }\n if (typeof entity !== 'undefined') {\n apiPayload['entity'] = entity;\n }\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof isTemplate !== 'undefined') {\n apiPayload['is_template'] = isTemplate;\n }\n if (typeof mapping !== 'undefined') {\n apiPayload['mapping'] = mapping;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof options !== 'undefined') {\n apiPayload['options'] = options;\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 * Seeds the 4 bundled templates and reports which of them it had to create — the call that gives a fresh tenant something to export through before anybody has written a profile. Idempotent and matched by NAME, so a second call answers with everything under 'existing' and writes nothing, and a template a merchant has edited is left exactly as they left it rather than reset. It also runs by itself on app.installed; call it by hand where that event cannot be relied on, and after deleting a template to get it back.\n *\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n cartsIoProfilesDefaults(): Promise<{}> {\n\n const apiPath = '/v1/carts/io/profiles/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 * Removes a profile. Nothing in this app points at one — no cart and no line stores the profile it was imported through — so no foreign key holds the delete up and nothing is orphaned by it; what breaks is the caller still holding that `profile_id`, which answers 404 on its next run. Deleting one of the four bundled templates is not permanent either: the next carts.io.profiles.defaults, and the next install of this app, seeds it again by name, in the shape it ships with rather than the shape a merchant had edited it into.\n *\n * @param {string} params.id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n cartsIoProfilesDelete(params: { id: string }): Promise<{}>;\n /**\n * Removes a profile. Nothing in this app points at one — no cart and no line stores the profile it was imported through — so no foreign key holds the delete up and nothing is orphaned by it; what breaks is the caller still holding that `profile_id`, which answers 404 on its next run. Deleting one of the four bundled templates is not permanent either: the next carts.io.profiles.defaults, and the next install of this app, seeds it again by name, in the shape it ships with rather than the shape a merchant had edited it into.\n *\n * @param {string} id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesDelete(id: string): Promise<{}>;\n cartsIoProfilesDelete(\n paramsOrFirst: { id: string } | string \n ): Promise<{}> {\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/carts/io/profiles/{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 profile by id — the id carts.export and carts.import name in `profile_id`. Read it to see what a run will do before starting one: `direction`, because a profile only ever runs the way it declares; `entity`, whole carts or bare lines; `format`, where json round-trips and csv carries line fields only; `mapping`, what the external columns are called; and `apply_mode`, which decides what an import does with the lines a target cart already has. `is_template` says whether this is one of the four the app ships with or something a merchant wrote. Reading a profile runs nothing and changes nothing.\n *\n * @param {string} params.id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<Models.IoProfile>}\n */\n cartsIoProfilesGet(params: { id: string }): Promise<Models.IoProfile>;\n /**\n * One profile by id — the id carts.export and carts.import name in `profile_id`. Read it to see what a run will do before starting one: `direction`, because a profile only ever runs the way it declares; `entity`, whole carts or bare lines; `format`, where json round-trips and csv carries line fields only; `mapping`, what the external columns are called; and `apply_mode`, which decides what an import does with the lines a target cart already has. `is_template` says whether this is one of the four the app ships with or something a merchant wrote. Reading a profile runs nothing and changes nothing.\n *\n * @param {string} id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @throws {RevenexxException}\n * @returns {Promise<Models.IoProfile>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesGet(id: string): Promise<Models.IoProfile>;\n cartsIoProfilesGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.IoProfile> {\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/carts/io/profiles/{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 * Edits a profile in place, the four bundled templates included — seeding matches on name and never rewrites what it finds, so an edit made here survives every later call to carts.io.profiles.defaults and every reinstall of the app. The name stays unique in the tenant, so renaming onto another profile's name is a 409, and a payload carrying no updatable field answers 400 rather than storing nothing quietly. Runs that already happened are unaffected: a profile is read at the moment carts.export or carts.import executes and nothing is kept pointing back at it, so changing a mapping changes the next run and no earlier one.\n *\n * @param {string} params.id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @param {CartIoApplyMode} params.applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoDirection} params.direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {CartIoEntity} params.entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} params.format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} params.isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} params.mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {string} params.name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {object} params.options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.IoProfile>}\n */\n cartsIoProfilesUpdate(params: { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object }): Promise<Models.IoProfile>;\n /**\n * Edits a profile in place, the four bundled templates included — seeding matches on name and never rewrites what it finds, so an edit made here survives every later call to carts.io.profiles.defaults and every reinstall of the app. The name stays unique in the tenant, so renaming onto another profile's name is a 409, and a payload carrying no updatable field answers 400 rather than storing nothing quietly. Runs that already happened are unaffected: a profile is read at the moment carts.export or carts.import executes and nothing is kept pointing back at it, so changing a mapping changes the next run and no earlier one.\n *\n * @param {string} id - The import/export profile, by its id — one of the ids `GET /carts/io/profiles` lists.\n * @param {CartIoApplyMode} applyMode - What an import does with the lines the target cart already has: 'replace' clears them first, 'insert' and 'append' both add and behave identically today. Read only when the import names a target_cart_id. Default 'insert'.\n * @param {CartIoDirection} direction - Which way this profile runs. A profile only ever runs in the direction it declares: handing an import profile to carts.export is a 400, and the other way round.\n * @param {CartIoEntity} entity - What the profile carries: whole carts (the `{cart, items}` document) or bare cart lines. Default 'carts'.\n * @param {CartIoFormat} format - The wire format. 'json' is the canonical, re-importable document; 'csv' is the spreadsheet form, and only line fields survive it. Default 'json'.\n * @param {boolean} isTemplate - One of the bundled templates. Set by carts.io.profiles.defaults; a profile a merchant writes is not one.\n * @param {object} mapping - Baseline-IO-compatible column mapping. An empty object (or null) is identity: the full canonical shape, every field under its own name.\n * @param {string} name - What a merchant picks this profile by. Unique within the tenant — reusing a name is a 409.\n * @param {object} options - Free-form options carried with the profile. The four bundled templates put one human sentence under `description` and nothing else; no other key is read by this app, so anything a merchant needs alongside a profile can live here.\n * @throws {RevenexxException}\n * @returns {Promise<Models.IoProfile>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsIoProfilesUpdate(id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object): Promise<Models.IoProfile>;\n cartsIoProfilesUpdate(\n paramsOrFirst: { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object } | string,\n ...rest: [(CartIoApplyMode)?, (CartIoDirection)?, (CartIoEntity)?, (CartIoFormat)?, (boolean)?, (object)?, (string)?, (object)?] \n ): Promise<Models.IoProfile> {\n let params: { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, applyMode?: CartIoApplyMode, direction?: CartIoDirection, entity?: CartIoEntity, format?: CartIoFormat, isTemplate?: boolean, mapping?: object, name?: string, options?: object };\n } else {\n params = {\n id: paramsOrFirst as string,\n applyMode: rest[0] as CartIoApplyMode,\n direction: rest[1] as CartIoDirection,\n entity: rest[2] as CartIoEntity,\n format: rest[3] as CartIoFormat,\n isTemplate: rest[4] as boolean,\n mapping: rest[5] as object,\n name: rest[6] as string,\n options: rest[7] as object \n };\n }\n \n const id = params.id;\n const applyMode = params.applyMode;\n const direction = params.direction;\n const entity = params.entity;\n const format = params.format;\n const isTemplate = params.isTemplate;\n const mapping = params.mapping;\n const name = params.name;\n const options = params.options;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/carts/io/profiles/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof applyMode !== 'undefined') {\n apiPayload['apply_mode'] = applyMode;\n }\n if (typeof direction !== 'undefined') {\n apiPayload['direction'] = direction;\n }\n if (typeof entity !== 'undefined') {\n apiPayload['entity'] = entity;\n }\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof isTemplate !== 'undefined') {\n apiPayload['is_template'] = isTemplate;\n }\n if (typeof mapping !== 'undefined') {\n apiPayload['mapping'] = mapping;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof options !== 'undefined') {\n apiPayload['options'] = options;\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 * Renders one cart as a document somebody can take away. With `profile_id` the named EXPORT profile decides the format, the entity and the column names; handing it an import profile is a 400, because a profile only runs the way it declares. Without one the call runs ad hoc — JSON, unless `format: 'csv'` says otherwise. The JSON form is `{cart: {…}, items: […]}` and is exactly what carts.import takes back, so an export round-trips; the CSV form is the lines only, header first, and drops everything that lives on the cart rather than on a line. Nothing is stored and nothing about the cart changes — `filename` is a suggestion for a browser download, not a file this app keeps — and a cart of any status can be exported, including one already ordered.\n *\n * @param {string} params.id - The cart, by its id — the `id` every cart answer carries. A uuid: the data plane casts the segment, so a code or a slug is refused before the cart is looked up.\n * @param {CartExportFormat} params.format - Format of an ad-hoc export, read only when no profile_id is sent. 'json' returns the whole `{cart, items}` document, 'csv' the lines alone. Default 'json'.\n * @param {string} params.profileId - The export profile to run — one of the ids `GET /carts/io/profiles?direction=export` lists. Omit it for an ad-hoc export in the canonical shape, which is what `format` is for.\n * @throws {RevenexxException}\n * @returns {Promise<Models.CartExport>}\n */\n cartsExport(params: { id: string, format?: CartExportFormat, profileId?: string }): Promise<Models.CartExport>;\n /**\n * Renders one cart as a document somebody can take away. With `profile_id` the named EXPORT profile decides the format, the entity and the column names; handing it an import profile is a 400, because a profile only runs the way it declares. Without one the call runs ad hoc — JSON, unless `format: 'csv'` says otherwise. The JSON form is `{cart: {…}, items: […]}` and is exactly what carts.import takes back, so an export round-trips; the CSV form is the lines only, header first, and drops everything that lives on the cart rather than on a line. Nothing is stored and nothing about the cart changes — `filename` is a suggestion for a browser download, not a file this app keeps — and a cart of any status can be exported, including one already ordered.\n *\n * @param {string} id - The cart, by its id — the `id` every cart answer carries. A uuid: the data plane casts the segment, so a code or a slug is refused before the cart is looked up.\n * @param {CartExportFormat} format - Format of an ad-hoc export, read only when no profile_id is sent. 'json' returns the whole `{cart, items}` document, 'csv' the lines alone. Default 'json'.\n * @param {string} profileId - The export profile to run — one of the ids `GET /carts/io/profiles?direction=export` lists. Omit it for an ad-hoc export in the canonical shape, which is what `format` is for.\n * @throws {RevenexxException}\n * @returns {Promise<Models.CartExport>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n cartsExport(id: string, format?: CartExportFormat, profileId?: string): Promise<Models.CartExport>;\n cartsExport(\n paramsOrFirst: { id: string, format?: CartExportFormat, profileId?: string } | string,\n ...rest: [(CartExportFormat)?, (string)?] \n ): Promise<Models.CartExport> {\n let params: { id: string, format?: CartExportFormat, profileId?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, format?: CartExportFormat, profileId?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n format: rest[0] as CartExportFormat,\n profileId: rest[1] as string \n };\n }\n \n const id = params.id;\n const format = params.format;\n const profileId = params.profileId;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/carts/{id}/export'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof format !== 'undefined') {\n apiPayload['format'] = format;\n }\n if (typeof profileId !== 'undefined') {\n apiPayload['profile_id'] = profileId;\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"]}
@@ -5,6 +5,15 @@ import '../query.mjs';
5
5
  import '../enums/address-type-row-tone.mjs';
6
6
  import '../enums/address-type-row-create-request-tone.mjs';
7
7
  import '../enums/address-type-row-update-request-tone.mjs';
8
+ import '../enums/approval-rule-approver-type.mjs';
9
+ import '../enums/approval-rule-condition.mjs';
10
+ import '../enums/approval-rule-effect.mjs';
11
+ import '../enums/approval-rule-create-request-approver-type.mjs';
12
+ import '../enums/approval-rule-create-request-condition.mjs';
13
+ import '../enums/approval-rule-create-request-effect.mjs';
14
+ import '../enums/approval-rule-update-request-approver-type.mjs';
15
+ import '../enums/approval-rule-update-request-condition.mjs';
16
+ import '../enums/approval-rule-update-request-effect.mjs';
8
17
  import '../enums/assets-source.mjs';
9
18
  import '../enums/attribute-value-bucket.mjs';
10
19
  import '../enums/auth-mail-source.mjs';
@@ -117,6 +126,8 @@ import '../enums/payment-term-tone.mjs';
117
126
  import '../enums/payment-term-create-request-tone.mjs';
118
127
  import '../enums/payment-term-update-request-tone.mjs';
119
128
  import '../enums/payment-vocabulary-tone.mjs';
129
+ import '../enums/pending-approval-approver-type.mjs';
130
+ import '../enums/pending-approval-status.mjs';
120
131
  import '../enums/price-ending-rule.mjs';
121
132
  import '../enums/price-entries-adjust-response-rounding.mjs';
122
133
  import '../enums/price-entries-adjust-response-rounding-mode.mjs';
@@ -139,6 +150,11 @@ import '../enums/product-grid-column-source.mjs';
139
150
  import '../enums/product-label-source.mjs';
140
151
  import '../enums/product-label-attribute-source.mjs';
141
152
  import '../enums/products-kind.mjs';
153
+ import '../enums/purchase-request-status.mjs';
154
+ import '../enums/purchase-request-event-name.mjs';
155
+ import '../enums/purchase-request-item-type.mjs';
156
+ import '../enums/purchase-request-item-create-request-type.mjs';
157
+ import '../enums/purchase-request-item-update-request-type.mjs';
142
158
  import '../enums/reorder-point-source.mjs';
143
159
  import '../enums/reservation-status.mjs';
144
160
  import '../enums/price-on-request-reason.mjs';
@@ -176,6 +192,8 @@ import '../enums/shipping-weight-unit-row-tone.mjs';
176
192
  import '../enums/shipping-weight-unit-update-request-tone.mjs';
177
193
  import '../enums/stock-movement-type.mjs';
178
194
  import '../enums/store-asset-request-visibility.mjs';
195
+ import '../enums/submit-item-type.mjs';
196
+ import '../enums/submit-result-outcome.mjs';
179
197
  import '../enums/validation-failed-response-status.mjs';
180
198
  import '../enums/vocabulary-default-tone.mjs';
181
199
  import '../enums/vocabulary-source.mjs';
@@ -248,7 +266,7 @@ declare class CartsItems {
248
266
  * @param {number} params.offset - Row offset for pagination (default 0).
249
267
  * @param {string} params.order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else is refused with 400.
250
268
  * @throws {RevenexxException}
251
- * @returns {Promise<Models.Error>}
269
+ * @returns {Promise<{}>}
252
270
  */
253
271
  cartsItemsList(params: {
254
272
  cartId: string;
@@ -269,7 +287,7 @@ declare class CartsItems {
269
287
  limit?: number;
270
288
  offset?: number;
271
289
  order?: string;
272
- }): Promise<Models.Error>;
290
+ }): Promise<{}>;
273
291
  /**
274
292
  * The array is still called 'items'; the response also carries 'page' and 'filter' like every other list, and an unknown cart_id answers 404 instead of an empty page. A cart with more lines than the page size is not silently truncated — 'page.hasMore' says so. Lines come back in position order unless 'order' says otherwise.
275
293
  *
@@ -292,10 +310,10 @@ declare class CartsItems {
292
310
  * @param {number} offset - Row offset for pagination (default 0).
293
311
  * @param {string} order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else is refused with 400.
294
312
  * @throws {RevenexxException}
295
- * @returns {Promise<Models.Error>}
313
+ * @returns {Promise<{}>}
296
314
  * @deprecated Use the object parameter style method for a better developer experience.
297
315
  */
298
- cartsItemsList(cartId: string, id?: string, type?: CartItemType, productId?: string, sku?: string, name?: string, quantity?: number, unit?: string, unitPrice?: number, currency?: string, taxRate?: number, lineTotal?: number, position?: number, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<Models.Error>;
316
+ cartsItemsList(cartId: string, id?: string, type?: CartItemType, productId?: string, sku?: string, name?: string, quantity?: number, unit?: string, unitPrice?: number, currency?: string, taxRate?: number, lineTotal?: number, position?: number, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;
299
317
  /**
300
318
  * Adds one line to an ACTIVE cart — the add-to-basket call. `name` or `sku` is required (a line sent with only a SKU takes the SKU as its name, so a line always has something to show) and `quantity` must be greater than zero; everything else defaults, including the currency, which falls back to the cart's. The one thing that surprises a caller: a plain product line with the same product/sku AND the same `unit_price` as a line already in the cart does not open a second row — its quantity is added to that line, and the 201 names a row that already existed. Price is part of that identity on purpose, so a changed price never averages into an old line. A configured or custom line always stands alone. The cart's `item_count` (the sum of QUANTITIES) and `subtotal` are recomputed before the answer, and `max_items_per_cart` / `max_quantity_per_line` are checked on the RESULT of the merge (422), so ten calls of one piece cannot walk past a limit one call of ten would hit.
301
319
  *
@@ -314,7 +332,7 @@ declare class CartsItems {
314
332
  * @param {string} params.unit - The unit the quantity is counted in. Display and ERP hand-over only — this app converts nothing.
315
333
  * @param {number} params.unitPrice - Net price of one unit — line_total is always derived from it, never sent. Part of the merge identity: the same article at a different price opens a new line rather than averaging into the old one.
316
334
  * @throws {RevenexxException}
317
- * @returns {Promise<Models.Error>}
335
+ * @returns {Promise<Models.CartItem>}
318
336
  */
319
337
  cartsItemsCreate(params: {
320
338
  cartId: string;
@@ -331,7 +349,7 @@ declare class CartsItems {
331
349
  type?: CartItemType;
332
350
  unit?: string;
333
351
  unitPrice?: number;
334
- }): Promise<Models.Error>;
352
+ }): Promise<Models.CartItem>;
335
353
  /**
336
354
  * Adds one line to an ACTIVE cart — the add-to-basket call. `name` or `sku` is required (a line sent with only a SKU takes the SKU as its name, so a line always has something to show) and `quantity` must be greater than zero; everything else defaults, including the currency, which falls back to the cart's. The one thing that surprises a caller: a plain product line with the same product/sku AND the same `unit_price` as a line already in the cart does not open a second row — its quantity is added to that line, and the 201 names a row that already existed. Price is part of that identity on purpose, so a changed price never averages into an old line. A configured or custom line always stands alone. The cart's `item_count` (the sum of QUANTITIES) and `subtotal` are recomputed before the answer, and `max_items_per_cart` / `max_quantity_per_line` are checked on the RESULT of the merge (422), so ten calls of one piece cannot walk past a limit one call of ten would hit.
337
355
  *
@@ -350,76 +368,76 @@ declare class CartsItems {
350
368
  * @param {string} unit - The unit the quantity is counted in. Display and ERP hand-over only — this app converts nothing.
351
369
  * @param {number} unitPrice - Net price of one unit — line_total is always derived from it, never sent. Part of the merge identity: the same article at a different price opens a new line rather than averaging into the old one.
352
370
  * @throws {RevenexxException}
353
- * @returns {Promise<Models.Error>}
371
+ * @returns {Promise<Models.CartItem>}
354
372
  * @deprecated Use the object parameter style method for a better developer experience.
355
373
  */
356
- cartsItemsCreate(cartId: string, configuration?: object, currency?: string, metadata?: object, name?: string, position?: number, productId?: string, quantity?: number, sku?: string, snapshot?: object, taxRate?: number, type?: CartItemType, unit?: string, unitPrice?: number): Promise<Models.Error>;
374
+ cartsItemsCreate(cartId: string, configuration?: object, currency?: string, metadata?: object, name?: string, position?: number, productId?: string, quantity?: number, sku?: string, snapshot?: object, taxRate?: number, type?: CartItemType, unit?: string, unitPrice?: number): Promise<Models.CartItem>;
357
375
  /**
358
376
  * Set semantics: the payload IS the cart. Every existing line is dropped and the payload is written in its place, so a line left out of the array is a line removed — this is the storefront sync, not a bulk add, and carts.items.create is what adds. Lines are numbered by their place in the array unless they carry their own `position`, and nothing merges: two identical lines in one payload stay two rows. The limits are checked against the payload BEFORE a single existing line is destroyed, so a sync refused with 422 leaves the cart exactly as it was. The cart must be active, and its totals are recomputed before the answer.
359
377
  *
360
378
  * @param {string} params.cartId - The cart the line belongs to, by its id. An id no cart in this tenant has answers 404 rather than an empty list, so a wrong cart is never mistaken for an empty one.
361
379
  * @param {Models.CartItemCreateRequest[]} params.items - The complete new item set (set semantics).
362
380
  * @throws {RevenexxException}
363
- * @returns {Promise<Models.Error>}
381
+ * @returns {Promise<{}>}
364
382
  */
365
383
  cartsItemsReplace(params: {
366
384
  cartId: string;
367
385
  items: Models.CartItemCreateRequest[];
368
- }): Promise<Models.Error>;
386
+ }): Promise<{}>;
369
387
  /**
370
388
  * Set semantics: the payload IS the cart. Every existing line is dropped and the payload is written in its place, so a line left out of the array is a line removed — this is the storefront sync, not a bulk add, and carts.items.create is what adds. Lines are numbered by their place in the array unless they carry their own `position`, and nothing merges: two identical lines in one payload stay two rows. The limits are checked against the payload BEFORE a single existing line is destroyed, so a sync refused with 422 leaves the cart exactly as it was. The cart must be active, and its totals are recomputed before the answer.
371
389
  *
372
390
  * @param {string} cartId - The cart the line belongs to, by its id. An id no cart in this tenant has answers 404 rather than an empty list, so a wrong cart is never mistaken for an empty one.
373
391
  * @param {Models.CartItemCreateRequest[]} items - The complete new item set (set semantics).
374
392
  * @throws {RevenexxException}
375
- * @returns {Promise<Models.Error>}
393
+ * @returns {Promise<{}>}
376
394
  * @deprecated Use the object parameter style method for a better developer experience.
377
395
  */
378
- cartsItemsReplace(cartId: string, items: Models.CartItemCreateRequest[]): Promise<Models.Error>;
396
+ cartsItemsReplace(cartId: string, items: Models.CartItemCreateRequest[]): Promise<{}>;
379
397
  /**
380
398
  * Removes one line from an ACTIVE cart and recomputes the owning cart's `item_count` and `subtotal` before answering. This is how a quantity reaches zero: `quantity` is constrained to be greater than zero, so "none of it" is a DELETE and never an update to 0. The cart in the path is part of the address — a line belonging to a different cart answers 404 and is left where it is. Deleting the last line leaves an empty cart, not a deleted one; the cart itself goes through carts.delete, which takes every line with it in one call.
381
399
  *
382
400
  * @param {string} params.cartId - The cart the line belongs to, by its id. An id no cart in this tenant has answers 404 rather than an empty list, so a wrong cart is never mistaken for an empty one.
383
401
  * @param {string} params.id - The line, by its id. The cart in the path is checked too: a line that belongs to a different cart answers 404, so an id guessed from another cart never resolves here.
384
402
  * @throws {RevenexxException}
385
- * @returns {Promise<Models.Error>}
403
+ * @returns {Promise<{}>}
386
404
  */
387
405
  cartsItemsDelete(params: {
388
406
  cartId: string;
389
407
  id: string;
390
- }): Promise<Models.Error>;
408
+ }): Promise<{}>;
391
409
  /**
392
410
  * Removes one line from an ACTIVE cart and recomputes the owning cart's `item_count` and `subtotal` before answering. This is how a quantity reaches zero: `quantity` is constrained to be greater than zero, so "none of it" is a DELETE and never an update to 0. The cart in the path is part of the address — a line belonging to a different cart answers 404 and is left where it is. Deleting the last line leaves an empty cart, not a deleted one; the cart itself goes through carts.delete, which takes every line with it in one call.
393
411
  *
394
412
  * @param {string} cartId - The cart the line belongs to, by its id. An id no cart in this tenant has answers 404 rather than an empty list, so a wrong cart is never mistaken for an empty one.
395
413
  * @param {string} id - The line, by its id. The cart in the path is checked too: a line that belongs to a different cart answers 404, so an id guessed from another cart never resolves here.
396
414
  * @throws {RevenexxException}
397
- * @returns {Promise<Models.Error>}
415
+ * @returns {Promise<{}>}
398
416
  * @deprecated Use the object parameter style method for a better developer experience.
399
417
  */
400
- cartsItemsDelete(cartId: string, id: string): Promise<Models.Error>;
418
+ cartsItemsDelete(cartId: string, id: string): Promise<{}>;
401
419
  /**
402
420
  * One line, addressed through the cart that owns it. Both ids are checked, not just the line's: a line that exists but belongs to a different cart answers 404 rather than the row, so an id copied out of another cart never resolves here and a caller can trust that what came back is a line of the cart they asked about. The line carries both of its prices — the working `unit_price`, which a resync or a repricing job may have moved, and the `snapshot` the buyer was shown when the line was added — and its own `line_total`, which is always quantity × unit_price and never what a payload claimed. To read a whole cart's lines, list them: this route is for one known line.
403
421
  *
404
422
  * @param {string} params.cartId - The cart the line belongs to, by its id. An id no cart in this tenant has answers 404 rather than an empty list, so a wrong cart is never mistaken for an empty one.
405
423
  * @param {string} params.id - The line, by its id. The cart in the path is checked too: a line that belongs to a different cart answers 404, so an id guessed from another cart never resolves here.
406
424
  * @throws {RevenexxException}
407
- * @returns {Promise<Models.Error>}
425
+ * @returns {Promise<Models.CartItem>}
408
426
  */
409
427
  cartsItemsGet(params: {
410
428
  cartId: string;
411
429
  id: string;
412
- }): Promise<Models.Error>;
430
+ }): Promise<Models.CartItem>;
413
431
  /**
414
432
  * One line, addressed through the cart that owns it. Both ids are checked, not just the line's: a line that exists but belongs to a different cart answers 404 rather than the row, so an id copied out of another cart never resolves here and a caller can trust that what came back is a line of the cart they asked about. The line carries both of its prices — the working `unit_price`, which a resync or a repricing job may have moved, and the `snapshot` the buyer was shown when the line was added — and its own `line_total`, which is always quantity × unit_price and never what a payload claimed. To read a whole cart's lines, list them: this route is for one known line.
415
433
  *
416
434
  * @param {string} cartId - The cart the line belongs to, by its id. An id no cart in this tenant has answers 404 rather than an empty list, so a wrong cart is never mistaken for an empty one.
417
435
  * @param {string} id - The line, by its id. The cart in the path is checked too: a line that belongs to a different cart answers 404, so an id guessed from another cart never resolves here.
418
436
  * @throws {RevenexxException}
419
- * @returns {Promise<Models.Error>}
437
+ * @returns {Promise<Models.CartItem>}
420
438
  * @deprecated Use the object parameter style method for a better developer experience.
421
439
  */
422
- cartsItemsGet(cartId: string, id: string): Promise<Models.Error>;
440
+ cartsItemsGet(cartId: string, id: string): Promise<Models.CartItem>;
423
441
  /**
424
442
  * Changes one line of an ACTIVE cart — the quantity stepper on the cart page, and the route a repricing job writes through. The fields sent are merged onto the stored line and the whole line is validated again, so `quantity` must still be greater than zero and `type` still one of the three. `line_total` is not settable: it is recomputed as quantity × unit_price, and the cart's `item_count` and `subtotal` follow before the answer. What it will NOT do is merge — only carts.items.create folds one line into another, so giving this line the same product and price as a sibling leaves two rows standing, and the next add joins whichever it matches. `max_quantity_per_line` is enforced on the result (422). A quantity of zero is not the way to remove a line; the delete is.
425
443
  *
@@ -439,7 +457,7 @@ declare class CartsItems {
439
457
  * @param {string} params.unit - The unit the quantity is counted in. Display and ERP hand-over only — this app converts nothing.
440
458
  * @param {number} params.unitPrice - Net price of one unit — line_total is always derived from it, never sent. Part of the merge identity: the same article at a different price opens a new line rather than averaging into the old one.
441
459
  * @throws {RevenexxException}
442
- * @returns {Promise<Models.Error>}
460
+ * @returns {Promise<Models.CartItem>}
443
461
  */
444
462
  cartsItemsUpdate(params: {
445
463
  cartId: string;
@@ -457,7 +475,7 @@ declare class CartsItems {
457
475
  type?: CartItemType;
458
476
  unit?: string;
459
477
  unitPrice?: number;
460
- }): Promise<Models.Error>;
478
+ }): Promise<Models.CartItem>;
461
479
  /**
462
480
  * Changes one line of an ACTIVE cart — the quantity stepper on the cart page, and the route a repricing job writes through. The fields sent are merged onto the stored line and the whole line is validated again, so `quantity` must still be greater than zero and `type` still one of the three. `line_total` is not settable: it is recomputed as quantity × unit_price, and the cart's `item_count` and `subtotal` follow before the answer. What it will NOT do is merge — only carts.items.create folds one line into another, so giving this line the same product and price as a sibling leaves two rows standing, and the next add joins whichever it matches. `max_quantity_per_line` is enforced on the result (422). A quantity of zero is not the way to remove a line; the delete is.
463
481
  *
@@ -477,10 +495,10 @@ declare class CartsItems {
477
495
  * @param {string} unit - The unit the quantity is counted in. Display and ERP hand-over only — this app converts nothing.
478
496
  * @param {number} unitPrice - Net price of one unit — line_total is always derived from it, never sent. Part of the merge identity: the same article at a different price opens a new line rather than averaging into the old one.
479
497
  * @throws {RevenexxException}
480
- * @returns {Promise<Models.Error>}
498
+ * @returns {Promise<Models.CartItem>}
481
499
  * @deprecated Use the object parameter style method for a better developer experience.
482
500
  */
483
- cartsItemsUpdate(cartId: string, id: string, configuration?: object, currency?: string, metadata?: object, name?: string, position?: number, productId?: string, quantity?: number, sku?: string, snapshot?: object, taxRate?: number, type?: CartItemType, unit?: string, unitPrice?: number): Promise<Models.Error>;
501
+ cartsItemsUpdate(cartId: string, id: string, configuration?: object, currency?: string, metadata?: object, name?: string, position?: number, productId?: string, quantity?: number, sku?: string, snapshot?: object, taxRate?: number, type?: CartItemType, unit?: string, unitPrice?: number): Promise<Models.CartItem>;
484
502
  }
485
503
 
486
504
  export { CartsItems };