@gradientedge/commercetools-utils 5.18.2 → 5.19.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,716 +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 { ChannelReference, ChannelResourceIdentifier } from './channel.js';
7
- import { BaseResource, CentPrecisionMoney, CreatedBy, LastModifiedBy, LocalizedString, Money, Reference } from './common.js';
8
- import { ProductReference, ProductResourceIdentifier } from './product.js';
9
- import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type.js';
10
- export interface CartDiscount extends BaseResource {
11
- /**
12
- * Unique identifier of the CartDiscount.
13
- *
14
- */
15
- readonly id: string;
16
- /**
17
- * Current version of the CartDiscount.
18
- *
19
- *
20
- */
21
- readonly version: number;
22
- /**
23
- * Date and time (UTC) for the CartDiscount was initially created.
24
- *
25
- *
26
- */
27
- readonly createdAt: string;
28
- /**
29
- * Date and time (UTC) for the CartDiscount was last updated.
30
- *
31
- *
32
- */
33
- readonly lastModifiedAt: string;
34
- /**
35
- * Present on resources updated after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).
36
- *
37
- *
38
- */
39
- readonly lastModifiedBy?: LastModifiedBy;
40
- /**
41
- * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).
42
- *
43
- *
44
- */
45
- readonly createdBy?: CreatedBy;
46
- /**
47
- * Name of the CartDiscount.
48
- *
49
- *
50
- */
51
- readonly name: LocalizedString;
52
- /**
53
- * User-defined unique identifier of the CartDiscount.
54
- *
55
- *
56
- */
57
- readonly key?: string;
58
- /**
59
- * Description of the CartDiscount.
60
- *
61
- *
62
- */
63
- readonly description?: LocalizedString;
64
- /**
65
- * Effect of the CartDiscount.
66
- *
67
- *
68
- */
69
- readonly value: CartDiscountValue;
70
- /**
71
- * Valid [Cart Predicate](/../api/projects/predicates#cart-predicates).
72
- *
73
- *
74
- */
75
- readonly cartPredicate: string;
76
- /**
77
- * Sets a [CartDiscountTarget](ctp:api:type:CartDiscountTarget). Empty if `value` has type `giftLineItem`.
78
- *
79
- *
80
- */
81
- readonly target?: CartDiscountTarget;
82
- /**
83
- * Value between `0` and `1`.
84
- * All matching CartDiscounts are applied to a Cart in the order defined by this field.
85
- * A Discount with a higher sortOrder is prioritized.
86
- * The sort order is unambiguous among all CartDiscounts.
87
- *
88
- *
89
- */
90
- readonly sortOrder: string;
91
- /**
92
- * Indicates if the CartDiscount is active and can be applied to the Cart.
93
- *
94
- *
95
- */
96
- readonly isActive: boolean;
97
- /**
98
- * Date and time (UTC) from which the Discount is effective.
99
- *
100
- *
101
- */
102
- readonly validFrom?: string;
103
- /**
104
- * Date and time (UTC) until which the Discount is effective.
105
- *
106
- *
107
- */
108
- readonly validUntil?: string;
109
- /**
110
- * Indicates if the Discount can be used in connection with a [DiscountCode](ctp:api:type:DiscountCode).
111
- *
112
- *
113
- */
114
- readonly requiresDiscountCode: boolean;
115
- /**
116
- * References of all resources that are addressed in the predicate.
117
- * The API generates this array from the predicate.
118
- *
119
- *
120
- */
121
- readonly references: Reference[];
122
- /**
123
- * Indicates whether the application of the CartDiscount causes other discounts to be ignored.
124
- *
125
- *
126
- */
127
- readonly stackingMode: StackingMode;
128
- /**
129
- * Custom Fields of the CartDiscount.
130
- *
131
- *
132
- */
133
- readonly custom?: CustomFields;
134
- }
135
- export interface CartDiscountDraft {
136
- /**
137
- * Name of the CartDiscount.
138
- *
139
- *
140
- */
141
- readonly name: LocalizedString;
142
- /**
143
- * User-defined unique identifier for the CartDiscount.
144
- *
145
- *
146
- */
147
- readonly key?: string;
148
- /**
149
- * Description of the CartDiscount.
150
- *
151
- *
152
- */
153
- readonly description?: LocalizedString;
154
- /**
155
- * Effect of the CartDiscount.
156
- * For a [target](ctp:api:type:CartDiscountTarget), relative or absolute Discount values or a fixed item Price value can be specified. If no target is specified, a [Gift Line Item](/../api/projects/cartDiscounts#gift-line-item) can be added to the Cart.
157
- *
158
- *
159
- */
160
- readonly value: CartDiscountValueDraft;
161
- /**
162
- * Valid [Cart Predicate](/../api/projects/predicates#cart-predicates).
163
- *
164
- *
165
- */
166
- readonly cartPredicate: string;
167
- /**
168
- * Must not be set when the `value` has type `giftLineItem`, otherwise a [CartDiscountTarget](ctp:api:type:CartDiscountTarget) must be set.
169
- *
170
- *
171
- */
172
- readonly target?: CartDiscountTarget;
173
- /**
174
- * Value between `0` and `1`.
175
- * A Discount with a higher sortOrder is prioritized.
176
- * The sort order must be unambiguous among all CartDiscounts.
177
- *
178
- *
179
- */
180
- readonly sortOrder: string;
181
- /**
182
- * Only active Discounts can be applied to the Cart.
183
- *
184
- *
185
- */
186
- readonly isActive?: boolean;
187
- /**
188
- * Date and time (UTC) from which the Discount is effective.
189
- *
190
- *
191
- */
192
- readonly validFrom?: string;
193
- /**
194
- * Date and time (UTC) until which the Discount is effective.
195
- *
196
- *
197
- */
198
- readonly validUntil?: string;
199
- /**
200
- * States whether the Discount can only be used in a connection with a [DiscountCode](ctp:api:type:DiscountCode).
201
- *
202
- *
203
- */
204
- readonly requiresDiscountCode?: boolean;
205
- /**
206
- * Specifies whether the application of this discount causes the following discounts to be ignored.
207
- *
208
- *
209
- */
210
- readonly stackingMode?: StackingMode;
211
- /**
212
- * Custom Fields of the CartDiscount.
213
- *
214
- *
215
- */
216
- readonly custom?: CustomFieldsDraft;
217
- }
218
- /**
219
- * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [CartDiscount](ctp:api:type:CartDiscount).
220
- *
221
- */
222
- export interface CartDiscountPagedQueryResponse {
223
- /**
224
- * Number of [results requested](/../api/general-concepts#limit).
225
- *
226
- *
227
- */
228
- readonly limit: number;
229
- /**
230
- * Number of [elements skipped](/../api/general-concepts#offset).
231
- *
232
- *
233
- */
234
- readonly offset: number;
235
- /**
236
- * Actual number of results returned.
237
- *
238
- *
239
- */
240
- readonly count: number;
241
- /**
242
- * Total number of results matching the query.
243
- * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
244
- * This field is returned by default.
245
- * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
246
- * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
247
- *
248
- *
249
- */
250
- readonly total?: number;
251
- /**
252
- * [CartDiscounts](ctp:api:type:CartDiscount) matching the query.
253
- *
254
- *
255
- */
256
- readonly results: CartDiscount[];
257
- }
258
- /**
259
- * [Reference](ctp:api:type:Reference) to a [CartDiscount](ctp:api:type:CartDiscount).
260
- *
261
- */
262
- export interface CartDiscountReference {
263
- readonly typeId: 'cart-discount';
264
- /**
265
- * Unique identifier of the referenced [CartDiscount](ctp:api:type:CartDiscount).
266
- *
267
- *
268
- */
269
- readonly id: string;
270
- /**
271
- * Contains the representation of the expanded CartDiscount. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for CartDiscounts.
272
- *
273
- *
274
- */
275
- readonly obj?: CartDiscount;
276
- }
277
- /**
278
- * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CartDiscount](ctp:api:type:CartDiscount).
279
- *
280
- */
281
- export interface CartDiscountResourceIdentifier {
282
- readonly typeId: 'cart-discount';
283
- /**
284
- * Unique identifier of the referenced [CartDiscount](ctp:api:type:CartDiscount). Either `id` or `key` is required.
285
- *
286
- *
287
- */
288
- readonly id?: string;
289
- /**
290
- * User-defined unique identifier of the referenced [CartDiscount](ctp:api:type:CartDiscount). Either `id` or `key` is required.
291
- *
292
- *
293
- */
294
- readonly key?: string;
295
- }
296
- export type CartDiscountTarget = CartDiscountCustomLineItemsTarget | CartDiscountLineItemsTarget | CartDiscountShippingCostTarget | MultiBuyCustomLineItemsTarget | MultiBuyLineItemsTarget;
297
- /**
298
- * Discount is applied to [CustomLineItems](ctp:api:type:CustomLineItem) matching the `predicate`.
299
- *
300
- */
301
- export interface CartDiscountCustomLineItemsTarget {
302
- readonly type: 'customLineItems';
303
- /**
304
- * Valid [CustomLineItem target predicate](/../api/projects/predicates#customlineitem-field-identifiers).
305
- *
306
- *
307
- */
308
- readonly predicate: string;
309
- }
310
- /**
311
- * Discount is applied to [LineItems](ctp:api:type:LineItem) matching the `predicate`.
312
- *
313
- */
314
- export interface CartDiscountLineItemsTarget {
315
- readonly type: 'lineItems';
316
- /**
317
- * Valid [LineItem target predicate](/../api/projects/predicates#lineitem-field-identifiers).
318
- *
319
- *
320
- */
321
- readonly predicate: string;
322
- }
323
- /**
324
- * Discount is applied to the shipping costs of the [Cart](ctp:api:type:Cart).
325
- *
326
- */
327
- export interface CartDiscountShippingCostTarget {
328
- readonly type: 'shipping';
329
- }
330
- export interface CartDiscountUpdate {
331
- /**
332
- * Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error is returned.
333
- *
334
- *
335
- */
336
- readonly version: number;
337
- /**
338
- * Update actions to be performed on the CartDiscount.
339
- *
340
- *
341
- */
342
- readonly actions: CartDiscountUpdateAction[];
343
- }
344
- export type CartDiscountUpdateAction = CartDiscountChangeCartPredicateAction | CartDiscountChangeIsActiveAction | CartDiscountChangeNameAction | CartDiscountChangeRequiresDiscountCodeAction | CartDiscountChangeSortOrderAction | CartDiscountChangeStackingModeAction | CartDiscountChangeTargetAction | CartDiscountChangeValueAction | CartDiscountSetCustomFieldAction | CartDiscountSetCustomTypeAction | CartDiscountSetDescriptionAction | CartDiscountSetKeyAction | CartDiscountSetValidFromAction | CartDiscountSetValidFromAndUntilAction | CartDiscountSetValidUntilAction;
345
- export type CartDiscountValue = CartDiscountValueAbsolute | CartDiscountValueFixed | CartDiscountValueGiftLineItem | CartDiscountValueRelative;
346
- /**
347
- * Discounts the [CartDiscountTarget](ctp:api:type:CartDiscountTarget) by an absolute amount (not allowed for [MultiBuyLineItemsTarget](ctp:api:type:MultiBuyLineItemsTarget) and [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget)).
348
- *
349
- */
350
- export interface CartDiscountValueAbsolute {
351
- readonly type: 'absolute';
352
- /**
353
- * Cent precision money values in different currencies.
354
- *
355
- *
356
- */
357
- readonly money: CentPrecisionMoney[];
358
- }
359
- export type CartDiscountValueDraft = CartDiscountValueAbsoluteDraft | CartDiscountValueFixedDraft | CartDiscountValueGiftLineItemDraft | CartDiscountValueRelativeDraft;
360
- export interface CartDiscountValueAbsoluteDraft {
361
- readonly type: 'absolute';
362
- /**
363
- * Money values in different currencies.
364
- * An absolute Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
365
- *
366
- *
367
- */
368
- readonly money: Money[];
369
- }
370
- /**
371
- * Sets the [DiscountedLineItemPrice](ctp:api:type:DiscountedLineItemPrice) of the [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) to the value specified in the `money` field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the `money` field, this Discount is not applied.
372
- *
373
- */
374
- export interface CartDiscountValueFixed {
375
- readonly type: 'fixed';
376
- /**
377
- * Cent precision money values in different currencies.
378
- *
379
- *
380
- */
381
- readonly money: CentPrecisionMoney[];
382
- }
383
- /**
384
- * Sets the [DiscountedLineItemPrice](ctp:api:type:DiscountedLineItemPrice) of the [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) to the value specified in the `money` field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the `money` field, this Discount is not applied.
385
- *
386
- */
387
- export interface CartDiscountValueFixedDraft {
388
- readonly type: 'fixed';
389
- /**
390
- * Money values in different currencies.
391
- * A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.
392
- *
393
- *
394
- */
395
- readonly money: Money[];
396
- }
397
- export interface CartDiscountValueGiftLineItem {
398
- readonly type: 'giftLineItem';
399
- /**
400
- * Reference to a Product.
401
- *
402
- *
403
- */
404
- readonly product: ProductReference;
405
- /**
406
- * [ProductVariant](ctp:api:type:ProductVariant) of the Product.
407
- *
408
- *
409
- */
410
- readonly variantId: number;
411
- /**
412
- * Channel must have the [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum) `InventorySupply`.
413
- *
414
- *
415
- */
416
- readonly supplyChannel?: ChannelReference;
417
- /**
418
- * Channel must have the [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum) `ProductDistribution`.
419
- *
420
- *
421
- */
422
- readonly distributionChannel?: ChannelReference;
423
- }
424
- export interface CartDiscountValueGiftLineItemDraft {
425
- readonly type: 'giftLineItem';
426
- /**
427
- * ResourceIdentifier of a Product.
428
- *
429
- *
430
- */
431
- readonly product: ProductResourceIdentifier;
432
- /**
433
- * [ProductVariant](ctp:api:type:ProductVariant) of the Product.
434
- *
435
- *
436
- */
437
- readonly variantId: number;
438
- /**
439
- * Channel must have the role `InventorySupply`.
440
- *
441
- *
442
- */
443
- readonly supplyChannel?: ChannelResourceIdentifier;
444
- /**
445
- * Channel must have the role `ProductDistribution`.
446
- *
447
- *
448
- */
449
- readonly distributionChannel?: ChannelResourceIdentifier;
450
- }
451
- /**
452
- * Discounts the [CartDiscountTarget](ctp:api:type:CartDiscountTarget) relative to its price.
453
- *
454
- */
455
- export interface CartDiscountValueRelative {
456
- readonly type: 'relative';
457
- /**
458
- * Fraction (per ten thousand) the price is reduced by. For example, `1000` will result in a 10% price reduction.
459
- *
460
- *
461
- */
462
- readonly permyriad: number;
463
- }
464
- export interface CartDiscountValueRelativeDraft {
465
- readonly type: 'relative';
466
- /**
467
- * Fraction (per ten thousand) the price is reduced by. For example, `1000` will result in a 10% price reduction.
468
- *
469
- *
470
- */
471
- readonly permyriad: number;
472
- }
473
- /**
474
- * This Discount target is similar to `MultiBuyLineItems`, but is applied on Custom Line Items instead of Line Items.
475
- *
476
- */
477
- export interface MultiBuyCustomLineItemsTarget {
478
- readonly type: 'multiBuyCustomLineItems';
479
- /**
480
- * Valid [CustomLineItems target predicate](/../api/projects/predicates#customlineitem-field-identifiers). The Discount will be applied to Custom Line Items that are matched by the predicate.
481
- *
482
- *
483
- */
484
- readonly predicate: string;
485
- /**
486
- * Number of Custom Line Items to be present in order to trigger an application of this Discount.
487
- *
488
- *
489
- */
490
- readonly triggerQuantity: number;
491
- /**
492
- * Number of Custom Line Items that are discounted per application of this Discount.
493
- *
494
- *
495
- */
496
- readonly discountedQuantity: number;
497
- /**
498
- * Maximum number of times this Discount can be applied.
499
- *
500
- *
501
- */
502
- readonly maxOccurrence?: number;
503
- /**
504
- * Discounts particular Line Items only according to the SelectionMode.
505
- *
506
- *
507
- */
508
- readonly selectionMode: SelectionMode;
509
- }
510
- export interface MultiBuyLineItemsTarget {
511
- readonly type: 'multiBuyLineItems';
512
- /**
513
- * Valid [LineItem target predicate](/../api/projects/predicates#lineitem-field-identifiers). The Discount will be applied to Line Items that are matched by the predicate.
514
- *
515
- *
516
- */
517
- readonly predicate: string;
518
- /**
519
- * Number of Line Items to be present in order to trigger an application of this Discount.
520
- *
521
- *
522
- */
523
- readonly triggerQuantity: number;
524
- /**
525
- * Number of Line Items that are discounted per application of this Discount.
526
- *
527
- *
528
- */
529
- readonly discountedQuantity: number;
530
- /**
531
- * Maximum number of times this Discount can be applied.
532
- *
533
- *
534
- */
535
- readonly maxOccurrence?: number;
536
- /**
537
- * Discounts particular Line Items only according to the SelectionMode.
538
- *
539
- *
540
- */
541
- readonly selectionMode: SelectionMode;
542
- }
543
- /**
544
- * Defines which matching items are to be discounted.
545
- *
546
- */
547
- export type SelectionMode = 'Cheapest' | 'MostExpensive' | string;
548
- /**
549
- * Describes how the Cart Discount interacts with other Discounts.
550
- *
551
- */
552
- export type StackingMode = 'Stacking' | 'StopAfterThisDiscount' | string;
553
- export interface CartDiscountChangeCartPredicateAction {
554
- readonly action: 'changeCartPredicate';
555
- /**
556
- * New value to set.
557
- *
558
- *
559
- */
560
- readonly cartPredicate: string;
561
- }
562
- export interface CartDiscountChangeIsActiveAction {
563
- readonly action: 'changeIsActive';
564
- /**
565
- * New value to set.
566
- * If set to `true`, the Discount will be applied to the Cart.
567
- *
568
- *
569
- */
570
- readonly isActive: boolean;
571
- }
572
- export interface CartDiscountChangeNameAction {
573
- readonly action: 'changeName';
574
- /**
575
- * New value to set.
576
- *
577
- *
578
- */
579
- readonly name: LocalizedString;
580
- }
581
- export interface CartDiscountChangeRequiresDiscountCodeAction {
582
- readonly action: 'changeRequiresDiscountCode';
583
- /**
584
- * New value to set.
585
- * If set to `true`, the Discount can only be used in connection with a [DiscountCode](ctp:api:type:DiscountCode).
586
- *
587
- *
588
- */
589
- readonly requiresDiscountCode: boolean;
590
- }
591
- export interface CartDiscountChangeSortOrderAction {
592
- readonly action: 'changeSortOrder';
593
- /**
594
- * New value to set (between `0` and `1`).
595
- * A Discount with a higher sortOrder is prioritized.
596
- *
597
- *
598
- */
599
- readonly sortOrder: string;
600
- }
601
- export interface CartDiscountChangeStackingModeAction {
602
- readonly action: 'changeStackingMode';
603
- /**
604
- * New value to set.
605
- *
606
- *
607
- */
608
- readonly stackingMode: StackingMode;
609
- }
610
- export interface CartDiscountChangeTargetAction {
611
- readonly action: 'changeTarget';
612
- /**
613
- * New value to set.
614
- *
615
- *
616
- */
617
- readonly target: CartDiscountTarget;
618
- }
619
- export interface CartDiscountChangeValueAction {
620
- readonly action: 'changeValue';
621
- /**
622
- * New value to set.
623
- *
624
- *
625
- */
626
- readonly value: CartDiscountValueDraft;
627
- }
628
- export interface CartDiscountSetCustomFieldAction {
629
- readonly action: 'setCustomField';
630
- /**
631
- * Name of the [Custom Field](/../api/projects/custom-fields).
632
- *
633
- *
634
- */
635
- readonly name: string;
636
- /**
637
- * If `value` is absent or `null`, this field will be removed if it exists.
638
- * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
639
- * If `value` is provided, it is set for the field defined by `name`.
640
- *
641
- *
642
- */
643
- readonly value?: any;
644
- }
645
- export interface CartDiscountSetCustomTypeAction {
646
- readonly action: 'setCustomType';
647
- /**
648
- * Defines the [Type](ctp:api:type:Type) that extends the CartDiscount with [Custom Fields](/../api/projects/custom-fields).
649
- * If absent, any existing Type and Custom Fields are removed from the CartDiscount.
650
- *
651
- *
652
- */
653
- readonly type?: TypeResourceIdentifier;
654
- /**
655
- * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the CartDiscount.
656
- *
657
- *
658
- */
659
- readonly fields?: FieldContainer;
660
- }
661
- export interface CartDiscountSetDescriptionAction {
662
- readonly action: 'setDescription';
663
- /**
664
- * Value to set. If empty, any existing value will be removed.
665
- *
666
- *
667
- */
668
- readonly description?: LocalizedString;
669
- }
670
- export interface CartDiscountSetKeyAction {
671
- readonly action: 'setKey';
672
- /**
673
- * Value to set. If empty, any existing value will be removed.
674
- *
675
- *
676
- */
677
- readonly key?: string;
678
- }
679
- export interface CartDiscountSetValidFromAction {
680
- readonly action: 'setValidFrom';
681
- /**
682
- * Value to set.
683
- * If empty, any existing value will be removed.
684
- *
685
- *
686
- */
687
- readonly validFrom?: string;
688
- }
689
- export interface CartDiscountSetValidFromAndUntilAction {
690
- readonly action: 'setValidFromAndUntil';
691
- /**
692
- * Value to set.
693
- * If empty, any existing value will be removed.
694
- *
695
- *
696
- */
697
- readonly validFrom?: string;
698
- /**
699
- * Value to set.
700
- * If empty, any existing value will be removed.
701
- *
702
- *
703
- */
704
- readonly validUntil?: string;
705
- }
706
- export interface CartDiscountSetValidUntilAction {
707
- readonly action: 'setValidUntil';
708
- /**
709
- * Value to set.
710
- * If empty, any existing value will be removed.
711
- *
712
- *
713
- */
714
- readonly validUntil?: string;
715
- }
716
- //# sourceMappingURL=cart-discount.d.ts.map