@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,409 @@
1
+ "use strict";
2
+ /**
3
+ * DJUST SDK Performance Utilities
4
+ * Production-grade performance optimizations for the SDK.
5
+ *
6
+ * Features:
7
+ * - Request deduplication (prevents duplicate concurrent requests)
8
+ * - Response caching with TTL
9
+ * - Connection keep-alive management
10
+ * - Request batching
11
+ * - Compression support
12
+ *
13
+ * @author DJUST Engineering Team
14
+ * @since 2.17.0
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.PerformanceMonitor = exports.RequestBatcher = exports.ResponseCache = exports.RequestDeduplicator = void 0;
18
+ exports.createPooledFetchOptions = createPooledFetchOptions;
19
+ exports.isCompressed = isCompressed;
20
+ exports.getCompressionRatio = getCompressionRatio;
21
+ exports.getDeduplicator = getDeduplicator;
22
+ exports.getCache = getCache;
23
+ exports.getMonitor = getMonitor;
24
+ exports.resetPerformanceUtils = resetPerformanceUtils;
25
+ /**
26
+ * Request deduplicator - prevents duplicate concurrent requests to the same endpoint.
27
+ * If a request is already in-flight, returns the same promise instead of making a new request.
28
+ */
29
+ class RequestDeduplicator {
30
+ constructor(maxAgeMs = 100) {
31
+ this.pendingRequests = new Map();
32
+ this.maxAge = maxAgeMs;
33
+ }
34
+ /**
35
+ * Creates a unique key for the request
36
+ */
37
+ createKey(method, url, body) {
38
+ return `${method}:${url}:${body || ""}`;
39
+ }
40
+ /**
41
+ * Executes a request with deduplication
42
+ */
43
+ async execute(key, requestFn) {
44
+ const now = Date.now();
45
+ const pending = this.pendingRequests.get(key);
46
+ // Return existing promise if request is still in-flight and recent
47
+ if (pending && now - pending.timestamp < this.maxAge) {
48
+ return pending.promise;
49
+ }
50
+ // Create new request
51
+ const promise = requestFn().finally(() => {
52
+ // Clean up after request completes
53
+ setTimeout(() => {
54
+ const current = this.pendingRequests.get(key);
55
+ if (current?.promise === promise) {
56
+ this.pendingRequests.delete(key);
57
+ }
58
+ }, 10);
59
+ });
60
+ this.pendingRequests.set(key, { promise, timestamp: now });
61
+ return promise;
62
+ }
63
+ /**
64
+ * Clears all pending requests
65
+ */
66
+ clear() {
67
+ this.pendingRequests.clear();
68
+ }
69
+ /**
70
+ * Gets the number of pending requests
71
+ */
72
+ get size() {
73
+ return this.pendingRequests.size;
74
+ }
75
+ }
76
+ exports.RequestDeduplicator = RequestDeduplicator;
77
+ /**
78
+ * LRU Response Cache with TTL support.
79
+ * Supports ETag-based validation and stale-while-revalidate pattern.
80
+ */
81
+ class ResponseCache {
82
+ constructor(options = {}) {
83
+ this.cache = new Map();
84
+ // Cache statistics
85
+ this.hits = 0;
86
+ this.misses = 0;
87
+ this.maxSize = options.maxSize ?? 100;
88
+ this.defaultTTL = options.defaultTTL ?? 60000;
89
+ this.staleWhileRevalidate = options.staleWhileRevalidate ?? true;
90
+ }
91
+ /**
92
+ * Gets a cached response
93
+ */
94
+ get(key) {
95
+ const entry = this.cache.get(key);
96
+ if (!entry) {
97
+ this.misses++;
98
+ return null;
99
+ }
100
+ const age = Date.now() - entry.timestamp;
101
+ const isStale = age > this.defaultTTL;
102
+ if (isStale && !this.staleWhileRevalidate) {
103
+ this.cache.delete(key);
104
+ this.misses++;
105
+ return null;
106
+ }
107
+ // Move to end (most recently used)
108
+ this.cache.delete(key);
109
+ this.cache.set(key, entry);
110
+ this.hits++;
111
+ return { data: entry.data, stale: isStale };
112
+ }
113
+ /**
114
+ * Sets a cached response
115
+ */
116
+ set(key, data, etag, headers) {
117
+ // Evict oldest entry if at capacity
118
+ if (this.cache.size >= this.maxSize && !this.cache.has(key)) {
119
+ const firstKey = this.cache.keys().next().value;
120
+ if (firstKey !== undefined) {
121
+ this.cache.delete(firstKey);
122
+ }
123
+ }
124
+ this.cache.set(key, {
125
+ data,
126
+ timestamp: Date.now(),
127
+ etag,
128
+ headers,
129
+ });
130
+ }
131
+ /**
132
+ * Gets ETag for a cached entry
133
+ */
134
+ getETag(key) {
135
+ return this.cache.get(key)?.etag;
136
+ }
137
+ /**
138
+ * Invalidates a cache entry
139
+ */
140
+ invalidate(key) {
141
+ return this.cache.delete(key);
142
+ }
143
+ /**
144
+ * Invalidates entries matching a pattern
145
+ */
146
+ invalidatePattern(pattern) {
147
+ let count = 0;
148
+ for (const key of this.cache.keys()) {
149
+ if (pattern.test(key)) {
150
+ this.cache.delete(key);
151
+ count++;
152
+ }
153
+ }
154
+ return count;
155
+ }
156
+ /**
157
+ * Clears all cached entries
158
+ */
159
+ clear() {
160
+ this.cache.clear();
161
+ this.hits = 0;
162
+ this.misses = 0;
163
+ }
164
+ /**
165
+ * Gets cache statistics
166
+ */
167
+ getStats() {
168
+ const total = this.hits + this.misses;
169
+ return {
170
+ size: this.cache.size,
171
+ hits: this.hits,
172
+ misses: this.misses,
173
+ hitRate: total > 0 ? this.hits / total : 0,
174
+ };
175
+ }
176
+ }
177
+ exports.ResponseCache = ResponseCache;
178
+ /**
179
+ * Request batcher for combining multiple requests into a single batch request.
180
+ * Useful for endpoints that support bulk operations.
181
+ */
182
+ class RequestBatcher {
183
+ constructor(config) {
184
+ this.queue = [];
185
+ this.timer = null;
186
+ this.maxSize = config.maxSize ?? 20;
187
+ this.maxWaitMs = config.maxWaitMs ?? 10;
188
+ this.executeBatch = config.executeBatch;
189
+ }
190
+ /**
191
+ * Adds a request to the batch queue
192
+ */
193
+ add(params) {
194
+ return new Promise((resolve, reject) => {
195
+ this.queue.push({ resolve, reject, params });
196
+ if (this.queue.length >= this.maxSize) {
197
+ this.flush();
198
+ }
199
+ else if (!this.timer) {
200
+ this.timer = setTimeout(() => this.flush(), this.maxWaitMs);
201
+ }
202
+ });
203
+ }
204
+ /**
205
+ * Flushes the current batch
206
+ */
207
+ async flush() {
208
+ if (this.timer) {
209
+ clearTimeout(this.timer);
210
+ this.timer = null;
211
+ }
212
+ if (this.queue.length === 0)
213
+ return;
214
+ const batch = this.queue.splice(0, this.maxSize);
215
+ const params = batch.map((b) => b.params);
216
+ try {
217
+ const results = await this.executeBatch(params);
218
+ batch.forEach((request, index) => {
219
+ if (results[index] !== undefined) {
220
+ request.resolve(results[index]);
221
+ }
222
+ else {
223
+ request.reject(new Error("No result for batch item"));
224
+ }
225
+ });
226
+ }
227
+ catch (error) {
228
+ batch.forEach((request) => {
229
+ request.reject(error);
230
+ });
231
+ }
232
+ }
233
+ /**
234
+ * Gets the current queue size
235
+ */
236
+ get queueSize() {
237
+ return this.queue.length;
238
+ }
239
+ }
240
+ exports.RequestBatcher = RequestBatcher;
241
+ /**
242
+ * Performance monitor for tracking SDK metrics.
243
+ */
244
+ class PerformanceMonitor {
245
+ constructor(maxMetrics = 1000, windowMs = 60000) {
246
+ this.metrics = [];
247
+ this.errors = 0;
248
+ this.cacheHits = 0;
249
+ this.maxMetrics = maxMetrics;
250
+ this.windowMs = windowMs;
251
+ }
252
+ /**
253
+ * Records a request metric
254
+ */
255
+ record(metric) {
256
+ this.metrics.push({ ...metric, timestamp: Date.now() });
257
+ if (metric.cached) {
258
+ this.cacheHits++;
259
+ }
260
+ if (metric.status >= 400) {
261
+ this.errors++;
262
+ }
263
+ // Prune old metrics
264
+ if (this.metrics.length > this.maxMetrics) {
265
+ this.metrics = this.metrics.slice(-this.maxMetrics);
266
+ }
267
+ }
268
+ /**
269
+ * Gets performance report
270
+ */
271
+ getReport() {
272
+ const now = Date.now();
273
+ const recentMetrics = this.metrics.filter((m) => now - m.timestamp < this.windowMs);
274
+ if (recentMetrics.length === 0) {
275
+ return {
276
+ totalRequests: 0,
277
+ averageDurationMs: 0,
278
+ p50DurationMs: 0,
279
+ p95DurationMs: 0,
280
+ p99DurationMs: 0,
281
+ cacheHitRate: 0,
282
+ errorRate: 0,
283
+ requestsPerSecond: 0,
284
+ slowestEndpoints: [],
285
+ };
286
+ }
287
+ const durations = recentMetrics
288
+ .map((m) => m.durationMs)
289
+ .sort((a, b) => a - b);
290
+ const totalDuration = durations.reduce((sum, d) => sum + d, 0);
291
+ // Calculate percentiles
292
+ const p50Index = Math.floor(durations.length * 0.5);
293
+ const p95Index = Math.floor(durations.length * 0.95);
294
+ const p99Index = Math.floor(durations.length * 0.99);
295
+ // Group by endpoint for slowest analysis
296
+ const endpointStats = new Map();
297
+ recentMetrics.forEach((m) => {
298
+ const key = `${m.method} ${m.url.split("?")[0]}`;
299
+ const existing = endpointStats.get(key) || { total: 0, count: 0 };
300
+ existing.total += m.durationMs;
301
+ existing.count++;
302
+ endpointStats.set(key, existing);
303
+ });
304
+ const slowestEndpoints = Array.from(endpointStats.entries())
305
+ .map(([endpoint, stats]) => ({
306
+ endpoint,
307
+ avgDurationMs: Math.round(stats.total / stats.count),
308
+ }))
309
+ .sort((a, b) => b.avgDurationMs - a.avgDurationMs)
310
+ .slice(0, 5);
311
+ const cachedCount = recentMetrics.filter((m) => m.cached).length;
312
+ const errorCount = recentMetrics.filter((m) => m.status >= 400).length;
313
+ const timeSpanMs = Math.max(now - recentMetrics[0].timestamp, 1000);
314
+ return {
315
+ totalRequests: recentMetrics.length,
316
+ averageDurationMs: Math.round(totalDuration / recentMetrics.length),
317
+ p50DurationMs: durations[p50Index] || 0,
318
+ p95DurationMs: durations[p95Index] || 0,
319
+ p99DurationMs: durations[p99Index] || 0,
320
+ cacheHitRate: cachedCount / recentMetrics.length,
321
+ errorRate: errorCount / recentMetrics.length,
322
+ requestsPerSecond: (recentMetrics.length / timeSpanMs) * 1000,
323
+ slowestEndpoints,
324
+ };
325
+ }
326
+ /**
327
+ * Clears all metrics
328
+ */
329
+ clear() {
330
+ this.metrics = [];
331
+ this.errors = 0;
332
+ this.cacheHits = 0;
333
+ }
334
+ }
335
+ exports.PerformanceMonitor = PerformanceMonitor;
336
+ /**
337
+ * Creates fetch options optimized for connection pooling (Node.js)
338
+ */
339
+ function createPooledFetchOptions(config = {}) {
340
+ const keepAliveTimeout = config.keepAliveTimeout ?? 30000;
341
+ // Note: In Node.js, you would use an HTTP agent here
342
+ // This is a placeholder that works in both browser and Node.js
343
+ return {
344
+ // @ts-ignore - Node.js specific option
345
+ keepalive: true,
346
+ headers: {
347
+ Connection: "keep-alive",
348
+ "Keep-Alive": `timeout=${Math.floor(keepAliveTimeout / 1000)}`,
349
+ },
350
+ };
351
+ }
352
+ // ============================================================================
353
+ // COMPRESSION UTILITIES
354
+ // ============================================================================
355
+ /**
356
+ * Checks if response is compressed
357
+ */
358
+ function isCompressed(headers) {
359
+ const encoding = headers.get("content-encoding");
360
+ return encoding === "gzip" || encoding === "br" || encoding === "deflate";
361
+ }
362
+ /**
363
+ * Gets compression ratio from response headers
364
+ */
365
+ function getCompressionRatio(headers) {
366
+ const originalSize = headers.get("x-original-size");
367
+ const compressedSize = headers.get("content-length");
368
+ if (originalSize && compressedSize) {
369
+ return parseInt(compressedSize) / parseInt(originalSize);
370
+ }
371
+ return null;
372
+ }
373
+ // ============================================================================
374
+ // EXPORTS
375
+ // ============================================================================
376
+ // Singleton instances for convenience
377
+ let _deduplicator = null;
378
+ let _cache = null;
379
+ let _monitor = null;
380
+ function getDeduplicator() {
381
+ if (!_deduplicator) {
382
+ _deduplicator = new RequestDeduplicator();
383
+ }
384
+ return _deduplicator;
385
+ }
386
+ function getCache(options) {
387
+ if (!_cache) {
388
+ _cache = new ResponseCache(options);
389
+ }
390
+ return _cache;
391
+ }
392
+ function getMonitor() {
393
+ if (!_monitor) {
394
+ _monitor = new PerformanceMonitor();
395
+ }
396
+ return _monitor;
397
+ }
398
+ /**
399
+ * Resets all performance singletons (useful for testing)
400
+ */
401
+ function resetPerformanceUtils() {
402
+ _deduplicator?.clear();
403
+ _cache?.clear();
404
+ _monitor?.clear();
405
+ _deduplicator = null;
406
+ _cache = null;
407
+ _monitor = null;
408
+ }
409
+ //# sourceMappingURL=performance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance.js","sourceRoot":"","sources":["../../src/client/performance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AA6cH,4DAaC;AASD,oCAGC;AAKD,kDAQC;AAWD,0CAKC;AAED,4BAKC;AAED,gCAKC;AAKD,sDAOC;AAlhBD;;;GAGG;AACH,MAAa,mBAAmB;IAI9B,YAAY,WAAmB,GAAG;QAH1B,oBAAe,GAAG,IAAI,GAAG,EAAmC,CAAC;QAInE,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,MAAc,EAAE,GAAW,EAAE,IAAa;QAClD,OAAO,GAAG,MAAM,IAAI,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CAAI,GAAW,EAAE,SAA2B;QACvD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE9C,mEAAmE;QACnE,IAAI,OAAO,IAAI,GAAG,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YACrD,OAAO,OAAO,CAAC,OAAqB,CAAC;QACvC,CAAC;QAED,qBAAqB;QACrB,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;YACvC,mCAAmC;YACnC,UAAU,CAAC,GAAG,EAAE;gBACd,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBAC9C,IAAI,OAAO,EAAE,OAAO,KAAK,OAAO,EAAE,CAAC;oBACjC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC,EAAE,EAAE,CAA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