@djust-b2b/djust-front-sdk 3.0.0-beta.9 → 3.0.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 (715) hide show
  1. package/README.md +34 -30
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/.tsbuildinfo-esm +1 -1
  4. package/dist/client/create-client.d.ts +18 -0
  5. package/dist/client/create-client.d.ts.map +1 -1
  6. package/dist/client/transport.d.ts +5 -0
  7. package/dist/client/transport.d.ts.map +1 -1
  8. package/dist/errors/classes/not-found.error.d.ts +1 -1
  9. package/dist/errors/classes/not-found.error.d.ts.map +1 -1
  10. package/dist/errors/factory.d.ts.map +1 -1
  11. package/dist/errors/helpers/djust-api-error.d.ts +29 -0
  12. package/dist/errors/helpers/djust-api-error.d.ts.map +1 -0
  13. package/dist/errors/types.d.ts +4 -0
  14. package/dist/errors/types.d.ts.map +1 -1
  15. package/dist/index.d.ts +42 -40
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.mjs +269 -63
  18. package/dist/interfaces/index.d.ts +15 -3
  19. package/dist/interfaces/index.d.ts.map +1 -1
  20. package/dist/services/base.service.d.ts +2 -0
  21. package/dist/services/base.service.d.ts.map +1 -1
  22. package/dist/services/commercial-order/commercial-order.service.d.ts +8 -5
  23. package/dist/services/commercial-order/commercial-order.service.d.ts.map +1 -1
  24. package/dist/services/commercial-order/definitions.d.ts +13 -0
  25. package/dist/services/commercial-order/definitions.d.ts.map +1 -1
  26. package/dist/services/commercial-order/index.d.ts +30 -19
  27. package/dist/services/commercial-order/index.d.ts.map +1 -1
  28. package/dist/services/commercial-order/module.d.ts +1 -1
  29. package/dist/services/commercial-order/module.d.ts.map +1 -1
  30. package/dist/services/commercial-order/types.d.ts +1 -0
  31. package/dist/services/commercial-order/types.d.ts.map +1 -1
  32. package/dist/services/logistic-order/definitions.d.ts +23 -1
  33. package/dist/services/logistic-order/definitions.d.ts.map +1 -1
  34. package/dist/services/logistic-order/endpoints.d.ts +1 -0
  35. package/dist/services/logistic-order/endpoints.d.ts.map +1 -1
  36. package/dist/services/logistic-order/index.d.ts +77 -1
  37. package/dist/services/logistic-order/index.d.ts.map +1 -1
  38. package/dist/services/logistic-order/logistic-order.service.d.ts +6 -1
  39. package/dist/services/logistic-order/logistic-order.service.d.ts.map +1 -1
  40. package/dist/services/logistic-order/module.d.ts +1 -1
  41. package/dist/services/logistic-order/module.d.ts.map +1 -1
  42. package/dist/services/logistic-order/types.d.ts +9 -0
  43. package/dist/services/logistic-order/types.d.ts.map +1 -1
  44. package/dist/services/operation/definitions.d.ts +1 -18
  45. package/dist/services/operation/definitions.d.ts.map +1 -1
  46. package/dist/services/payment/definitions.d.ts +0 -10
  47. package/dist/services/payment/definitions.d.ts.map +1 -1
  48. package/dist/services/product/definitions.d.ts +1 -0
  49. package/dist/services/product/definitions.d.ts.map +1 -1
  50. package/dist/services/product/index.d.ts +6 -5
  51. package/dist/services/product/index.d.ts.map +1 -1
  52. package/dist/services/product-variant/definitions.d.ts +3 -142
  53. package/dist/services/product-variant/definitions.d.ts.map +1 -1
  54. package/dist/services/quote/index.d.ts +1 -1
  55. package/dist/settings/fetch-instance.d.ts.map +1 -1
  56. package/dist/settings/sdk-version.d.ts +3 -0
  57. package/dist/settings/sdk-version.d.ts.map +1 -0
  58. package/lib/.tsbuildinfo +1 -0
  59. package/lib/client/create-client.d.ts +251 -0
  60. package/lib/client/create-client.d.ts.map +1 -0
  61. package/lib/client/create-client.js +233 -0
  62. package/lib/client/create-client.js.map +1 -0
  63. package/lib/client/index.d.ts +14 -0
  64. package/lib/client/index.d.ts.map +1 -0
  65. package/lib/client/index.js +91 -0
  66. package/lib/client/index.js.map +1 -0
  67. package/lib/client/performance.d.ts +203 -0
  68. package/lib/client/performance.d.ts.map +1 -0
  69. package/lib/client/performance.js +409 -0
  70. package/lib/client/performance.js.map +1 -0
  71. package/lib/client/transport.d.ts +372 -0
  72. package/lib/client/transport.d.ts.map +1 -0
  73. package/lib/client/transport.js +735 -0
  74. package/lib/client/transport.js.map +1 -0
  75. package/lib/errors/base.d.ts +101 -0
  76. package/lib/errors/base.d.ts.map +1 -0
  77. package/lib/errors/base.js +145 -0
  78. package/lib/errors/base.js.map +1 -0
  79. package/lib/errors/classes/auth.error.d.ts +64 -0
  80. package/lib/errors/classes/auth.error.d.ts.map +1 -0
  81. package/lib/errors/classes/auth.error.js +116 -0
  82. package/lib/errors/classes/auth.error.js.map +1 -0
  83. package/lib/errors/classes/forbidden.error.d.ts +52 -0
  84. package/lib/errors/classes/forbidden.error.d.ts.map +1 -0
  85. package/lib/errors/classes/forbidden.error.js +90 -0
  86. package/lib/errors/classes/forbidden.error.js.map +1 -0
  87. package/lib/errors/classes/index.d.ts +17 -0
  88. package/lib/errors/classes/index.d.ts.map +1 -0
  89. package/lib/errors/classes/index.js +29 -0
  90. package/lib/errors/classes/index.js.map +1 -0
  91. package/lib/errors/classes/network.error.d.ts +63 -0
  92. package/lib/errors/classes/network.error.d.ts.map +1 -0
  93. package/lib/errors/classes/network.error.js +122 -0
  94. package/lib/errors/classes/network.error.js.map +1 -0
  95. package/lib/errors/classes/not-found.error.d.ts +58 -0
  96. package/lib/errors/classes/not-found.error.d.ts.map +1 -0
  97. package/lib/errors/classes/not-found.error.js +120 -0
  98. package/lib/errors/classes/not-found.error.js.map +1 -0
  99. package/lib/errors/classes/rate-limit.error.d.ts +49 -0
  100. package/lib/errors/classes/rate-limit.error.d.ts.map +1 -0
  101. package/lib/errors/classes/rate-limit.error.js +107 -0
  102. package/lib/errors/classes/rate-limit.error.js.map +1 -0
  103. package/lib/errors/classes/server.error.d.ts +63 -0
  104. package/lib/errors/classes/server.error.d.ts.map +1 -0
  105. package/lib/errors/classes/server.error.js +156 -0
  106. package/lib/errors/classes/server.error.js.map +1 -0
  107. package/lib/errors/classes/timeout.error.d.ts +64 -0
  108. package/lib/errors/classes/timeout.error.d.ts.map +1 -0
  109. package/lib/errors/classes/timeout.error.js +90 -0
  110. package/lib/errors/classes/timeout.error.js.map +1 -0
  111. package/lib/errors/classes/unexpected.error.d.ts +70 -0
  112. package/lib/errors/classes/unexpected.error.d.ts.map +1 -0
  113. package/lib/errors/classes/unexpected.error.js +105 -0
  114. package/lib/errors/classes/unexpected.error.js.map +1 -0
  115. package/lib/errors/classes/validation.error.d.ts +68 -0
  116. package/lib/errors/classes/validation.error.d.ts.map +1 -0
  117. package/lib/errors/classes/validation.error.js +103 -0
  118. package/lib/errors/classes/validation.error.js.map +1 -0
  119. package/lib/errors/codes.d.ts +111 -0
  120. package/lib/errors/codes.d.ts.map +1 -0
  121. package/lib/errors/codes.js +143 -0
  122. package/lib/errors/codes.js.map +1 -0
  123. package/lib/errors/compat.d.ts +99 -0
  124. package/lib/errors/compat.d.ts.map +1 -0
  125. package/lib/errors/compat.js +280 -0
  126. package/lib/errors/compat.js.map +1 -0
  127. package/lib/errors/factory.d.ts +33 -0
  128. package/lib/errors/factory.d.ts.map +1 -0
  129. package/lib/errors/factory.js +298 -0
  130. package/lib/errors/factory.js.map +1 -0
  131. package/lib/errors/guards.d.ts +142 -0
  132. package/lib/errors/guards.d.ts.map +1 -0
  133. package/lib/errors/guards.js +281 -0
  134. package/lib/errors/guards.js.map +1 -0
  135. package/lib/errors/helpers/djust-api-error.d.ts +29 -0
  136. package/lib/errors/helpers/djust-api-error.d.ts.map +1 -0
  137. package/lib/errors/helpers/djust-api-error.js +49 -0
  138. package/lib/errors/helpers/djust-api-error.js.map +1 -0
  139. package/lib/errors/index.d.ts +25 -0
  140. package/lib/errors/index.d.ts.map +1 -0
  141. package/lib/errors/index.js +89 -0
  142. package/lib/errors/index.js.map +1 -0
  143. package/lib/errors/types.d.ts +104 -0
  144. package/lib/errors/types.d.ts.map +1 -0
  145. package/lib/errors/types.js +10 -0
  146. package/lib/errors/types.js.map +1 -0
  147. package/lib/helpers/index.d.ts +42 -0
  148. package/lib/helpers/index.d.ts.map +1 -0
  149. package/lib/helpers/index.js +102 -0
  150. package/lib/helpers/index.js.map +1 -0
  151. package/lib/helpers/parameters-validation.d.ts +3 -0
  152. package/lib/helpers/parameters-validation.d.ts.map +1 -0
  153. package/lib/helpers/parameters-validation.js +22 -0
  154. package/lib/helpers/parameters-validation.js.map +1 -0
  155. package/lib/helpers/utils.d.ts +5 -0
  156. package/lib/helpers/utils.d.ts.map +1 -0
  157. package/lib/helpers/utils.js +30 -0
  158. package/lib/helpers/utils.js.map +1 -0
  159. package/lib/index.d.ts +267 -0
  160. package/lib/index.d.ts.map +1 -0
  161. package/lib/index.js +182 -0
  162. package/lib/index.js.map +1 -0
  163. package/lib/interfaces/index.d.ts +43 -0
  164. package/lib/interfaces/index.d.ts.map +1 -0
  165. package/lib/interfaces/index.js +36 -0
  166. package/lib/interfaces/index.js.map +1 -0
  167. package/lib/interfaces/models/address.d.ts +61 -0
  168. package/lib/interfaces/models/address.d.ts.map +1 -0
  169. package/lib/interfaces/models/address.js +3 -0
  170. package/lib/interfaces/models/address.js.map +1 -0
  171. package/lib/interfaces/models/attribute.d.ts +31 -0
  172. package/lib/interfaces/models/attribute.d.ts.map +1 -0
  173. package/lib/interfaces/models/attribute.js +3 -0
  174. package/lib/interfaces/models/attribute.js.map +1 -0
  175. package/lib/interfaces/models/auth.d.ts +37 -0
  176. package/lib/interfaces/models/auth.d.ts.map +1 -0
  177. package/lib/interfaces/models/auth.js +3 -0
  178. package/lib/interfaces/models/auth.js.map +1 -0
  179. package/lib/interfaces/models/cart.d.ts +64 -0
  180. package/lib/interfaces/models/cart.d.ts.map +1 -0
  181. package/lib/interfaces/models/cart.js +3 -0
  182. package/lib/interfaces/models/cart.js.map +1 -0
  183. package/lib/interfaces/models/common.d.ts +68 -0
  184. package/lib/interfaces/models/common.d.ts.map +1 -0
  185. package/lib/interfaces/models/common.js +3 -0
  186. package/lib/interfaces/models/common.js.map +1 -0
  187. package/lib/interfaces/models/custom-field.d.ts +57 -0
  188. package/lib/interfaces/models/custom-field.d.ts.map +1 -0
  189. package/lib/interfaces/models/custom-field.js +3 -0
  190. package/lib/interfaces/models/custom-field.js.map +1 -0
  191. package/lib/interfaces/models/customer-account.d.ts +52 -0
  192. package/lib/interfaces/models/customer-account.d.ts.map +1 -0
  193. package/lib/interfaces/models/customer-account.js +3 -0
  194. package/lib/interfaces/models/customer-account.js.map +1 -0
  195. package/lib/interfaces/models/customer-organisation.d.ts +14 -0
  196. package/lib/interfaces/models/customer-organisation.d.ts.map +1 -0
  197. package/lib/interfaces/models/customer-organisation.js +3 -0
  198. package/lib/interfaces/models/customer-organisation.js.map +1 -0
  199. package/lib/interfaces/models/customer-user.d.ts +114 -0
  200. package/lib/interfaces/models/customer-user.d.ts.map +1 -0
  201. package/lib/interfaces/models/customer-user.js +3 -0
  202. package/lib/interfaces/models/customer-user.js.map +1 -0
  203. package/lib/interfaces/models/incident.d.ts +37 -0
  204. package/lib/interfaces/models/incident.d.ts.map +1 -0
  205. package/lib/interfaces/models/incident.js +3 -0
  206. package/lib/interfaces/models/incident.js.map +1 -0
  207. package/lib/interfaces/models/navigation-category.d.ts +22 -0
  208. package/lib/interfaces/models/navigation-category.d.ts.map +1 -0
  209. package/lib/interfaces/models/navigation-category.js +3 -0
  210. package/lib/interfaces/models/navigation-category.js.map +1 -0
  211. package/lib/interfaces/models/offer.d.ts +151 -0
  212. package/lib/interfaces/models/offer.d.ts.map +1 -0
  213. package/lib/interfaces/models/offer.js +3 -0
  214. package/lib/interfaces/models/offer.js.map +1 -0
  215. package/lib/interfaces/models/order.d.ts +701 -0
  216. package/lib/interfaces/models/order.d.ts.map +1 -0
  217. package/lib/interfaces/models/order.js +3 -0
  218. package/lib/interfaces/models/order.js.map +1 -0
  219. package/lib/interfaces/models/payment.d.ts +20 -0
  220. package/lib/interfaces/models/payment.d.ts.map +1 -0
  221. package/lib/interfaces/models/payment.js +3 -0
  222. package/lib/interfaces/models/payment.js.map +1 -0
  223. package/lib/interfaces/models/price.d.ts +6 -0
  224. package/lib/interfaces/models/price.d.ts.map +1 -0
  225. package/lib/interfaces/models/price.js +3 -0
  226. package/lib/interfaces/models/price.js.map +1 -0
  227. package/lib/interfaces/models/product.d.ts +243 -0
  228. package/lib/interfaces/models/product.d.ts.map +1 -0
  229. package/lib/interfaces/models/product.js +3 -0
  230. package/lib/interfaces/models/product.js.map +1 -0
  231. package/lib/interfaces/models/quote.d.ts +77 -0
  232. package/lib/interfaces/models/quote.d.ts.map +1 -0
  233. package/lib/interfaces/models/quote.js +3 -0
  234. package/lib/interfaces/models/quote.js.map +1 -0
  235. package/lib/interfaces/models/searchProduct.d.ts +128 -0
  236. package/lib/interfaces/models/searchProduct.d.ts.map +1 -0
  237. package/lib/interfaces/models/searchProduct.js +3 -0
  238. package/lib/interfaces/models/searchProduct.js.map +1 -0
  239. package/lib/interfaces/models/supplier.d.ts +72 -0
  240. package/lib/interfaces/models/supplier.d.ts.map +1 -0
  241. package/lib/interfaces/models/supplier.js +3 -0
  242. package/lib/interfaces/models/supplier.js.map +1 -0
  243. package/lib/services/attributes/attributes.service.d.ts +18 -0
  244. package/lib/services/attributes/attributes.service.d.ts.map +1 -0
  245. package/lib/services/attributes/attributes.service.js +37 -0
  246. package/lib/services/attributes/attributes.service.js.map +1 -0
  247. package/lib/services/attributes/definitions.d.ts +28 -0
  248. package/lib/services/attributes/definitions.d.ts.map +1 -0
  249. package/lib/services/attributes/definitions.js +3 -0
  250. package/lib/services/attributes/definitions.js.map +1 -0
  251. package/lib/services/attributes/endpoints.d.ts +12 -0
  252. package/lib/services/attributes/endpoints.d.ts.map +1 -0
  253. package/lib/services/attributes/endpoints.js +14 -0
  254. package/lib/services/attributes/endpoints.js.map +1 -0
  255. package/lib/services/attributes/index.d.ts +33 -0
  256. package/lib/services/attributes/index.d.ts.map +1 -0
  257. package/lib/services/attributes/index.js +50 -0
  258. package/lib/services/attributes/index.js.map +1 -0
  259. package/lib/services/attributes/module.d.ts +11 -0
  260. package/lib/services/attributes/module.d.ts.map +1 -0
  261. package/lib/services/attributes/module.js +15 -0
  262. package/lib/services/attributes/module.js.map +1 -0
  263. package/lib/services/attributes/types.d.ts +35 -0
  264. package/lib/services/attributes/types.d.ts.map +1 -0
  265. package/lib/services/attributes/types.js +10 -0
  266. package/lib/services/attributes/types.js.map +1 -0
  267. package/lib/services/auth/__mocks__/auth.mocks.d.ts +249 -0
  268. package/lib/services/auth/__mocks__/auth.mocks.d.ts.map +1 -0
  269. package/lib/services/auth/__mocks__/auth.mocks.js +221 -0
  270. package/lib/services/auth/__mocks__/auth.mocks.js.map +1 -0
  271. package/lib/services/auth/auth.service.d.ts +286 -0
  272. package/lib/services/auth/auth.service.d.ts.map +1 -0
  273. package/lib/services/auth/auth.service.js +423 -0
  274. package/lib/services/auth/auth.service.js.map +1 -0
  275. package/lib/services/auth/definitions.d.ts +69 -0
  276. package/lib/services/auth/definitions.d.ts.map +1 -0
  277. package/lib/services/auth/definitions.js +3 -0
  278. package/lib/services/auth/definitions.js.map +1 -0
  279. package/lib/services/auth/definitions.requests.d.ts +25 -0
  280. package/lib/services/auth/definitions.requests.d.ts.map +1 -0
  281. package/lib/services/auth/definitions.requests.js +6 -0
  282. package/lib/services/auth/definitions.requests.js.map +1 -0
  283. package/lib/services/auth/endpoints.d.ts +30 -0
  284. package/lib/services/auth/endpoints.d.ts.map +1 -0
  285. package/lib/services/auth/endpoints.js +32 -0
  286. package/lib/services/auth/endpoints.js.map +1 -0
  287. package/lib/services/auth/index.d.ts +232 -0
  288. package/lib/services/auth/index.d.ts.map +1 -0
  289. package/lib/services/auth/index.js +310 -0
  290. package/lib/services/auth/index.js.map +1 -0
  291. package/lib/services/auth/module.d.ts +11 -0
  292. package/lib/services/auth/module.d.ts.map +1 -0
  293. package/lib/services/auth/module.js +17 -0
  294. package/lib/services/auth/module.js.map +1 -0
  295. package/lib/services/auth/types.d.ts +124 -0
  296. package/lib/services/auth/types.d.ts.map +1 -0
  297. package/lib/services/auth/types.js +10 -0
  298. package/lib/services/auth/types.js.map +1 -0
  299. package/lib/services/base.service.d.ts +83 -0
  300. package/lib/services/base.service.d.ts.map +1 -0
  301. package/lib/services/base.service.js +121 -0
  302. package/lib/services/base.service.js.map +1 -0
  303. package/lib/services/cart/cart.service.d.ts +443 -0
  304. package/lib/services/cart/cart.service.d.ts.map +1 -0
  305. package/lib/services/cart/cart.service.js +551 -0
  306. package/lib/services/cart/cart.service.js.map +1 -0
  307. package/lib/services/cart/definitions.d.ts +84 -0
  308. package/lib/services/cart/definitions.d.ts.map +1 -0
  309. package/lib/services/cart/definitions.js +3 -0
  310. package/lib/services/cart/definitions.js.map +1 -0
  311. package/lib/services/cart/endpoints.d.ts +24 -0
  312. package/lib/services/cart/endpoints.d.ts.map +1 -0
  313. package/lib/services/cart/endpoints.js +26 -0
  314. package/lib/services/cart/endpoints.js.map +1 -0
  315. package/lib/services/cart/index.d.ts +330 -0
  316. package/lib/services/cart/index.d.ts.map +1 -0
  317. package/lib/services/cart/index.js +464 -0
  318. package/lib/services/cart/index.js.map +1 -0
  319. package/lib/services/cart/module.d.ts +11 -0
  320. package/lib/services/cart/module.d.ts.map +1 -0
  321. package/lib/services/cart/module.js +17 -0
  322. package/lib/services/cart/module.js.map +1 -0
  323. package/lib/services/cart/types.d.ts +236 -0
  324. package/lib/services/cart/types.d.ts.map +1 -0
  325. package/lib/services/cart/types.js +10 -0
  326. package/lib/services/cart/types.js.map +1 -0
  327. package/lib/services/commercial-order/commercial-order.service.d.ts +435 -0
  328. package/lib/services/commercial-order/commercial-order.service.d.ts.map +1 -0
  329. package/lib/services/commercial-order/commercial-order.service.js +690 -0
  330. package/lib/services/commercial-order/commercial-order.service.js.map +1 -0
  331. package/lib/services/commercial-order/definitions.d.ts +182 -0
  332. package/lib/services/commercial-order/definitions.d.ts.map +1 -0
  333. package/lib/services/commercial-order/definitions.js +3 -0
  334. package/lib/services/commercial-order/definitions.js.map +1 -0
  335. package/lib/services/commercial-order/endpoints.d.ts +28 -0
  336. package/lib/services/commercial-order/endpoints.d.ts.map +1 -0
  337. package/lib/services/commercial-order/endpoints.js +33 -0
  338. package/lib/services/commercial-order/endpoints.js.map +1 -0
  339. package/lib/services/commercial-order/index.d.ts +721 -0
  340. package/lib/services/commercial-order/index.d.ts.map +1 -0
  341. package/lib/services/commercial-order/index.js +986 -0
  342. package/lib/services/commercial-order/index.js.map +1 -0
  343. package/lib/services/commercial-order/module.d.ts +11 -0
  344. package/lib/services/commercial-order/module.d.ts.map +1 -0
  345. package/lib/services/commercial-order/module.js +15 -0
  346. package/lib/services/commercial-order/module.js.map +1 -0
  347. package/lib/services/commercial-order/types.d.ts +244 -0
  348. package/lib/services/commercial-order/types.d.ts.map +1 -0
  349. package/lib/services/commercial-order/types.js +10 -0
  350. package/lib/services/commercial-order/types.js.map +1 -0
  351. package/lib/services/custom-field/custom-field.service.d.ts +23 -0
  352. package/lib/services/custom-field/custom-field.service.d.ts.map +1 -0
  353. package/lib/services/custom-field/custom-field.service.js +64 -0
  354. package/lib/services/custom-field/custom-field.service.js.map +1 -0
  355. package/lib/services/custom-field/definitions.d.ts +107 -0
  356. package/lib/services/custom-field/definitions.d.ts.map +1 -0
  357. package/lib/services/custom-field/definitions.js +61 -0
  358. package/lib/services/custom-field/definitions.js.map +1 -0
  359. package/lib/services/custom-field/endpoints.d.ts +13 -0
  360. package/lib/services/custom-field/endpoints.d.ts.map +1 -0
  361. package/lib/services/custom-field/endpoints.js +15 -0
  362. package/lib/services/custom-field/endpoints.js.map +1 -0
  363. package/lib/services/custom-field/index.d.ts +115 -0
  364. package/lib/services/custom-field/index.d.ts.map +1 -0
  365. package/lib/services/custom-field/index.js +144 -0
  366. package/lib/services/custom-field/index.js.map +1 -0
  367. package/lib/services/custom-field/module.d.ts +11 -0
  368. package/lib/services/custom-field/module.d.ts.map +1 -0
  369. package/lib/services/custom-field/module.js +15 -0
  370. package/lib/services/custom-field/module.js.map +1 -0
  371. package/lib/services/custom-field/types.d.ts +51 -0
  372. package/lib/services/custom-field/types.d.ts.map +1 -0
  373. package/lib/services/custom-field/types.js +10 -0
  374. package/lib/services/custom-field/types.js.map +1 -0
  375. package/lib/services/customer-account/customer-account.service.d.ts +387 -0
  376. package/lib/services/customer-account/customer-account.service.d.ts.map +1 -0
  377. package/lib/services/customer-account/customer-account.service.js +579 -0
  378. package/lib/services/customer-account/customer-account.service.js.map +1 -0
  379. package/lib/services/customer-account/definitions.d.ts +164 -0
  380. package/lib/services/customer-account/definitions.d.ts.map +1 -0
  381. package/lib/services/customer-account/definitions.js +3 -0
  382. package/lib/services/customer-account/definitions.js.map +1 -0
  383. package/lib/services/customer-account/endpoints.d.ts +25 -0
  384. package/lib/services/customer-account/endpoints.d.ts.map +1 -0
  385. package/lib/services/customer-account/endpoints.js +33 -0
  386. package/lib/services/customer-account/endpoints.js.map +1 -0
  387. package/lib/services/customer-account/index.d.ts +656 -0
  388. package/lib/services/customer-account/index.d.ts.map +1 -0
  389. package/lib/services/customer-account/index.js +929 -0
  390. package/lib/services/customer-account/index.js.map +1 -0
  391. package/lib/services/customer-account/module.d.ts +11 -0
  392. package/lib/services/customer-account/module.d.ts.map +1 -0
  393. package/lib/services/customer-account/module.js +15 -0
  394. package/lib/services/customer-account/module.js.map +1 -0
  395. package/lib/services/customer-account/types.d.ts +253 -0
  396. package/lib/services/customer-account/types.d.ts.map +1 -0
  397. package/lib/services/customer-account/types.js +10 -0
  398. package/lib/services/customer-account/types.js.map +1 -0
  399. package/lib/services/customer-user/customer-user.service.d.ts +280 -0
  400. package/lib/services/customer-user/customer-user.service.d.ts.map +1 -0
  401. package/lib/services/customer-user/customer-user.service.js +402 -0
  402. package/lib/services/customer-user/customer-user.service.js.map +1 -0
  403. package/lib/services/customer-user/definitions.d.ts +84 -0
  404. package/lib/services/customer-user/definitions.d.ts.map +1 -0
  405. package/lib/services/customer-user/definitions.js +3 -0
  406. package/lib/services/customer-user/definitions.js.map +1 -0
  407. package/lib/services/customer-user/endpoints.d.ts +19 -0
  408. package/lib/services/customer-user/endpoints.d.ts.map +1 -0
  409. package/lib/services/customer-user/endpoints.js +21 -0
  410. package/lib/services/customer-user/endpoints.js.map +1 -0
  411. package/lib/services/customer-user/index.d.ts +394 -0
  412. package/lib/services/customer-user/index.d.ts.map +1 -0
  413. package/lib/services/customer-user/index.js +528 -0
  414. package/lib/services/customer-user/index.js.map +1 -0
  415. package/lib/services/customer-user/module.d.ts +11 -0
  416. package/lib/services/customer-user/module.d.ts.map +1 -0
  417. package/lib/services/customer-user/module.js +15 -0
  418. package/lib/services/customer-user/module.js.map +1 -0
  419. package/lib/services/customer-user/types.d.ts +118 -0
  420. package/lib/services/customer-user/types.d.ts.map +1 -0
  421. package/lib/services/customer-user/types.js +10 -0
  422. package/lib/services/customer-user/types.js.map +1 -0
  423. package/lib/services/factory.d.ts +104 -0
  424. package/lib/services/factory.d.ts.map +1 -0
  425. package/lib/services/factory.js +89 -0
  426. package/lib/services/factory.js.map +1 -0
  427. package/lib/services/incident/definitions.d.ts +85 -0
  428. package/lib/services/incident/definitions.d.ts.map +1 -0
  429. package/lib/services/incident/definitions.js +3 -0
  430. package/lib/services/incident/definitions.js.map +1 -0
  431. package/lib/services/incident/endpoints.d.ts +17 -0
  432. package/lib/services/incident/endpoints.d.ts.map +1 -0
  433. package/lib/services/incident/endpoints.js +19 -0
  434. package/lib/services/incident/endpoints.js.map +1 -0
  435. package/lib/services/incident/incident.service.d.ts +24 -0
  436. package/lib/services/incident/incident.service.d.ts.map +1 -0
  437. package/lib/services/incident/incident.service.js +141 -0
  438. package/lib/services/incident/incident.service.js.map +1 -0
  439. package/lib/services/incident/index.d.ts +270 -0
  440. package/lib/services/incident/index.d.ts.map +1 -0
  441. package/lib/services/incident/index.js +389 -0
  442. package/lib/services/incident/index.js.map +1 -0
  443. package/lib/services/incident/module.d.ts +11 -0
  444. package/lib/services/incident/module.d.ts.map +1 -0
  445. package/lib/services/incident/module.js +15 -0
  446. package/lib/services/incident/module.js.map +1 -0
  447. package/lib/services/incident/types.d.ts +116 -0
  448. package/lib/services/incident/types.d.ts.map +1 -0
  449. package/lib/services/incident/types.js +10 -0
  450. package/lib/services/incident/types.js.map +1 -0
  451. package/lib/services/logistic-order/definitions.d.ts +315 -0
  452. package/lib/services/logistic-order/definitions.d.ts.map +1 -0
  453. package/lib/services/logistic-order/definitions.js +3 -0
  454. package/lib/services/logistic-order/definitions.js.map +1 -0
  455. package/lib/services/logistic-order/endpoints.d.ts +44 -0
  456. package/lib/services/logistic-order/endpoints.d.ts.map +1 -0
  457. package/lib/services/logistic-order/endpoints.js +57 -0
  458. package/lib/services/logistic-order/endpoints.js.map +1 -0
  459. package/lib/services/logistic-order/index.d.ts +1376 -0
  460. package/lib/services/logistic-order/index.d.ts.map +1 -0
  461. package/lib/services/logistic-order/index.js +1823 -0
  462. package/lib/services/logistic-order/index.js.map +1 -0
  463. package/lib/services/logistic-order/logistic-order.service.d.ts +62 -0
  464. package/lib/services/logistic-order/logistic-order.service.d.ts.map +1 -0
  465. package/lib/services/logistic-order/logistic-order.service.js +499 -0
  466. package/lib/services/logistic-order/logistic-order.service.js.map +1 -0
  467. package/lib/services/logistic-order/module.d.ts +11 -0
  468. package/lib/services/logistic-order/module.d.ts.map +1 -0
  469. package/lib/services/logistic-order/module.js +15 -0
  470. package/lib/services/logistic-order/module.js.map +1 -0
  471. package/lib/services/logistic-order/types.d.ts +411 -0
  472. package/lib/services/logistic-order/types.d.ts.map +1 -0
  473. package/lib/services/logistic-order/types.js +10 -0
  474. package/lib/services/logistic-order/types.js.map +1 -0
  475. package/lib/services/module.d.ts +64 -0
  476. package/lib/services/module.d.ts.map +1 -0
  477. package/lib/services/module.js +147 -0
  478. package/lib/services/module.js.map +1 -0
  479. package/lib/services/navigation-category/definitions.d.ts +31 -0
  480. package/lib/services/navigation-category/definitions.d.ts.map +1 -0
  481. package/lib/services/navigation-category/definitions.js +3 -0
  482. package/lib/services/navigation-category/definitions.js.map +1 -0
  483. package/lib/services/navigation-category/endpoints.d.ts +15 -0
  484. package/lib/services/navigation-category/endpoints.d.ts.map +1 -0
  485. package/lib/services/navigation-category/endpoints.js +17 -0
  486. package/lib/services/navigation-category/endpoints.js.map +1 -0
  487. package/lib/services/navigation-category/index.d.ts +114 -0
  488. package/lib/services/navigation-category/index.d.ts.map +1 -0
  489. package/lib/services/navigation-category/index.js +160 -0
  490. package/lib/services/navigation-category/index.js.map +1 -0
  491. package/lib/services/navigation-category/module.d.ts +11 -0
  492. package/lib/services/navigation-category/module.d.ts.map +1 -0
  493. package/lib/services/navigation-category/module.js +15 -0
  494. package/lib/services/navigation-category/module.js.map +1 -0
  495. package/lib/services/navigation-category/navigation-category.service.d.ts +148 -0
  496. package/lib/services/navigation-category/navigation-category.service.d.ts.map +1 -0
  497. package/lib/services/navigation-category/navigation-category.service.js +191 -0
  498. package/lib/services/navigation-category/navigation-category.service.js.map +1 -0
  499. package/lib/services/navigation-category/types.d.ts +51 -0
  500. package/lib/services/navigation-category/types.d.ts.map +1 -0
  501. package/lib/services/navigation-category/types.js +10 -0
  502. package/lib/services/navigation-category/types.js.map +1 -0
  503. package/lib/services/offer-inventories/definitions.d.ts +73 -0
  504. package/lib/services/offer-inventories/definitions.d.ts.map +1 -0
  505. package/lib/services/offer-inventories/definitions.js +3 -0
  506. package/lib/services/offer-inventories/definitions.js.map +1 -0
  507. package/lib/services/offer-inventories/endpoints.d.ts +16 -0
  508. package/lib/services/offer-inventories/endpoints.d.ts.map +1 -0
  509. package/lib/services/offer-inventories/endpoints.js +18 -0
  510. package/lib/services/offer-inventories/endpoints.js.map +1 -0
  511. package/lib/services/offer-inventories/index.d.ts +120 -0
  512. package/lib/services/offer-inventories/index.d.ts.map +1 -0
  513. package/lib/services/offer-inventories/index.js +175 -0
  514. package/lib/services/offer-inventories/index.js.map +1 -0
  515. package/lib/services/offer-inventories/module.d.ts +11 -0
  516. package/lib/services/offer-inventories/module.d.ts.map +1 -0
  517. package/lib/services/offer-inventories/module.js +15 -0
  518. package/lib/services/offer-inventories/module.js.map +1 -0
  519. package/lib/services/offer-inventories/offer-inventories.service.d.ts +26 -0
  520. package/lib/services/offer-inventories/offer-inventories.service.d.ts.map +1 -0
  521. package/lib/services/offer-inventories/offer-inventories.service.js +80 -0
  522. package/lib/services/offer-inventories/offer-inventories.service.js.map +1 -0
  523. package/lib/services/offer-inventories/types.d.ts +85 -0
  524. package/lib/services/offer-inventories/types.d.ts.map +1 -0
  525. package/lib/services/offer-inventories/types.js +10 -0
  526. package/lib/services/offer-inventories/types.js.map +1 -0
  527. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +109 -0
  528. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts.map +1 -0
  529. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js +201 -0
  530. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js.map +1 -0
  531. package/lib/services/offer-prices/definitions.d.ts +24 -0
  532. package/lib/services/offer-prices/definitions.d.ts.map +1 -0
  533. package/lib/services/offer-prices/definitions.js +3 -0
  534. package/lib/services/offer-prices/definitions.js.map +1 -0
  535. package/lib/services/offer-prices/endpoints.d.ts +12 -0
  536. package/lib/services/offer-prices/endpoints.d.ts.map +1 -0
  537. package/lib/services/offer-prices/endpoints.js +14 -0
  538. package/lib/services/offer-prices/endpoints.js.map +1 -0
  539. package/lib/services/offer-prices/index.d.ts +36 -0
  540. package/lib/services/offer-prices/index.d.ts.map +1 -0
  541. package/lib/services/offer-prices/index.js +53 -0
  542. package/lib/services/offer-prices/index.js.map +1 -0
  543. package/lib/services/offer-prices/module.d.ts +11 -0
  544. package/lib/services/offer-prices/module.d.ts.map +1 -0
  545. package/lib/services/offer-prices/module.js +15 -0
  546. package/lib/services/offer-prices/module.js.map +1 -0
  547. package/lib/services/offer-prices/offer-prices.service.d.ts +18 -0
  548. package/lib/services/offer-prices/offer-prices.service.d.ts.map +1 -0
  549. package/lib/services/offer-prices/offer-prices.service.js +36 -0
  550. package/lib/services/offer-prices/offer-prices.service.js.map +1 -0
  551. package/lib/services/offer-prices/types.d.ts +33 -0
  552. package/lib/services/offer-prices/types.d.ts.map +1 -0
  553. package/lib/services/offer-prices/types.js +10 -0
  554. package/lib/services/offer-prices/types.js.map +1 -0
  555. package/lib/services/operation/definitions.d.ts +263 -0
  556. package/lib/services/operation/definitions.d.ts.map +1 -0
  557. package/lib/services/operation/definitions.js +18 -0
  558. package/lib/services/operation/definitions.js.map +1 -0
  559. package/lib/services/operation/endpoints.d.ts +18 -0
  560. package/lib/services/operation/endpoints.d.ts.map +1 -0
  561. package/lib/services/operation/endpoints.js +22 -0
  562. package/lib/services/operation/endpoints.js.map +1 -0
  563. package/lib/services/operation/index.d.ts +520 -0
  564. package/lib/services/operation/index.d.ts.map +1 -0
  565. package/lib/services/operation/index.js +704 -0
  566. package/lib/services/operation/index.js.map +1 -0
  567. package/lib/services/operation/module.d.ts +11 -0
  568. package/lib/services/operation/module.d.ts.map +1 -0
  569. package/lib/services/operation/module.js +15 -0
  570. package/lib/services/operation/module.js.map +1 -0
  571. package/lib/services/operation/operation.service.d.ts +32 -0
  572. package/lib/services/operation/operation.service.d.ts.map +1 -0
  573. package/lib/services/operation/operation.service.js +206 -0
  574. package/lib/services/operation/operation.service.js.map +1 -0
  575. package/lib/services/operation/types.d.ts +174 -0
  576. package/lib/services/operation/types.d.ts.map +1 -0
  577. package/lib/services/operation/types.js +10 -0
  578. package/lib/services/operation/types.js.map +1 -0
  579. package/lib/services/payment/definitions.d.ts +69 -0
  580. package/lib/services/payment/definitions.d.ts.map +1 -0
  581. package/lib/services/payment/definitions.js +3 -0
  582. package/lib/services/payment/definitions.js.map +1 -0
  583. package/lib/services/payment/endpoints.d.ts +16 -0
  584. package/lib/services/payment/endpoints.d.ts.map +1 -0
  585. package/lib/services/payment/endpoints.js +18 -0
  586. package/lib/services/payment/endpoints.js.map +1 -0
  587. package/lib/services/payment/index.d.ts +150 -0
  588. package/lib/services/payment/index.d.ts.map +1 -0
  589. package/lib/services/payment/index.js +220 -0
  590. package/lib/services/payment/index.js.map +1 -0
  591. package/lib/services/payment/module.d.ts +11 -0
  592. package/lib/services/payment/module.d.ts.map +1 -0
  593. package/lib/services/payment/module.js +15 -0
  594. package/lib/services/payment/module.js.map +1 -0
  595. package/lib/services/payment/payment.service.d.ts +224 -0
  596. package/lib/services/payment/payment.service.d.ts.map +1 -0
  597. package/lib/services/payment/payment.service.js +288 -0
  598. package/lib/services/payment/payment.service.js.map +1 -0
  599. package/lib/services/payment/types.d.ts +93 -0
  600. package/lib/services/payment/types.d.ts.map +1 -0
  601. package/lib/services/payment/types.js +10 -0
  602. package/lib/services/payment/types.js.map +1 -0
  603. package/lib/services/product/definitions.d.ts +150 -0
  604. package/lib/services/product/definitions.d.ts.map +1 -0
  605. package/lib/services/product/definitions.js +9 -0
  606. package/lib/services/product/definitions.js.map +1 -0
  607. package/lib/services/product/endpoints.d.ts +40 -0
  608. package/lib/services/product/endpoints.d.ts.map +1 -0
  609. package/lib/services/product/endpoints.js +42 -0
  610. package/lib/services/product/endpoints.js.map +1 -0
  611. package/lib/services/product/index.d.ts +388 -0
  612. package/lib/services/product/index.d.ts.map +1 -0
  613. package/lib/services/product/index.js +564 -0
  614. package/lib/services/product/index.js.map +1 -0
  615. package/lib/services/product/module.d.ts +11 -0
  616. package/lib/services/product/module.d.ts.map +1 -0
  617. package/lib/services/product/module.js +17 -0
  618. package/lib/services/product/module.js.map +1 -0
  619. package/lib/services/product/product.service.d.ts +452 -0
  620. package/lib/services/product/product.service.d.ts.map +1 -0
  621. package/lib/services/product/product.service.js +624 -0
  622. package/lib/services/product/product.service.js.map +1 -0
  623. package/lib/services/product/types.d.ts +344 -0
  624. package/lib/services/product/types.d.ts.map +1 -0
  625. package/lib/services/product/types.js +10 -0
  626. package/lib/services/product/types.js.map +1 -0
  627. package/lib/services/product-variant/definitions.d.ts +33 -0
  628. package/lib/services/product-variant/definitions.d.ts.map +1 -0
  629. package/lib/services/product-variant/definitions.js +7 -0
  630. package/lib/services/product-variant/definitions.js.map +1 -0
  631. package/lib/services/product-variant/endpoints.d.ts +15 -0
  632. package/lib/services/product-variant/endpoints.d.ts.map +1 -0
  633. package/lib/services/product-variant/endpoints.js +17 -0
  634. package/lib/services/product-variant/endpoints.js.map +1 -0
  635. package/lib/services/product-variant/index.d.ts +123 -0
  636. package/lib/services/product-variant/index.d.ts.map +1 -0
  637. package/lib/services/product-variant/index.js +172 -0
  638. package/lib/services/product-variant/index.js.map +1 -0
  639. package/lib/services/product-variant/module.d.ts +11 -0
  640. package/lib/services/product-variant/module.d.ts.map +1 -0
  641. package/lib/services/product-variant/module.js +15 -0
  642. package/lib/services/product-variant/module.js.map +1 -0
  643. package/lib/services/product-variant/product-variant.service.d.ts +21 -0
  644. package/lib/services/product-variant/product-variant.service.d.ts.map +1 -0
  645. package/lib/services/product-variant/product-variant.service.js +69 -0
  646. package/lib/services/product-variant/product-variant.service.js.map +1 -0
  647. package/lib/services/product-variant/types.d.ts +73 -0
  648. package/lib/services/product-variant/types.d.ts.map +1 -0
  649. package/lib/services/product-variant/types.js +10 -0
  650. package/lib/services/product-variant/types.js.map +1 -0
  651. package/lib/services/quote/definitions.d.ts +102 -0
  652. package/lib/services/quote/definitions.d.ts.map +1 -0
  653. package/lib/services/quote/definitions.js +3 -0
  654. package/lib/services/quote/definitions.js.map +1 -0
  655. package/lib/services/quote/endpoints.d.ts +20 -0
  656. package/lib/services/quote/endpoints.d.ts.map +1 -0
  657. package/lib/services/quote/endpoints.js +24 -0
  658. package/lib/services/quote/endpoints.js.map +1 -0
  659. package/lib/services/quote/index.d.ts +378 -0
  660. package/lib/services/quote/index.d.ts.map +1 -0
  661. package/lib/services/quote/index.js +506 -0
  662. package/lib/services/quote/index.js.map +1 -0
  663. package/lib/services/quote/module.d.ts +11 -0
  664. package/lib/services/quote/module.d.ts.map +1 -0
  665. package/lib/services/quote/module.js +15 -0
  666. package/lib/services/quote/module.js.map +1 -0
  667. package/lib/services/quote/quote.service.d.ts +346 -0
  668. package/lib/services/quote/quote.service.d.ts.map +1 -0
  669. package/lib/services/quote/quote.service.js +479 -0
  670. package/lib/services/quote/quote.service.js.map +1 -0
  671. package/lib/services/quote/types.d.ts +160 -0
  672. package/lib/services/quote/types.d.ts.map +1 -0
  673. package/lib/services/quote/types.js +10 -0
  674. package/lib/services/quote/types.js.map +1 -0
  675. package/lib/services/supplier/__mocks__/supplier-mocks.d.ts +49 -0
  676. package/lib/services/supplier/__mocks__/supplier-mocks.d.ts.map +1 -0
  677. package/lib/services/supplier/__mocks__/supplier-mocks.js +168 -0
  678. package/lib/services/supplier/__mocks__/supplier-mocks.js.map +1 -0
  679. package/lib/services/supplier/definitions.d.ts +30 -0
  680. package/lib/services/supplier/definitions.d.ts.map +1 -0
  681. package/lib/services/supplier/definitions.js +3 -0
  682. package/lib/services/supplier/definitions.js.map +1 -0
  683. package/lib/services/supplier/endpoints.d.ts +14 -0
  684. package/lib/services/supplier/endpoints.d.ts.map +1 -0
  685. package/lib/services/supplier/endpoints.js +16 -0
  686. package/lib/services/supplier/endpoints.js.map +1 -0
  687. package/lib/services/supplier/index.d.ts +102 -0
  688. package/lib/services/supplier/index.d.ts.map +1 -0
  689. package/lib/services/supplier/index.js +146 -0
  690. package/lib/services/supplier/index.js.map +1 -0
  691. package/lib/services/supplier/module.d.ts +11 -0
  692. package/lib/services/supplier/module.d.ts.map +1 -0
  693. package/lib/services/supplier/module.js +15 -0
  694. package/lib/services/supplier/module.js.map +1 -0
  695. package/lib/services/supplier/supplier.service.d.ts +20 -0
  696. package/lib/services/supplier/supplier.service.d.ts.map +1 -0
  697. package/lib/services/supplier/supplier.service.js +63 -0
  698. package/lib/services/supplier/supplier.service.js.map +1 -0
  699. package/lib/services/supplier/types.d.ts +58 -0
  700. package/lib/services/supplier/types.d.ts.map +1 -0
  701. package/lib/services/supplier/types.js +10 -0
  702. package/lib/services/supplier/types.js.map +1 -0
  703. package/lib/services/types.d.ts +81 -0
  704. package/lib/services/types.d.ts.map +1 -0
  705. package/lib/services/types.js +10 -0
  706. package/lib/services/types.js.map +1 -0
  707. package/lib/settings/fetch-instance.d.ts +30 -0
  708. package/lib/settings/fetch-instance.d.ts.map +1 -0
  709. package/lib/settings/fetch-instance.js +223 -0
  710. package/lib/settings/fetch-instance.js.map +1 -0
  711. package/lib/settings/sdk-version.d.ts +3 -0
  712. package/lib/settings/sdk-version.d.ts.map +1 -0
  713. package/lib/settings/sdk-version.js +6 -0
  714. package/lib/settings/sdk-version.js.map +1 -0
  715. package/package.json +27 -8
@@ -0,0 +1,929 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCustomerAccount = getCustomerAccount;
4
+ exports.getCustomerAccountV2 = getCustomerAccountV2;
5
+ exports.createCustomerAccount = createCustomerAccount;
6
+ exports.updateCustomerAccount = updateCustomerAccount;
7
+ exports.getCustomerAccountAddresses = getCustomerAccountAddresses;
8
+ exports.createCustomerAccountAddress = createCustomerAccountAddress;
9
+ exports.deleteCustomerAccountAddress = deleteCustomerAccountAddress;
10
+ exports.updateCustomerAccountAddress = updateCustomerAccountAddress;
11
+ exports.getCustomerAccountCustomFields = getCustomerAccountCustomFields;
12
+ exports.getCustomerAccountOrders = getCustomerAccountOrders;
13
+ exports.getCustomerAccountUsers = getCustomerAccountUsers;
14
+ exports.createCustomerAccountOrganisation = createCustomerAccountOrganisation;
15
+ exports.updateCustomerAccountOrganisation = updateCustomerAccountOrganisation;
16
+ exports.getCustomerAccountOrganisations = getCustomerAccountOrganisations;
17
+ exports.getCustomerAccountOrganisationAddresses = getCustomerAccountOrganisationAddresses;
18
+ exports.deleteCustomerAccountOrganisationAddress = deleteCustomerAccountOrganisationAddress;
19
+ exports.updateCustomerAccountOrganisationAddress = updateCustomerAccountOrganisationAddress;
20
+ exports.getCustomerAccountOrganisationOrders = getCustomerAccountOrganisationOrders;
21
+ exports.getCustomerAccountOrganisationUsers = getCustomerAccountOrganisationUsers;
22
+ exports.updateCustomerAccountOrganisationUser = updateCustomerAccountOrganisationUser;
23
+ const parameters_validation_1 = require("../../helpers/parameters-validation");
24
+ const fetch_instance_1 = require("../../settings/fetch-instance");
25
+ /**
26
+ * 📄 Get customer account details.
27
+ *
28
+ * This function retrieves the detailed information of a customer account, including addresses, main contacts, custom fields, and more.
29
+ *
30
+ * 🛠 **Endpoint**: `GET /v1/shop/customer-accounts`
31
+ *
32
+ * 📤 **Returns**:
33
+ * A `Promise<GetCustomerAccountResponse>` containing the customer account details.
34
+ *
35
+ * 🛠 **Example usage**:
36
+ * ```ts
37
+ * const response = await getCustomerAccount();
38
+ * console.log(response);
39
+ * ```
40
+ */
41
+ async function getCustomerAccount(config) {
42
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
43
+ method: "GET",
44
+ path: "/v1/shop/customer-accounts",
45
+ params: config,
46
+ });
47
+ return data;
48
+ }
49
+ /**
50
+ * 📋 Get customer accounts.
51
+ *
52
+ * This function retrieves a paginated list of customer accounts.
53
+ *
54
+ * 🛠 **Endpoint**: `GET /v2/shop/customer-accounts`
55
+ *
56
+ * | **Parameter** | **Type** | **Required** | **Description** |
57
+ * |----------------------|------------|--------------|---------------------------------------------------------------------------|
58
+ * | `pageable` | `object` | ❌ | The pagination parameters to retrieve paginated results. |
59
+ *
60
+ * 📤 **Returns**:
61
+ * A `Promise<GetCustomerAccountResponseV2>` containing the paginated list of customer accounts.
62
+ *
63
+ * 🛠 **Example usage**:
64
+ * ```typescript
65
+ * const accounts = await getCustomerAccountV2({
66
+ * pageable: { page: 0, size: 20 },
67
+ * });
68
+ * console.log(accounts);
69
+ * ```
70
+ *
71
+ * @param {PageableParameters} pageable - The pagination parameters.
72
+ * @returns {Promise<GetCustomerAccountResponseV2>} - The response containing the customer accounts.
73
+ */
74
+ async function getCustomerAccountV2(pageable) {
75
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
76
+ method: "GET",
77
+ path: "/v2/shop/customer-accounts",
78
+ params: {
79
+ page: pageable?.page,
80
+ size: pageable?.size,
81
+ sort: pageable?.sort,
82
+ },
83
+ });
84
+ return data;
85
+ }
86
+ /**
87
+ * 📄 Creates a new customer account.
88
+ *
89
+ * This function allows the creation of a new customer account with relevant details including addresses, user information, and custom fields.
90
+ *
91
+ * 🛠 **Endpoint**: `POST /v1/shop/customer-accounts` [ACCOUNT-100]
92
+ *
93
+ * | Parameter | Type | Required | Description |
94
+ * |-----------------------------------|--------------------------------|----------|-------------|
95
+ * | `createAddressRequests` | `object[]` | ✅ | List of addresses to create, including `address`, `city`, `country`, `billing`, and `shipping` status. |
96
+ * | `createCustomerUserRequest` | `object` | ✅ | Contains user details such as `email`, `firstName`, `lastName`, `groups`, `password`, and `phone`. |
97
+ * | `createObjectCustomerAccountRequest` | `object` | ✅ | Main account details including `accountManager`, `businessRegistrationNumber`, `companyRegistrationName`, `externalId`, `name`, `vatNumber`, and `website`. |
98
+ * | `customFieldValues` | `object[]` | ✅ | List of custom fields with their `customFieldId` and `customFieldValue`. |
99
+ * | `customerTagList` | `string[]` | ✅ | List of customer tags. |
100
+ * | `fromFO` | `boolean` | ✅ | Flag indicating if the account is created from the front-office (FO). |
101
+ * | `legalUser` | `object` | ✅ | Information about the legal user including `birthday`, `countryOfResidence`, `email`, `firstName`, `lastName`, and `nationality`. |
102
+ *
103
+ * 📤 **Returns**:
104
+ * A `Promise<CreateCustomerAccountResponse>` containing the details of the created customer account.
105
+ *
106
+ * 🛠 **Example usage**:
107
+ * ```ts
108
+ * const response = await createCustomerAccount({
109
+ * createAddressRequests: [
110
+ * {
111
+ * address: "123 Main Street",
112
+ * city: "Paris",
113
+ * country: "FR",
114
+ * billing: true,
115
+ * shipping: true,
116
+ * fullName: "John Doe",
117
+ * zipcode: "75001"
118
+ * }
119
+ * ],
120
+ * createCustomerUserRequest: {
121
+ * email: "john.doe@example.com",
122
+ * firstName: "John",
123
+ * lastName: "Doe",
124
+ * password: "securePassword123",
125
+ * phone: "+33123456789"
126
+ * },
127
+ * createObjectCustomerAccountRequest: {
128
+ * name: "Acme Corporation",
129
+ * externalId: "acme-corp-001",
130
+ * vatNumber: "FR12345678901"
131
+ * },
132
+ * customFieldValues: [
133
+ * {
134
+ * customFieldId: "industry",
135
+ * customFieldValue: "technology"
136
+ * }
137
+ * ],
138
+ * customerTagList: ["premium", "enterprise"],
139
+ * fromFO: true,
140
+ * legalUser: {
141
+ * birthday: "1990-01-01T00:00:00.000Z",
142
+ * countryOfResidence: "FR",
143
+ * email: "john.doe@example.com",
144
+ * firstName: "John",
145
+ * lastName: "Doe",
146
+ * nationality: "FR"
147
+ * }
148
+ * });
149
+ * ```
150
+ *
151
+ * @param {CreateCustomerAccountParameters} params - The parameters for creating a customer account
152
+ * @throws {Error} If required parameters are missing
153
+ * @returns {Promise<CreateCustomerAccountResponse>} A promise resolving to the response containing the created customer account
154
+ */
155
+ async function createCustomerAccount({ createAddressRequests, createCustomerUserRequest, createObjectCustomerAccountRequest, customFieldValues, customerTagList, fromFO, legalUser, ...config }) {
156
+ (0, parameters_validation_1.required)({
157
+ createAddressRequests,
158
+ createCustomerUserRequest,
159
+ createObjectCustomerAccountRequest,
160
+ customFieldValues,
161
+ customerTagList,
162
+ fromFO,
163
+ legalUser,
164
+ });
165
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
166
+ method: "POST",
167
+ path: "/v1/shop/customer-accounts",
168
+ params: config,
169
+ body: JSON.stringify({
170
+ createAddressRequests,
171
+ createCustomerUserRequest,
172
+ createObjectCustomerAccountRequest,
173
+ customFieldValues,
174
+ customerTagList,
175
+ fromFO,
176
+ legalUser,
177
+ }),
178
+ });
179
+ return data;
180
+ }
181
+ /**
182
+ * 📄 Update customer account details.
183
+ *
184
+ * This function allows you to update the details of an existing customer account, including account manager, registration details, tags, and more.
185
+ *
186
+ * 🛠 **Endpoint**: `PUT /v1/shop/customer-accounts`
187
+ *
188
+ * 📤 **Returns**:
189
+ * A `Promise<UpdateCustomerAccountResponse>` containing the updated customer account details.
190
+ *
191
+ * 🛠 **Example usage**:
192
+ * ```ts
193
+ * const response = await updateCustomerAccount({
194
+ * name: "Updated Company Name",
195
+ * accountManager: "John Doe",
196
+ * vatNumber: "FR12345678901",
197
+ * });
198
+ * console.log(response);
199
+ * ```
200
+ */
201
+ async function updateCustomerAccount({ accountManager, businessRegistrationNumber, companyRegistrationName, customFieldValues, customerTagList, legalUser, name, vatNumber, website, ...config }) {
202
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
203
+ method: "PUT",
204
+ path: "/v1/shop/customer-accounts",
205
+ params: config,
206
+ body: JSON.stringify({
207
+ accountManager,
208
+ businessRegistrationNumber,
209
+ companyRegistrationName,
210
+ customFieldValues,
211
+ customerTagList,
212
+ legalUser,
213
+ name,
214
+ vatNumber,
215
+ website,
216
+ }),
217
+ });
218
+ return data;
219
+ }
220
+ /**
221
+ * 📄 Get customer account's addresses.
222
+ *
223
+ * This function retrieves the addresses associated with a specific customer account, including shipping and billing addresses.
224
+ *
225
+ * 🛠 **Endpoint**: `GET /v1/shop/customer-accounts/addresses`
226
+ *
227
+ * | Parameter | Type | Required | Description |
228
+ * |---------------|-----------|----------|------------------------------------------------------|
229
+ * | `shipping` | `boolean` | ✅ | Flag to include shipping address. |
230
+ * | `billing` | `boolean` | ✅ | Flag to include billing address. |
231
+ *
232
+ * 📤 **Returns**:
233
+ * A `Promise<GetCustomerAccountAddressesResponse>` containing the addresses associated with the customer account.
234
+ *
235
+ * 🛠 **Example usage**:
236
+ * ```ts
237
+ * const response = await getCustomerAccountAddresses({ shipping: true, billing: true });
238
+ * console.log(response);
239
+ * ```
240
+ */
241
+ async function getCustomerAccountAddresses(params) {
242
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
243
+ method: "GET",
244
+ path: "/v1/shop/customer-accounts/addresses",
245
+ params,
246
+ });
247
+ return data;
248
+ }
249
+ /**
250
+ * 📄 Create an address for a customer account.
251
+ *
252
+ * This function creates a new address for a specific customer account, with optional fields like shipping and billing flags.
253
+ *
254
+ * 🛠 **Endpoint**: `POST /v1/shop/customer-accounts/addresses`
255
+ *
256
+ * | Parameter | Type | Required | Description |
257
+ * |---------------------|-----------|----------|------------------------------------------------------|
258
+ * | `additionalAddress` | `string` | ❌ | Additional address line. |
259
+ * | `address` | `string` | ✅ | The main address of the customer. |
260
+ * | `billing` | `boolean` | ❌ | Flag indicating if it's a billing address. |
261
+ * | `city` | `string` | ✅ | The city of the customer address. |
262
+ * | `company` | `string` | ❌ | The company name associated with the address. |
263
+ * | `country` | `string` | ✅ | The country of the customer address. |
264
+ * | `externalId` | `string` | ❌ | External ID for the address. |
265
+ * | `fullName` | `string` | ✅ | The full name of the person associated with the address. |
266
+ * | `label` | `string` | ❌ | Label for the address. |
267
+ * | `phone` | `string` | ❌ | Phone number associated with the address. |
268
+ * | `shipping` | `boolean` | ❌ | Flag indicating if it's a shipping address. |
269
+ * | `state` | `string` | ❌ | The state/province of the customer address. |
270
+ * | `zipcode` | `string` | ✅ | The postal code for the customer address. |
271
+ *
272
+ * 📤 **Returns**:
273
+ * A `Promise<CreateCustomerAccountAddressResponse>` containing the created customer account address.
274
+ *
275
+ * 🛠 **Example usage**:
276
+ * ```ts
277
+ * const response = await createCustomerAccountAddress({
278
+ * additionalAddress: "string",
279
+ * address: "string",
280
+ * billing: true,
281
+ * city: "string",
282
+ * company: "string",
283
+ * country: "string",
284
+ * externalId: "string",
285
+ * fullName: "string",
286
+ * label: "string",
287
+ * phone: "string",
288
+ * shipping: true,
289
+ * state: "string",
290
+ * zipcode: "string"
291
+ * });
292
+ * console.log(response);
293
+ * ```
294
+ */
295
+ async function createCustomerAccountAddress(params) {
296
+ (0, parameters_validation_1.required)(params);
297
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
298
+ method: "POST",
299
+ path: "/v1/shop/customer-accounts/addresses",
300
+ params,
301
+ body: JSON.stringify(params),
302
+ });
303
+ return data;
304
+ }
305
+ /**
306
+ * 🗑️ Delete an address from a customer account.
307
+ *
308
+ * This function deletes a specific address from a customer's account based on the provided address ID.
309
+ *
310
+ * 🛠 **Endpoint**: `DELETE /v1/shop/customer-accounts/addresses/{addressId}`
311
+ *
312
+ * | Parameter | Type | Required | Description |
313
+ * |-------------|----------|----------|----------------------------------|
314
+ * | `addressId` | `string` | ✅ | The ID of the address to delete. |
315
+ *
316
+ * 📤 **Returns**: `Promise<void>` - No content response indicating successful deletion.
317
+ *
318
+ * 🛠 **Example usage**:
319
+ * ```ts
320
+ * const response = await deleteCustomerAccountAddress({ addressId: "string" });
321
+ * console.log(response); // No content response
322
+ * ```
323
+ */
324
+ async function deleteCustomerAccountAddress({ addressId, ...config }) {
325
+ (0, parameters_validation_1.required)({ addressId });
326
+ await (0, fetch_instance_1.enhancedFetch)({
327
+ method: "DELETE",
328
+ path: `/v1/shop/customer-accounts/addresses/${addressId}`,
329
+ params: config,
330
+ });
331
+ }
332
+ /**
333
+ * ✏️ Update an address for a customer account.
334
+ *
335
+ * This function allows you to update an existing address for a customer account. You must provide the address ID and at least one of the optional parameters for updating the address.
336
+ *
337
+ * 🛠 **Endpoint**: `PUT /v1/shop/customer-accounts/addresses/{addressId}`
338
+ *
339
+ * | Parameter | Type | Required | Description |
340
+ * |----------------------|-----------|----------|-------------------------------------------------------|
341
+ * | `addressId` | `string` | ✅ | The ID of the address to update. |
342
+ * | `additionalAddress` | `string` | ❌ | Additional address line. |
343
+ * | `address` | `string` | ✅ | The main address of the customer. |
344
+ * | `billing` | `boolean` | ❌ | Flag indicating if it's a billing address. |
345
+ * | `city` | `string` | ✅ | The city of the customer address. |
346
+ * | `company` | `string` | ❌ | The company name associated with the address. |
347
+ * | `country` | `string` | ✅ | The country of the customer address. |
348
+ * | `fullName` | `string` | ✅ | The full name of the person associated with the address. |
349
+ * | `label` | `string` | ❌ | Label for the address. |
350
+ * | `phone` | `string` | ❌ | Phone number associated with the address. |
351
+ * | `shipping` | `boolean` | ❌ | Flag indicating if it's a shipping address. |
352
+ * | `state` | `string` | ❌ | The state/province of the customer address. |
353
+ * | `zipcode` | `string` | ✅ | The postal code for the customer address. |
354
+ *
355
+ * 📤 **Returns**:
356
+ * A `Promise<UpdateCustomerAccountAddressResponse>` containing the updated customer account address.
357
+ *
358
+ * 🛠 **Example usage**:
359
+ * ```ts
360
+ * const response = await updateCustomerAccountAddress({
361
+ * addressId: "string",
362
+ * additionalAddress: "string",
363
+ * address: "string",
364
+ * billing: true,
365
+ * city: "string",
366
+ * company: "string",
367
+ * country: "string",
368
+ * fullName: "string",
369
+ * label: "string",
370
+ * phone: "string",
371
+ * shipping: true,
372
+ * state: "string",
373
+ * zipcode: "string"
374
+ * });
375
+ * console.log(response); // Updated address details
376
+ * ```
377
+ */
378
+ async function updateCustomerAccountAddress({ addressId, additionalAddress, address, billing, city, company, country, fullName, label, phone, shipping, state, zipcode, ...config }) {
379
+ (0, parameters_validation_1.required)({ addressId });
380
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
381
+ method: "PUT",
382
+ path: `/v1/shop/customer-accounts/addresses/${addressId}`,
383
+ params: config,
384
+ body: JSON.stringify({
385
+ additionalAddress,
386
+ address,
387
+ billing,
388
+ city,
389
+ company,
390
+ country,
391
+ fullName,
392
+ label,
393
+ phone,
394
+ shipping,
395
+ state,
396
+ zipcode,
397
+ }),
398
+ });
399
+ return data;
400
+ }
401
+ /**
402
+ * 📋 Get customer account custom fields.
403
+ *
404
+ * This function retrieves custom fields for a customer account.
405
+ *
406
+ * 🛠 **Endpoint**: `GET /v1/shop/customer-accounts/custom-fields` [ACCOUNT-554]
407
+ *
408
+ * | **Parameter** | **Type** | **Required** | **Description** |
409
+ * |----------------------|------------|--------------|---------------------------------------------------------------------------|
410
+ * | `customFieldIds` | `string[]` | ❌ | The array of custom fields IDs to retrieve. |
411
+ * | `idType` | `AccountCustomFieldsIdType` | ❌ | The type of custom field ID to use to retrieve them (e.g., `DJUST_ID`, `EXTERNAL_ID`). |
412
+ * | `pageable` | `object` | ❌ | The pagination parameters to retrieve paginated results. |
413
+ *
414
+ * 📤 **Returns**:
415
+ * A `Promise<GetCustomerAccountCustomFieldsResponse>` containing the custom fields.
416
+ *
417
+ * 🛠 **Example Usage**:
418
+ * ```typescript
419
+ * const customFields = await getCustomerAccountCustomFields({
420
+ * customFieldIds: ['customField1', 'customField2'],
421
+ * idType: 'EXTERNAL_ID',
422
+ * pageable: { page: 1, size: 10 },
423
+ * });
424
+ * ```
425
+ */
426
+ async function getCustomerAccountCustomFields({ customFieldIds, idType, pageable, }) {
427
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
428
+ method: "GET",
429
+ path: "/v1/shop/customer-accounts/custom-fields",
430
+ params: {
431
+ customFieldIds,
432
+ idType,
433
+ page: pageable?.page,
434
+ size: pageable?.size,
435
+ sort: pageable?.sort,
436
+ },
437
+ });
438
+ return data;
439
+ }
440
+ /**
441
+ * 📋 Retrieves orders for a customer account.
442
+ *
443
+ * This function fetches the orders for a customer account based on the provided parameters.
444
+ *
445
+ * 🛠 **Endpoint**: `GET /v1/shop/customer-accounts/orders`
446
+ *
447
+ * | **Parameter** | **Type** | **Required** | **Description** |
448
+ * |----------------------|------------|--------------|---------------------------------------------------------------------------|
449
+ * | `pageable` | `object` | ✅ | The pagination parameters to retrieve paginated results. |
450
+ * | `locale` | `string` | ✅ | The locale to be used for the response. |
451
+ * | `nbPreviewLines` | `number` | ❌ | The number of order lines to retrieve by orders (default: 100). |
452
+ * | `logisticOrderStatuses`| `string[]`| ❌ | The statuses of the orders to retrieve. |
453
+ * | `orderLogisticStatusType`| `string`| ❌ | The status of the orders to retrieve (deprecated, use logisticOrderStatuses instead). |
454
+ *
455
+ * 📤 **Returns**:
456
+ * A `Promise<GetCustomerAccountOrdersResponse>` containing the retrieved customer account orders.
457
+ *
458
+ * 🛠 **Example Usage**:
459
+ * ```typescript
460
+ * const orders = await getCustomerAccountOrders({
461
+ * pageable: { page: 0, size: 20, sort: ['createdAt,DESC'] },
462
+ * locale: 'en',
463
+ * nbPreviewLines: 100,
464
+ * logisticOrderStatuses: ["ORDER_CREATED", "WAITING_CUSTOMER_APPROVAL"],
465
+ * });
466
+ * ```
467
+ *
468
+ * @param {GetCustomerAccountOrdersParameters} params - The parameters for fetching customer account orders:
469
+ * - `pageable` - Pagination parameters (page, size, sort).
470
+ * - `locale` - The locale for the response.
471
+ * - `nbPreviewLines` (optional) - Number of order lines to put in the response (default: 100).
472
+ * - `logisticOrderStatuses` (optional) - Array of statuses of the orders to retrieve.
473
+ * - `orderLogisticStatusType` (optional, deprecated) - Single status of the orders to retrieve. Use logisticOrderStatuses instead.
474
+ *
475
+ * @returns {Promise<GetCustomerAccountOrdersResponse>} - The response containing the customer account orders.
476
+ */
477
+ async function getCustomerAccountOrders(params) {
478
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
479
+ method: "GET",
480
+ path: `/v1/shop/customer-accounts/orders`,
481
+ params: {
482
+ page: params.pageable?.page,
483
+ size: params.pageable?.size,
484
+ sort: params.pageable?.sort,
485
+ locale: params.locale,
486
+ nbPreviewLines: params.nbPreviewLines,
487
+ logisticOrderStatuses: params.logisticOrderStatuses,
488
+ orderLogisticStatusType: params.orderLogisticStatusType,
489
+ },
490
+ });
491
+ return data;
492
+ }
493
+ /**
494
+ * 📋 Retrieve Customer Account Users
495
+ *
496
+ * This function retrieves the list of users associated with a specific customer account.
497
+ *
498
+ * 🛠 **Endpoint**: `GET /v1/shop/customer-accounts/users` [ACCOUNT-502]
499
+ *
500
+ * | **Parameter** | **Type** | **Required** | **Description** |
501
+ * |-------------------|------------|--------------|-------------------------------------------------------------|
502
+ * | `pageable` | `object` | ✅ | Object containing pagination details: `page`, `size`, etc. |
503
+ * | `forAllAccounts` | `boolean` | ❌ | Specifies if we want to retrieve users of all my users' accounts |
504
+ * | `query` | `string` | ❌ | Search query to filter users. |
505
+ * | `locale` | `string` | ❌ | The locale in which data should be retrieved. |
506
+ *
507
+ * 📤 **Returns**:
508
+ * A `Promise<GetCustomerAccountUsersResponse>` containing the list of users and pagination metadata.
509
+ *
510
+ * 🛠 **Example usage**:
511
+ * ```typescript
512
+ * const response = await getCustomerAccountUsers({
513
+ * pageable: { page: 0, size: 20 },
514
+ * locale: "fr-FR",
515
+ * query: "john",
516
+ * });
517
+ * console.log(response);
518
+ * ```
519
+ */
520
+ async function getCustomerAccountUsers(params) {
521
+ (0, parameters_validation_1.required)({ pageable: params.pageable });
522
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
523
+ method: "GET",
524
+ path: `/v1/shop/customer-accounts/users`,
525
+ params: {
526
+ page: params.pageable?.page,
527
+ size: params.pageable?.size,
528
+ sort: params.pageable?.sort,
529
+ forAllAccounts: params.forAllAccounts ?? false,
530
+ query: params.query || "",
531
+ },
532
+ });
533
+ return data;
534
+ }
535
+ /**
536
+ * ## Create a Customer Account's Organisation
537
+ *
538
+ * This function allows the creation of a new organisation within a customer account.
539
+ *
540
+ * ### API Code: ACCOUNT-101
541
+ *
542
+ * ### **Endpoint**: `POST /v1/shop/customer-accounts/organisations`
543
+ *
544
+ * | **Parameter** | **Type** | **Required** | **Description** |
545
+ * |-------------------|------------|--------------|---------------------------------------------------------------|
546
+ * | `externalId` | `string` | ✅ | A unique identifier for the organisation. |
547
+ * | `name` | `string` | ✅ | The name of the organisation. |
548
+ * | `parentId` | `string` | ❌ | The ID of the parent organisation, if applicable. |
549
+ *
550
+ * ### **Returns**:
551
+ * A `Promise<CreateCustomerAccountOrganisationResponse>` containing the newly created organisation data.
552
+ *
553
+ * ### **Example Usage**:
554
+ * ```typescript
555
+ * const response = await createCustomerAccountOrganisation({
556
+ * externalId: "org123",
557
+ * name: "My Organisation",
558
+ * parentId: "parentOrgId"
559
+ * });
560
+ * ```
561
+ */
562
+ async function createCustomerAccountOrganisation(params) {
563
+ (0, parameters_validation_1.required)({ externalId: params.externalId, name: params.name });
564
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
565
+ method: "POST",
566
+ path: `/v1/shop/customer-accounts/organisations`,
567
+ params,
568
+ body: JSON.stringify(params),
569
+ });
570
+ return data;
571
+ }
572
+ /**
573
+ * ## Update a customer account's organisation
574
+ *
575
+ * This function allows updating an existing organisation within a customer account.
576
+ *
577
+ * ### API Code: ACCOUNT-202
578
+ *
579
+ * ### **Endpoint**: `PUT /v1/shop/customer-accounts/organisations/{organisationId}`
580
+ *
581
+ * | **Parameter** | **Type** | **Required** | **Description** |
582
+ * |--------------------|------------|--------------|---------------------------------------------------------------|
583
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation to be updated. |
584
+ * | `name` | `string` | ❌ | The new name of the organisation. |
585
+ * | `parentId` | `string` | ❌ | The new parent ID for the organisation, if applicable. |
586
+ * | `status` | `string` | ❌ | The new status of the organisation (e.g., ACTIVE, INACTIVE). |
587
+ *
588
+ * ### **Returns**:
589
+ * A `Promise<UpdateCustomerAccountOrganisationResponse>` containing the updated organisation data.
590
+ *
591
+ * ### **Example Usage**:
592
+ * ```typescript
593
+ * const response = await updateCustomerAccountOrganisation({
594
+ * organisationId: "org12345",
595
+ * name: "Updated Organisation Name",
596
+ * parentId: "parentOrg123",
597
+ * status: "ACTIVE",
598
+ * });
599
+ *
600
+ * console.log(response);
601
+ * ```
602
+ */
603
+ async function updateCustomerAccountOrganisation(params) {
604
+ (0, parameters_validation_1.required)({ organisationId: params.organisationId });
605
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
606
+ method: "PUT",
607
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}`,
608
+ params,
609
+ body: JSON.stringify(params),
610
+ });
611
+ return data;
612
+ }
613
+ /**
614
+ * @deprecated
615
+ * ## Get organisations from customer account
616
+ *
617
+ * This function retrieves all organisations associated with a customer account.
618
+ *
619
+ * ### API Code: ACCOUNT-503
620
+ *
621
+ * ### **Endpoint**: `GET /v1/shop/customer-accounts/organisations`
622
+ *
623
+ * | **Parameter** | **Type** | **Required** | **Description** |
624
+ * |-------------------|------------|--------------|-------------------------------------------------------------|
625
+ * | `pageable` | `object` | ❌ | Object containing pagination details: `page`, `size`, `sort`. |
626
+ *
627
+ * ### **Returns**:
628
+ * A `Promise<GetCustomerAccountOrganisationResponse>` containing the list of customer account organisations.
629
+ *
630
+ * ### **Example Usage**:
631
+ * ```typescript
632
+ * const response = await getCustomerAccountOrganisations({
633
+ * pageable: { page: 0, size: 20 }
634
+ * });
635
+ * console.log(response);
636
+ * ```
637
+ */
638
+ async function getCustomerAccountOrganisations(params) {
639
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
640
+ method: "GET",
641
+ path: `/v1/shop/customer-accounts/organisations`,
642
+ params: {
643
+ ...params,
644
+ page: params?.pageable?.page,
645
+ size: params?.pageable?.size,
646
+ sort: params?.pageable?.sort,
647
+ },
648
+ });
649
+ return data;
650
+ }
651
+ /**
652
+ * ## Get addresses from a customer account organisation
653
+ *
654
+ * This function retrieves all the addresses associated with a given customer account organisation.
655
+ *
656
+ * ### API Code: ACCOUNT-505
657
+ *
658
+ * ### **Endpoint**: `GET /v1/shop/customer-accounts/organisations/{organisationId}/addresses`
659
+ *
660
+ * | **Parameter** | **Type** | **Required** | **Description** |
661
+ * |---------------------|------------|--------------|--------------------------------------------------------------------|
662
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation whose addresses are being retrieved. |
663
+ *
664
+ * ### **Returns**:
665
+ * A `Promise<GetCustomerAccountOrganisationAddressesResponse>` containing the list of addresses for the specified customer account organisation.
666
+ *
667
+ * ### **Example Usage**:
668
+ * ```typescript
669
+ * const addresses = await getCustomerAccountOrganisationAddresses({ organisationId: "org12345" });
670
+ * console.log(addresses);
671
+ * ```
672
+ */
673
+ async function getCustomerAccountOrganisationAddresses(params) {
674
+ (0, parameters_validation_1.required)({ organisationId: params.organisationId });
675
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
676
+ method: "GET",
677
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/addresses`,
678
+ params,
679
+ });
680
+ return data;
681
+ }
682
+ /**
683
+ * ## Delete an address from a customer account organisation
684
+ *
685
+ * This function deletes a specific address from a given customer account organisation.
686
+ *
687
+ * ### API Code: ADDRESS-301
688
+ *
689
+ * ### **Endpoint**: `DELETE /v1/shop/customer-accounts/organisations/{organisationId}/addresses/{addressId}`
690
+ *
691
+ * | **Parameter** | **Type** | **Required** | **Description** |
692
+ * |---------------------|------------|--------------|---------------------------------------------------------------------|
693
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation from which the address will be deleted. |
694
+ * | `addressId` | `string` | ✅ | The unique identifier of the address to delete. |
695
+ *
696
+ * ### **Returns**:
697
+ * A `Promise<void>` that resolves when the address is successfully deleted.
698
+ *
699
+ * ### **Example Usage**:
700
+ * ```typescript
701
+ * await deleteCustomerAccountOrganisationAddress({
702
+ * organisationId: "org12345",
703
+ * addressId: "addr67890",
704
+ * });
705
+ * console.log('Address deleted successfully.');
706
+ * ```
707
+ */
708
+ async function deleteCustomerAccountOrganisationAddress(params) {
709
+ (0, parameters_validation_1.required)({
710
+ organisationId: params.organisationId,
711
+ addressId: params.addressId,
712
+ });
713
+ await (0, fetch_instance_1.enhancedFetch)({
714
+ method: "DELETE",
715
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/addresses/${params.addressId}`,
716
+ params,
717
+ });
718
+ }
719
+ /**
720
+ * ## Update an address from a customer account organisation
721
+ *
722
+ * This function allows updating an existing address within a customer account organisation.
723
+ *
724
+ * ### API Code: ADDRESS-201
725
+ *
726
+ * ### **Endpoint**: `PUT /v1/shop/customer-accounts/organisations/{organisationId}/addresses/{addressId}`
727
+ *
728
+ * | **Parameter** | **Type** | **Required** | **Description** |
729
+ * |----------------------|------------|--------------|-------------------------------------------------------------------|
730
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation containing the address. |
731
+ * | `addressId` | `string` | ✅ | The unique identifier of the address to be updated. |
732
+ * | `additionalAddress` | `string` | ❌ | Additional address information (optional). |
733
+ * | `address` | `string` | ❌ | The street address (optional). |
734
+ * | `billing` | `boolean` | ❌ | Whether the address is for billing purposes (optional). |
735
+ * | `city` | `string` | ❌ | The city of the address (optional). |
736
+ * | `company` | `string` | ❌ | The company associated with the address (optional). |
737
+ * | `country` | `string` | ❌ | The country of the address (optional). |
738
+ * | `fullName` | `string` | ❌ | The full name of the person associated with the address (optional).|
739
+ * | `label` | `string` | ❌ | A label for the address (optional). |
740
+ * | `phone` | `string` | ❌ | The phone number associated with the address (optional). |
741
+ * | `shipping` | `boolean` | ❌ | Whether the address is for shipping purposes (optional). |
742
+ * | `state` | `string` | ❌ | The state or region of the address (optional). |
743
+ * | `zipcode` | `string` | ❌ | The postal code for the address (optional). |
744
+ *
745
+ * ### **Returns**:
746
+ * A `Promise<UpdateCustomerAccountOrganisationAddressResponse>` containing the updated address data.
747
+ *
748
+ * ### **Example Usage**:
749
+ * ```typescript
750
+ * const response = await updateCustomerAccountOrganisationAddress({
751
+ * organisationId: "org12345",
752
+ * addressId: "address12345",
753
+ * additionalAddress: "Suite 5",
754
+ * address: "123 Main St",
755
+ * billing: true,
756
+ * city: "New York",
757
+ * company: "Company Name",
758
+ * country: "USA",
759
+ * fullName: "John Doe",
760
+ * label: "Primary Address",
761
+ * phone: "+123456789",
762
+ * shipping: true,
763
+ * state: "NY",
764
+ * zipcode: "10001"
765
+ * });
766
+ *
767
+ * console.log(response);
768
+ * ```
769
+ */
770
+ async function updateCustomerAccountOrganisationAddress(params) {
771
+ (0, parameters_validation_1.required)({
772
+ organisationId: params.organisationId,
773
+ addressId: params.addressId,
774
+ });
775
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
776
+ method: "PUT",
777
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/addresses/${params.addressId}`,
778
+ params,
779
+ body: JSON.stringify(params),
780
+ });
781
+ return data;
782
+ }
783
+ /**
784
+ * ## Get orders from a customer account organisation
785
+ *
786
+ * This function retrieves the orders associated with a specific customer account organisation.
787
+ *
788
+ * ### API Code: ORDER-555
789
+ *
790
+ * ### **Endpoint**: `GET /v1/shop/customer-accounts/organisations/{organisationId}/orders`
791
+ *
792
+ * | **Parameter** | **Type** | **Required** | **Description** |
793
+ * |----------------------|------------|--------------|---------------------------------------------------------------------------|
794
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation whose orders need to be fetched. |
795
+ * | `pageable` | `object` | ✅ | The pagination parameters for the orders (e.g., page, size, sort). |
796
+ * | `locale` | `string` | ✅ | The locale for the response (e.g., "en_US"). |
797
+ *
798
+ * ### **Returns**:
799
+ * A `Promise<GetCustomerAccountOrganisationOrdersResponse>` containing the list of orders for the organisation.
800
+ *
801
+ * ### **Example Usage**:
802
+ * ```typescript
803
+ * const response = await getCustomerAccountOrganisationOrders({
804
+ * organisationId: "org12345",
805
+ * pageable: { page: 1, size: 10, sort: [{ property: "createdAt", direction: "DESC" }] },
806
+ * locale: "en_US"
807
+ * });
808
+ *
809
+ * console.log(response);
810
+ * ```
811
+ */
812
+ async function getCustomerAccountOrganisationOrders(params) {
813
+ (0, parameters_validation_1.required)({
814
+ organisationId: params.organisationId,
815
+ pageable: params.pageable,
816
+ locale: params.locale,
817
+ });
818
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
819
+ method: "GET",
820
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/orders`,
821
+ params: {
822
+ page: params.pageable?.page,
823
+ size: params.pageable?.size,
824
+ sort: params.pageable?.sort,
825
+ locale: params.locale,
826
+ nbPreviewLines: params.nbPreviewLines,
827
+ },
828
+ });
829
+ return data;
830
+ }
831
+ /**
832
+ * ## Get users from a customer account organisation
833
+ *
834
+ * This function retrieves the list of users associated with a specific customer account organisation.
835
+ *
836
+ * ### API Code: ACCOUNT-504
837
+ *
838
+ * ### **Endpoint**: `GET /v1/shop/customer-accounts/organisations/{organisationId}/users`
839
+ *
840
+ * | **Parameter** | **Type** | **Required** | **Description** |
841
+ * |----------------------|------------|--------------|---------------------------------------------------------------------------|
842
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation whose users need to be fetched. |
843
+ * | `pageable` | `object` | ✅ | The pagination parameters for the users (e.g., page, size, sort). |
844
+ *
845
+ * ### **Returns**:
846
+ * A `Promise<GetCustomerAccountOrganisationUsersResponse>` containing the list of users for the organisation.
847
+ *
848
+ * ### **Example Usage**:
849
+ * ```typescript
850
+ * const response = await getCustomerAccountOrganisationUsers({
851
+ * organisationId: "org12345",
852
+ * pageable: { page: 1, size: 10, sort: [{ property: "createdAt", direction: "DESC" }] },
853
+ * });
854
+ *
855
+ * console.log(response);
856
+ * ```
857
+ */
858
+ async function getCustomerAccountOrganisationUsers(params) {
859
+ (0, parameters_validation_1.required)({
860
+ organisationId: params.organisationId,
861
+ pageable: params.pageable,
862
+ });
863
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
864
+ method: "GET",
865
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/users`,
866
+ params: {
867
+ page: params.pageable?.page,
868
+ size: params.pageable?.size,
869
+ sort: params.pageable?.sort,
870
+ },
871
+ });
872
+ return data;
873
+ }
874
+ /**
875
+ * ## Update a customer account organisation user
876
+ *
877
+ * This function updates the details of a specific user within a customer account organisation.
878
+ *
879
+ * ### API Code: ACCOUNT-202
880
+ *
881
+ * ### **Endpoint**: `PUT /v1/shop/customer-accounts/organisations/{organisationId}/users/{customerUserId}`
882
+ *
883
+ * | **Parameter** | **Type** | **Required** | **Description** |
884
+ * |-------------------------|-------------|--------------|---------------------------------------------------------------------------------|
885
+ * | `organisationId` | `string` | ✅ | The unique identifier of the organisation. |
886
+ * | `customerUserId` | `string` | ✅ | The unique identifier of the user to update. |
887
+ * | `civility` | `string` | ❌ | Civility of the user (e.g., "MR", "MRS"). |
888
+ * | `customFieldValues` | `object[]` | ❌ | Array of custom field values for the user. |
889
+ * | `firstName` | `string` | ❌ | First name of the user. |
890
+ * | `lastName` | `string` | ❌ | Last name of the user. |
891
+ * | `phone` | `string` | ❌ | Phone number of the user. |
892
+ *
893
+ * ### **Returns**:
894
+ * A `Promise<UpdateCustomerAccountOrganisationUserResponse>` containing the details of the updated user.
895
+ *
896
+ * ### **Example Usage**:
897
+ * ```typescript
898
+ * const response = await updateCustomerAccountOrganisationUser({
899
+ * organisationId: "org12345",
900
+ * customerUserId: "user67890",
901
+ * civility: "MR",
902
+ * customFieldValues: [
903
+ * {
904
+ * customFieldId: "custom123",
905
+ * customFieldValue: "value123"
906
+ * }
907
+ * ],
908
+ * firstName: "John",
909
+ * lastName: "Doe",
910
+ * phone: "+1234567890"
911
+ * });
912
+ *
913
+ * console.log(response);
914
+ * ```
915
+ */
916
+ async function updateCustomerAccountOrganisationUser(params) {
917
+ (0, parameters_validation_1.required)({
918
+ organisationId: params.organisationId,
919
+ customerUserId: params.customerUserId,
920
+ });
921
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
922
+ method: "PUT",
923
+ path: `/v1/shop/customer-accounts/organisations/${params.organisationId}/users/${params.customerUserId}`,
924
+ params,
925
+ body: JSON.stringify(params),
926
+ });
927
+ return data;
928
+ }
929
+ //# sourceMappingURL=index.js.map