@gradientedge/commercetools-utils 5.18.2 → 5.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/dist/cjs/api/CommercetoolsApi.d.ts +11 -11
  2. package/dist/cjs/api/CommercetoolsApi.d.ts.map +1 -1
  3. package/dist/cjs/api/CommercetoolsApi.js +7 -7
  4. package/dist/cjs/api/CommercetoolsApi.js.map +1 -1
  5. package/dist/cjs/index.d.ts +0 -1
  6. package/dist/cjs/index.d.ts.map +1 -1
  7. package/dist/cjs/index.js +0 -1
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/types.d.ts +1 -0
  10. package/dist/cjs/types.d.ts.map +1 -1
  11. package/dist/cjs/utils/get-attribute-value.d.ts +1 -1
  12. package/dist/cjs/utils/get-attribute-value.d.ts.map +1 -1
  13. package/dist/cjs/utils/get-attribute-value.js.map +1 -1
  14. package/dist/mjs/api/CommercetoolsApi.d.ts +11 -11
  15. package/dist/mjs/api/CommercetoolsApi.d.ts.map +1 -1
  16. package/dist/mjs/api/CommercetoolsApi.js +8 -8
  17. package/dist/mjs/api/CommercetoolsApi.js.map +1 -1
  18. package/dist/mjs/index.d.ts +0 -1
  19. package/dist/mjs/index.d.ts.map +1 -1
  20. package/dist/mjs/index.js +0 -1
  21. package/dist/mjs/index.js.map +1 -1
  22. package/dist/mjs/types.d.ts +1 -0
  23. package/dist/mjs/types.d.ts.map +1 -1
  24. package/dist/mjs/utils/get-attribute-value.d.ts +1 -1
  25. package/dist/mjs/utils/get-attribute-value.d.ts.map +1 -1
  26. package/dist/mjs/utils/get-attribute-value.js.map +1 -1
  27. package/package.json +2 -1
  28. package/dist/cjs/models/associate-role.d.ts +0 -319
  29. package/dist/cjs/models/associate-role.d.ts.map +0 -1
  30. package/dist/cjs/models/associate-role.js +0 -8
  31. package/dist/cjs/models/associate-role.js.map +0 -1
  32. package/dist/cjs/models/attribute-group.d.ts +0 -253
  33. package/dist/cjs/models/attribute-group.d.ts.map +0 -1
  34. package/dist/cjs/models/attribute-group.js +0 -8
  35. package/dist/cjs/models/attribute-group.js.map +0 -1
  36. package/dist/cjs/models/business-unit.d.ts +0 -1197
  37. package/dist/cjs/models/business-unit.d.ts.map +0 -1
  38. package/dist/cjs/models/business-unit.js +0 -8
  39. package/dist/cjs/models/business-unit.js.map +0 -1
  40. package/dist/cjs/models/cart-discount.d.ts +0 -716
  41. package/dist/cjs/models/cart-discount.d.ts.map +0 -1
  42. package/dist/cjs/models/cart-discount.js +0 -8
  43. package/dist/cjs/models/cart-discount.js.map +0 -1
  44. package/dist/cjs/models/cart.d.ts +0 -3366
  45. package/dist/cjs/models/cart.d.ts.map +0 -1
  46. package/dist/cjs/models/cart.js +0 -8
  47. package/dist/cjs/models/cart.js.map +0 -1
  48. package/dist/cjs/models/category.d.ts +0 -634
  49. package/dist/cjs/models/category.d.ts.map +0 -1
  50. package/dist/cjs/models/category.js +0 -8
  51. package/dist/cjs/models/category.js.map +0 -1
  52. package/dist/cjs/models/channel.d.ts +0 -379
  53. package/dist/cjs/models/channel.d.ts.map +0 -1
  54. package/dist/cjs/models/channel.js +0 -8
  55. package/dist/cjs/models/channel.js.map +0 -1
  56. package/dist/cjs/models/common.d.ts +0 -1096
  57. package/dist/cjs/models/common.d.ts.map +0 -1
  58. package/dist/cjs/models/common.js +0 -8
  59. package/dist/cjs/models/common.js.map +0 -1
  60. package/dist/cjs/models/custom-object.d.ts +0 -151
  61. package/dist/cjs/models/custom-object.d.ts.map +0 -1
  62. package/dist/cjs/models/custom-object.js +0 -8
  63. package/dist/cjs/models/custom-object.js.map +0 -1
  64. package/dist/cjs/models/customer-group.d.ts +0 -235
  65. package/dist/cjs/models/customer-group.d.ts.map +0 -1
  66. package/dist/cjs/models/customer-group.js +0 -8
  67. package/dist/cjs/models/customer-group.js.map +0 -1
  68. package/dist/cjs/models/customer.d.ts +0 -1221
  69. package/dist/cjs/models/customer.d.ts.map +0 -1
  70. package/dist/cjs/models/customer.js +0 -8
  71. package/dist/cjs/models/customer.js.map +0 -1
  72. package/dist/cjs/models/discount-code.d.ts +0 -439
  73. package/dist/cjs/models/discount-code.d.ts.map +0 -1
  74. package/dist/cjs/models/discount-code.js +0 -8
  75. package/dist/cjs/models/discount-code.js.map +0 -1
  76. package/dist/cjs/models/error.d.ts +0 -3062
  77. package/dist/cjs/models/error.d.ts.map +0 -1
  78. package/dist/cjs/models/error.js +0 -8
  79. package/dist/cjs/models/error.js.map +0 -1
  80. package/dist/cjs/models/extension.d.ts +0 -335
  81. package/dist/cjs/models/extension.d.ts.map +0 -1
  82. package/dist/cjs/models/extension.js +0 -8
  83. package/dist/cjs/models/extension.js.map +0 -1
  84. package/dist/cjs/models/graph-ql.d.ts +0 -63
  85. package/dist/cjs/models/graph-ql.d.ts.map +0 -1
  86. package/dist/cjs/models/graph-ql.js +0 -8
  87. package/dist/cjs/models/graph-ql.js.map +0 -1
  88. package/dist/cjs/models/index.d.ts +0 -42
  89. package/dist/cjs/models/index.d.ts.map +0 -1
  90. package/dist/cjs/models/index.js +0 -58
  91. package/dist/cjs/models/index.js.map +0 -1
  92. package/dist/cjs/models/inventory.d.ts +0 -327
  93. package/dist/cjs/models/inventory.d.ts.map +0 -1
  94. package/dist/cjs/models/inventory.js +0 -8
  95. package/dist/cjs/models/inventory.js.map +0 -1
  96. package/dist/cjs/models/me.d.ts +0 -2483
  97. package/dist/cjs/models/me.d.ts.map +0 -1
  98. package/dist/cjs/models/me.js +0 -8
  99. package/dist/cjs/models/me.js.map +0 -1
  100. package/dist/cjs/models/message.d.ts +0 -15095
  101. package/dist/cjs/models/message.d.ts.map +0 -1
  102. package/dist/cjs/models/message.js +0 -8
  103. package/dist/cjs/models/message.js.map +0 -1
  104. package/dist/cjs/models/order-edit.d.ts +0 -1645
  105. package/dist/cjs/models/order-edit.d.ts.map +0 -1
  106. package/dist/cjs/models/order-edit.js +0 -8
  107. package/dist/cjs/models/order-edit.js.map +0 -1
  108. package/dist/cjs/models/order.d.ts +0 -2157
  109. package/dist/cjs/models/order.d.ts.map +0 -1
  110. package/dist/cjs/models/order.js +0 -8
  111. package/dist/cjs/models/order.js.map +0 -1
  112. package/dist/cjs/models/payment.d.ts +0 -734
  113. package/dist/cjs/models/payment.d.ts.map +0 -1
  114. package/dist/cjs/models/payment.js +0 -8
  115. package/dist/cjs/models/payment.js.map +0 -1
  116. package/dist/cjs/models/product-discount.d.ts +0 -461
  117. package/dist/cjs/models/product-discount.d.ts.map +0 -1
  118. package/dist/cjs/models/product-discount.js +0 -8
  119. package/dist/cjs/models/product-discount.js.map +0 -1
  120. package/dist/cjs/models/product-selection.d.ts +0 -638
  121. package/dist/cjs/models/product-selection.d.ts.map +0 -1
  122. package/dist/cjs/models/product-selection.js +0 -8
  123. package/dist/cjs/models/product-selection.js.map +0 -1
  124. package/dist/cjs/models/product-type.d.ts +0 -774
  125. package/dist/cjs/models/product-type.d.ts.map +0 -1
  126. package/dist/cjs/models/product-type.js +0 -8
  127. package/dist/cjs/models/product-type.js.map +0 -1
  128. package/dist/cjs/models/product.d.ts +0 -2282
  129. package/dist/cjs/models/product.d.ts.map +0 -1
  130. package/dist/cjs/models/product.js +0 -8
  131. package/dist/cjs/models/product.js.map +0 -1
  132. package/dist/cjs/models/project.d.ts +0 -381
  133. package/dist/cjs/models/project.d.ts.map +0 -1
  134. package/dist/cjs/models/project.js +0 -8
  135. package/dist/cjs/models/project.js.map +0 -1
  136. package/dist/cjs/models/quote-request.d.ts +0 -430
  137. package/dist/cjs/models/quote-request.d.ts.map +0 -1
  138. package/dist/cjs/models/quote-request.js +0 -8
  139. package/dist/cjs/models/quote-request.js.map +0 -1
  140. package/dist/cjs/models/quote.d.ts +0 -458
  141. package/dist/cjs/models/quote.d.ts.map +0 -1
  142. package/dist/cjs/models/quote.js +0 -8
  143. package/dist/cjs/models/quote.js.map +0 -1
  144. package/dist/cjs/models/review.d.ts +0 -435
  145. package/dist/cjs/models/review.d.ts.map +0 -1
  146. package/dist/cjs/models/review.js +0 -8
  147. package/dist/cjs/models/review.js.map +0 -1
  148. package/dist/cjs/models/scalar-types.d.ts +0 -9
  149. package/dist/cjs/models/scalar-types.d.ts.map +0 -1
  150. package/dist/cjs/models/scalar-types.js +0 -8
  151. package/dist/cjs/models/scalar-types.js.map +0 -1
  152. package/dist/cjs/models/shipping-method.d.ts +0 -569
  153. package/dist/cjs/models/shipping-method.d.ts.map +0 -1
  154. package/dist/cjs/models/shipping-method.js +0 -8
  155. package/dist/cjs/models/shipping-method.js.map +0 -1
  156. package/dist/cjs/models/shopping-list.d.ts +0 -844
  157. package/dist/cjs/models/shopping-list.d.ts.map +0 -1
  158. package/dist/cjs/models/shopping-list.js +0 -8
  159. package/dist/cjs/models/shopping-list.js.map +0 -1
  160. package/dist/cjs/models/staged-quote.d.ts +0 -338
  161. package/dist/cjs/models/staged-quote.d.ts.map +0 -1
  162. package/dist/cjs/models/staged-quote.js +0 -8
  163. package/dist/cjs/models/staged-quote.js.map +0 -1
  164. package/dist/cjs/models/standalone-price.d.ts +0 -410
  165. package/dist/cjs/models/standalone-price.d.ts.map +0 -1
  166. package/dist/cjs/models/standalone-price.js +0 -8
  167. package/dist/cjs/models/standalone-price.js.map +0 -1
  168. package/dist/cjs/models/state.d.ts +0 -341
  169. package/dist/cjs/models/state.d.ts.map +0 -1
  170. package/dist/cjs/models/state.js +0 -8
  171. package/dist/cjs/models/state.js.map +0 -1
  172. package/dist/cjs/models/store-country.d.ts +0 -14
  173. package/dist/cjs/models/store-country.d.ts.map +0 -1
  174. package/dist/cjs/models/store-country.js +0 -8
  175. package/dist/cjs/models/store-country.js.map +0 -1
  176. package/dist/cjs/models/store.d.ts +0 -547
  177. package/dist/cjs/models/store.d.ts.map +0 -1
  178. package/dist/cjs/models/store.js +0 -8
  179. package/dist/cjs/models/store.js.map +0 -1
  180. package/dist/cjs/models/subscription.d.ts +0 -717
  181. package/dist/cjs/models/subscription.d.ts.map +0 -1
  182. package/dist/cjs/models/subscription.js +0 -8
  183. package/dist/cjs/models/subscription.js.map +0 -1
  184. package/dist/cjs/models/tax-category.d.ts +0 -376
  185. package/dist/cjs/models/tax-category.d.ts.map +0 -1
  186. package/dist/cjs/models/tax-category.js +0 -8
  187. package/dist/cjs/models/tax-category.js.map +0 -1
  188. package/dist/cjs/models/type.d.ts +0 -645
  189. package/dist/cjs/models/type.d.ts.map +0 -1
  190. package/dist/cjs/models/type.js +0 -8
  191. package/dist/cjs/models/type.js.map +0 -1
  192. package/dist/cjs/models/zone.d.ts +0 -234
  193. package/dist/cjs/models/zone.d.ts.map +0 -1
  194. package/dist/cjs/models/zone.js +0 -8
  195. package/dist/cjs/models/zone.js.map +0 -1
  196. package/dist/mjs/models/associate-role.d.ts +0 -319
  197. package/dist/mjs/models/associate-role.d.ts.map +0 -1
  198. package/dist/mjs/models/associate-role.js +0 -7
  199. package/dist/mjs/models/associate-role.js.map +0 -1
  200. package/dist/mjs/models/attribute-group.d.ts +0 -253
  201. package/dist/mjs/models/attribute-group.d.ts.map +0 -1
  202. package/dist/mjs/models/attribute-group.js +0 -7
  203. package/dist/mjs/models/attribute-group.js.map +0 -1
  204. package/dist/mjs/models/business-unit.d.ts +0 -1197
  205. package/dist/mjs/models/business-unit.d.ts.map +0 -1
  206. package/dist/mjs/models/business-unit.js +0 -7
  207. package/dist/mjs/models/business-unit.js.map +0 -1
  208. package/dist/mjs/models/cart-discount.d.ts +0 -716
  209. package/dist/mjs/models/cart-discount.d.ts.map +0 -1
  210. package/dist/mjs/models/cart-discount.js +0 -7
  211. package/dist/mjs/models/cart-discount.js.map +0 -1
  212. package/dist/mjs/models/cart.d.ts +0 -3366
  213. package/dist/mjs/models/cart.d.ts.map +0 -1
  214. package/dist/mjs/models/cart.js +0 -7
  215. package/dist/mjs/models/cart.js.map +0 -1
  216. package/dist/mjs/models/category.d.ts +0 -634
  217. package/dist/mjs/models/category.d.ts.map +0 -1
  218. package/dist/mjs/models/category.js +0 -7
  219. package/dist/mjs/models/category.js.map +0 -1
  220. package/dist/mjs/models/channel.d.ts +0 -379
  221. package/dist/mjs/models/channel.d.ts.map +0 -1
  222. package/dist/mjs/models/channel.js +0 -7
  223. package/dist/mjs/models/channel.js.map +0 -1
  224. package/dist/mjs/models/common.d.ts +0 -1096
  225. package/dist/mjs/models/common.d.ts.map +0 -1
  226. package/dist/mjs/models/common.js +0 -7
  227. package/dist/mjs/models/common.js.map +0 -1
  228. package/dist/mjs/models/custom-object.d.ts +0 -151
  229. package/dist/mjs/models/custom-object.d.ts.map +0 -1
  230. package/dist/mjs/models/custom-object.js +0 -7
  231. package/dist/mjs/models/custom-object.js.map +0 -1
  232. package/dist/mjs/models/customer-group.d.ts +0 -235
  233. package/dist/mjs/models/customer-group.d.ts.map +0 -1
  234. package/dist/mjs/models/customer-group.js +0 -7
  235. package/dist/mjs/models/customer-group.js.map +0 -1
  236. package/dist/mjs/models/customer.d.ts +0 -1221
  237. package/dist/mjs/models/customer.d.ts.map +0 -1
  238. package/dist/mjs/models/customer.js +0 -7
  239. package/dist/mjs/models/customer.js.map +0 -1
  240. package/dist/mjs/models/discount-code.d.ts +0 -439
  241. package/dist/mjs/models/discount-code.d.ts.map +0 -1
  242. package/dist/mjs/models/discount-code.js +0 -7
  243. package/dist/mjs/models/discount-code.js.map +0 -1
  244. package/dist/mjs/models/error.d.ts +0 -3062
  245. package/dist/mjs/models/error.d.ts.map +0 -1
  246. package/dist/mjs/models/error.js +0 -7
  247. package/dist/mjs/models/error.js.map +0 -1
  248. package/dist/mjs/models/extension.d.ts +0 -335
  249. package/dist/mjs/models/extension.d.ts.map +0 -1
  250. package/dist/mjs/models/extension.js +0 -7
  251. package/dist/mjs/models/extension.js.map +0 -1
  252. package/dist/mjs/models/graph-ql.d.ts +0 -63
  253. package/dist/mjs/models/graph-ql.d.ts.map +0 -1
  254. package/dist/mjs/models/graph-ql.js +0 -7
  255. package/dist/mjs/models/graph-ql.js.map +0 -1
  256. package/dist/mjs/models/index.d.ts +0 -42
  257. package/dist/mjs/models/index.d.ts.map +0 -1
  258. package/dist/mjs/models/index.js +0 -42
  259. package/dist/mjs/models/index.js.map +0 -1
  260. package/dist/mjs/models/inventory.d.ts +0 -327
  261. package/dist/mjs/models/inventory.d.ts.map +0 -1
  262. package/dist/mjs/models/inventory.js +0 -7
  263. package/dist/mjs/models/inventory.js.map +0 -1
  264. package/dist/mjs/models/me.d.ts +0 -2483
  265. package/dist/mjs/models/me.d.ts.map +0 -1
  266. package/dist/mjs/models/me.js +0 -7
  267. package/dist/mjs/models/me.js.map +0 -1
  268. package/dist/mjs/models/message.d.ts +0 -15095
  269. package/dist/mjs/models/message.d.ts.map +0 -1
  270. package/dist/mjs/models/message.js +0 -7
  271. package/dist/mjs/models/message.js.map +0 -1
  272. package/dist/mjs/models/order-edit.d.ts +0 -1645
  273. package/dist/mjs/models/order-edit.d.ts.map +0 -1
  274. package/dist/mjs/models/order-edit.js +0 -7
  275. package/dist/mjs/models/order-edit.js.map +0 -1
  276. package/dist/mjs/models/order.d.ts +0 -2157
  277. package/dist/mjs/models/order.d.ts.map +0 -1
  278. package/dist/mjs/models/order.js +0 -7
  279. package/dist/mjs/models/order.js.map +0 -1
  280. package/dist/mjs/models/payment.d.ts +0 -734
  281. package/dist/mjs/models/payment.d.ts.map +0 -1
  282. package/dist/mjs/models/payment.js +0 -7
  283. package/dist/mjs/models/payment.js.map +0 -1
  284. package/dist/mjs/models/product-discount.d.ts +0 -461
  285. package/dist/mjs/models/product-discount.d.ts.map +0 -1
  286. package/dist/mjs/models/product-discount.js +0 -7
  287. package/dist/mjs/models/product-discount.js.map +0 -1
  288. package/dist/mjs/models/product-selection.d.ts +0 -638
  289. package/dist/mjs/models/product-selection.d.ts.map +0 -1
  290. package/dist/mjs/models/product-selection.js +0 -7
  291. package/dist/mjs/models/product-selection.js.map +0 -1
  292. package/dist/mjs/models/product-type.d.ts +0 -774
  293. package/dist/mjs/models/product-type.d.ts.map +0 -1
  294. package/dist/mjs/models/product-type.js +0 -7
  295. package/dist/mjs/models/product-type.js.map +0 -1
  296. package/dist/mjs/models/product.d.ts +0 -2282
  297. package/dist/mjs/models/product.d.ts.map +0 -1
  298. package/dist/mjs/models/product.js +0 -7
  299. package/dist/mjs/models/product.js.map +0 -1
  300. package/dist/mjs/models/project.d.ts +0 -381
  301. package/dist/mjs/models/project.d.ts.map +0 -1
  302. package/dist/mjs/models/project.js +0 -7
  303. package/dist/mjs/models/project.js.map +0 -1
  304. package/dist/mjs/models/quote-request.d.ts +0 -430
  305. package/dist/mjs/models/quote-request.d.ts.map +0 -1
  306. package/dist/mjs/models/quote-request.js +0 -7
  307. package/dist/mjs/models/quote-request.js.map +0 -1
  308. package/dist/mjs/models/quote.d.ts +0 -458
  309. package/dist/mjs/models/quote.d.ts.map +0 -1
  310. package/dist/mjs/models/quote.js +0 -7
  311. package/dist/mjs/models/quote.js.map +0 -1
  312. package/dist/mjs/models/review.d.ts +0 -435
  313. package/dist/mjs/models/review.d.ts.map +0 -1
  314. package/dist/mjs/models/review.js +0 -7
  315. package/dist/mjs/models/review.js.map +0 -1
  316. package/dist/mjs/models/scalar-types.d.ts +0 -9
  317. package/dist/mjs/models/scalar-types.d.ts.map +0 -1
  318. package/dist/mjs/models/scalar-types.js +0 -7
  319. package/dist/mjs/models/scalar-types.js.map +0 -1
  320. package/dist/mjs/models/shipping-method.d.ts +0 -569
  321. package/dist/mjs/models/shipping-method.d.ts.map +0 -1
  322. package/dist/mjs/models/shipping-method.js +0 -7
  323. package/dist/mjs/models/shipping-method.js.map +0 -1
  324. package/dist/mjs/models/shopping-list.d.ts +0 -844
  325. package/dist/mjs/models/shopping-list.d.ts.map +0 -1
  326. package/dist/mjs/models/shopping-list.js +0 -7
  327. package/dist/mjs/models/shopping-list.js.map +0 -1
  328. package/dist/mjs/models/staged-quote.d.ts +0 -338
  329. package/dist/mjs/models/staged-quote.d.ts.map +0 -1
  330. package/dist/mjs/models/staged-quote.js +0 -7
  331. package/dist/mjs/models/staged-quote.js.map +0 -1
  332. package/dist/mjs/models/standalone-price.d.ts +0 -410
  333. package/dist/mjs/models/standalone-price.d.ts.map +0 -1
  334. package/dist/mjs/models/standalone-price.js +0 -7
  335. package/dist/mjs/models/standalone-price.js.map +0 -1
  336. package/dist/mjs/models/state.d.ts +0 -341
  337. package/dist/mjs/models/state.d.ts.map +0 -1
  338. package/dist/mjs/models/state.js +0 -7
  339. package/dist/mjs/models/state.js.map +0 -1
  340. package/dist/mjs/models/store-country.d.ts +0 -14
  341. package/dist/mjs/models/store-country.d.ts.map +0 -1
  342. package/dist/mjs/models/store-country.js +0 -7
  343. package/dist/mjs/models/store-country.js.map +0 -1
  344. package/dist/mjs/models/store.d.ts +0 -547
  345. package/dist/mjs/models/store.d.ts.map +0 -1
  346. package/dist/mjs/models/store.js +0 -7
  347. package/dist/mjs/models/store.js.map +0 -1
  348. package/dist/mjs/models/subscription.d.ts +0 -717
  349. package/dist/mjs/models/subscription.d.ts.map +0 -1
  350. package/dist/mjs/models/subscription.js +0 -7
  351. package/dist/mjs/models/subscription.js.map +0 -1
  352. package/dist/mjs/models/tax-category.d.ts +0 -376
  353. package/dist/mjs/models/tax-category.d.ts.map +0 -1
  354. package/dist/mjs/models/tax-category.js +0 -7
  355. package/dist/mjs/models/tax-category.js.map +0 -1
  356. package/dist/mjs/models/type.d.ts +0 -645
  357. package/dist/mjs/models/type.d.ts.map +0 -1
  358. package/dist/mjs/models/type.js +0 -7
  359. package/dist/mjs/models/type.js.map +0 -1
  360. package/dist/mjs/models/zone.d.ts +0 -234
  361. package/dist/mjs/models/zone.d.ts.map +0 -1
  362. package/dist/mjs/models/zone.js +0 -7
  363. package/dist/mjs/models/zone.js.map +0 -1
@@ -1,2483 +0,0 @@
1
- /**
2
- * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
3
- * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
4
- * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
- */
6
- import { AssociateDraft, AssociateRoleAssignmentDraft, BusinessUnitResourceIdentifier, BusinessUnitUpdateAction } from './business-unit.js';
7
- import { CartReference, ExternalLineItemTotalPrice, ExternalTaxRateDraft, InventoryMode, ItemShippingDetailsDraft, ItemShippingTarget, TaxMode } from './cart.js';
8
- import { ChannelResourceIdentifier } from './channel.js';
9
- import { BaseAddress, CentPrecisionMoney, LocalizedString, _BaseAddress, _Money } from './common.js';
10
- import { CustomerReference, CustomerResourceIdentifier } from './customer.js';
11
- import { DiscountCodeReference } from './discount-code.js';
12
- import { OrderReference } from './order.js';
13
- import { PaymentMethodInfo, PaymentResourceIdentifier, Transaction, TransactionDraft, TransactionType } from './payment.js';
14
- import { ShippingMethodResourceIdentifier } from './shipping-method.js';
15
- import { ShoppingListLineItemDraft, TextLineItemDraft } from './shopping-list.js';
16
- import { StoreResourceIdentifier } from './store.js';
17
- import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type.js';
18
- export interface MyBusinessUnitAssociateDraft {
19
- /**
20
- * Expected version of the BusinessUnit on which the changes should be applied. If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error will be returned.
21
- *
22
- *
23
- */
24
- readonly version: number;
25
- /**
26
- * [Customer](ctp:api:type:Customer) to create and assign to the Business Unit.
27
- *
28
- *
29
- */
30
- readonly customer: MyCustomerDraft;
31
- /**
32
- * Roles assigned to the new Associate within a Business Unit.
33
- *
34
- *
35
- */
36
- readonly associateRoleAssignments: AssociateRoleAssignmentDraft[];
37
- }
38
- export type MyBusinessUnitDraft = MyCompanyDraft | MyDivisionDraft;
39
- export interface MyBusinessUnitUpdate {
40
- /**
41
- * Expected version of the BusinessUnit on which the changes should be applied.
42
- * If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error will be returned.
43
- *
44
- *
45
- */
46
- readonly version: number;
47
- /**
48
- * Update actions to be performed on the BusinessUnit.
49
- *
50
- *
51
- */
52
- readonly actions: BusinessUnitUpdateAction[];
53
- }
54
- export type MyBusinessUnitUpdateAction = MyBusinessUnitAddAddressAction | MyBusinessUnitAddBillingAddressIdAction | MyBusinessUnitAddShippingAddressIdAction | MyBusinessUnitChangeAddressAction | MyBusinessUnitChangeAssociateAction | MyBusinessUnitChangeNameAction | MyBusinessUnitChangeParentUnitAction | MyBusinessUnitRemoveAddressAction | MyBusinessUnitRemoveAssociateAction | MyBusinessUnitRemoveBillingAddressIdAction | MyBusinessUnitRemoveShippingAddressIdAction | MyBusinessUnitSetAddressCustomFieldAction | MyBusinessUnitSetAddressCustomTypeAction | MyBusinessUnitSetContactEmailAction | MyBusinessUnitSetCustomFieldAction | MyBusinessUnitSetCustomTypeAction | MyBusinessUnitSetDefaultBillingAddressAction | MyBusinessUnitSetDefaultShippingAddressAction;
55
- /**
56
- * The `customerId` is determined by a [password flow token](/../api/authorization#password-flow) and
57
- * automatically set on the resulting [Cart](ctp:api:type:Cart).
58
- * The `anonymousId` is determined by a [token for an anonymous session](ctp:api:type:AnonymousSession) and
59
- * automatically set on the resulting [Cart](ctp:api:type:Cart).
60
- *
61
- */
62
- export interface MyCartDraft {
63
- /**
64
- * Currency the Cart uses.
65
- *
66
- *
67
- */
68
- readonly currency: string;
69
- /**
70
- * Email address of the Customer the Cart belongs to.
71
- *
72
- *
73
- */
74
- readonly customerEmail?: string;
75
- /**
76
- * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Business Unit the Cart should belong to. The [Customer](ctp:api:type:Customer) must be an [Associate](ctp:api:type:Associate) of the Business Unit.
77
- *
78
- *
79
- */
80
- readonly businessUnit?: BusinessUnitResourceIdentifier;
81
- /**
82
- * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Store the Cart should belong to. Once set, it cannot be updated.
83
- *
84
- *
85
- */
86
- readonly store?: StoreResourceIdentifier;
87
- /**
88
- * [Line Items](ctp:api:type:LineItems) to add to the Cart.
89
- *
90
- *
91
- */
92
- readonly lineItems?: MyLineItemDraft[];
93
- /**
94
- * Determines how Tax Rates are set. The `Disabled` TaxMode **cannot** be set.
95
- *
96
- *
97
- */
98
- readonly taxMode?: TaxMode;
99
- /**
100
- * Determines how stock quantities are tracked for Line Items in the Cart.
101
- *
102
- *
103
- */
104
- readonly inventoryMode?: InventoryMode;
105
- /**
106
- * Billing address associated with the Cart.
107
- *
108
- *
109
- */
110
- readonly billingAddress?: _BaseAddress;
111
- /**
112
- * Shipping address associated with the Cart. Determines eligible [ShippingMethod](ctp:api:type:ShippingMethod) rates and Tax Rates of Line Items.
113
- *
114
- *
115
- */
116
- readonly shippingAddress?: _BaseAddress;
117
- /**
118
- * Shipping Method for the Cart. If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) has a `predicate` that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned when [creating a Cart](ctp:api:endpoint:/{projectKey}/carts:POST).
119
- *
120
- *
121
- */
122
- readonly shippingMethod?: ShippingMethodResourceIdentifier;
123
- /**
124
- * Multiple shipping addresses of the Cart. Each address must contain a `key` that is unique in this Cart.
125
- * The keys are used by [LineItems](ctp:api:type:LineItem) to reference these addresses under their `shippingDetails`.
126
- *
127
- * Eligible Shipping Methods or applicable Tax Rates are determined by the [Cart](ctp:api:type:Cart) `shippingAddress`, and not `itemShippingAddresses`.
128
- *
129
- *
130
- */
131
- readonly itemShippingAddresses?: BaseAddress[];
132
- /**
133
- * `code` of the existing [DiscountCodes](ctp:api:type:DiscountCode) to add to the Cart.
134
- *
135
- *
136
- */
137
- readonly discountCodes?: string[];
138
- /**
139
- * Used for [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
140
- * If used for [Create Cart in Store](ctp:api:endpoint:/{projectKey}/in-store/me/carts:POST), the provided country must be one of the [Store's](ctp:api:type:Store) `countries`.
141
- *
142
- *
143
- */
144
- readonly country?: string;
145
- /**
146
- * Languages of the Cart.
147
- * Can only contain languages supported by the [Project](ctp:api:type:Project).
148
- *
149
- *
150
- */
151
- readonly locale?: string;
152
- /**
153
- * Number of days after which a Cart with `Active` [CartState](ctp:api:type:CartState) is deleted since its last modification.
154
- * If not provided, the default value for this field configured in [Project settings](ctp:api:type:CartsConfiguration) is assigned.
155
- *
156
- * Create a [ChangeSubscription](ctp:api:type:ChangeSubscription) for Carts to receive a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) upon deletion of the Cart.
157
- *
158
- *
159
- */
160
- readonly deleteDaysAfterLastModification?: number;
161
- /**
162
- * Custom Fields for the Cart.
163
- *
164
- *
165
- */
166
- readonly custom?: CustomFieldsDraft;
167
- }
168
- export interface MyCartUpdate {
169
- /**
170
- * Expected version of the Cart on which the changes apply.
171
- * If it does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error is returned.
172
- *
173
- *
174
- */
175
- readonly version: number;
176
- /**
177
- * Update actions to be performed on the Cart.
178
- *
179
- *
180
- */
181
- readonly actions: MyCartUpdateAction[];
182
- }
183
- export type MyCartUpdateAction = MyCartAddDiscountCodeAction | MyCartAddItemShippingAddressAction | MyCartAddLineItemAction | MyCartAddPaymentAction | MyCartApplyDeltaToLineItemShippingDetailsTargetsAction | MyCartChangeLineItemQuantityAction | MyCartChangeTaxModeAction | MyCartRecalculateAction | MyCartRemoveDiscountCodeAction | MyCartRemoveItemShippingAddressAction | MyCartRemoveLineItemAction | MyCartRemovePaymentAction | MyCartSetBillingAddressAction | MyCartSetBusinessUnitAction | MyCartSetCountryAction | MyCartSetCustomFieldAction | MyCartSetCustomTypeAction | MyCartSetCustomerEmailAction | MyCartSetDeleteDaysAfterLastModificationAction | MyCartSetLineItemCustomFieldAction | MyCartSetLineItemCustomTypeAction | MyCartSetLineItemDistributionChannelAction | MyCartSetLineItemShippingDetailsAction | MyCartSetLineItemSupplyChannelAction | MyCartSetLocaleAction | MyCartSetShippingAddressAction | MyCartSetShippingMethodAction | MyCartUpdateItemShippingAddressAction;
184
- /**
185
- * Draft type to represent the top level of a business.
186
- * Contains the fields and values of the generic [MyBusinessUnitDraft](ctp:api:type:BusinessUnitDraft) that are used specifically for creating a [Company](ctp:api:type:Company).
187
- *
188
- */
189
- export interface MyCompanyDraft {
190
- readonly unitType: 'Company';
191
- /**
192
- * User-defined unique identifier for the BusinessUnit.
193
- *
194
- *
195
- */
196
- readonly key: string;
197
- /**
198
- * Name of the Business Unit.
199
- *
200
- *
201
- */
202
- readonly name: string;
203
- /**
204
- * Email address of the Business Unit.
205
- *
206
- *
207
- */
208
- readonly contactEmail?: string;
209
- /**
210
- * Custom Fields for the Business Unit.
211
- *
212
- *
213
- */
214
- readonly custom?: CustomFields;
215
- /**
216
- * Addresses used by the Business Unit.
217
- *
218
- *
219
- */
220
- readonly addresses?: BaseAddress[];
221
- /**
222
- * Indexes of entries in `addresses` to set as shipping addresses.
223
- * The `shippingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
224
- *
225
- *
226
- */
227
- readonly shippingAddresses?: number[];
228
- /**
229
- * Index of the entry in `addresses` to set as the default shipping address.
230
- *
231
- *
232
- */
233
- readonly defaultShippingAddress?: number;
234
- /**
235
- * Indexes of entries in `addresses` to set as billing addresses.
236
- * The `billingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
237
- *
238
- *
239
- */
240
- readonly billingAddresses?: number[];
241
- /**
242
- * Index of the entry in `addresses` to set as the default billing address.
243
- *
244
- *
245
- */
246
- readonly defaultBillingAddress?: number;
247
- }
248
- export interface MyCustomerDraft {
249
- /**
250
- * Email address of the Customer that is [unique](/../api/customers-overview#customer-uniqueness) for an entire Project or Store the Customer is assigned to.
251
- * It is the mandatory unique identifier of a Customer.
252
- *
253
- *
254
- */
255
- readonly email: string;
256
- /**
257
- * Password of the Customer.
258
- *
259
- *
260
- */
261
- readonly password: string;
262
- /**
263
- * Given name (first name) of the Customer.
264
- *
265
- *
266
- */
267
- readonly firstName?: string;
268
- /**
269
- * Family name (last name) of the Customer.
270
- *
271
- *
272
- */
273
- readonly lastName?: string;
274
- /**
275
- * Middle name of the Customer.
276
- *
277
- *
278
- */
279
- readonly middleName?: string;
280
- /**
281
- * Title of the Customer, for example, 'Dr.'.
282
- *
283
- *
284
- */
285
- readonly title?: string;
286
- /**
287
- * Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.
288
- *
289
- *
290
- */
291
- readonly salutation?: string;
292
- /**
293
- * Date of birth of the Customer.
294
- *
295
- *
296
- */
297
- readonly dateOfBirth?: string;
298
- /**
299
- * Company name of the Customer.
300
- *
301
- *
302
- */
303
- readonly companyName?: string;
304
- /**
305
- * Unique VAT ID of the Customer.
306
- *
307
- *
308
- */
309
- readonly vatId?: string;
310
- /**
311
- * Addresses of the Customer.
312
- *
313
- *
314
- */
315
- readonly addresses?: BaseAddress[];
316
- /**
317
- * Index of the address in the `addresses` array to use as the default shipping address.
318
- * The `defaultShippingAddressId` of the Customer will be set to the `id` of that address.
319
- *
320
- *
321
- */
322
- readonly defaultShippingAddress?: number;
323
- /**
324
- * Index of the address in the `addresses` array to use as the default billing address.
325
- * The `defaultBillingAddressId` of the Customer will be set to the `id` of that address.
326
- *
327
- *
328
- */
329
- readonly defaultBillingAddress?: number;
330
- /**
331
- * Custom Fields for the Customer.
332
- *
333
- *
334
- */
335
- readonly custom?: CustomFieldsDraft;
336
- /**
337
- * Preferred language of the Customer. Must be one of the languages supported by the [Project](ctp:api:type:Project).
338
- *
339
- *
340
- */
341
- readonly locale?: string;
342
- /**
343
- * Sets the [Stores](ctp:api:type:Store) for the Customer.
344
- *
345
- *
346
- */
347
- readonly stores?: StoreResourceIdentifier[];
348
- }
349
- export interface MyCustomerUpdate {
350
- /**
351
- * Expected version of the Customer on which the changes should be applied. If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error will be returned.
352
- *
353
- *
354
- */
355
- readonly version: number;
356
- /**
357
- * Update actions to be performed on the Customer.
358
- *
359
- *
360
- */
361
- readonly actions: MyCustomerUpdateAction[];
362
- }
363
- export type MyCustomerUpdateAction = MyCustomerAddAddressAction | MyCustomerAddBillingAddressIdAction | MyCustomerAddShippingAddressIdAction | MyCustomerChangeAddressAction | MyCustomerChangeEmailAction | MyCustomerRemoveAddressAction | MyCustomerRemoveBillingAddressIdAction | MyCustomerRemoveShippingAddressIdAction | MyCustomerSetCompanyNameAction | MyCustomerSetCustomFieldAction | MyCustomerSetCustomTypeAction | MyCustomerSetDateOfBirthAction | MyCustomerSetDefaultBillingAddressAction | MyCustomerSetDefaultShippingAddressAction | MyCustomerSetFirstNameAction | MyCustomerSetLastNameAction | MyCustomerSetLocaleAction | MyCustomerSetMiddleNameAction | MyCustomerSetSalutationAction | MyCustomerSetTitleAction | MyCustomerSetVatIdAction;
364
- /**
365
- * Draft type to model divisions that are part of the [Company](ctp:api:type:Company) or a higher-order [Division](ctp:api:type:Division).
366
- * Contains the fields and values of the generic [MyBusinessUnitDraft](ctp:api:type:MyBusinessUnitDraft) that are used specifically for creating a Division.
367
- *
368
- */
369
- export interface MyDivisionDraft {
370
- readonly unitType: 'Division';
371
- /**
372
- * User-defined unique identifier for the BusinessUnit.
373
- *
374
- *
375
- */
376
- readonly key: string;
377
- /**
378
- * Name of the Business Unit.
379
- *
380
- *
381
- */
382
- readonly name: string;
383
- /**
384
- * Email address of the Business Unit.
385
- *
386
- *
387
- */
388
- readonly contactEmail?: string;
389
- /**
390
- * Custom Fields for the Business Unit.
391
- *
392
- *
393
- */
394
- readonly custom?: CustomFields;
395
- /**
396
- * Addresses used by the Business Unit.
397
- *
398
- *
399
- */
400
- readonly addresses?: BaseAddress[];
401
- /**
402
- * Indexes of entries in `addresses` to set as shipping addresses.
403
- * The `shippingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
404
- *
405
- *
406
- */
407
- readonly shippingAddresses?: number[];
408
- /**
409
- * Index of the entry in `addresses` to set as the default shipping address.
410
- *
411
- *
412
- */
413
- readonly defaultShippingAddress?: number;
414
- /**
415
- * Indexes of entries in `addresses` to set as billing addresses.
416
- * The `billingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
417
- *
418
- *
419
- */
420
- readonly billingAddresses?: number[];
421
- /**
422
- * Index of the entry in `addresses` to set as the default billing address.
423
- *
424
- *
425
- */
426
- readonly defaultBillingAddress?: number;
427
- /**
428
- * The parent unit of this Division. Can be a Company or a Division.
429
- *
430
- *
431
- */
432
- readonly parentUnit: BusinessUnitResourceIdentifier;
433
- }
434
- /**
435
- * For Product Variant identification, either the `productId` and `variantId`, or `sku` must be provided.
436
- *
437
- */
438
- export interface MyLineItemDraft {
439
- /**
440
- * `id` of the [Product](ctp:api:type:Product).
441
- *
442
- *
443
- */
444
- readonly productId?: string;
445
- /**
446
- * `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
447
- * If not provided, the Master Variant is used.
448
- *
449
- *
450
- */
451
- readonly variantId?: number;
452
- /**
453
- * `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
454
- *
455
- *
456
- */
457
- readonly sku?: string;
458
- /**
459
- * Number of Product Variants to add to the Cart.
460
- *
461
- *
462
- */
463
- readonly quantity?: number;
464
- /**
465
- * Date and time (UTC) the Product Variant is added to the Cart.
466
- * If not set, it defaults to the current date and time.
467
- *
468
- * Optional for backwards compatibility reasons.
469
- *
470
- *
471
- */
472
- readonly addedAt?: string;
473
- /**
474
- * Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
475
- * The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
476
- *
477
- *
478
- */
479
- readonly supplyChannel?: ChannelResourceIdentifier;
480
- /**
481
- * Used to [select](ctp:api:type:LineItemPriceSelection) a Product Price.
482
- * The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
483
- *
484
- * If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set,
485
- * the Channel must match one of the Store's distribution channels.
486
- *
487
- *
488
- */
489
- readonly distributionChannel?: ChannelResourceIdentifier;
490
- /**
491
- * Container for Line Item-specific addresses.
492
- *
493
- *
494
- */
495
- readonly shippingDetails?: ItemShippingDetailsDraft;
496
- /**
497
- * Custom Fields for the Cart.
498
- *
499
- *
500
- */
501
- readonly custom?: CustomFieldsDraft;
502
- }
503
- /**
504
- * When creating [B2B Orders](/../api/associates-overview#b2b-resources), the Customer must have the `MyOrderFromCartDraft` [Permission](ctp:api:type:Permission).
505
- */
506
- export interface MyOrderFromCartDraft {
507
- /**
508
- * Unique identifier of the Cart that initiates an Order creation.
509
- *
510
- */
511
- readonly id: string;
512
- /**
513
- *
514
- */
515
- readonly version: number;
516
- }
517
- /**
518
- * When creating [B2B Orders](/../api/associates-overview#b2b-resources), the Customer must have the `MyOrderFromQuoteDraft` [Permission](ctp:api:type:Permission).
519
- */
520
- export interface MyOrderFromQuoteDraft {
521
- /**
522
- * Unique identifier of the Quote from which the Order is created.
523
- *
524
- */
525
- readonly id: string;
526
- /**
527
- * `version` of the [Quote](ctp:api:type:quote) from which the Order is created.
528
- *
529
- *
530
- */
531
- readonly version: number;
532
- /**
533
- * Set to `true`, if the `quoteState` of the referenced [Quote](ctp:api:type:quote) should be set to `Accepted`.
534
- *
535
- *
536
- */
537
- readonly quoteStateToAccepted?: boolean;
538
- }
539
- export interface MyPayment {
540
- /**
541
- * Unique identifier of the Payment.
542
- *
543
- *
544
- */
545
- readonly id: string;
546
- /**
547
- * Current version of the Payment.
548
- *
549
- *
550
- */
551
- readonly version: number;
552
- /**
553
- * Reference to a [Customer](ctp:api:type:Customer) associated with the Payment. Set automatically with a [password flow token](/../api/authorization#password-flow). Either `customer` or `anonymousId` is present.
554
- *
555
- *
556
- */
557
- readonly customer?: CustomerReference;
558
- /**
559
- * [Anonymous session](ctp:api:type:AnonymousSession) associated with the Payment. Set automatically with a [token for an anonymous session](ctp:api:type:AnonymousSession). Either `customer` or `anonymousId` is present.
560
- *
561
- *
562
- */
563
- readonly anonymousId?: string;
564
- /**
565
- * Money value the Payment intends to receive from the customer.
566
- * The value typically matches the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) gross total.
567
- *
568
- *
569
- */
570
- readonly amountPlanned: CentPrecisionMoney;
571
- /**
572
- * Information regarding the payment interface (for example, a PSP), and the specific payment method used.
573
- *
574
- *
575
- */
576
- readonly paymentMethodInfo: PaymentMethodInfo;
577
- /**
578
- * Financial transactions of the Payment. Each Transaction has a [TransactionType](ctp:api:type:TransactionType) and a [TransactionState](ctp:api:type:TransactionState).
579
- *
580
- *
581
- */
582
- readonly transactions: Transaction[];
583
- /**
584
- * Custom Fields defined for the Payment.
585
- *
586
- *
587
- */
588
- readonly custom?: CustomFields;
589
- }
590
- export interface MyPaymentDraft {
591
- /**
592
- * Money value the Payment intends to receive from the customer.
593
- * The value usually matches the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) gross total.
594
- *
595
- *
596
- */
597
- readonly amountPlanned: _Money;
598
- /**
599
- * Information regarding the payment interface (for example, a PSP), and the specific payment method used.
600
- *
601
- *
602
- */
603
- readonly paymentMethodInfo?: PaymentMethodInfo;
604
- /**
605
- * Custom Fields for the Payment.
606
- *
607
- *
608
- */
609
- readonly custom?: CustomFieldsDraft;
610
- /**
611
- * Financial transactions of the [TransactionTypes](ctp:api:type:TransactionType) `Authorization` or `Charge`.
612
- *
613
- *
614
- */
615
- readonly transaction?: MyTransactionDraft;
616
- }
617
- /**
618
- * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [MyPayment](ctp:api:type:MyPayment).
619
- *
620
- */
621
- export interface MyPaymentPagedQueryResponse {
622
- /**
623
- * Number of [results requested](/../api/general-concepts#limit).
624
- *
625
- *
626
- */
627
- readonly limit: number;
628
- /**
629
- * Actual number of results returned.
630
- *
631
- *
632
- */
633
- readonly count: number;
634
- /**
635
- * Total number of results matching the query.
636
- * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
637
- * This field is returned by default.
638
- * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
639
- * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
640
- *
641
- *
642
- */
643
- readonly total?: number;
644
- /**
645
- * Number of [elements skipped](/../api/general-concepts#offset).
646
- *
647
- *
648
- */
649
- readonly offset: number;
650
- /**
651
- * [MyPayments](ctp:api:type:MyPayment) matching the query.
652
- *
653
- *
654
- */
655
- readonly results: MyPayment[];
656
- }
657
- export interface MyPaymentUpdate {
658
- /**
659
- * Expected version of the Payment on which the changes should be applied. If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) will be returned.
660
- *
661
- *
662
- */
663
- readonly version: number;
664
- /**
665
- * Update actions to be performed on the Payment.
666
- *
667
- *
668
- */
669
- readonly actions: MyPaymentUpdateAction[];
670
- }
671
- export type MyPaymentUpdateAction = MyPaymentAddTransactionAction | MyPaymentChangeAmountPlannedAction | MyPaymentSetCustomFieldAction | MyPaymentSetMethodInfoInterfaceAction | MyPaymentSetMethodInfoMethodAction | MyPaymentSetMethodInfoNameAction | MyPaymentSetTransactionCustomFieldAction;
672
- export interface MyQuoteRequestDraft {
673
- /**
674
- * `id` of the Cart from which the Quote Request is created.
675
- *
676
- *
677
- */
678
- readonly cartId: string;
679
- /**
680
- * Current version of the Cart.
681
- *
682
- */
683
- readonly cartVersion: number;
684
- /**
685
- * Message from the Buyer included in the Quote Request.
686
- *
687
- */
688
- readonly comment: string;
689
- }
690
- export interface MyQuoteRequestUpdate {
691
- /**
692
- *
693
- */
694
- readonly version: number;
695
- /**
696
- *
697
- */
698
- readonly actions: MyQuoteRequestUpdateAction[];
699
- }
700
- export type MyQuoteRequestUpdateAction = MyQuoteRequestCancelAction;
701
- /**
702
- * [QuoteStates](ctp:api:type:QuoteState) that can be set using the [Change My Quote State](ctp:api:type:MyQuoteChangeMyQuoteStateAction) update action.
703
- *
704
- */
705
- export type MyQuoteState = 'Accepted' | 'Declined' | string;
706
- export interface MyQuoteUpdate {
707
- /**
708
- * Expected version of the [Quote](ctp:api:type:Quote) to which the changes should be applied.
709
- * If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error will be returned.
710
- *
711
- *
712
- */
713
- readonly version: number;
714
- /**
715
- * Update actions to be performed on the [Quote](ctp:api:type:Quote).
716
- *
717
- *
718
- */
719
- readonly actions: MyQuoteUpdateAction[];
720
- }
721
- export type MyQuoteUpdateAction = MyQuoteChangeMyQuoteStateAction;
722
- /**
723
- * A [MyShoppingListDraft](ctp:api:type:MyShoppingListDraft) is the object submitted as payload to the [Create MyShoppingList request](ctp:api:endpoint:/{projectKey}/me/shopping-lists:POST).
724
- * The `customer` field of [ShoppingList](ctp:api:type:ShoppingList) is automatically set with
725
- * a [password flow token](/authorization#password-flow).
726
- * The `anonymousId` is automatically set with a [token for an anonymous session](/authorization#tokens-for-anonymous-sessions).
727
- * The `key` and `slug` fields can not be set.
728
- *
729
- */
730
- export interface MyShoppingListDraft {
731
- /**
732
- * Name of the [ShoppingList](ctp:api:type:ShoppingList).
733
- *
734
- *
735
- */
736
- readonly name: LocalizedString;
737
- /**
738
- * Description of the ShoppingList.
739
- *
740
- *
741
- */
742
- readonly description?: LocalizedString;
743
- /**
744
- * [Line Items](ctp:api:type:ShoppingListLineItem) (containing Products) to add to the ShoppingList.
745
- *
746
- *
747
- */
748
- readonly lineItems?: ShoppingListLineItemDraft[];
749
- /**
750
- * [Line Items](ctp:api:type:TextLineItem) (containing text values) to add to the ShoppingList.
751
- *
752
- *
753
- */
754
- readonly textLineItems?: TextLineItemDraft[];
755
- /**
756
- * Custom Fields defined for the ShoppingList.
757
- *
758
- *
759
- */
760
- readonly custom?: CustomFieldsDraft;
761
- /**
762
- * Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the [default value](ctp:api:type:ShoppingListsConfiguration) configured in the [Project](ctp:api:type:Project) is used.
763
- *
764
- *
765
- */
766
- readonly deleteDaysAfterLastModification?: number;
767
- /**
768
- * Assigns the new ShoppingList to the [Store](ctp:api:type:Store). The Store assignment can not be modified.
769
- *
770
- *
771
- */
772
- readonly store?: StoreResourceIdentifier;
773
- }
774
- export interface MyShoppingListUpdate {
775
- /**
776
- * Expected version of the ShoppingList on which the changes should be applied. If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) will be returned.
777
- *
778
- *
779
- */
780
- readonly version: number;
781
- /**
782
- * List of update actions to be performed on the ShoppingList.
783
- *
784
- *
785
- */
786
- readonly actions: MyShoppingListUpdateAction[];
787
- }
788
- export type MyShoppingListUpdateAction = MyShoppingListAddLineItemAction | MyShoppingListAddTextLineItemAction | MyShoppingListChangeLineItemQuantityAction | MyShoppingListChangeLineItemsOrderAction | MyShoppingListChangeNameAction | MyShoppingListChangeTextLineItemNameAction | MyShoppingListChangeTextLineItemQuantityAction | MyShoppingListChangeTextLineItemsOrderAction | MyShoppingListRemoveLineItemAction | MyShoppingListRemoveTextLineItemAction | MyShoppingListSetCustomFieldAction | MyShoppingListSetCustomTypeAction | MyShoppingListSetDeleteDaysAfterLastModificationAction | MyShoppingListSetDescriptionAction | MyShoppingListSetLineItemCustomFieldAction | MyShoppingListSetLineItemCustomTypeAction | MyShoppingListSetTextLineItemCustomFieldAction | MyShoppingListSetTextLineItemCustomTypeAction | MyShoppingListSetTextLineItemDescriptionAction;
789
- export interface MyTransactionDraft {
790
- /**
791
- * Date and time (UTC) the Transaction took place.
792
- *
793
- *
794
- */
795
- readonly timestamp?: string;
796
- /**
797
- * Type of the Transaction.
798
- * Only `Authorization` or `Charge` is allowed.
799
- *
800
- *
801
- */
802
- readonly type: TransactionType;
803
- /**
804
- * Money value for the Transaction.
805
- *
806
- *
807
- */
808
- readonly amount: _Money;
809
- /**
810
- * Identifier used by the payment service that manages the Transaction.
811
- * Can be used to correlate the Transaction to an interface interaction.
812
- *
813
- *
814
- */
815
- readonly interactionId?: string;
816
- /**
817
- * Custom Fields of the Transaction.
818
- *
819
- *
820
- */
821
- readonly custom?: CustomFieldsDraft;
822
- }
823
- export interface ReplicaMyCartDraft {
824
- /**
825
- * [Reference](ctp:api:type:Reference) to a [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) that is replicated.
826
- *
827
- *
828
- */
829
- readonly reference: CartReference | OrderReference;
830
- }
831
- /**
832
- * Adding an address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitAddressAdded](ctp:api:type:BusinessUnitAddressAddedMessage) Message.
833
- *
834
- */
835
- export interface MyBusinessUnitAddAddressAction {
836
- readonly action: 'addAddress';
837
- /**
838
- * The address to add to `addresses`.
839
- *
840
- *
841
- */
842
- readonly address: _BaseAddress;
843
- }
844
- /**
845
- * Adding a billing address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitBillingAddressAdded](ctp:api:type:BusinessUnitBillingAddressAddedMessage) Message.
846
- *
847
- */
848
- export interface MyBusinessUnitAddBillingAddressIdAction {
849
- readonly action: 'addBillingAddressId';
850
- /**
851
- * ID of the address to add as a billing address. Either `addressId` or `addressKey` is required.
852
- *
853
- *
854
- */
855
- readonly addressId?: string;
856
- /**
857
- * Key of the address to add as a billing address. Either `addressId` or `addressKey` is required.
858
- *
859
- *
860
- */
861
- readonly addressKey?: string;
862
- }
863
- /**
864
- * Adding a shipping address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressAdded](ctp:api:type:BusinessUnitShippingAddressAddedMessage) Message.
865
- *
866
- */
867
- export interface MyBusinessUnitAddShippingAddressIdAction {
868
- readonly action: 'addShippingAddressId';
869
- /**
870
- * ID of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
871
- *
872
- *
873
- */
874
- readonly addressId?: string;
875
- /**
876
- * Key of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
877
- *
878
- *
879
- */
880
- readonly addressKey?: string;
881
- }
882
- /**
883
- * Changing the address on a Business Unit generates the [BusinessUnitAddressChanged](ctp:api:type:BusinessUnitAddressChangedMessage) Message.
884
- *
885
- */
886
- export interface MyBusinessUnitChangeAddressAction {
887
- readonly action: 'changeAddress';
888
- /**
889
- * ID of the address to change. Either `addressId` or `addressKey` is required.
890
- *
891
- *
892
- */
893
- readonly addressId?: string;
894
- /**
895
- * Key of the address to change. Either `addressId` or `addressKey` is required.
896
- *
897
- *
898
- */
899
- readonly addressKey?: string;
900
- /**
901
- * New address to set.
902
- *
903
- *
904
- */
905
- readonly address: _BaseAddress;
906
- }
907
- /**
908
- * Updating the [Associate](ctp:api:type:Associate) on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitAssociateChanged](ctp:api:type:BusinessUnitAssociateChangedMessage) Message.
909
- *
910
- */
911
- export interface MyBusinessUnitChangeAssociateAction {
912
- readonly action: 'changeAssociate';
913
- /**
914
- * The Associate to add.
915
- *
916
- *
917
- */
918
- readonly associate: AssociateDraft;
919
- }
920
- /**
921
- * Updating the name on a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitNameChanged](ctp:api:type:BusinessUnitNameChangedMessage) Message.
922
- *
923
- */
924
- export interface MyBusinessUnitChangeNameAction {
925
- readonly action: 'changeName';
926
- /**
927
- * New name to set.
928
- *
929
- *
930
- */
931
- readonly name: string;
932
- }
933
- /**
934
- * Changing the parent of a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitParentUnitChanged](ctp:api:type:BusinessUnitParentUnitChangedMessage) Message.
935
- *
936
- */
937
- export interface MyBusinessUnitChangeParentUnitAction {
938
- readonly action: 'changeParentUnit';
939
- /**
940
- * New parent unit of the [Business Unit](ctp:api:type:BusinessUnit).
941
- *
942
- *
943
- */
944
- readonly parentUnit: BusinessUnitResourceIdentifier;
945
- }
946
- /**
947
- * Removing the address from a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitAddressRemoved](ctp:api:type:BusinessUnitAddressRemovedMessage) Message.
948
- *
949
- */
950
- export interface MyBusinessUnitRemoveAddressAction {
951
- readonly action: 'removeAddress';
952
- /**
953
- * ID of the address to be removed. Either `addressId` or `addressKey` is required.
954
- *
955
- *
956
- */
957
- readonly addressId?: string;
958
- /**
959
- * Key of the address to be removed. Either `addressId` or `addressKey` is required.
960
- *
961
- *
962
- */
963
- readonly addressKey?: string;
964
- }
965
- /**
966
- * Removing an [Associate](ctp:api:type:Associate) from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitAssociateRemoved](ctp:api:type:BusinessUnitAssociateRemovedMessage) Message.
967
- *
968
- */
969
- export interface MyBusinessUnitRemoveAssociateAction {
970
- readonly action: 'removeAssociate';
971
- /**
972
- * [Associate](ctp:api:type:Associate) to remove.
973
- *
974
- *
975
- */
976
- readonly customer: CustomerResourceIdentifier;
977
- }
978
- /**
979
- * Removing a billing address from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitBillingAddressRemoved](ctp:api:type:BusinessUnitBillingAddressRemovedMessage) Message.
980
- *
981
- */
982
- export interface MyBusinessUnitRemoveBillingAddressIdAction {
983
- readonly action: 'removeBillingAddressId';
984
- /**
985
- * ID of the billing address to be removed. Either `addressId` or `addressKey` is required.
986
- *
987
- *
988
- */
989
- readonly addressId?: string;
990
- /**
991
- * Key of the billing address to be removed. Either `addressId` or `addressKey` is required.
992
- *
993
- *
994
- */
995
- readonly addressKey?: string;
996
- }
997
- /**
998
- * Removing a shipping address from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressRemoved](ctp:api:type:BusinessUnitShippingAddressRemovedMessage) Message.
999
- *
1000
- */
1001
- export interface MyBusinessUnitRemoveShippingAddressIdAction {
1002
- readonly action: 'removeShippingAddressId';
1003
- /**
1004
- * ID of the shipping address to be removed. Either `addressId` or `addressKey` is required.
1005
- *
1006
- *
1007
- */
1008
- readonly addressId?: string;
1009
- /**
1010
- * Key of the shipping address to be removed. Either `addressId` or `addressKey` is required.
1011
- *
1012
- *
1013
- */
1014
- readonly addressKey?: string;
1015
- }
1016
- export interface MyBusinessUnitSetAddressCustomFieldAction {
1017
- readonly action: 'setAddressCustomField';
1018
- /**
1019
- * ID of the `address` to be extended.
1020
- *
1021
- *
1022
- */
1023
- readonly addressId: string;
1024
- /**
1025
- * Name of the [Custom Field](/../api/projects/custom-fields).
1026
- *
1027
- *
1028
- */
1029
- readonly name: string;
1030
- /**
1031
- * If `value` is absent or `null`, this field will be removed if it exists.
1032
- * Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1033
- * If `value` is provided, it is set for the field defined by `name`.
1034
- *
1035
- *
1036
- */
1037
- readonly value?: any;
1038
- }
1039
- export interface MyBusinessUnitSetAddressCustomTypeAction {
1040
- readonly action: 'setAddressCustomType';
1041
- /**
1042
- * Defines the [Type](ctp:api:type:Type) that extends the `address` with [Custom Fields](/../api/projects/custom-fields).
1043
- * If absent, any existing Type and Custom Fields are removed from the `address`.
1044
- *
1045
- *
1046
- */
1047
- readonly type?: TypeResourceIdentifier;
1048
- /**
1049
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `address`.
1050
- *
1051
- *
1052
- */
1053
- readonly fields?: FieldContainer;
1054
- /**
1055
- * ID of the `address` to be extended.
1056
- *
1057
- *
1058
- */
1059
- readonly addressId: string;
1060
- }
1061
- /**
1062
- * Setting the contact email on a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitContactEmailSet](ctp:api:type:BusinessUnitContactEmailSetMessage) Message.
1063
- *
1064
- */
1065
- export interface MyBusinessUnitSetContactEmailAction {
1066
- readonly action: 'setContactEmail';
1067
- /**
1068
- * Email to set.
1069
- * If `contactEmail` is absent or `null`, the existing contact email, if any, will be removed.
1070
- *
1071
- *
1072
- */
1073
- readonly contactEmail?: string;
1074
- }
1075
- export interface MyBusinessUnitSetCustomFieldAction {
1076
- readonly action: 'setCustomField';
1077
- /**
1078
- * Name of the [Custom Field](/../api/projects/custom-fields).
1079
- *
1080
- *
1081
- */
1082
- readonly name: string;
1083
- /**
1084
- * If `value` is absent or `null`, this field will be removed if it exists.
1085
- * Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1086
- * If `value` is provided, it is set for the field defined by `name`.
1087
- *
1088
- *
1089
- */
1090
- readonly value?: any;
1091
- }
1092
- export interface MyBusinessUnitSetCustomTypeAction {
1093
- readonly action: 'setCustomType';
1094
- /**
1095
- * Defines the [Type](ctp:api:type:Type) that extends the BusinessUnit with [Custom Fields](/../api/projects/custom-fields).
1096
- * If absent, any existing Type and Custom Fields are removed from the BusinessUnit.
1097
- *
1098
- *
1099
- */
1100
- readonly type?: TypeResourceIdentifier;
1101
- /**
1102
- * Sets the [Custom Fields](/../api/projects/custom-fields) for the BusinessUnit.
1103
- *
1104
- *
1105
- */
1106
- readonly fields?: FieldContainer;
1107
- }
1108
- /**
1109
- * Setting the default billing address on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitDefaultBillingAddressSet](ctp:api:type:BusinessUnitDefaultBillingAddressSetMessage) Message.
1110
- *
1111
- */
1112
- export interface MyBusinessUnitSetDefaultBillingAddressAction {
1113
- readonly action: 'setDefaultBillingAddress';
1114
- /**
1115
- * ID of the address to add as a billing address. Either `addressId` or `addressKey` is required.
1116
- *
1117
- *
1118
- */
1119
- readonly addressId?: string;
1120
- /**
1121
- * Key of the address to add as a billing address. Either `addressId` or `addressKey` is required.
1122
- *
1123
- *
1124
- */
1125
- readonly addressKey?: string;
1126
- }
1127
- /**
1128
- * Setting the default shipping address on a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitDefaultShippingAddressSet](ctp:api:type:BusinessUnitDefaultShippingAddressSetMessage) Message.
1129
- *
1130
- */
1131
- export interface MyBusinessUnitSetDefaultShippingAddressAction {
1132
- readonly action: 'setDefaultShippingAddress';
1133
- /**
1134
- * ID of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
1135
- *
1136
- *
1137
- */
1138
- readonly addressId?: string;
1139
- /**
1140
- * Key of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
1141
- *
1142
- *
1143
- */
1144
- readonly addressKey?: string;
1145
- }
1146
- /**
1147
- * Adds a [DiscountCode](ctp:api:type:DiscountCode) to the Cart to activate the related [CartDiscounts](/../api/projects/cartDiscounts).
1148
- * Adding a Discount Code is only possible if no [DirectDiscount](ctp:api:type:DirectDiscount) has been applied to the Cart.
1149
- * Discount Codes can be added to [frozen Carts](ctp:api:type:FrozenCarts), but their [DiscountCodeState](ctp:api:type:DiscountCodeState) is then `DoesNotMatchCart`.
1150
- *
1151
- * The maximum number of Discount Codes in a Cart is restricted by a [limit](/../api/limits#carts).
1152
- *
1153
- * Specific Error Code: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
1154
- *
1155
- */
1156
- export interface MyCartAddDiscountCodeAction {
1157
- readonly action: 'addDiscountCode';
1158
- /**
1159
- * `code` of a [DiscountCode](ctp:api:type:DiscountCode).
1160
- *
1161
- *
1162
- */
1163
- readonly code: string;
1164
- }
1165
- /**
1166
- * Adds an address to a Cart when shipping to multiple addresses is desired.
1167
- *
1168
- */
1169
- export interface MyCartAddItemShippingAddressAction {
1170
- readonly action: 'addItemShippingAddress';
1171
- /**
1172
- * Address to append to `itemShippingAddresses`.
1173
- *
1174
- * The new address must have a key that is unique accross this Cart.
1175
- *
1176
- *
1177
- */
1178
- readonly address: _BaseAddress;
1179
- }
1180
- /**
1181
- * If the Cart contains a [LineItem](ctp:api:type:LineItem) for a Product Variant with the same [LineItemMode](ctp:api:type:LineItemMode), [Custom Fields](/../api/projects/custom-fields), supply and distribution channel, then only the quantity of the existing Line Item is increased.
1182
- * If [LineItem](ctp:api:type:LineItem) `shippingDetails` is set, it is merged. All addresses will be present afterwards and, for address keys present in both shipping details, the quantity will be summed up.
1183
- * A new Line Item is added when the `externalPrice` or `externalTotalPrice` is set in this update action.
1184
- * The [LineItem](ctp:api:type:LineItem) price is set as described in [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
1185
- *
1186
- * If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
1187
- *
1188
- * If the Line Items do not have a Price according to the [Product](ctp:api:type:Product) `priceMode` value for a selected currency and/or country, Customer Group, or Channel, a [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) error is returned.
1189
- *
1190
- */
1191
- export interface MyCartAddLineItemAction {
1192
- readonly action: 'addLineItem';
1193
- /**
1194
- * `id` of the [Product](ctp:api:type:Product).
1195
- *
1196
- * Either the `productId` and `variantId`, or `sku` must be provided.
1197
- *
1198
- *
1199
- */
1200
- readonly productId?: string;
1201
- /**
1202
- * `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
1203
- *
1204
- * If not given, the Master Variant is used.
1205
- *
1206
- * Either the `productId` and `variantId`, or `sku` must be provided.
1207
- *
1208
- *
1209
- */
1210
- readonly variantId?: number;
1211
- /**
1212
- * `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
1213
- *
1214
- * Either the `productId` and `variantId`, or `sku` must be provided.
1215
- *
1216
- *
1217
- */
1218
- readonly sku?: string;
1219
- /**
1220
- * Number of Line Items to add to the Cart.
1221
- *
1222
- *
1223
- */
1224
- readonly quantity?: number;
1225
- /**
1226
- * Date and time (UTC) the Line Item was added to the Cart.
1227
- * If not set, it defaults to the current date and time.
1228
- *
1229
- * Optional for backwards compatibility reasons.
1230
- *
1231
- *
1232
- */
1233
- readonly addedAt?: string;
1234
- /**
1235
- * Used to [select](ctp:api:type:LineItemPriceSelection) a Product Price.
1236
- * The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1237
- * If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set, the Channel must match one of the Store's distribution channels.
1238
- *
1239
- *
1240
- */
1241
- readonly distributionChannel?: ChannelResourceIdentifier;
1242
- /**
1243
- * Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
1244
- * The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1245
- *
1246
- *
1247
- */
1248
- readonly supplyChannel?: ChannelResourceIdentifier;
1249
- /**
1250
- * Container for Line Item-specific addresses.
1251
- *
1252
- *
1253
- */
1254
- readonly shippingDetails?: ItemShippingDetailsDraft;
1255
- /**
1256
- * Custom Fields for the Line Item.
1257
- *
1258
- *
1259
- */
1260
- readonly custom?: CustomFieldsDraft;
1261
- }
1262
- export interface MyCartAddPaymentAction {
1263
- readonly action: 'addPayment';
1264
- /**
1265
- * Payment to add to the Cart.
1266
- * Must not be assigned to another Order or active Cart already.
1267
- *
1268
- *
1269
- */
1270
- readonly payment: PaymentResourceIdentifier;
1271
- }
1272
- /**
1273
- * To override the shipping details, see [Set LineItemShippingDetails](ctp:api:type:MyCartSetLineItemShippingDetailsAction).
1274
- *
1275
- */
1276
- export interface MyCartApplyDeltaToLineItemShippingDetailsTargetsAction {
1277
- readonly action: 'applyDeltaToLineItemShippingDetailsTargets';
1278
- /**
1279
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1280
- *
1281
- *
1282
- */
1283
- readonly lineItemId: string;
1284
- /**
1285
- * Using positive or negative quantities increases or decreases the number of items shipped to an address.
1286
- *
1287
- *
1288
- */
1289
- readonly targetsDelta: ItemShippingTarget[];
1290
- }
1291
- /**
1292
- * When multiple shipping addresses are set for a Line Item,
1293
- * use the [Remove LineItem](ctp:api:type:CartRemoveLineItemAction) and [Add LineItem](ctp:api:type:CartAddLineItemAction) update action
1294
- * to change the shipping details.
1295
- * Since it is not possible for the API to infer how the overall change in the Line Item quantity should be distributed over the sub-quantities,
1296
- * the `shippingDetails` field is kept in its current state to avoid data loss.
1297
- *
1298
- * To change the Line Item quantity and shipping details together,
1299
- * use this update action in combination with the [Set LineItemShippingDetails](ctp:api:type:CartSetCustomLineItemShippingDetailsAction) update action
1300
- * in a single Cart update command.
1301
- *
1302
- * The [LineItem](ctp:api:type:LineItem) price is set as described in [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
1303
- *
1304
- */
1305
- export interface MyCartChangeLineItemQuantityAction {
1306
- readonly action: 'changeLineItemQuantity';
1307
- /**
1308
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1309
- *
1310
- *
1311
- */
1312
- readonly lineItemId: string;
1313
- /**
1314
- * New value to set.
1315
- *
1316
- * If `0`, the Line Item is removed from the Cart.
1317
- *
1318
- *
1319
- */
1320
- readonly quantity: number;
1321
- /**
1322
- * Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when changing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
1323
- *
1324
- * The LineItem price is updated as described in LineItem Price selection.
1325
- *
1326
- *
1327
- */
1328
- readonly externalPrice?: _Money;
1329
- /**
1330
- * Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` to the given value when changing the quantity of a Line Item with the `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
1331
- *
1332
- *
1333
- */
1334
- readonly externalTotalPrice?: ExternalLineItemTotalPrice;
1335
- }
1336
- /**
1337
- * - When `External` [TaxMode](ctp:api:type:TaxMode) is changed to `Platform` or `Disabled`, all previously set external Tax Rates are removed.
1338
- * - When set to `Platform`, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart's `shippingAddress`.
1339
- *
1340
- */
1341
- export interface MyCartChangeTaxModeAction {
1342
- readonly action: 'changeTaxMode';
1343
- /**
1344
- * The new TaxMode.
1345
- *
1346
- *
1347
- */
1348
- readonly taxMode: TaxMode;
1349
- }
1350
- /**
1351
- * This update action does not set any Cart field in particular, but it triggers several [Cart updates](/../api/carts-orders-overview#cart-updates)
1352
- * to bring prices and discounts to the latest state. Those can become stale over time when no Cart updates have been performed for a while and
1353
- * prices on related Products have changed in the meanwhile.
1354
- *
1355
- * If the `priceMode` of the [Product](ctp:api:type:Product) related to a Line Item is of `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum),
1356
- * the updated `price` of that [LineItem](ctp:api:type:LineItem) may not correspond to a Price in the `variant.prices` anymore.
1357
- *
1358
- */
1359
- export interface MyCartRecalculateAction {
1360
- readonly action: 'recalculate';
1361
- /**
1362
- * - Leave empty or set to `false` to only update the Prices and TaxRates of the Line Items.
1363
- * - Set to `true` to update the Line Items' product data (like `name`, `variant` and `productType`) also.
1364
- *
1365
- *
1366
- */
1367
- readonly updateProductData?: boolean;
1368
- }
1369
- export interface MyCartRemoveDiscountCodeAction {
1370
- readonly action: 'removeDiscountCode';
1371
- /**
1372
- * Discount Code to remove from the Cart.
1373
- *
1374
- *
1375
- */
1376
- readonly discountCode: DiscountCodeReference;
1377
- }
1378
- /**
1379
- * An address can only be removed if it is not referenced in any [ItemShippingTarget](ctp:api:type:ItemShippingTarget) of the Cart.
1380
- *
1381
- */
1382
- export interface MyCartRemoveItemShippingAddressAction {
1383
- readonly action: 'removeItemShippingAddress';
1384
- /**
1385
- * `key` of the Address to remove from `itemShippingAddresses`.
1386
- *
1387
- *
1388
- */
1389
- readonly addressKey: string;
1390
- }
1391
- /**
1392
- * The [LineItem](ctp:api:type:LineItem) price is updated as described in [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
1393
- *
1394
- */
1395
- export interface MyCartRemoveLineItemAction {
1396
- readonly action: 'removeLineItem';
1397
- /**
1398
- * `id` of the Line Item to remove.
1399
- *
1400
- *
1401
- */
1402
- readonly lineItemId: string;
1403
- /**
1404
- * New value to set.
1405
- *
1406
- * If `0`, the Line Item is removed from the Cart.
1407
- *
1408
- *
1409
- */
1410
- readonly quantity?: number;
1411
- /**
1412
- * Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when decreasing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
1413
- *
1414
- *
1415
- */
1416
- readonly externalPrice?: _Money;
1417
- /**
1418
- * Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` to the given value when decreasing the quantity of a Line Item with the `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
1419
- *
1420
- *
1421
- */
1422
- readonly externalTotalPrice?: ExternalLineItemTotalPrice;
1423
- /**
1424
- * Container for Line Item-specific addresses to remove.
1425
- *
1426
- *
1427
- */
1428
- readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
1429
- }
1430
- export interface MyCartRemovePaymentAction {
1431
- readonly action: 'removePayment';
1432
- /**
1433
- * Payment to remove from the Cart.
1434
- *
1435
- *
1436
- */
1437
- readonly payment: PaymentResourceIdentifier;
1438
- }
1439
- export interface MyCartSetBillingAddressAction {
1440
- readonly action: 'setBillingAddress';
1441
- /**
1442
- * Value to set.
1443
- * If empty, any existing value is removed.
1444
- *
1445
- *
1446
- */
1447
- readonly address?: _BaseAddress;
1448
- }
1449
- /**
1450
- * Updates the Business Unit on the Cart. The Cart must have an existing Business Unit assigned already.
1451
- *
1452
- */
1453
- export interface MyCartSetBusinessUnitAction {
1454
- readonly action: 'setBusinessUnit';
1455
- /**
1456
- * New Business Unit to assign to the Cart, which must have access to the [Store](/../api/projects/stores) that is set on the Cart.
1457
- * Additionally, the authenticated user must be an [Associate](/projects/business-units#associate) in the [Business Unit](/projects/business-units#businessunit).
1458
- *
1459
- *
1460
- */
1461
- readonly businessUnit: BusinessUnitResourceIdentifier;
1462
- }
1463
- /**
1464
- * Setting the country can lead to changes in the [LineItem](ctp:api:type:LineItem) prices.
1465
- *
1466
- */
1467
- export interface MyCartSetCountryAction {
1468
- readonly action: 'setCountry';
1469
- /**
1470
- * Value to set.
1471
- * If empty, any existing value is removed.
1472
- *
1473
- * If the Cart is bound to a `store`, the provided value must be included in the [Store's](ctp:api:type:Store) `countries`.
1474
- * Otherwise a [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError) error is returned.
1475
- *
1476
- *
1477
- */
1478
- readonly country?: string;
1479
- }
1480
- export interface MyCartSetCustomFieldAction {
1481
- readonly action: 'setCustomField';
1482
- /**
1483
- * Name of the [Custom Field](/../api/projects/custom-fields).
1484
- *
1485
- *
1486
- */
1487
- readonly name: string;
1488
- /**
1489
- * If `value` is absent or `null`, this field will be removed if it exists.
1490
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1491
- * If `value` is provided, it is set for the field defined by `name`.
1492
- *
1493
- *
1494
- */
1495
- readonly value?: any;
1496
- }
1497
- export interface MyCartSetCustomTypeAction {
1498
- readonly action: 'setCustomType';
1499
- /**
1500
- * Defines the [Type](ctp:api:type:Type) that extends the Cart with [Custom Fields](/../api/projects/custom-fields).
1501
- * If absent, any existing Type and Custom Fields are removed from the Cart.
1502
- *
1503
- *
1504
- */
1505
- readonly type?: TypeResourceIdentifier;
1506
- /**
1507
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Cart.
1508
- *
1509
- *
1510
- */
1511
- readonly fields?: FieldContainer;
1512
- }
1513
- export interface MyCartSetCustomerEmailAction {
1514
- readonly action: 'setCustomerEmail';
1515
- /**
1516
- * Value to set.
1517
- * If empty, any existing value is removed.
1518
- *
1519
- *
1520
- */
1521
- readonly email?: string;
1522
- }
1523
- /**
1524
- * Number of days after which a Cart with `Active` [CartState](ctp:api:type:CartState) is deleted since its last modification.
1525
- *
1526
- * If a [ChangeSubscription](ctp:api:type:ChangeSubscription) exists for Carts, a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) is sent.
1527
- *
1528
- */
1529
- export interface MyCartSetDeleteDaysAfterLastModificationAction {
1530
- readonly action: 'setDeleteDaysAfterLastModification';
1531
- /**
1532
- * Value to set.
1533
- * If not provided, the default value for this field configured in [Project settings](ctp:api:type:CartsConfiguration) is assigned.
1534
- *
1535
- *
1536
- */
1537
- readonly deleteDaysAfterLastModification?: number;
1538
- }
1539
- export interface MyCartSetLineItemCustomFieldAction {
1540
- readonly action: 'setLineItemCustomField';
1541
- /**
1542
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1543
- *
1544
- *
1545
- */
1546
- readonly lineItemId: string;
1547
- /**
1548
- * Name of the [Custom Field](/../api/projects/custom-fields).
1549
- *
1550
- *
1551
- */
1552
- readonly name: string;
1553
- /**
1554
- * If `value` is absent or `null`, this field will be removed if it exists.
1555
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1556
- * If `value` is provided, it is set for the field defined by `name`.
1557
- *
1558
- *
1559
- */
1560
- readonly value?: any;
1561
- }
1562
- export interface MyCartSetLineItemCustomTypeAction {
1563
- readonly action: 'setLineItemCustomType';
1564
- /**
1565
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1566
- *
1567
- *
1568
- */
1569
- readonly lineItemId: string;
1570
- /**
1571
- * Defines the [Type](ctp:api:type:Type) that extends the LineItem with [Custom Fields](/../api/projects/custom-fields).
1572
- * If absent, any existing Type and Custom Fields are removed from the Line Item.
1573
- *
1574
- *
1575
- */
1576
- readonly type?: TypeResourceIdentifier;
1577
- /**
1578
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Line Item.
1579
- *
1580
- *
1581
- */
1582
- readonly fields?: FieldContainer;
1583
- }
1584
- /**
1585
- * Setting a distribution channel for a [LineItem](ctp:api:type:LineItem) can lead to an updated `price` as described in [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
1586
- *
1587
- */
1588
- export interface MyCartSetLineItemDistributionChannelAction {
1589
- readonly action: 'setLineItemDistributionChannel';
1590
- /**
1591
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1592
- *
1593
- *
1594
- */
1595
- readonly lineItemId: string;
1596
- /**
1597
- * - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
1598
- * - If not present, the current [Reference](ctp:api:type:Reference) to a distribution channel is removed from the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
1599
- * The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1600
- *
1601
- *
1602
- */
1603
- readonly distributionChannel?: ChannelResourceIdentifier;
1604
- }
1605
- export interface MyCartSetLineItemShippingDetailsAction {
1606
- readonly action: 'setLineItemShippingDetails';
1607
- /**
1608
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1609
- *
1610
- *
1611
- */
1612
- readonly lineItemId: string;
1613
- /**
1614
- * Value to set.
1615
- * If empty, the existing value is removed.
1616
- *
1617
- *
1618
- */
1619
- readonly shippingDetails?: ItemShippingDetailsDraft;
1620
- }
1621
- /**
1622
- * Performing this action has no impact on inventory that should be reserved.
1623
- *
1624
- */
1625
- export interface MyCartSetLineItemSupplyChannelAction {
1626
- readonly action: 'setLineItemSupplyChannel';
1627
- /**
1628
- * `id` of the [LineItem](ctp:api:type:LineItem) to update.
1629
- *
1630
- *
1631
- */
1632
- readonly lineItemId: string;
1633
- /**
1634
- * - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
1635
- * - If not present, the current [Reference](ctp:api:type:Reference) to a supply channel will be removed from the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
1636
- * The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1637
- *
1638
- *
1639
- */
1640
- readonly supplyChannel?: ChannelResourceIdentifier;
1641
- }
1642
- export interface MyCartSetLocaleAction {
1643
- readonly action: 'setLocale';
1644
- /**
1645
- * Value to set.
1646
- * Must be one of the [Project](ctp:api:type:Project)'s `languages`.
1647
- * If empty, any existing value will be removed.
1648
- *
1649
- *
1650
- */
1651
- readonly locale?: string;
1652
- }
1653
- /**
1654
- * Setting the shipping address also sets the [TaxRate](ctp:api:type:TaxRate) of Line Items and calculates the [TaxedPrice](ctp:api:type:TaxedPrice).
1655
- *
1656
- * If a matching price cannot be found for the given shipping address during [Line Item Price selection](ctp:api:type:LineItemPriceSelection),
1657
- * a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
1658
- *
1659
- * If you want to allow shipping to states inside a country that are not explicitly covered by a TaxRate,
1660
- * set the `countryTaxRateFallbackEnabled` field to `true` in the [CartsConfiguration](ctp:api:type:CartsConfiguration) by using
1661
- * the [Change CountryTaxRateFallbackEnabled](ctp:api:type:ProjectChangeCountryTaxRateFallbackEnabledAction) update action.
1662
- *
1663
- */
1664
- export interface MyCartSetShippingAddressAction {
1665
- readonly action: 'setShippingAddress';
1666
- /**
1667
- * Value to set.
1668
- * If not set, the shipping address is unset, and the `taxedPrice` and `taxRate` are unset in all Line Items.
1669
- *
1670
- *
1671
- */
1672
- readonly address?: _BaseAddress;
1673
- }
1674
- /**
1675
- * To set the Cart's Shipping Method the Cart must have the `Single` [ShippingMode](ctp:api:type:ShippingMode) and a `shippingAddress`.
1676
- *
1677
- */
1678
- export interface MyCartSetShippingMethodAction {
1679
- readonly action: 'setShippingMethod';
1680
- /**
1681
- * Value to set.
1682
- * If empty, any existing value is removed.
1683
- *
1684
- * If the referenced Shipping Method has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
1685
- *
1686
- *
1687
- */
1688
- readonly shippingMethod?: ShippingMethodResourceIdentifier;
1689
- /**
1690
- * An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
1691
- *
1692
- *
1693
- */
1694
- readonly externalTaxRate?: ExternalTaxRateDraft;
1695
- }
1696
- /**
1697
- * Updates an address in `itemShippingAddresses` by keeping the Address `key`.
1698
- *
1699
- */
1700
- export interface MyCartUpdateItemShippingAddressAction {
1701
- readonly action: 'updateItemShippingAddress';
1702
- /**
1703
- * The new Address with the same `key` as the Address it will replace.
1704
- *
1705
- *
1706
- */
1707
- readonly address: _BaseAddress;
1708
- }
1709
- /**
1710
- * Adding an address to the Customer produces the [CustomerAddressAdded](ctp:api:type:CustomerAddressAddedMessage) Message.
1711
- *
1712
- */
1713
- export interface MyCustomerAddAddressAction {
1714
- readonly action: 'addAddress';
1715
- /**
1716
- * Value to append to the `addresses` array.
1717
- *
1718
- *
1719
- */
1720
- readonly address: _BaseAddress;
1721
- }
1722
- /**
1723
- * Adds an address from the `addresses` array to `billingAddressIds`. Either `addressId` or `addressKey` is required.
1724
- *
1725
- */
1726
- export interface MyCustomerAddBillingAddressIdAction {
1727
- readonly action: 'addBillingAddressId';
1728
- /**
1729
- * `id` of the [Address](ctp:api:type:Address) to become a billing address.
1730
- *
1731
- *
1732
- */
1733
- readonly addressId?: string;
1734
- /**
1735
- * `key` of the [Address](ctp:api:type:Address) to become a billing address.
1736
- *
1737
- *
1738
- */
1739
- readonly addressKey?: string;
1740
- }
1741
- /**
1742
- * Adds an address from the `addresses` array to `shippingAddressIds`. Either `addressId` or `addressKey` is required.
1743
- *
1744
- */
1745
- export interface MyCustomerAddShippingAddressIdAction {
1746
- readonly action: 'addShippingAddressId';
1747
- /**
1748
- * `id` of the [Address](ctp:api:type:Address) to become a shipping address.
1749
- *
1750
- *
1751
- */
1752
- readonly addressId?: string;
1753
- /**
1754
- * `key` of the [Address](ctp:api:type:Address) to become a shipping address.
1755
- *
1756
- *
1757
- */
1758
- readonly addressKey?: string;
1759
- }
1760
- /**
1761
- * Changing an address of the Customer produces the [CustomerAddressChanged](ctp:api:type:CustomerAddressChangedMessage) Message.
1762
- *
1763
- * Either `addressId` or `addressKey` is required.
1764
- *
1765
- */
1766
- export interface MyCustomerChangeAddressAction {
1767
- readonly action: 'changeAddress';
1768
- /**
1769
- * `id` of the [Address](ctp:api:type:Address) to change.
1770
- *
1771
- *
1772
- */
1773
- readonly addressId?: string;
1774
- /**
1775
- * `key` of the [Address](ctp:api:type:Address) to change.
1776
- *
1777
- *
1778
- */
1779
- readonly addressKey?: string;
1780
- /**
1781
- * Value to set.
1782
- *
1783
- *
1784
- */
1785
- readonly address: _BaseAddress;
1786
- }
1787
- /**
1788
- * Changing the email of the Customer produces the [CustomerEmailChanged](ctp:api:type:CustomerEmailChangedMessage) Message.
1789
- *
1790
- */
1791
- export interface MyCustomerChangeEmailAction {
1792
- readonly action: 'changeEmail';
1793
- /**
1794
- * New value to set.
1795
- *
1796
- *
1797
- */
1798
- readonly email: string;
1799
- }
1800
- /**
1801
- * Removing an address of the Customer produces the [CustomerAddressRemoved](ctp:api:type:CustomerAddressRemovedMessage) Message.
1802
- *
1803
- * Either `addressId` or `addressKey` is required.
1804
- *
1805
- */
1806
- export interface MyCustomerRemoveAddressAction {
1807
- readonly action: 'removeAddress';
1808
- /**
1809
- * `id` of the [Address](ctp:api:type:Address) to remove.
1810
- *
1811
- *
1812
- */
1813
- readonly addressId?: string;
1814
- /**
1815
- * `key` of the [Address](ctp:api:type:Address) to remove.
1816
- *
1817
- *
1818
- */
1819
- readonly addressKey?: string;
1820
- }
1821
- /**
1822
- * Removes an existing billing address from `billingAddressesIds`.
1823
- * If the billing address is the default billing address, the `defaultBillingAddressId` is unset. Either `addressId` or `addressKey` is required.
1824
- *
1825
- */
1826
- export interface MyCustomerRemoveBillingAddressIdAction {
1827
- readonly action: 'removeBillingAddressId';
1828
- /**
1829
- * `id` of the [Address](ctp:api:type:Address) to remove from `billingAddressesIds`.
1830
- *
1831
- *
1832
- */
1833
- readonly addressId?: string;
1834
- /**
1835
- * `key` of the [Address](ctp:api:type:Address) to remove from `billingAddressesIds`.
1836
- *
1837
- *
1838
- */
1839
- readonly addressKey?: string;
1840
- }
1841
- /**
1842
- * Removes an existing shipping address from `shippingAddressesIds`.
1843
- * If the shipping address is the default shipping address, the `defaultShippingAddressId` is unset. Either `addressId` or `addressKey` is required.
1844
- *
1845
- */
1846
- export interface MyCustomerRemoveShippingAddressIdAction {
1847
- readonly action: 'removeShippingAddressId';
1848
- /**
1849
- * `id` of the [Address](ctp:api:type:Address) to remove from `shippingAddressesIds`.
1850
- *
1851
- *
1852
- */
1853
- readonly addressId?: string;
1854
- /**
1855
- * `key` of the [Address](ctp:api:type:Address) to remove from `shippingAddressesIds`.
1856
- *
1857
- *
1858
- */
1859
- readonly addressKey?: string;
1860
- }
1861
- /**
1862
- * Setting the `companyName` field on the Customer produces the [CustomerCompanyNameSet](ctp:api:type:CustomerCompanyNameSetMessage) Message.
1863
- *
1864
- */
1865
- export interface MyCustomerSetCompanyNameAction {
1866
- readonly action: 'setCompanyName';
1867
- /**
1868
- * Value to set.
1869
- * If empty, any existing value is removed.
1870
- *
1871
- *
1872
- */
1873
- readonly companyName?: string;
1874
- }
1875
- export interface MyCustomerSetCustomFieldAction {
1876
- readonly action: 'setCustomField';
1877
- /**
1878
- * Name of the [Custom Field](/../api/projects/custom-fields).
1879
- *
1880
- *
1881
- */
1882
- readonly name: string;
1883
- /**
1884
- * If `value` is absent or `null`, this field will be removed if it exists.
1885
- * If `value` is provided, it is set for the field defined by `name`.
1886
- * Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
1887
- *
1888
- *
1889
- */
1890
- readonly value?: any;
1891
- }
1892
- export interface MyCustomerSetCustomTypeAction {
1893
- readonly action: 'setCustomType';
1894
- /**
1895
- * Defines the [Type](ctp:api:type:Type) that extends the MyCustomer with [Custom Fields](/../api/projects/custom-fields).
1896
- * If absent, any existing Type and Custom Fields are removed from the MyCustomer.
1897
- *
1898
- *
1899
- */
1900
- readonly type?: TypeResourceIdentifier;
1901
- /**
1902
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the MyCustomer.
1903
- *
1904
- *
1905
- */
1906
- readonly fields?: FieldContainer;
1907
- }
1908
- /**
1909
- * Setting the date of birth of the Customer produces the [CustomerDateOfBirthSet](ctp:api:type:CustomerDateOfBirthSetMessage) Message.
1910
- *
1911
- */
1912
- export interface MyCustomerSetDateOfBirthAction {
1913
- readonly action: 'setDateOfBirth';
1914
- /**
1915
- * Value to set.
1916
- * If empty, any existing value is removed.
1917
- *
1918
- *
1919
- */
1920
- readonly dateOfBirth?: string;
1921
- }
1922
- /**
1923
- * Sets the default billing address from `addresses`.
1924
- * If the address is not currently a billing address, it is added to `billingAddressIds`. Either `addressId` or `addressKey` is required.
1925
- *
1926
- */
1927
- export interface MyCustomerSetDefaultBillingAddressAction {
1928
- readonly action: 'setDefaultBillingAddress';
1929
- /**
1930
- * `id` of the [Address](ctp:api:type:Address) to become the default billing address.
1931
- *
1932
- *
1933
- */
1934
- readonly addressId?: string;
1935
- /**
1936
- * `key` of the [Address](ctp:api:type:Address) to become the default billing address.
1937
- *
1938
- *
1939
- */
1940
- readonly addressKey?: string;
1941
- }
1942
- /**
1943
- * Sets the default shipping address from `addresses`.
1944
- * If the address is not currently a shipping address, it is added to `shippingAddressIds`. Either `addressId` or `addressKey` is required.
1945
- *
1946
- */
1947
- export interface MyCustomerSetDefaultShippingAddressAction {
1948
- readonly action: 'setDefaultShippingAddress';
1949
- /**
1950
- * `id` of the [Address](ctp:api:type:Address) to become the default shipping address.
1951
- *
1952
- *
1953
- */
1954
- readonly addressId?: string;
1955
- /**
1956
- * `key` of the [Address](ctp:api:type:Address) to become the default shipping address.
1957
- *
1958
- *
1959
- */
1960
- readonly addressKey?: string;
1961
- }
1962
- /**
1963
- * Setting the first name of the Customer produces the [CustomerFirstNameSetMessage](ctp:api:type:CustomerFirstNameSetMessage).
1964
- *
1965
- */
1966
- export interface MyCustomerSetFirstNameAction {
1967
- readonly action: 'setFirstName';
1968
- /**
1969
- * Value to set.
1970
- * If empty, any existing value is removed.
1971
- *
1972
- *
1973
- */
1974
- readonly firstName?: string;
1975
- }
1976
- /**
1977
- * Setting the last name of the Customer produces the [CustomerLastNameSetMessage](ctp:api:type:CustomerLastNameSetMessage).
1978
- *
1979
- */
1980
- export interface MyCustomerSetLastNameAction {
1981
- readonly action: 'setLastName';
1982
- /**
1983
- * Value to set.
1984
- * If empty, any existing value is removed.
1985
- *
1986
- *
1987
- */
1988
- readonly lastName?: string;
1989
- }
1990
- export interface MyCustomerSetLocaleAction {
1991
- readonly action: 'setLocale';
1992
- /**
1993
- * Value to set.
1994
- * Must be one of the languages supported by the [Project](ctp:api:type:Project).
1995
- *
1996
- *
1997
- */
1998
- readonly locale?: string;
1999
- }
2000
- export interface MyCustomerSetMiddleNameAction {
2001
- readonly action: 'setMiddleName';
2002
- /**
2003
- * Value to set.
2004
- * If empty, any existing value is removed.
2005
- *
2006
- *
2007
- */
2008
- readonly middleName?: string;
2009
- }
2010
- export interface MyCustomerSetSalutationAction {
2011
- readonly action: 'setSalutation';
2012
- /**
2013
- * Value to set.
2014
- * If empty, any existing value is removed.
2015
- *
2016
- *
2017
- */
2018
- readonly salutation?: string;
2019
- }
2020
- /**
2021
- * Setting the title of the Customer produces the [CustomerTitleSetMessage](ctp:api:type:CustomerTitleSetMessage).
2022
- *
2023
- */
2024
- export interface MyCustomerSetTitleAction {
2025
- readonly action: 'setTitle';
2026
- /**
2027
- * Value to set.
2028
- * If empty, any existing value is removed.
2029
- *
2030
- *
2031
- */
2032
- readonly title?: string;
2033
- }
2034
- export interface MyCustomerSetVatIdAction {
2035
- readonly action: 'setVatId';
2036
- /**
2037
- * Value to set.
2038
- * If empty, any existing value is removed.
2039
- *
2040
- *
2041
- */
2042
- readonly vatId?: string;
2043
- }
2044
- /**
2045
- * Adding a Transaction to a Payment generates the [PaymentTransactionAdded](ctp:api:type:PaymentTransactionAddedMessage) Message.
2046
- * Once a Transaction is added to the Payment, it can no longer be updated or deleted using the My Payments API.
2047
- *
2048
- */
2049
- export interface MyPaymentAddTransactionAction {
2050
- readonly action: 'addTransaction';
2051
- /**
2052
- * Transaction to add to the Payment.
2053
- *
2054
- *
2055
- */
2056
- readonly transaction: TransactionDraft;
2057
- }
2058
- /**
2059
- * Can be used to update the Payment if a customer changes the [Cart](ctp:api:type:Cart), or adds or removes a [CartDiscount](ctp:api:type:CartDiscount) during checkout.
2060
- *
2061
- */
2062
- export interface MyPaymentChangeAmountPlannedAction {
2063
- readonly action: 'changeAmountPlanned';
2064
- /**
2065
- * New value to set.
2066
- *
2067
- *
2068
- */
2069
- readonly amount: _Money;
2070
- }
2071
- export interface MyPaymentSetCustomFieldAction {
2072
- readonly action: 'setCustomField';
2073
- /**
2074
- * Name of the [Custom Field](/../api/projects/custom-fields).
2075
- *
2076
- *
2077
- */
2078
- readonly name: string;
2079
- /**
2080
- * If `value` is absent or `null`, this field will be removed if it exists.
2081
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2082
- * If `value` is provided, it is set for the field defined by `name`.
2083
- *
2084
- *
2085
- */
2086
- readonly value?: any;
2087
- }
2088
- export interface MyPaymentSetMethodInfoInterfaceAction {
2089
- readonly action: 'setMethodInfoInterface';
2090
- /**
2091
- * Value to set.
2092
- * Once set, the `paymentInterface` of the `paymentMethodInfo` cannot be changed.
2093
- *
2094
- *
2095
- */
2096
- readonly interface: string;
2097
- }
2098
- export interface MyPaymentSetMethodInfoMethodAction {
2099
- readonly action: 'setMethodInfoMethod';
2100
- /**
2101
- * Value to set.
2102
- * If empty, any existing value will be removed.
2103
- *
2104
- *
2105
- */
2106
- readonly method?: string;
2107
- }
2108
- export interface MyPaymentSetMethodInfoNameAction {
2109
- readonly action: 'setMethodInfoName';
2110
- /**
2111
- * Value to set.
2112
- * If empty, any existing value will be removed.
2113
- *
2114
- *
2115
- */
2116
- readonly name?: LocalizedString;
2117
- }
2118
- export interface MyPaymentSetTransactionCustomFieldAction {
2119
- readonly action: 'setTransactionCustomField';
2120
- /**
2121
- * Name of the [Custom Field](/../api/projects/custom-fields).
2122
- *
2123
- *
2124
- */
2125
- readonly name: string;
2126
- /**
2127
- * If `value` is absent or `null`, this field will be removed if it exists.
2128
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2129
- * If `value` is provided, it is set for the field defined by `name`.
2130
- *
2131
- *
2132
- */
2133
- readonly value?: any;
2134
- }
2135
- /**
2136
- * When accepting, declining, or renegotiating [B2B Quotes](/../api/associates-overview#b2b-resources), the Customer must have the `AcceptMyQuotes`, `DeclineMyQuotes`, or `RenegotiateMyQuotes` [Permission](ctp:api:type:Permission), respectively. If the required [Permission](/projects/associate-roles#permission) is missing, an [AssociateMissingPermission](/errors#associatemissingpermission) error is returned.
2137
- */
2138
- export interface MyQuoteChangeMyQuoteStateAction {
2139
- readonly action: 'changeMyQuoteState';
2140
- /**
2141
- * New state to be set for the Quote.
2142
- *
2143
- */
2144
- readonly quoteState: MyQuoteState;
2145
- }
2146
- /**
2147
- * Transitions the `quoteRequestState` of the Quote Request to `Cancelled`. Can only be used when the Quote Request is in state `Submitted`.
2148
- *
2149
- */
2150
- export interface MyQuoteRequestCancelAction {
2151
- readonly action: 'cancelQuoteRequest';
2152
- }
2153
- export interface MyShoppingListAddLineItemAction {
2154
- readonly action: 'addLineItem';
2155
- /**
2156
- * `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
2157
- *
2158
- *
2159
- */
2160
- readonly sku?: string;
2161
- /**
2162
- * Unique identifier of a [Product](ctp:api:type:Product).
2163
- *
2164
- *
2165
- */
2166
- readonly productId?: string;
2167
- /**
2168
- * `id` of the [ProductVariant](ctp:api:type:ProductVariant). If not set, the ShoppingListLineItem refers to the Master Variant.
2169
- *
2170
- *
2171
- */
2172
- readonly variantId?: number;
2173
- /**
2174
- * Number of Products in the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem).
2175
- *
2176
- *
2177
- */
2178
- readonly quantity?: number;
2179
- /**
2180
- * Date and time the TextLineItem is added to the [ShoppingList](ctp:api:type:ShoppingList). If not set, the current date and time (UTC) is used.
2181
- *
2182
- *
2183
- */
2184
- readonly addedAt?: string;
2185
- /**
2186
- * Custom Fields defined for the ShoppingListLineItem.
2187
- *
2188
- *
2189
- */
2190
- readonly custom?: CustomFieldsDraft;
2191
- }
2192
- export interface MyShoppingListAddTextLineItemAction {
2193
- readonly action: 'addTextLineItem';
2194
- /**
2195
- * Name of the [TextLineItem](ctp:api:type:TextLineItem).
2196
- *
2197
- *
2198
- */
2199
- readonly name: LocalizedString;
2200
- /**
2201
- * Description of the TextLineItem.
2202
- *
2203
- *
2204
- */
2205
- readonly description?: LocalizedString;
2206
- /**
2207
- * Number of entries in the TextLineItem.
2208
- *
2209
- *
2210
- */
2211
- readonly quantity?: number;
2212
- /**
2213
- * Date and time the TextLineItem is added to the [ShoppingList](ctp:api:type:ShoppingList). If not set, the current date and time (UTC) is used.
2214
- *
2215
- *
2216
- */
2217
- readonly addedAt?: string;
2218
- /**
2219
- * Custom Fields defined for the TextLineItem.
2220
- *
2221
- *
2222
- */
2223
- readonly custom?: CustomFieldsDraft;
2224
- }
2225
- export interface MyShoppingListChangeLineItemQuantityAction {
2226
- readonly action: 'changeLineItemQuantity';
2227
- /**
2228
- * The `id` of the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) to update.
2229
- *
2230
- *
2231
- */
2232
- readonly lineItemId: string;
2233
- /**
2234
- * New value to set. If `0`, the ShoppingListLineItem is removed from the ShoppingList.
2235
- *
2236
- *
2237
- */
2238
- readonly quantity: number;
2239
- }
2240
- export interface MyShoppingListChangeLineItemsOrderAction {
2241
- readonly action: 'changeLineItemsOrder';
2242
- /**
2243
- * All existing [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) `id`s of the [ShoppingList](ctp:api:type:ShoppingList) in the desired new order.
2244
- *
2245
- *
2246
- */
2247
- readonly lineItemOrder: string[];
2248
- }
2249
- export interface MyShoppingListChangeNameAction {
2250
- readonly action: 'changeName';
2251
- /**
2252
- * New value to set. Must not be empty.
2253
- *
2254
- *
2255
- */
2256
- readonly name: LocalizedString;
2257
- }
2258
- export interface MyShoppingListChangeTextLineItemNameAction {
2259
- readonly action: 'changeTextLineItemName';
2260
- /**
2261
- * The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update.
2262
- *
2263
- *
2264
- */
2265
- readonly textLineItemId: string;
2266
- /**
2267
- * New value to set. Must not be empty.
2268
- *
2269
- *
2270
- */
2271
- readonly name: LocalizedString;
2272
- }
2273
- export interface MyShoppingListChangeTextLineItemQuantityAction {
2274
- readonly action: 'changeTextLineItemQuantity';
2275
- /**
2276
- * The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update.
2277
- *
2278
- *
2279
- */
2280
- readonly textLineItemId: string;
2281
- /**
2282
- * New value to set. If `0`, the TextLineItem is removed from the ShoppingList.
2283
- *
2284
- *
2285
- */
2286
- readonly quantity: number;
2287
- }
2288
- export interface MyShoppingListChangeTextLineItemsOrderAction {
2289
- readonly action: 'changeTextLineItemsOrder';
2290
- /**
2291
- * All existing [TextLineItem](ctp:api:type:TextLineItem) `id`s in the desired new order.
2292
- *
2293
- *
2294
- */
2295
- readonly textLineItemOrder: string[];
2296
- }
2297
- export interface MyShoppingListRemoveLineItemAction {
2298
- readonly action: 'removeLineItem';
2299
- /**
2300
- * The `id` of the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) to update.
2301
- *
2302
- *
2303
- */
2304
- readonly lineItemId: string;
2305
- /**
2306
- * Amount to remove from the `quantity` of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current `quantity` of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.
2307
- *
2308
- *
2309
- */
2310
- readonly quantity?: number;
2311
- }
2312
- export interface MyShoppingListRemoveTextLineItemAction {
2313
- readonly action: 'removeTextLineItem';
2314
- /**
2315
- * The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update.
2316
- *
2317
- *
2318
- */
2319
- readonly textLineItemId: string;
2320
- /**
2321
- * Amount to remove from the `quantity` of the TextLineItem. If not set, the TextLineItem is removed from the ShoppingList. If this value matches or exceeds the current `quantity` of the TextLineItem, the TextLineItem is removed from the ShoppingList.
2322
- *
2323
- *
2324
- */
2325
- readonly quantity?: number;
2326
- }
2327
- export interface MyShoppingListSetCustomFieldAction {
2328
- readonly action: 'setCustomField';
2329
- /**
2330
- * Name of the [Custom Field](/../api/projects/custom-fields).
2331
- *
2332
- *
2333
- */
2334
- readonly name: string;
2335
- /**
2336
- * If `value` is absent or `null`, this field will be removed if it exists.
2337
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2338
- * If `value` is provided, it is set for the field defined by `name`.
2339
- *
2340
- *
2341
- */
2342
- readonly value?: any;
2343
- }
2344
- export interface MyShoppingListSetCustomTypeAction {
2345
- readonly action: 'setCustomType';
2346
- /**
2347
- * Defines the [Type](ctp:api:type:Type) that extends the MyShoppingList with [Custom Fields](/../api/projects/custom-fields).
2348
- * If absent, any existing Type and Custom Fields are removed from the MyShoppingList.
2349
- *
2350
- *
2351
- */
2352
- readonly type?: TypeResourceIdentifier;
2353
- /**
2354
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the MyShoppingList.
2355
- *
2356
- *
2357
- */
2358
- readonly fields?: FieldContainer;
2359
- }
2360
- export interface MyShoppingListSetDeleteDaysAfterLastModificationAction {
2361
- readonly action: 'setDeleteDaysAfterLastModification';
2362
- /**
2363
- * Value to set. If empty, any existing value will be removed.
2364
- *
2365
- *
2366
- */
2367
- readonly deleteDaysAfterLastModification?: number;
2368
- }
2369
- export interface MyShoppingListSetDescriptionAction {
2370
- readonly action: 'setDescription';
2371
- /**
2372
- * Value to set. If empty, any existing value will be removed.
2373
- *
2374
- *
2375
- */
2376
- readonly description?: LocalizedString;
2377
- }
2378
- export interface MyShoppingListSetLineItemCustomFieldAction {
2379
- readonly action: 'setLineItemCustomField';
2380
- /**
2381
- * Unique identifier of an existing [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) in the [ShoppingList](ctp:api:type:ShoppingList).
2382
- *
2383
- *
2384
- */
2385
- readonly lineItemId: string;
2386
- /**
2387
- * Name of the [Custom Field](/../api/projects/custom-fields).
2388
- *
2389
- *
2390
- */
2391
- readonly name: string;
2392
- /**
2393
- * If `value` is absent or `null`, this field will be removed if it exists.
2394
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2395
- * If `value` is provided, it is set for the field defined by `name`.
2396
- *
2397
- *
2398
- */
2399
- readonly value?: any;
2400
- }
2401
- export interface MyShoppingListSetLineItemCustomTypeAction {
2402
- readonly action: 'setLineItemCustomType';
2403
- /**
2404
- * Unique identifier of an existing [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) in the [ShoppingList](ctp:api:type:ShoppingList).
2405
- *
2406
- *
2407
- */
2408
- readonly lineItemId: string;
2409
- /**
2410
- * Defines the [Type](ctp:api:type:Type) that extends the ShoppingListLineItem with [Custom Fields](/../api/projects/custom-fields).
2411
- * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.
2412
- *
2413
- *
2414
- */
2415
- readonly type?: TypeResourceIdentifier;
2416
- /**
2417
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the ShoppingListLineItem.
2418
- *
2419
- *
2420
- */
2421
- readonly fields?: FieldContainer;
2422
- }
2423
- export interface MyShoppingListSetTextLineItemCustomFieldAction {
2424
- readonly action: 'setTextLineItemCustomField';
2425
- /**
2426
- * The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update.
2427
- *
2428
- *
2429
- */
2430
- readonly textLineItemId: string;
2431
- /**
2432
- * Name of the [Custom Field](/../api/projects/custom-fields).
2433
- *
2434
- *
2435
- */
2436
- readonly name: string;
2437
- /**
2438
- * If `value` is absent or `null`, this field will be removed if it exists.
2439
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2440
- * If `value` is provided, it is set for the field defined by `name`.
2441
- *
2442
- *
2443
- */
2444
- readonly value?: any;
2445
- }
2446
- export interface MyShoppingListSetTextLineItemCustomTypeAction {
2447
- readonly action: 'setTextLineItemCustomType';
2448
- /**
2449
- * The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update.
2450
- *
2451
- *
2452
- */
2453
- readonly textLineItemId: string;
2454
- /**
2455
- * Defines the [Type](ctp:api:type:Type) that extends the TextLineItem with [Custom Fields](/../api/projects/custom-fields).
2456
- * If absent, any existing Type and Custom Fields are removed from the TextLineItem.
2457
- *
2458
- *
2459
- */
2460
- readonly type?: TypeResourceIdentifier;
2461
- /**
2462
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the TextLineItem.
2463
- *
2464
- *
2465
- */
2466
- readonly fields?: FieldContainer;
2467
- }
2468
- export interface MyShoppingListSetTextLineItemDescriptionAction {
2469
- readonly action: 'setTextLineItemDescription';
2470
- /**
2471
- * The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update.
2472
- *
2473
- *
2474
- */
2475
- readonly textLineItemId: string;
2476
- /**
2477
- * Value to set. If empty, any existing value will be removed.
2478
- *
2479
- *
2480
- */
2481
- readonly description?: LocalizedString;
2482
- }
2483
- //# sourceMappingURL=me.d.ts.map