@djust-b2b/djust-front-sdk 3.0.0-beta.20 → 3.0.0-beta.22

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 (677) hide show
  1. package/README.md +16 -5
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/.tsbuildinfo-esm +1 -1
  4. package/dist/client/create-client.d.ts +3 -0
  5. package/dist/client/create-client.d.ts.map +1 -1
  6. package/dist/client/transport.d.ts.map +1 -1
  7. package/dist/errors/classes/not-found.error.d.ts +1 -1
  8. package/dist/errors/classes/not-found.error.d.ts.map +1 -1
  9. package/dist/errors/factory.d.ts.map +1 -1
  10. package/dist/errors/helpers/djust-api-error.d.ts +29 -0
  11. package/dist/errors/helpers/djust-api-error.d.ts.map +1 -0
  12. package/dist/errors/types.d.ts +4 -0
  13. package/dist/errors/types.d.ts.map +1 -1
  14. package/dist/index.d.ts +7 -7
  15. package/dist/index.mjs +73 -19
  16. package/dist/interfaces/index.d.ts +6 -1
  17. package/dist/interfaces/index.d.ts.map +1 -1
  18. package/dist/settings/sdk-version.d.ts +3 -0
  19. package/dist/settings/sdk-version.d.ts.map +1 -0
  20. package/lib/.tsbuildinfo +1 -0
  21. package/lib/client/create-client.d.ts +251 -0
  22. package/lib/client/create-client.d.ts.map +1 -0
  23. package/lib/client/create-client.js +233 -0
  24. package/lib/client/create-client.js.map +1 -0
  25. package/lib/client/index.d.ts +14 -0
  26. package/lib/client/index.d.ts.map +1 -0
  27. package/lib/client/index.js +91 -0
  28. package/lib/client/index.js.map +1 -0
  29. package/lib/client/performance.d.ts +203 -0
  30. package/lib/client/performance.d.ts.map +1 -0
  31. package/lib/client/performance.js +409 -0
  32. package/lib/client/performance.js.map +1 -0
  33. package/lib/client/transport.d.ts +372 -0
  34. package/lib/client/transport.d.ts.map +1 -0
  35. package/lib/client/transport.js +735 -0
  36. package/lib/client/transport.js.map +1 -0
  37. package/lib/errors/base.d.ts +101 -0
  38. package/lib/errors/base.d.ts.map +1 -0
  39. package/lib/errors/base.js +145 -0
  40. package/lib/errors/base.js.map +1 -0
  41. package/lib/errors/classes/auth.error.d.ts +64 -0
  42. package/lib/errors/classes/auth.error.d.ts.map +1 -0
  43. package/lib/errors/classes/auth.error.js +116 -0
  44. package/lib/errors/classes/auth.error.js.map +1 -0
  45. package/lib/errors/classes/forbidden.error.d.ts +52 -0
  46. package/lib/errors/classes/forbidden.error.d.ts.map +1 -0
  47. package/lib/errors/classes/forbidden.error.js +90 -0
  48. package/lib/errors/classes/forbidden.error.js.map +1 -0
  49. package/lib/errors/classes/index.d.ts +17 -0
  50. package/lib/errors/classes/index.d.ts.map +1 -0
  51. package/lib/errors/classes/index.js +29 -0
  52. package/lib/errors/classes/index.js.map +1 -0
  53. package/lib/errors/classes/network.error.d.ts +63 -0
  54. package/lib/errors/classes/network.error.d.ts.map +1 -0
  55. package/lib/errors/classes/network.error.js +122 -0
  56. package/lib/errors/classes/network.error.js.map +1 -0
  57. package/lib/errors/classes/not-found.error.d.ts +58 -0
  58. package/lib/errors/classes/not-found.error.d.ts.map +1 -0
  59. package/lib/errors/classes/not-found.error.js +120 -0
  60. package/lib/errors/classes/not-found.error.js.map +1 -0
  61. package/lib/errors/classes/rate-limit.error.d.ts +49 -0
  62. package/lib/errors/classes/rate-limit.error.d.ts.map +1 -0
  63. package/lib/errors/classes/rate-limit.error.js +107 -0
  64. package/lib/errors/classes/rate-limit.error.js.map +1 -0
  65. package/lib/errors/classes/server.error.d.ts +63 -0
  66. package/lib/errors/classes/server.error.d.ts.map +1 -0
  67. package/lib/errors/classes/server.error.js +156 -0
  68. package/lib/errors/classes/server.error.js.map +1 -0
  69. package/lib/errors/classes/timeout.error.d.ts +64 -0
  70. package/lib/errors/classes/timeout.error.d.ts.map +1 -0
  71. package/lib/errors/classes/timeout.error.js +90 -0
  72. package/lib/errors/classes/timeout.error.js.map +1 -0
  73. package/lib/errors/classes/unexpected.error.d.ts +70 -0
  74. package/lib/errors/classes/unexpected.error.d.ts.map +1 -0
  75. package/lib/errors/classes/unexpected.error.js +105 -0
  76. package/lib/errors/classes/unexpected.error.js.map +1 -0
  77. package/lib/errors/classes/validation.error.d.ts +68 -0
  78. package/lib/errors/classes/validation.error.d.ts.map +1 -0
  79. package/lib/errors/classes/validation.error.js +103 -0
  80. package/lib/errors/classes/validation.error.js.map +1 -0
  81. package/lib/errors/codes.d.ts +111 -0
  82. package/lib/errors/codes.d.ts.map +1 -0
  83. package/lib/errors/codes.js +143 -0
  84. package/lib/errors/codes.js.map +1 -0
  85. package/lib/errors/compat.d.ts +99 -0
  86. package/lib/errors/compat.d.ts.map +1 -0
  87. package/lib/errors/compat.js +280 -0
  88. package/lib/errors/compat.js.map +1 -0
  89. package/lib/errors/factory.d.ts +33 -0
  90. package/lib/errors/factory.d.ts.map +1 -0
  91. package/lib/errors/factory.js +298 -0
  92. package/lib/errors/factory.js.map +1 -0
  93. package/lib/errors/guards.d.ts +142 -0
  94. package/lib/errors/guards.d.ts.map +1 -0
  95. package/lib/errors/guards.js +281 -0
  96. package/lib/errors/guards.js.map +1 -0
  97. package/lib/errors/helpers/djust-api-error.d.ts +29 -0
  98. package/lib/errors/helpers/djust-api-error.d.ts.map +1 -0
  99. package/lib/errors/helpers/djust-api-error.js +49 -0
  100. package/lib/errors/helpers/djust-api-error.js.map +1 -0
  101. package/lib/errors/index.d.ts +25 -0
  102. package/lib/errors/index.d.ts.map +1 -0
  103. package/lib/errors/index.js +89 -0
  104. package/lib/errors/index.js.map +1 -0
  105. package/lib/errors/types.d.ts +104 -0
  106. package/lib/errors/types.d.ts.map +1 -0
  107. package/lib/errors/types.js +10 -0
  108. package/lib/errors/types.js.map +1 -0
  109. package/lib/helpers/index.d.ts +42 -0
  110. package/lib/helpers/index.d.ts.map +1 -0
  111. package/lib/helpers/index.js +102 -0
  112. package/lib/helpers/index.js.map +1 -0
  113. package/lib/helpers/parameters-validation.d.ts +3 -0
  114. package/lib/helpers/parameters-validation.d.ts.map +1 -0
  115. package/lib/helpers/parameters-validation.js +22 -0
  116. package/lib/helpers/parameters-validation.js.map +1 -0
  117. package/lib/helpers/utils.d.ts +5 -0
  118. package/lib/helpers/utils.d.ts.map +1 -0
  119. package/lib/helpers/utils.js +30 -0
  120. package/lib/helpers/utils.js.map +1 -0
  121. package/lib/index.d.ts +266 -0
  122. package/lib/index.d.ts.map +1 -0
  123. package/lib/index.js +182 -0
  124. package/lib/index.js.map +1 -0
  125. package/lib/interfaces/index.d.ts +36 -0
  126. package/lib/interfaces/index.d.ts.map +1 -0
  127. package/lib/interfaces/index.js +29 -0
  128. package/lib/interfaces/index.js.map +1 -0
  129. package/lib/interfaces/models/address.d.ts +61 -0
  130. package/lib/interfaces/models/address.d.ts.map +1 -0
  131. package/lib/interfaces/models/address.js +3 -0
  132. package/lib/interfaces/models/address.js.map +1 -0
  133. package/lib/interfaces/models/attribute.d.ts +31 -0
  134. package/lib/interfaces/models/attribute.d.ts.map +1 -0
  135. package/lib/interfaces/models/attribute.js +3 -0
  136. package/lib/interfaces/models/attribute.js.map +1 -0
  137. package/lib/interfaces/models/auth.d.ts +37 -0
  138. package/lib/interfaces/models/auth.d.ts.map +1 -0
  139. package/lib/interfaces/models/auth.js +3 -0
  140. package/lib/interfaces/models/auth.js.map +1 -0
  141. package/lib/interfaces/models/cart.d.ts +64 -0
  142. package/lib/interfaces/models/cart.d.ts.map +1 -0
  143. package/lib/interfaces/models/cart.js +3 -0
  144. package/lib/interfaces/models/cart.js.map +1 -0
  145. package/lib/interfaces/models/common.d.ts +68 -0
  146. package/lib/interfaces/models/common.d.ts.map +1 -0
  147. package/lib/interfaces/models/common.js +3 -0
  148. package/lib/interfaces/models/common.js.map +1 -0
  149. package/lib/interfaces/models/custom-field.d.ts +57 -0
  150. package/lib/interfaces/models/custom-field.d.ts.map +1 -0
  151. package/lib/interfaces/models/custom-field.js +3 -0
  152. package/lib/interfaces/models/custom-field.js.map +1 -0
  153. package/lib/interfaces/models/customer-account.d.ts +52 -0
  154. package/lib/interfaces/models/customer-account.d.ts.map +1 -0
  155. package/lib/interfaces/models/customer-account.js +3 -0
  156. package/lib/interfaces/models/customer-account.js.map +1 -0
  157. package/lib/interfaces/models/customer-organisation.d.ts +14 -0
  158. package/lib/interfaces/models/customer-organisation.d.ts.map +1 -0
  159. package/lib/interfaces/models/customer-organisation.js +3 -0
  160. package/lib/interfaces/models/customer-organisation.js.map +1 -0
  161. package/lib/interfaces/models/customer-user.d.ts +114 -0
  162. package/lib/interfaces/models/customer-user.d.ts.map +1 -0
  163. package/lib/interfaces/models/customer-user.js +3 -0
  164. package/lib/interfaces/models/customer-user.js.map +1 -0
  165. package/lib/interfaces/models/incident.d.ts +37 -0
  166. package/lib/interfaces/models/incident.d.ts.map +1 -0
  167. package/lib/interfaces/models/incident.js +3 -0
  168. package/lib/interfaces/models/incident.js.map +1 -0
  169. package/lib/interfaces/models/navigation-category.d.ts +22 -0
  170. package/lib/interfaces/models/navigation-category.d.ts.map +1 -0
  171. package/lib/interfaces/models/navigation-category.js +3 -0
  172. package/lib/interfaces/models/navigation-category.js.map +1 -0
  173. package/lib/interfaces/models/offer.d.ts +151 -0
  174. package/lib/interfaces/models/offer.d.ts.map +1 -0
  175. package/lib/interfaces/models/offer.js +3 -0
  176. package/lib/interfaces/models/offer.js.map +1 -0
  177. package/lib/interfaces/models/order.d.ts +701 -0
  178. package/lib/interfaces/models/order.d.ts.map +1 -0
  179. package/lib/interfaces/models/order.js +3 -0
  180. package/lib/interfaces/models/order.js.map +1 -0
  181. package/lib/interfaces/models/payment.d.ts +20 -0
  182. package/lib/interfaces/models/payment.d.ts.map +1 -0
  183. package/lib/interfaces/models/payment.js +3 -0
  184. package/lib/interfaces/models/payment.js.map +1 -0
  185. package/lib/interfaces/models/price.d.ts +6 -0
  186. package/lib/interfaces/models/price.d.ts.map +1 -0
  187. package/lib/interfaces/models/price.js +3 -0
  188. package/lib/interfaces/models/price.js.map +1 -0
  189. package/lib/interfaces/models/product.d.ts +243 -0
  190. package/lib/interfaces/models/product.d.ts.map +1 -0
  191. package/lib/interfaces/models/product.js +3 -0
  192. package/lib/interfaces/models/product.js.map +1 -0
  193. package/lib/interfaces/models/quote.d.ts +77 -0
  194. package/lib/interfaces/models/quote.d.ts.map +1 -0
  195. package/lib/interfaces/models/quote.js +3 -0
  196. package/lib/interfaces/models/quote.js.map +1 -0
  197. package/lib/interfaces/models/searchProduct.d.ts +128 -0
  198. package/lib/interfaces/models/searchProduct.d.ts.map +1 -0
  199. package/lib/interfaces/models/searchProduct.js +3 -0
  200. package/lib/interfaces/models/searchProduct.js.map +1 -0
  201. package/lib/interfaces/models/supplier.d.ts +72 -0
  202. package/lib/interfaces/models/supplier.d.ts.map +1 -0
  203. package/lib/interfaces/models/supplier.js +3 -0
  204. package/lib/interfaces/models/supplier.js.map +1 -0
  205. package/lib/services/attributes/attributes.service.d.ts +18 -0
  206. package/lib/services/attributes/attributes.service.d.ts.map +1 -0
  207. package/lib/services/attributes/attributes.service.js +37 -0
  208. package/lib/services/attributes/attributes.service.js.map +1 -0
  209. package/lib/services/attributes/definitions.d.ts +28 -0
  210. package/lib/services/attributes/definitions.d.ts.map +1 -0
  211. package/lib/services/attributes/definitions.js +3 -0
  212. package/lib/services/attributes/definitions.js.map +1 -0
  213. package/lib/services/attributes/endpoints.d.ts +12 -0
  214. package/lib/services/attributes/endpoints.d.ts.map +1 -0
  215. package/lib/services/attributes/endpoints.js +14 -0
  216. package/lib/services/attributes/endpoints.js.map +1 -0
  217. package/lib/services/attributes/index.d.ts +33 -0
  218. package/lib/services/attributes/index.d.ts.map +1 -0
  219. package/lib/services/attributes/index.js +50 -0
  220. package/lib/services/attributes/index.js.map +1 -0
  221. package/lib/services/attributes/module.d.ts +11 -0
  222. package/lib/services/attributes/module.d.ts.map +1 -0
  223. package/lib/services/attributes/module.js +15 -0
  224. package/lib/services/attributes/module.js.map +1 -0
  225. package/lib/services/attributes/types.d.ts +35 -0
  226. package/lib/services/attributes/types.d.ts.map +1 -0
  227. package/lib/services/attributes/types.js +10 -0
  228. package/lib/services/attributes/types.js.map +1 -0
  229. package/lib/services/auth/__mocks__/auth.mocks.d.ts +249 -0
  230. package/lib/services/auth/__mocks__/auth.mocks.d.ts.map +1 -0
  231. package/lib/services/auth/__mocks__/auth.mocks.js +221 -0
  232. package/lib/services/auth/__mocks__/auth.mocks.js.map +1 -0
  233. package/lib/services/auth/auth.service.d.ts +286 -0
  234. package/lib/services/auth/auth.service.d.ts.map +1 -0
  235. package/lib/services/auth/auth.service.js +423 -0
  236. package/lib/services/auth/auth.service.js.map +1 -0
  237. package/lib/services/auth/definitions.d.ts +69 -0
  238. package/lib/services/auth/definitions.d.ts.map +1 -0
  239. package/lib/services/auth/definitions.js +3 -0
  240. package/lib/services/auth/definitions.js.map +1 -0
  241. package/lib/services/auth/definitions.requests.d.ts +25 -0
  242. package/lib/services/auth/definitions.requests.d.ts.map +1 -0
  243. package/lib/services/auth/definitions.requests.js +6 -0
  244. package/lib/services/auth/definitions.requests.js.map +1 -0
  245. package/lib/services/auth/endpoints.d.ts +30 -0
  246. package/lib/services/auth/endpoints.d.ts.map +1 -0
  247. package/lib/services/auth/endpoints.js +32 -0
  248. package/lib/services/auth/endpoints.js.map +1 -0
  249. package/lib/services/auth/index.d.ts +232 -0
  250. package/lib/services/auth/index.d.ts.map +1 -0
  251. package/lib/services/auth/index.js +310 -0
  252. package/lib/services/auth/index.js.map +1 -0
  253. package/lib/services/auth/module.d.ts +11 -0
  254. package/lib/services/auth/module.d.ts.map +1 -0
  255. package/lib/services/auth/module.js +17 -0
  256. package/lib/services/auth/module.js.map +1 -0
  257. package/lib/services/auth/types.d.ts +124 -0
  258. package/lib/services/auth/types.d.ts.map +1 -0
  259. package/lib/services/auth/types.js +10 -0
  260. package/lib/services/auth/types.js.map +1 -0
  261. package/lib/services/base.service.d.ts +83 -0
  262. package/lib/services/base.service.d.ts.map +1 -0
  263. package/lib/services/base.service.js +121 -0
  264. package/lib/services/base.service.js.map +1 -0
  265. package/lib/services/cart/cart.service.d.ts +443 -0
  266. package/lib/services/cart/cart.service.d.ts.map +1 -0
  267. package/lib/services/cart/cart.service.js +551 -0
  268. package/lib/services/cart/cart.service.js.map +1 -0
  269. package/lib/services/cart/definitions.d.ts +84 -0
  270. package/lib/services/cart/definitions.d.ts.map +1 -0
  271. package/lib/services/cart/definitions.js +3 -0
  272. package/lib/services/cart/definitions.js.map +1 -0
  273. package/lib/services/cart/endpoints.d.ts +24 -0
  274. package/lib/services/cart/endpoints.d.ts.map +1 -0
  275. package/lib/services/cart/endpoints.js +26 -0
  276. package/lib/services/cart/endpoints.js.map +1 -0
  277. package/lib/services/cart/index.d.ts +330 -0
  278. package/lib/services/cart/index.d.ts.map +1 -0
  279. package/lib/services/cart/index.js +464 -0
  280. package/lib/services/cart/index.js.map +1 -0
  281. package/lib/services/cart/module.d.ts +11 -0
  282. package/lib/services/cart/module.d.ts.map +1 -0
  283. package/lib/services/cart/module.js +17 -0
  284. package/lib/services/cart/module.js.map +1 -0
  285. package/lib/services/cart/types.d.ts +236 -0
  286. package/lib/services/cart/types.d.ts.map +1 -0
  287. package/lib/services/cart/types.js +10 -0
  288. package/lib/services/cart/types.js.map +1 -0
  289. package/lib/services/commercial-order/commercial-order.service.d.ts +435 -0
  290. package/lib/services/commercial-order/commercial-order.service.d.ts.map +1 -0
  291. package/lib/services/commercial-order/commercial-order.service.js +690 -0
  292. package/lib/services/commercial-order/commercial-order.service.js.map +1 -0
  293. package/lib/services/commercial-order/definitions.d.ts +181 -0
  294. package/lib/services/commercial-order/definitions.d.ts.map +1 -0
  295. package/lib/services/commercial-order/definitions.js +3 -0
  296. package/lib/services/commercial-order/definitions.js.map +1 -0
  297. package/lib/services/commercial-order/endpoints.d.ts +28 -0
  298. package/lib/services/commercial-order/endpoints.d.ts.map +1 -0
  299. package/lib/services/commercial-order/endpoints.js +33 -0
  300. package/lib/services/commercial-order/endpoints.js.map +1 -0
  301. package/lib/services/commercial-order/index.d.ts +712 -0
  302. package/lib/services/commercial-order/index.d.ts.map +1 -0
  303. package/lib/services/commercial-order/index.js +976 -0
  304. package/lib/services/commercial-order/index.js.map +1 -0
  305. package/lib/services/commercial-order/module.d.ts +11 -0
  306. package/lib/services/commercial-order/module.d.ts.map +1 -0
  307. package/lib/services/commercial-order/module.js +15 -0
  308. package/lib/services/commercial-order/module.js.map +1 -0
  309. package/lib/services/commercial-order/types.d.ts +244 -0
  310. package/lib/services/commercial-order/types.d.ts.map +1 -0
  311. package/lib/services/commercial-order/types.js +10 -0
  312. package/lib/services/commercial-order/types.js.map +1 -0
  313. package/lib/services/custom-field/custom-field.service.d.ts +23 -0
  314. package/lib/services/custom-field/custom-field.service.d.ts.map +1 -0
  315. package/lib/services/custom-field/custom-field.service.js +64 -0
  316. package/lib/services/custom-field/custom-field.service.js.map +1 -0
  317. package/lib/services/custom-field/definitions.d.ts +107 -0
  318. package/lib/services/custom-field/definitions.d.ts.map +1 -0
  319. package/lib/services/custom-field/definitions.js +61 -0
  320. package/lib/services/custom-field/definitions.js.map +1 -0
  321. package/lib/services/custom-field/endpoints.d.ts +13 -0
  322. package/lib/services/custom-field/endpoints.d.ts.map +1 -0
  323. package/lib/services/custom-field/endpoints.js +15 -0
  324. package/lib/services/custom-field/endpoints.js.map +1 -0
  325. package/lib/services/custom-field/index.d.ts +115 -0
  326. package/lib/services/custom-field/index.d.ts.map +1 -0
  327. package/lib/services/custom-field/index.js +144 -0
  328. package/lib/services/custom-field/index.js.map +1 -0
  329. package/lib/services/custom-field/module.d.ts +11 -0
  330. package/lib/services/custom-field/module.d.ts.map +1 -0
  331. package/lib/services/custom-field/module.js +15 -0
  332. package/lib/services/custom-field/module.js.map +1 -0
  333. package/lib/services/custom-field/types.d.ts +51 -0
  334. package/lib/services/custom-field/types.d.ts.map +1 -0
  335. package/lib/services/custom-field/types.js +10 -0
  336. package/lib/services/custom-field/types.js.map +1 -0
  337. package/lib/services/customer-account/customer-account.service.d.ts +387 -0
  338. package/lib/services/customer-account/customer-account.service.d.ts.map +1 -0
  339. package/lib/services/customer-account/customer-account.service.js +579 -0
  340. package/lib/services/customer-account/customer-account.service.js.map +1 -0
  341. package/lib/services/customer-account/definitions.d.ts +164 -0
  342. package/lib/services/customer-account/definitions.d.ts.map +1 -0
  343. package/lib/services/customer-account/definitions.js +3 -0
  344. package/lib/services/customer-account/definitions.js.map +1 -0
  345. package/lib/services/customer-account/endpoints.d.ts +25 -0
  346. package/lib/services/customer-account/endpoints.d.ts.map +1 -0
  347. package/lib/services/customer-account/endpoints.js +33 -0
  348. package/lib/services/customer-account/endpoints.js.map +1 -0
  349. package/lib/services/customer-account/index.d.ts +656 -0
  350. package/lib/services/customer-account/index.d.ts.map +1 -0
  351. package/lib/services/customer-account/index.js +929 -0
  352. package/lib/services/customer-account/index.js.map +1 -0
  353. package/lib/services/customer-account/module.d.ts +11 -0
  354. package/lib/services/customer-account/module.d.ts.map +1 -0
  355. package/lib/services/customer-account/module.js +15 -0
  356. package/lib/services/customer-account/module.js.map +1 -0
  357. package/lib/services/customer-account/types.d.ts +253 -0
  358. package/lib/services/customer-account/types.d.ts.map +1 -0
  359. package/lib/services/customer-account/types.js +10 -0
  360. package/lib/services/customer-account/types.js.map +1 -0
  361. package/lib/services/customer-user/customer-user.service.d.ts +280 -0
  362. package/lib/services/customer-user/customer-user.service.d.ts.map +1 -0
  363. package/lib/services/customer-user/customer-user.service.js +402 -0
  364. package/lib/services/customer-user/customer-user.service.js.map +1 -0
  365. package/lib/services/customer-user/definitions.d.ts +84 -0
  366. package/lib/services/customer-user/definitions.d.ts.map +1 -0
  367. package/lib/services/customer-user/definitions.js +3 -0
  368. package/lib/services/customer-user/definitions.js.map +1 -0
  369. package/lib/services/customer-user/endpoints.d.ts +19 -0
  370. package/lib/services/customer-user/endpoints.d.ts.map +1 -0
  371. package/lib/services/customer-user/endpoints.js +21 -0
  372. package/lib/services/customer-user/endpoints.js.map +1 -0
  373. package/lib/services/customer-user/index.d.ts +394 -0
  374. package/lib/services/customer-user/index.d.ts.map +1 -0
  375. package/lib/services/customer-user/index.js +528 -0
  376. package/lib/services/customer-user/index.js.map +1 -0
  377. package/lib/services/customer-user/module.d.ts +11 -0
  378. package/lib/services/customer-user/module.d.ts.map +1 -0
  379. package/lib/services/customer-user/module.js +15 -0
  380. package/lib/services/customer-user/module.js.map +1 -0
  381. package/lib/services/customer-user/types.d.ts +118 -0
  382. package/lib/services/customer-user/types.d.ts.map +1 -0
  383. package/lib/services/customer-user/types.js +10 -0
  384. package/lib/services/customer-user/types.js.map +1 -0
  385. package/lib/services/factory.d.ts +104 -0
  386. package/lib/services/factory.d.ts.map +1 -0
  387. package/lib/services/factory.js +89 -0
  388. package/lib/services/factory.js.map +1 -0
  389. package/lib/services/incident/definitions.d.ts +85 -0
  390. package/lib/services/incident/definitions.d.ts.map +1 -0
  391. package/lib/services/incident/definitions.js +3 -0
  392. package/lib/services/incident/definitions.js.map +1 -0
  393. package/lib/services/incident/endpoints.d.ts +17 -0
  394. package/lib/services/incident/endpoints.d.ts.map +1 -0
  395. package/lib/services/incident/endpoints.js +19 -0
  396. package/lib/services/incident/endpoints.js.map +1 -0
  397. package/lib/services/incident/incident.service.d.ts +24 -0
  398. package/lib/services/incident/incident.service.d.ts.map +1 -0
  399. package/lib/services/incident/incident.service.js +141 -0
  400. package/lib/services/incident/incident.service.js.map +1 -0
  401. package/lib/services/incident/index.d.ts +270 -0
  402. package/lib/services/incident/index.d.ts.map +1 -0
  403. package/lib/services/incident/index.js +389 -0
  404. package/lib/services/incident/index.js.map +1 -0
  405. package/lib/services/incident/module.d.ts +11 -0
  406. package/lib/services/incident/module.d.ts.map +1 -0
  407. package/lib/services/incident/module.js +15 -0
  408. package/lib/services/incident/module.js.map +1 -0
  409. package/lib/services/incident/types.d.ts +116 -0
  410. package/lib/services/incident/types.d.ts.map +1 -0
  411. package/lib/services/incident/types.js +10 -0
  412. package/lib/services/incident/types.js.map +1 -0
  413. package/lib/services/logistic-order/definitions.d.ts +296 -0
  414. package/lib/services/logistic-order/definitions.d.ts.map +1 -0
  415. package/lib/services/logistic-order/definitions.js +3 -0
  416. package/lib/services/logistic-order/definitions.js.map +1 -0
  417. package/lib/services/logistic-order/endpoints.d.ts +44 -0
  418. package/lib/services/logistic-order/endpoints.d.ts.map +1 -0
  419. package/lib/services/logistic-order/endpoints.js +57 -0
  420. package/lib/services/logistic-order/endpoints.js.map +1 -0
  421. package/lib/services/logistic-order/index.d.ts +1338 -0
  422. package/lib/services/logistic-order/index.d.ts.map +1 -0
  423. package/lib/services/logistic-order/index.js +1776 -0
  424. package/lib/services/logistic-order/index.js.map +1 -0
  425. package/lib/services/logistic-order/logistic-order.service.d.ts +62 -0
  426. package/lib/services/logistic-order/logistic-order.service.d.ts.map +1 -0
  427. package/lib/services/logistic-order/logistic-order.service.js +499 -0
  428. package/lib/services/logistic-order/logistic-order.service.js.map +1 -0
  429. package/lib/services/logistic-order/module.d.ts +11 -0
  430. package/lib/services/logistic-order/module.d.ts.map +1 -0
  431. package/lib/services/logistic-order/module.js +15 -0
  432. package/lib/services/logistic-order/module.js.map +1 -0
  433. package/lib/services/logistic-order/types.d.ts +411 -0
  434. package/lib/services/logistic-order/types.d.ts.map +1 -0
  435. package/lib/services/logistic-order/types.js +10 -0
  436. package/lib/services/logistic-order/types.js.map +1 -0
  437. package/lib/services/module.d.ts +64 -0
  438. package/lib/services/module.d.ts.map +1 -0
  439. package/lib/services/module.js +147 -0
  440. package/lib/services/module.js.map +1 -0
  441. package/lib/services/navigation-category/definitions.d.ts +31 -0
  442. package/lib/services/navigation-category/definitions.d.ts.map +1 -0
  443. package/lib/services/navigation-category/definitions.js +3 -0
  444. package/lib/services/navigation-category/definitions.js.map +1 -0
  445. package/lib/services/navigation-category/endpoints.d.ts +15 -0
  446. package/lib/services/navigation-category/endpoints.d.ts.map +1 -0
  447. package/lib/services/navigation-category/endpoints.js +17 -0
  448. package/lib/services/navigation-category/endpoints.js.map +1 -0
  449. package/lib/services/navigation-category/index.d.ts +114 -0
  450. package/lib/services/navigation-category/index.d.ts.map +1 -0
  451. package/lib/services/navigation-category/index.js +160 -0
  452. package/lib/services/navigation-category/index.js.map +1 -0
  453. package/lib/services/navigation-category/module.d.ts +11 -0
  454. package/lib/services/navigation-category/module.d.ts.map +1 -0
  455. package/lib/services/navigation-category/module.js +15 -0
  456. package/lib/services/navigation-category/module.js.map +1 -0
  457. package/lib/services/navigation-category/navigation-category.service.d.ts +148 -0
  458. package/lib/services/navigation-category/navigation-category.service.d.ts.map +1 -0
  459. package/lib/services/navigation-category/navigation-category.service.js +191 -0
  460. package/lib/services/navigation-category/navigation-category.service.js.map +1 -0
  461. package/lib/services/navigation-category/types.d.ts +51 -0
  462. package/lib/services/navigation-category/types.d.ts.map +1 -0
  463. package/lib/services/navigation-category/types.js +10 -0
  464. package/lib/services/navigation-category/types.js.map +1 -0
  465. package/lib/services/offer-inventories/definitions.d.ts +73 -0
  466. package/lib/services/offer-inventories/definitions.d.ts.map +1 -0
  467. package/lib/services/offer-inventories/definitions.js +3 -0
  468. package/lib/services/offer-inventories/definitions.js.map +1 -0
  469. package/lib/services/offer-inventories/endpoints.d.ts +16 -0
  470. package/lib/services/offer-inventories/endpoints.d.ts.map +1 -0
  471. package/lib/services/offer-inventories/endpoints.js +18 -0
  472. package/lib/services/offer-inventories/endpoints.js.map +1 -0
  473. package/lib/services/offer-inventories/index.d.ts +120 -0
  474. package/lib/services/offer-inventories/index.d.ts.map +1 -0
  475. package/lib/services/offer-inventories/index.js +175 -0
  476. package/lib/services/offer-inventories/index.js.map +1 -0
  477. package/lib/services/offer-inventories/module.d.ts +11 -0
  478. package/lib/services/offer-inventories/module.d.ts.map +1 -0
  479. package/lib/services/offer-inventories/module.js +15 -0
  480. package/lib/services/offer-inventories/module.js.map +1 -0
  481. package/lib/services/offer-inventories/offer-inventories.service.d.ts +26 -0
  482. package/lib/services/offer-inventories/offer-inventories.service.d.ts.map +1 -0
  483. package/lib/services/offer-inventories/offer-inventories.service.js +80 -0
  484. package/lib/services/offer-inventories/offer-inventories.service.js.map +1 -0
  485. package/lib/services/offer-inventories/types.d.ts +85 -0
  486. package/lib/services/offer-inventories/types.d.ts.map +1 -0
  487. package/lib/services/offer-inventories/types.js +10 -0
  488. package/lib/services/offer-inventories/types.js.map +1 -0
  489. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +109 -0
  490. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts.map +1 -0
  491. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js +201 -0
  492. package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js.map +1 -0
  493. package/lib/services/offer-prices/definitions.d.ts +24 -0
  494. package/lib/services/offer-prices/definitions.d.ts.map +1 -0
  495. package/lib/services/offer-prices/definitions.js +3 -0
  496. package/lib/services/offer-prices/definitions.js.map +1 -0
  497. package/lib/services/offer-prices/endpoints.d.ts +12 -0
  498. package/lib/services/offer-prices/endpoints.d.ts.map +1 -0
  499. package/lib/services/offer-prices/endpoints.js +14 -0
  500. package/lib/services/offer-prices/endpoints.js.map +1 -0
  501. package/lib/services/offer-prices/index.d.ts +36 -0
  502. package/lib/services/offer-prices/index.d.ts.map +1 -0
  503. package/lib/services/offer-prices/index.js +53 -0
  504. package/lib/services/offer-prices/index.js.map +1 -0
  505. package/lib/services/offer-prices/module.d.ts +11 -0
  506. package/lib/services/offer-prices/module.d.ts.map +1 -0
  507. package/lib/services/offer-prices/module.js +15 -0
  508. package/lib/services/offer-prices/module.js.map +1 -0
  509. package/lib/services/offer-prices/offer-prices.service.d.ts +18 -0
  510. package/lib/services/offer-prices/offer-prices.service.d.ts.map +1 -0
  511. package/lib/services/offer-prices/offer-prices.service.js +36 -0
  512. package/lib/services/offer-prices/offer-prices.service.js.map +1 -0
  513. package/lib/services/offer-prices/types.d.ts +33 -0
  514. package/lib/services/offer-prices/types.d.ts.map +1 -0
  515. package/lib/services/offer-prices/types.js +10 -0
  516. package/lib/services/offer-prices/types.js.map +1 -0
  517. package/lib/services/operation/definitions.d.ts +280 -0
  518. package/lib/services/operation/definitions.d.ts.map +1 -0
  519. package/lib/services/operation/definitions.js +18 -0
  520. package/lib/services/operation/definitions.js.map +1 -0
  521. package/lib/services/operation/endpoints.d.ts +18 -0
  522. package/lib/services/operation/endpoints.d.ts.map +1 -0
  523. package/lib/services/operation/endpoints.js +22 -0
  524. package/lib/services/operation/endpoints.js.map +1 -0
  525. package/lib/services/operation/index.d.ts +520 -0
  526. package/lib/services/operation/index.d.ts.map +1 -0
  527. package/lib/services/operation/index.js +704 -0
  528. package/lib/services/operation/index.js.map +1 -0
  529. package/lib/services/operation/module.d.ts +11 -0
  530. package/lib/services/operation/module.d.ts.map +1 -0
  531. package/lib/services/operation/module.js +15 -0
  532. package/lib/services/operation/module.js.map +1 -0
  533. package/lib/services/operation/operation.service.d.ts +32 -0
  534. package/lib/services/operation/operation.service.d.ts.map +1 -0
  535. package/lib/services/operation/operation.service.js +206 -0
  536. package/lib/services/operation/operation.service.js.map +1 -0
  537. package/lib/services/operation/types.d.ts +174 -0
  538. package/lib/services/operation/types.d.ts.map +1 -0
  539. package/lib/services/operation/types.js +10 -0
  540. package/lib/services/operation/types.js.map +1 -0
  541. package/lib/services/payment/definitions.d.ts +79 -0
  542. package/lib/services/payment/definitions.d.ts.map +1 -0
  543. package/lib/services/payment/definitions.js +3 -0
  544. package/lib/services/payment/definitions.js.map +1 -0
  545. package/lib/services/payment/endpoints.d.ts +16 -0
  546. package/lib/services/payment/endpoints.d.ts.map +1 -0
  547. package/lib/services/payment/endpoints.js +18 -0
  548. package/lib/services/payment/endpoints.js.map +1 -0
  549. package/lib/services/payment/index.d.ts +150 -0
  550. package/lib/services/payment/index.d.ts.map +1 -0
  551. package/lib/services/payment/index.js +220 -0
  552. package/lib/services/payment/index.js.map +1 -0
  553. package/lib/services/payment/module.d.ts +11 -0
  554. package/lib/services/payment/module.d.ts.map +1 -0
  555. package/lib/services/payment/module.js +15 -0
  556. package/lib/services/payment/module.js.map +1 -0
  557. package/lib/services/payment/payment.service.d.ts +224 -0
  558. package/lib/services/payment/payment.service.d.ts.map +1 -0
  559. package/lib/services/payment/payment.service.js +288 -0
  560. package/lib/services/payment/payment.service.js.map +1 -0
  561. package/lib/services/payment/types.d.ts +93 -0
  562. package/lib/services/payment/types.d.ts.map +1 -0
  563. package/lib/services/payment/types.js +10 -0
  564. package/lib/services/payment/types.js.map +1 -0
  565. package/lib/services/product/definitions.d.ts +150 -0
  566. package/lib/services/product/definitions.d.ts.map +1 -0
  567. package/lib/services/product/definitions.js +9 -0
  568. package/lib/services/product/definitions.js.map +1 -0
  569. package/lib/services/product/endpoints.d.ts +40 -0
  570. package/lib/services/product/endpoints.d.ts.map +1 -0
  571. package/lib/services/product/endpoints.js +42 -0
  572. package/lib/services/product/endpoints.js.map +1 -0
  573. package/lib/services/product/index.d.ts +388 -0
  574. package/lib/services/product/index.d.ts.map +1 -0
  575. package/lib/services/product/index.js +564 -0
  576. package/lib/services/product/index.js.map +1 -0
  577. package/lib/services/product/module.d.ts +11 -0
  578. package/lib/services/product/module.d.ts.map +1 -0
  579. package/lib/services/product/module.js +17 -0
  580. package/lib/services/product/module.js.map +1 -0
  581. package/lib/services/product/product.service.d.ts +452 -0
  582. package/lib/services/product/product.service.d.ts.map +1 -0
  583. package/lib/services/product/product.service.js +624 -0
  584. package/lib/services/product/product.service.js.map +1 -0
  585. package/lib/services/product/types.d.ts +344 -0
  586. package/lib/services/product/types.d.ts.map +1 -0
  587. package/lib/services/product/types.js +10 -0
  588. package/lib/services/product/types.js.map +1 -0
  589. package/lib/services/product-variant/definitions.d.ts +172 -0
  590. package/lib/services/product-variant/definitions.d.ts.map +1 -0
  591. package/lib/services/product-variant/definitions.js +8 -0
  592. package/lib/services/product-variant/definitions.js.map +1 -0
  593. package/lib/services/product-variant/endpoints.d.ts +15 -0
  594. package/lib/services/product-variant/endpoints.d.ts.map +1 -0
  595. package/lib/services/product-variant/endpoints.js +17 -0
  596. package/lib/services/product-variant/endpoints.js.map +1 -0
  597. package/lib/services/product-variant/index.d.ts +123 -0
  598. package/lib/services/product-variant/index.d.ts.map +1 -0
  599. package/lib/services/product-variant/index.js +172 -0
  600. package/lib/services/product-variant/index.js.map +1 -0
  601. package/lib/services/product-variant/module.d.ts +11 -0
  602. package/lib/services/product-variant/module.d.ts.map +1 -0
  603. package/lib/services/product-variant/module.js +15 -0
  604. package/lib/services/product-variant/module.js.map +1 -0
  605. package/lib/services/product-variant/product-variant.service.d.ts +21 -0
  606. package/lib/services/product-variant/product-variant.service.d.ts.map +1 -0
  607. package/lib/services/product-variant/product-variant.service.js +69 -0
  608. package/lib/services/product-variant/product-variant.service.js.map +1 -0
  609. package/lib/services/product-variant/types.d.ts +73 -0
  610. package/lib/services/product-variant/types.d.ts.map +1 -0
  611. package/lib/services/product-variant/types.js +10 -0
  612. package/lib/services/product-variant/types.js.map +1 -0
  613. package/lib/services/quote/definitions.d.ts +102 -0
  614. package/lib/services/quote/definitions.d.ts.map +1 -0
  615. package/lib/services/quote/definitions.js +3 -0
  616. package/lib/services/quote/definitions.js.map +1 -0
  617. package/lib/services/quote/endpoints.d.ts +20 -0
  618. package/lib/services/quote/endpoints.d.ts.map +1 -0
  619. package/lib/services/quote/endpoints.js +24 -0
  620. package/lib/services/quote/endpoints.js.map +1 -0
  621. package/lib/services/quote/index.d.ts +378 -0
  622. package/lib/services/quote/index.d.ts.map +1 -0
  623. package/lib/services/quote/index.js +506 -0
  624. package/lib/services/quote/index.js.map +1 -0
  625. package/lib/services/quote/module.d.ts +11 -0
  626. package/lib/services/quote/module.d.ts.map +1 -0
  627. package/lib/services/quote/module.js +15 -0
  628. package/lib/services/quote/module.js.map +1 -0
  629. package/lib/services/quote/quote.service.d.ts +346 -0
  630. package/lib/services/quote/quote.service.d.ts.map +1 -0
  631. package/lib/services/quote/quote.service.js +479 -0
  632. package/lib/services/quote/quote.service.js.map +1 -0
  633. package/lib/services/quote/types.d.ts +160 -0
  634. package/lib/services/quote/types.d.ts.map +1 -0
  635. package/lib/services/quote/types.js +10 -0
  636. package/lib/services/quote/types.js.map +1 -0
  637. package/lib/services/supplier/__mocks__/supplier-mocks.d.ts +49 -0
  638. package/lib/services/supplier/__mocks__/supplier-mocks.d.ts.map +1 -0
  639. package/lib/services/supplier/__mocks__/supplier-mocks.js +168 -0
  640. package/lib/services/supplier/__mocks__/supplier-mocks.js.map +1 -0
  641. package/lib/services/supplier/definitions.d.ts +30 -0
  642. package/lib/services/supplier/definitions.d.ts.map +1 -0
  643. package/lib/services/supplier/definitions.js +3 -0
  644. package/lib/services/supplier/definitions.js.map +1 -0
  645. package/lib/services/supplier/endpoints.d.ts +14 -0
  646. package/lib/services/supplier/endpoints.d.ts.map +1 -0
  647. package/lib/services/supplier/endpoints.js +16 -0
  648. package/lib/services/supplier/endpoints.js.map +1 -0
  649. package/lib/services/supplier/index.d.ts +102 -0
  650. package/lib/services/supplier/index.d.ts.map +1 -0
  651. package/lib/services/supplier/index.js +146 -0
  652. package/lib/services/supplier/index.js.map +1 -0
  653. package/lib/services/supplier/module.d.ts +11 -0
  654. package/lib/services/supplier/module.d.ts.map +1 -0
  655. package/lib/services/supplier/module.js +15 -0
  656. package/lib/services/supplier/module.js.map +1 -0
  657. package/lib/services/supplier/supplier.service.d.ts +20 -0
  658. package/lib/services/supplier/supplier.service.d.ts.map +1 -0
  659. package/lib/services/supplier/supplier.service.js +63 -0
  660. package/lib/services/supplier/supplier.service.js.map +1 -0
  661. package/lib/services/supplier/types.d.ts +58 -0
  662. package/lib/services/supplier/types.d.ts.map +1 -0
  663. package/lib/services/supplier/types.js +10 -0
  664. package/lib/services/supplier/types.js.map +1 -0
  665. package/lib/services/types.d.ts +81 -0
  666. package/lib/services/types.d.ts.map +1 -0
  667. package/lib/services/types.js +10 -0
  668. package/lib/services/types.js.map +1 -0
  669. package/lib/settings/fetch-instance.d.ts +30 -0
  670. package/lib/settings/fetch-instance.d.ts.map +1 -0
  671. package/lib/settings/fetch-instance.js +195 -0
  672. package/lib/settings/fetch-instance.js.map +1 -0
  673. package/lib/settings/sdk-version.d.ts +3 -0
  674. package/lib/settings/sdk-version.d.ts.map +1 -0
  675. package/lib/settings/sdk-version.js +6 -0
  676. package/lib/settings/sdk-version.js.map +1 -0
  677. package/package.json +17 -3
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /**
3
+ * DJUST SDK Supplier Service
4
+ * Service class for supplier operations.
5
+ *
6
+ * @module services/supplier/service
7
+ * @since 2.17.0
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.SupplierService = void 0;
11
+ const base_service_1 = require("../base.service");
12
+ const endpoints_1 = require("./endpoints");
13
+ /**
14
+ * Service for supplier operations.
15
+ */
16
+ class SupplierService extends base_service_1.BaseService {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.serviceName = "supplier";
20
+ }
21
+ async getSuppliers(params, context) {
22
+ this.required(params, ["pageable"]);
23
+ return this.request({
24
+ method: "GET",
25
+ path: endpoints_1.SupplierEndpoints.SUPPLIERS,
26
+ params: this.buildParams({
27
+ page: params.pageable.page,
28
+ size: params.pageable.size,
29
+ sort: params.pageable.sort,
30
+ supplierStatus: params.supplierStatus,
31
+ supplierIds: params.supplierIds,
32
+ idType: params.idType,
33
+ }),
34
+ }, context);
35
+ }
36
+ async getSupplier(params, context) {
37
+ this.required(params, ["supplierId"]);
38
+ return this.request({
39
+ method: "GET",
40
+ path: this.buildPath(endpoints_1.SupplierEndpoints.SUPPLIER, {
41
+ supplierId: params.supplierId,
42
+ }),
43
+ params: this.buildParams({ idType: params.idType }),
44
+ }, context);
45
+ }
46
+ async getSupplierEvaluations(params, context) {
47
+ this.required(params, ["supplierId", "pageable"]);
48
+ return this.request({
49
+ method: "GET",
50
+ path: this.buildPath(endpoints_1.SupplierEndpoints.EVALUATIONS, {
51
+ supplierId: params.supplierId,
52
+ }),
53
+ params: this.buildParams({
54
+ idType: params.idType,
55
+ page: params.pageable.page,
56
+ size: params.pageable.size,
57
+ sort: params.pageable.sort,
58
+ }),
59
+ }, context);
60
+ }
61
+ }
62
+ exports.SupplierService = SupplierService;
63
+ //# sourceMappingURL=supplier.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supplier.service.js","sourceRoot":"","sources":["../../../src/services/supplier/supplier.service.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,kDAA8C;AAE9C,2CAAgD;AAUhD;;GAEG;AACH,MAAa,eAAgB,SAAQ,0BAAW;IAAhD;;QACW,gBAAW,GAAG,UAAU,CAAC;IAiEpC,CAAC;IA/DC,KAAK,CAAC,YAAY,CAChB,MAA0B,EAC1B,OAAwB;QAExB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAEpC,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,6BAAiB,CAAC,SAAS;YACjC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC;gBACvB,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBAC1B,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBAC1B,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBAC1B,cAAc,EAAE,MAAM,CAAC,cAAc;gBACrC,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC;SACH,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CACf,MAAyB,EACzB,OAAwB;QAExB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;QAEtC,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,6BAAiB,CAAC,QAAQ,EAAE;gBAC/C,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC;YACF,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;SACpD,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,sBAAsB,CAC1B,MAAoC,EACpC,OAAwB;QAExB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;QAElD,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,6BAAiB,CAAC,WAAW,EAAE;gBAClD,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC;YACF,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC;gBACvB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBAC1B,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBAC1B,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;aAC3B,CAAC;SACH,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAlED,0CAkEC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * DJUST SDK Supplier Service - Types
3
+ * Type definitions for supplier operations.
4
+ *
5
+ * @module services/supplier/types
6
+ * @since 2.17.0
7
+ */
8
+ import type { Pageable, PaginatedResponse } from "../types";
9
+ export type SupplierStatus = "ACTIVE" | "INACTIVE" | "SUSPENDED";
10
+ export type IdType = "DJUST_ID" | "EXTERNAL_ID";
11
+ export interface GetSuppliersParams {
12
+ pageable: Pageable;
13
+ supplierStatus?: SupplierStatus;
14
+ supplierIds?: string[];
15
+ idType?: IdType;
16
+ }
17
+ export interface GetSupplierParams {
18
+ supplierId: string;
19
+ idType?: IdType;
20
+ }
21
+ export interface GetSupplierEvaluationsParams {
22
+ supplierId: string;
23
+ idType?: IdType;
24
+ pageable: Pageable;
25
+ }
26
+ export interface Supplier {
27
+ id: string;
28
+ externalId?: string;
29
+ name: string;
30
+ status: SupplierStatus;
31
+ description?: string;
32
+ logoUrl?: string;
33
+ website?: string;
34
+ email?: string;
35
+ phone?: string;
36
+ address?: string;
37
+ city?: string;
38
+ country?: string;
39
+ zipcode?: string;
40
+ createdAt: string;
41
+ updatedAt: string;
42
+ }
43
+ export interface SupplierEvaluation {
44
+ id: string;
45
+ supplierId: string;
46
+ rating: number;
47
+ comment?: string;
48
+ orderId?: string;
49
+ customerId?: string;
50
+ createdAt: string;
51
+ }
52
+ export interface GetSuppliersResponse extends PaginatedResponse<Supplier> {
53
+ }
54
+ export interface GetSupplierResponse extends Supplier {
55
+ }
56
+ export interface GetSupplierEvaluationsResponse extends PaginatedResponse<SupplierEvaluation> {
57
+ }
58
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/supplier/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAM5D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;AACjE,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;AAMhD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAMD,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB,CAAC,QAAQ,CAAC;CAAG;AAC5E,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;CAAG;AACxD,MAAM,WAAW,8BACf,SAAQ,iBAAiB,CAAC,kBAAkB,CAAC;CAAG"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * DJUST SDK Supplier Service - Types
4
+ * Type definitions for supplier operations.
5
+ *
6
+ * @module services/supplier/types
7
+ * @since 2.17.0
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/supplier/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * DJUST SDK Services - Shared Types
3
+ * Common types used across all services.
4
+ *
5
+ * @module services/types
6
+ * @since 2.17.0
7
+ */
8
+ /**
9
+ * Standard pagination parameters.
10
+ */
11
+ export interface Pageable {
12
+ /** Page number (0-based) */
13
+ page?: number;
14
+ /** Number of items per page */
15
+ size?: number;
16
+ /** Sort criteria (e.g., "createdAt,desc") */
17
+ sort?: string | string[];
18
+ }
19
+ /**
20
+ * Standard paginated response wrapper.
21
+ */
22
+ export interface PaginatedResponse<T> {
23
+ content: T[];
24
+ totalElements: number;
25
+ totalPages: number;
26
+ size: number;
27
+ number: number;
28
+ first: boolean;
29
+ last: boolean;
30
+ empty: boolean;
31
+ }
32
+ /**
33
+ * Product identifier types.
34
+ */
35
+ export type ProductIdType = "id" | "sku" | "externalId";
36
+ /**
37
+ * Common identifier parameter.
38
+ */
39
+ export interface IdentifierParam {
40
+ /** The identifier value */
41
+ identifier: string;
42
+ /** The type of identifier */
43
+ idType: ProductIdType;
44
+ }
45
+ /**
46
+ * Context passed to service methods.
47
+ * Allows per-request configuration without global state.
48
+ */
49
+ export interface ServiceContext {
50
+ /** Access token for authentication */
51
+ accessToken?: string;
52
+ /** Customer account ID for B2B operations */
53
+ customerAccountId?: string;
54
+ /** Request correlation ID */
55
+ requestId?: string;
56
+ /** Custom headers to include */
57
+ headers?: Record<string, string>;
58
+ }
59
+ /**
60
+ * Options for creating a service instance.
61
+ */
62
+ export interface ServiceOptions {
63
+ /** Base URL for the API */
64
+ baseUrl: string;
65
+ /** Client ID */
66
+ clientId: string;
67
+ /** API Key */
68
+ apiKey: string;
69
+ /** Default timeout in milliseconds */
70
+ timeout?: number;
71
+ /** Enable strict error mode */
72
+ strictErrors?: boolean;
73
+ }
74
+ /**
75
+ * Base interface for all service classes.
76
+ */
77
+ export interface BaseService {
78
+ /** Service name for logging */
79
+ readonly serviceName: string;
80
+ }
81
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/services/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAMD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,KAAK,GAAG,YAAY,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,MAAM,EAAE,aAAa,CAAC;CACvB;AAMD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAMD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAMD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,+BAA+B;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * DJUST SDK Services - Shared Types
4
+ * Common types used across all services.
5
+ *
6
+ * @module services/types
7
+ * @since 2.17.0
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/services/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,30 @@
1
+ import { DjustConfig } from "../interfaces/models/common";
2
+ import "isomorphic-fetch";
3
+ export type ClientConfig = {
4
+ baseUrl: string;
5
+ clientId: string;
6
+ apiKey: string;
7
+ timeout?: number;
8
+ locale?: string;
9
+ headers?: Headers;
10
+ accessToken?: string;
11
+ storeId?: string;
12
+ storeViewId?: string;
13
+ customerAccountId?: string;
14
+ clientName?: string;
15
+ env?: string;
16
+ dsn?: string;
17
+ logLevels?: ("log" | "info" | "warn" | "error")[];
18
+ };
19
+ export declare const initialize: (initConfig: ClientConfig) => void;
20
+ export declare const updateConfiguration: (newConfig: Partial<ClientConfig>) => void;
21
+ export declare const enhancedFetch: <T = any>({ path, method, params, body, }: RequestInit & {
22
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
23
+ path: string;
24
+ params?: Record<string, any> & DjustConfig;
25
+ }) => Promise<{
26
+ data: T;
27
+ headers: Headers;
28
+ status: number;
29
+ }>;
30
+ //# sourceMappingURL=fetch-instance.d.ts.map
@@ -0,0 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IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAqHxD,CAAC"}
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enhancedFetch = exports.updateConfiguration = exports.initialize = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const qs = tslib_1.__importStar(require("query-string"));
6
+ const Sentry = tslib_1.__importStar(require("@sentry/browser"));
7
+ require("isomorphic-fetch");
8
+ const sdk_version_1 = require("./sdk-version");
9
+ let clientConfig = {
10
+ baseUrl: "",
11
+ clientId: "",
12
+ apiKey: "",
13
+ dsn: "https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
14
+ env: "development",
15
+ clientName: "Djust",
16
+ logLevels: ["log", "info", "warn", "error"],
17
+ };
18
+ const initialize = (initConfig) => {
19
+ clientConfig = {
20
+ ...initConfig,
21
+ };
22
+ if (clientConfig.dsn) {
23
+ Sentry.init({
24
+ dsn: clientConfig.dsn ||
25
+ "https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
26
+ environment: `${clientConfig.clientName}-${clientConfig.env}`,
27
+ release: `${sdk_version_1.SDK_VERSION || "unknown"}`,
28
+ integrations: [
29
+ Sentry.browserTracingIntegration(),
30
+ Sentry.replayIntegration(),
31
+ Sentry.httpClientIntegration(),
32
+ Sentry.breadcrumbsIntegration({
33
+ console: true,
34
+ dom: true,
35
+ fetch: true,
36
+ history: true,
37
+ xhr: true,
38
+ }),
39
+ Sentry.browserApiErrorsIntegration({
40
+ setTimeout: true,
41
+ setInterval: true,
42
+ requestAnimationFrame: true,
43
+ XMLHttpRequest: true,
44
+ eventTarget: true,
45
+ }),
46
+ ],
47
+ tracesSampleRate: 1.0,
48
+ replaysSessionSampleRate: 0.1,
49
+ replaysOnErrorSampleRate: 1.0,
50
+ profilesSampleRate: 1.0,
51
+ sendDefaultPii: true,
52
+ });
53
+ if (clientConfig.logLevels?.includes("info")) {
54
+ console.info(`[Djust SDK] Sentry initialized in ${clientConfig.clientName || "unknown"} environment: ${clientConfig.env || "unknown"}.`);
55
+ }
56
+ }
57
+ };
58
+ exports.initialize = initialize;
59
+ const updateConfiguration = (newConfig) => {
60
+ clientConfig = { ...clientConfig, ...newConfig };
61
+ };
62
+ exports.updateConfiguration = updateConfiguration;
63
+ const isClientInitialized = (config) => "apiKey" in config && "clientId" in config;
64
+ const serializeParams = (params, useRepeat) => {
65
+ if (useRepeat) {
66
+ return Object.keys(params)
67
+ .filter((key) => params[key] !== undefined && params[key] !== null)
68
+ .map((key) => Array.isArray(params[key])
69
+ ? params[key]
70
+ .filter((val) => val !== undefined && val !== null)
71
+ .map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`)
72
+ .join("&")
73
+ : `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
74
+ .filter(Boolean)
75
+ .join("&");
76
+ }
77
+ // Use "bracket" format for arrays by default (e.g., logisticStatus[]=VALUE1&logisticStatus[]=VALUE2)
78
+ return qs.stringify(params, { arrayFormat: "bracket", skipNull: true });
79
+ };
80
+ const isTokenValid = (token) => {
81
+ if (!token)
82
+ return false;
83
+ try {
84
+ const payload = JSON.parse(atob(token.split(".")[1]));
85
+ const now = Math.floor(Date.now() / 1000);
86
+ return payload.exp && payload.exp > now;
87
+ }
88
+ catch {
89
+ return false;
90
+ }
91
+ };
92
+ const enhancedFetch = async ({ path, method, params = {}, body, }) => {
93
+ if (!isClientInitialized(clientConfig)) {
94
+ const error = new Error("[Djust SDK] SDK not initialized.");
95
+ Sentry.captureException(error, {
96
+ tags: { env: clientConfig.env },
97
+ });
98
+ throw error;
99
+ }
100
+ const { clientId, apiKey, accessToken, locale, headers } = clientConfig;
101
+ const requestHeaders = new Headers({
102
+ "dj-client": clientId,
103
+ "dj-api-key": apiKey,
104
+ "Content-Type": "application/json",
105
+ });
106
+ if (isTokenValid(accessToken)) {
107
+ requestHeaders.append("Authorization", `Bearer ${accessToken}`);
108
+ }
109
+ if (locale)
110
+ requestHeaders.append("locale", locale);
111
+ // Use provided params or fallback to clientConfig defaults
112
+ const customerAccountId = params.customerAccountId ?? clientConfig.customerAccountId;
113
+ const storeId = params.storeId ?? clientConfig.storeId;
114
+ const storeViewId = params.storeViewId ?? clientConfig.storeViewId;
115
+ // Add headers dynamically if they exist
116
+ if (customerAccountId)
117
+ requestHeaders.append("customer-account-id", customerAccountId);
118
+ if (storeId)
119
+ requestHeaders.append("dj-store", storeId);
120
+ if (storeViewId)
121
+ requestHeaders.append("dj-store-view", storeViewId);
122
+ if (headers) {
123
+ headers.forEach((value, key) => requestHeaders.append(key, value));
124
+ }
125
+ let fullPath = `${clientConfig.baseUrl}${path}`;
126
+ // Use repeat format for search endpoints and customer-accounts/orders endpoint
127
+ const useRepeatFormat = path.includes("search") || path.includes("/customer-accounts/orders");
128
+ if (params) {
129
+ const urlParams = serializeParams(params, useRepeatFormat);
130
+ fullPath += `?${urlParams}`;
131
+ }
132
+ try {
133
+ const response = await fetch(fullPath, {
134
+ method,
135
+ headers: requestHeaders,
136
+ body: body ? body : undefined,
137
+ });
138
+ const { status, headers } = response;
139
+ if (!response.ok) {
140
+ const errorMessage = await response.text();
141
+ const error = new Error(`[API] Error ${response.status}: ${errorMessage}`);
142
+ Sentry.captureException(error, {
143
+ extra: {
144
+ url: fullPath,
145
+ method,
146
+ response: response,
147
+ errorMessage: errorMessage,
148
+ status: response.status,
149
+ env: clientConfig.env,
150
+ headers: (() => {
151
+ const headersObj = {};
152
+ requestHeaders.forEach((value, key) => {
153
+ headersObj[key] = value;
154
+ });
155
+ return headersObj;
156
+ })(),
157
+ body: body ? body : null,
158
+ params,
159
+ },
160
+ });
161
+ throw error;
162
+ }
163
+ const isJsonResponse = headers
164
+ .get("content-type")
165
+ ?.includes("application/json");
166
+ // Always read raw text; parse only if JSON
167
+ const responseText = await response.text();
168
+ let data;
169
+ if (isJsonResponse && responseText) {
170
+ data = JSON.parse(responseText);
171
+ // Check if response data contains new accessToken and update configuration
172
+ if (data && data?.token?.accessToken) {
173
+ (0, exports.updateConfiguration)({
174
+ accessToken: data?.token?.accessToken,
175
+ });
176
+ }
177
+ }
178
+ else {
179
+ // Non-JSON responses should return raw text
180
+ data = responseText;
181
+ }
182
+ return { data: data, headers, status };
183
+ }
184
+ catch (error) {
185
+ Sentry.captureException(error, { tags: { env: clientConfig.env } });
186
+ if (error instanceof Error) {
187
+ throw Error(error.message);
188
+ }
189
+ else {
190
+ throw new Error(`[Djust SDK] Unknown error occurred`);
191
+ }
192
+ }
193
+ };
194
+ exports.enhancedFetch = enhancedFetch;
195
+ //# sourceMappingURL=fetch-instance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-instance.js","sourceRoot":"","sources":["../../src/settings/fetch-instance.ts"],"names":[],"mappings":";;;;AAAA,yDAAmC;AACnC,gEAA0C;AAE1C,4BAA0B;AAE1B,+CAA4C;AAmB5C,IAAI,YAAY,GAAiB;IAC/B,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,EAAE;IACV,GAAG,EAAE,wFAAwF;IAC7F,GAAG,EAAE,aAAa;IAClB,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;CAC5C,CAAC;AAEK,MAAM,UAAU,GAAG,CAAC,UAAwB,EAAE,EAAE;IACrD,YAAY,GAAG;QACb,GAAG,UAAU;KACd,CAAC;IAEF,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC;YACV,GAAG,EACD,YAAY,CAAC,GAAG;gBAChB,wFAAwF;YAC1F,WAAW,EAAE,GAAG,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,GAAG,EAAE;YAC7D,OAAO,EAAE,GAAG,yBAAW,IAAI,SAAS,EAAE;YACtC,YAAY,EAAE;gBACZ,MAAM,CAAC,yBAAyB,EAAE;gBAClC,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AAC;QAED,OAAO,EAAE,IAAI,EAAE,IAAS,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAC9C,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpE,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,MAAM,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AA9HW,QAAA,aAAa,iBA8HxB"}
@@ -0,0 +1,3 @@
1
+ /** Auto-generated by scripts/sync-sdk-version.js — do not edit */
2
+ export declare const SDK_VERSION = "3.0.0-beta.22";
3
+ //# sourceMappingURL=sdk-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk-version.d.ts","sourceRoot":"","sources":["../../src/settings/sdk-version.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,WAAW,kBAAkB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDK_VERSION = void 0;
4
+ /** Auto-generated by scripts/sync-sdk-version.js — do not edit */
5
+ exports.SDK_VERSION = "3.0.0-beta.22";
6
+ //# sourceMappingURL=sdk-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk-version.js","sourceRoot":"","sources":["../../src/settings/sdk-version.ts"],"names":[],"mappings":";;;AAAA,kEAAkE;AACrD,QAAA,WAAW,GAAG,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djust-b2b/djust-front-sdk",
3
- "version": "3.0.0-beta.20",
3
+ "version": "3.0.0-beta.22",
4
4
  "description": "DJUST Front SDK - Universal TypeScript SDK for DJUST B2B API. SSR-safe, type-safe, production-ready.",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -10,6 +10,15 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.mjs",
12
12
  "require": "./dist/index.cjs"
13
+ },
14
+ "./package.json": "./package.json",
15
+ "./lib/*": "./lib/*"
16
+ },
17
+ "typesVersions": {
18
+ "*": {
19
+ "lib/*": [
20
+ "lib/*"
21
+ ]
13
22
  }
14
23
  },
15
24
  "sideEffects": false,
@@ -19,7 +28,11 @@
19
28
  "test:run": "vitest run",
20
29
  "coverage": "vitest run --coverage",
21
30
  "clean": "rm -rf lib dist",
22
- "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:types && npm run build:bundle",
31
+ "sync-version": "node scripts/sync-sdk-version.js",
32
+ "build:lib": "tsc --project tsconfig.lib.json",
33
+ "verify-legacy-imports": "node scripts/verify-legacy-imports.js",
34
+ "verify-starter-surface": "node scripts/verify-starter-surface.js",
35
+ "build": "npm run clean && npm run sync-version && npm run build:lib && npm run verify-legacy-imports && npm run build:cjs && npm run build:esm && npm run build:types && npm run build:bundle && npm run verify-starter-surface",
23
36
  "build:cjs": "tsc --project tsconfig.json --outDir dist/cjs",
24
37
  "build:esm": "tsc --project tsconfig.esm.json --outDir dist/esm",
25
38
  "build:types": "tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --outDir dist",
@@ -72,7 +85,8 @@
72
85
  "vitest": "3.0.9"
73
86
  },
74
87
  "files": [
75
- "dist"
88
+ "dist",
89
+ "lib"
76
90
  ],
77
91
  "dependencies": {
78
92
  "@sentry/browser": "^9.2.0",