@unchainedshop/api 3.1.11 → 4.0.0-rc.2

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 (690) hide show
  1. package/lib/context.d.ts +2 -2
  2. package/lib/context.d.ts.map +1 -1
  3. package/lib/context.js +1 -1
  4. package/lib/context.js.map +1 -1
  5. package/lib/createGraphQLServer.d.ts +2 -2
  6. package/lib/createGraphQLServer.d.ts.map +1 -1
  7. package/lib/errors.d.ts +2 -0
  8. package/lib/errors.d.ts.map +1 -1
  9. package/lib/errors.js +2 -0
  10. package/lib/errors.js.map +1 -1
  11. package/lib/express/createERCMetadataMiddleware.d.ts.map +1 -1
  12. package/lib/express/createERCMetadataMiddleware.js +9 -5
  13. package/lib/express/createERCMetadataMiddleware.js.map +1 -1
  14. package/lib/express/createMCPMiddleware.d.ts +8 -0
  15. package/lib/express/createMCPMiddleware.d.ts.map +1 -0
  16. package/lib/express/createMCPMiddleware.js +46 -0
  17. package/lib/express/createMCPMiddleware.js.map +1 -0
  18. package/lib/express/index.d.ts.map +1 -1
  19. package/lib/express/index.js +0 -2
  20. package/lib/express/index.js.map +1 -1
  21. package/lib/express/mcpHandler.d.ts.map +1 -0
  22. package/lib/express/mcpHandler.js +68 -0
  23. package/lib/express/mcpHandler.js.map +1 -0
  24. package/lib/fastify/ercMetadataHandler.d.ts.map +1 -1
  25. package/lib/fastify/ercMetadataHandler.js +9 -5
  26. package/lib/fastify/ercMetadataHandler.js.map +1 -1
  27. package/lib/fastify/index copy.d.ts.map +1 -0
  28. package/lib/fastify/index copy.js +157 -0
  29. package/lib/fastify/index copy.js.map +1 -0
  30. package/lib/fastify/index.d.ts.map +1 -1
  31. package/lib/fastify/index.js +0 -3
  32. package/lib/fastify/index.js.map +1 -1
  33. package/lib/fastify/mcpHandler.d.ts +8 -0
  34. package/lib/fastify/mcpHandler.d.ts.map +1 -0
  35. package/lib/fastify/mcpHandler.js +46 -0
  36. package/lib/fastify/mcpHandler.js.map +1 -0
  37. package/lib/loaders/assortmentLinkLoader.d.ts +12 -0
  38. package/lib/loaders/assortmentLinkLoader.d.ts.map +1 -0
  39. package/lib/loaders/assortmentLinkLoader.js +23 -0
  40. package/lib/loaders/assortmentLinkLoader.js.map +1 -0
  41. package/lib/loaders/assortmentLinksLoader.d.ts +14 -0
  42. package/lib/loaders/assortmentLinksLoader.d.ts.map +1 -0
  43. package/lib/loaders/assortmentLinksLoader.js +38 -0
  44. package/lib/loaders/assortmentLinksLoader.js.map +1 -0
  45. package/lib/loaders/assortmentLoader.d.ts +10 -0
  46. package/lib/loaders/assortmentLoader.d.ts.map +1 -0
  47. package/lib/loaders/assortmentLoader.js +15 -0
  48. package/lib/loaders/assortmentLoader.js.map +1 -0
  49. package/lib/loaders/assortmentMediaTextLoader.d.ts +12 -0
  50. package/lib/loaders/assortmentMediaTextLoader.d.ts.map +1 -0
  51. package/lib/loaders/assortmentMediaTextLoader.js +15 -0
  52. package/lib/loaders/assortmentMediaTextLoader.js.map +1 -0
  53. package/lib/loaders/assortmentMediasLoader.d.ts +10 -0
  54. package/lib/loaders/assortmentMediasLoader.d.ts.map +1 -0
  55. package/lib/loaders/assortmentMediasLoader.js +18 -0
  56. package/lib/loaders/assortmentMediasLoader.js.map +1 -0
  57. package/lib/loaders/assortmentProductLoader.d.ts +12 -0
  58. package/lib/loaders/assortmentProductLoader.d.ts.map +1 -0
  59. package/lib/loaders/assortmentProductLoader.js +14 -0
  60. package/lib/loaders/assortmentProductLoader.js.map +1 -0
  61. package/lib/loaders/assortmentProductsLoader.d.ts +10 -0
  62. package/lib/loaders/assortmentProductsLoader.d.ts.map +1 -0
  63. package/lib/loaders/assortmentProductsLoader.js +18 -0
  64. package/lib/loaders/assortmentProductsLoader.js.map +1 -0
  65. package/lib/loaders/assortmentTextLoader.d.ts +12 -0
  66. package/lib/loaders/assortmentTextLoader.d.ts.map +1 -0
  67. package/lib/loaders/assortmentTextLoader.js +15 -0
  68. package/lib/loaders/assortmentTextLoader.js.map +1 -0
  69. package/lib/loaders/buildTextMap.d.ts +2 -2
  70. package/lib/loaders/buildTextMap.d.ts.map +1 -1
  71. package/lib/loaders/countryLoader.d.ts +10 -0
  72. package/lib/loaders/countryLoader.d.ts.map +1 -0
  73. package/lib/loaders/countryLoader.js +14 -0
  74. package/lib/loaders/countryLoader.js.map +1 -0
  75. package/lib/loaders/currencyLoader.d.ts +10 -0
  76. package/lib/loaders/currencyLoader.d.ts.map +1 -0
  77. package/lib/loaders/currencyLoader.js +14 -0
  78. package/lib/loaders/currencyLoader.js.map +1 -0
  79. package/lib/loaders/deliveryProviderLoader.d.ts +10 -0
  80. package/lib/loaders/deliveryProviderLoader.d.ts.map +1 -0
  81. package/lib/loaders/deliveryProviderLoader.js +13 -0
  82. package/lib/loaders/deliveryProviderLoader.js.map +1 -0
  83. package/lib/loaders/fileLoader.d.ts +10 -0
  84. package/lib/loaders/fileLoader.d.ts.map +1 -0
  85. package/lib/loaders/fileLoader.js +13 -0
  86. package/lib/loaders/fileLoader.js.map +1 -0
  87. package/lib/loaders/filterLoader.d.ts +10 -0
  88. package/lib/loaders/filterLoader.d.ts.map +1 -0
  89. package/lib/loaders/filterLoader.js +14 -0
  90. package/lib/loaders/filterLoader.js.map +1 -0
  91. package/lib/loaders/filterTextLoader.d.ts +14 -0
  92. package/lib/loaders/filterTextLoader.d.ts.map +1 -0
  93. package/lib/loaders/filterTextLoader.js +15 -0
  94. package/lib/loaders/filterTextLoader.js.map +1 -0
  95. package/lib/loaders/index.d.ts +79 -49
  96. package/lib/loaders/index.d.ts.map +1 -1
  97. package/lib/loaders/index.js +47 -268
  98. package/lib/loaders/index.js.map +1 -1
  99. package/lib/loaders/languageLoader.d.ts +10 -0
  100. package/lib/loaders/languageLoader.d.ts.map +1 -0
  101. package/lib/loaders/languageLoader.js +14 -0
  102. package/lib/loaders/languageLoader.js.map +1 -0
  103. package/lib/loaders/orderLoader.d.ts +10 -0
  104. package/lib/loaders/orderLoader.d.ts.map +1 -0
  105. package/lib/loaders/orderLoader.js +16 -0
  106. package/lib/loaders/orderLoader.js.map +1 -0
  107. package/lib/loaders/paymentProviderLoader.d.ts +10 -0
  108. package/lib/loaders/paymentProviderLoader.d.ts.map +1 -0
  109. package/lib/loaders/paymentProviderLoader.js +13 -0
  110. package/lib/loaders/paymentProviderLoader.js.map +1 -0
  111. package/lib/loaders/productLoader.d.ts +10 -0
  112. package/lib/loaders/productLoader.d.ts.map +1 -0
  113. package/lib/loaders/productLoader.js +16 -0
  114. package/lib/loaders/productLoader.js.map +1 -0
  115. package/lib/loaders/productLoaderBySKU.d.ts +10 -0
  116. package/lib/loaders/productLoaderBySKU.d.ts.map +1 -0
  117. package/lib/loaders/productLoaderBySKU.js +16 -0
  118. package/lib/loaders/productLoaderBySKU.js.map +1 -0
  119. package/lib/loaders/productMediaTextLoader.d.ts +12 -0
  120. package/lib/loaders/productMediaTextLoader.d.ts.map +1 -0
  121. package/lib/loaders/productMediaTextLoader.js +15 -0
  122. package/lib/loaders/productMediaTextLoader.js.map +1 -0
  123. package/lib/loaders/productMediasLoader.d.ts +10 -0
  124. package/lib/loaders/productMediasLoader.d.ts.map +1 -0
  125. package/lib/loaders/productMediasLoader.js +18 -0
  126. package/lib/loaders/productMediasLoader.js.map +1 -0
  127. package/lib/loaders/productTextLoader.d.ts +12 -0
  128. package/lib/loaders/productTextLoader.d.ts.map +1 -0
  129. package/lib/loaders/productTextLoader.js +15 -0
  130. package/lib/loaders/productTextLoader.js.map +1 -0
  131. package/lib/loaders/userLoader.d.ts +10 -0
  132. package/lib/loaders/userLoader.d.ts.map +1 -0
  133. package/lib/loaders/userLoader.js +17 -0
  134. package/lib/loaders/userLoader.js.map +1 -0
  135. package/lib/loaders/utils.d.ts +7 -0
  136. package/lib/loaders/utils.d.ts.map +1 -0
  137. package/lib/loaders/utils.js +29 -0
  138. package/lib/loaders/utils.js.map +1 -0
  139. package/lib/locale-context.d.ts +3 -3
  140. package/lib/locale-context.d.ts.map +1 -1
  141. package/lib/locale-context.js +9 -10
  142. package/lib/locale-context.js.map +1 -1
  143. package/lib/mcp/index.d.ts +95 -0
  144. package/lib/mcp/index.d.ts.map +1 -0
  145. package/lib/mcp/index.js +138 -0
  146. package/lib/mcp/index.js.map +1 -0
  147. package/lib/mcp/server.d.ts +4 -0
  148. package/lib/mcp/server.d.ts.map +1 -0
  149. package/lib/mcp/server.js +60 -0
  150. package/lib/mcp/server.js.map +1 -0
  151. package/lib/mcp/types.d.ts +28 -0
  152. package/lib/mcp/types.d.ts.map +1 -0
  153. package/lib/mcp/types.js +2 -0
  154. package/lib/mcp/types.js.map +1 -0
  155. package/lib/middleware/accountLockout.d.ts.map +1 -0
  156. package/lib/middleware/accountLockout.js +84 -0
  157. package/lib/middleware/accountLockout.js.map +1 -0
  158. package/lib/middleware/rateLimiter.d.ts.map +1 -0
  159. package/lib/middleware/rateLimiter.js +91 -0
  160. package/lib/middleware/rateLimiter.js.map +1 -0
  161. package/lib/plugins/inputValidation.d.ts.map +1 -0
  162. package/lib/plugins/inputValidation.js +95 -0
  163. package/lib/plugins/inputValidation.js.map +1 -0
  164. package/lib/resolvers/mutations/accounts/createUser.d.ts.map +1 -1
  165. package/lib/resolvers/mutations/accounts/createUser.js +4 -5
  166. package/lib/resolvers/mutations/accounts/createUser.js.map +1 -1
  167. package/lib/resolvers/mutations/accounts/impersonate.js +1 -1
  168. package/lib/resolvers/mutations/accounts/impersonate.js.map +1 -1
  169. package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts.map +1 -1
  170. package/lib/resolvers/mutations/accounts/loginAsGuest.js +4 -5
  171. package/lib/resolvers/mutations/accounts/loginAsGuest.js.map +1 -1
  172. package/lib/resolvers/mutations/accounts/loginWithPassword.js +3 -3
  173. package/lib/resolvers/mutations/accounts/loginWithPassword.js.map +1 -1
  174. package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js +3 -3
  175. package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js.map +1 -1
  176. package/lib/resolvers/mutations/accounts/resetPassword.js +3 -3
  177. package/lib/resolvers/mutations/accounts/resetPassword.js.map +1 -1
  178. package/lib/resolvers/mutations/accounts/stopImpersonation.js +1 -1
  179. package/lib/resolvers/mutations/accounts/stopImpersonation.js.map +1 -1
  180. package/lib/resolvers/mutations/accounts/verifyEmail.js +3 -3
  181. package/lib/resolvers/mutations/accounts/verifyEmail.js.map +1 -1
  182. package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts +2 -2
  183. package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts.map +1 -1
  184. package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.js.map +1 -1
  185. package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts +2 -2
  186. package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts.map +1 -1
  187. package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.js.map +1 -1
  188. package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts +2 -2
  189. package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts.map +1 -1
  190. package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.js.map +1 -1
  191. package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts +2 -2
  192. package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts.map +1 -1
  193. package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.js.map +1 -1
  194. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +1 -1
  195. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts.map +1 -1
  196. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.js.map +1 -1
  197. package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts +1 -1
  198. package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts.map +1 -1
  199. package/lib/resolvers/mutations/assortments/updateAssortmentTexts.js.map +1 -1
  200. package/lib/resolvers/mutations/enrollments/createEnrollment.js +3 -3
  201. package/lib/resolvers/mutations/enrollments/createEnrollment.js.map +1 -1
  202. package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts +2 -2
  203. package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts.map +1 -1
  204. package/lib/resolvers/mutations/filters/createFilter.d.ts.map +1 -1
  205. package/lib/resolvers/mutations/filters/createFilter.js +2 -6
  206. package/lib/resolvers/mutations/filters/createFilter.js.map +1 -1
  207. package/lib/resolvers/mutations/filters/updateFilterTexts.d.ts +2 -2
  208. package/lib/resolvers/mutations/filters/updateFilterTexts.d.ts.map +1 -1
  209. package/lib/resolvers/mutations/orders/addCartDiscount.js +1 -1
  210. package/lib/resolvers/mutations/orders/addCartDiscount.js.map +1 -1
  211. package/lib/resolvers/mutations/orders/addCartProduct.js +1 -1
  212. package/lib/resolvers/mutations/orders/addCartProduct.js.map +1 -1
  213. package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +2 -2
  214. package/lib/resolvers/mutations/orders/addCartQuotation.d.ts.map +1 -1
  215. package/lib/resolvers/mutations/orders/addCartQuotation.js +1 -1
  216. package/lib/resolvers/mutations/orders/addCartQuotation.js.map +1 -1
  217. package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts +4 -4
  218. package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts.map +1 -1
  219. package/lib/resolvers/mutations/orders/addMultipleCartProducts.js +1 -1
  220. package/lib/resolvers/mutations/orders/addMultipleCartProducts.js.map +1 -1
  221. package/lib/resolvers/mutations/orders/checkoutCart.js +1 -1
  222. package/lib/resolvers/mutations/orders/checkoutCart.js.map +1 -1
  223. package/lib/resolvers/mutations/orders/createCart.js +1 -1
  224. package/lib/resolvers/mutations/orders/createCart.js.map +1 -1
  225. package/lib/resolvers/mutations/orders/emptyCart.js +1 -1
  226. package/lib/resolvers/mutations/orders/emptyCart.js.map +1 -1
  227. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js +1 -1
  228. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js.map +1 -1
  229. package/lib/resolvers/mutations/orders/updateCart.js +1 -1
  230. package/lib/resolvers/mutations/orders/updateCart.js.map +1 -1
  231. package/lib/resolvers/mutations/orders/updateCartItem.d.ts +2 -2
  232. package/lib/resolvers/mutations/orders/updateCartItem.d.ts.map +1 -1
  233. package/lib/resolvers/mutations/products/addProductAssignment.d.ts +1 -1
  234. package/lib/resolvers/mutations/products/addProductAssignment.d.ts.map +1 -1
  235. package/lib/resolvers/mutations/products/addProductAssignment.js +35 -2
  236. package/lib/resolvers/mutations/products/addProductAssignment.js.map +1 -1
  237. package/lib/resolvers/mutations/products/createProductVariation.d.ts +2 -2
  238. package/lib/resolvers/mutations/products/createProductVariation.d.ts.map +1 -1
  239. package/lib/resolvers/mutations/products/createProductVariation.js.map +1 -1
  240. package/lib/resolvers/mutations/products/removeProductAssignment.d.ts +1 -1
  241. package/lib/resolvers/mutations/products/removeProductAssignment.d.ts.map +1 -1
  242. package/lib/resolvers/mutations/products/removeProductAssignment.js.map +1 -1
  243. package/lib/resolvers/mutations/products/reorderProductMedia.d.ts +2 -2
  244. package/lib/resolvers/mutations/products/reorderProductMedia.d.ts.map +1 -1
  245. package/lib/resolvers/mutations/products/reorderProductMedia.js.map +1 -1
  246. package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts +1 -1
  247. package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts.map +1 -1
  248. package/lib/resolvers/mutations/products/updateProductMediaTexts.js.map +1 -1
  249. package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts +1 -1
  250. package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts.map +1 -1
  251. package/lib/resolvers/mutations/quotations/requestQuotation.d.ts +2 -2
  252. package/lib/resolvers/mutations/quotations/requestQuotation.d.ts.map +1 -1
  253. package/lib/resolvers/mutations/quotations/requestQuotation.js +3 -3
  254. package/lib/resolvers/mutations/quotations/requestQuotation.js.map +1 -1
  255. package/lib/resolvers/mutations/users/heartbeat.d.ts +1 -1
  256. package/lib/resolvers/mutations/users/heartbeat.d.ts.map +1 -1
  257. package/lib/resolvers/mutations/users/heartbeat.js +3 -3
  258. package/lib/resolvers/mutations/users/heartbeat.js.map +1 -1
  259. package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
  260. package/lib/resolvers/mutations/users/setRoles.d.ts.map +1 -1
  261. package/lib/resolvers/mutations/users/setRoles.js.map +1 -1
  262. package/lib/resolvers/mutations/users/setUserTags.d.ts +1 -1
  263. package/lib/resolvers/mutations/users/setUserTags.d.ts.map +1 -1
  264. package/lib/resolvers/mutations/users/setUserTags.js.map +1 -1
  265. package/lib/resolvers/mutations/warehousing/invalidateToken.js +1 -3
  266. package/lib/resolvers/mutations/warehousing/invalidateToken.js.map +1 -1
  267. package/lib/resolvers/mutations/worker/allocateWork.d.ts +1 -1
  268. package/lib/resolvers/mutations/worker/allocateWork.d.ts.map +1 -1
  269. package/lib/resolvers/mutations/worker/allocateWork.js.map +1 -1
  270. package/lib/resolvers/queries/assortments/assortments.d.ts +1 -1
  271. package/lib/resolvers/queries/assortments/assortments.d.ts.map +1 -1
  272. package/lib/resolvers/queries/countries/countries.d.ts +1 -1
  273. package/lib/resolvers/queries/countries/countries.d.ts.map +1 -1
  274. package/lib/resolvers/queries/countries/countries.js.map +1 -1
  275. package/lib/resolvers/queries/currencies/currencies.d.ts +1 -1
  276. package/lib/resolvers/queries/currencies/currencies.d.ts.map +1 -1
  277. package/lib/resolvers/queries/currencies/currencies.js.map +1 -1
  278. package/lib/resolvers/queries/enrollments/enrollments.d.ts +1 -1
  279. package/lib/resolvers/queries/enrollments/enrollments.d.ts.map +1 -1
  280. package/lib/resolvers/queries/filters/filters.d.ts +1 -1
  281. package/lib/resolvers/queries/filters/filters.d.ts.map +1 -1
  282. package/lib/resolvers/queries/filters/searchAssortments.js +2 -2
  283. package/lib/resolvers/queries/filters/searchAssortments.js.map +1 -1
  284. package/lib/resolvers/queries/filters/searchProducts.js +3 -3
  285. package/lib/resolvers/queries/filters/searchProducts.js.map +1 -1
  286. package/lib/resolvers/queries/languages/languages.d.ts +1 -1
  287. package/lib/resolvers/queries/languages/languages.d.ts.map +1 -1
  288. package/lib/resolvers/queries/languages/languages.js.map +1 -1
  289. package/lib/resolvers/queries/orders/orders.d.ts +1 -1
  290. package/lib/resolvers/queries/orders/orders.d.ts.map +1 -1
  291. package/lib/resolvers/queries/orders/orders.js.map +1 -1
  292. package/lib/resolvers/queries/products/productReviews.d.ts +1 -1
  293. package/lib/resolvers/queries/products/productReviews.d.ts.map +1 -1
  294. package/lib/resolvers/queries/products/products.d.ts +1 -1
  295. package/lib/resolvers/queries/products/products.d.ts.map +1 -1
  296. package/lib/resolvers/queries/quotations/quotations.d.ts +1 -1
  297. package/lib/resolvers/queries/quotations/quotations.d.ts.map +1 -1
  298. package/lib/resolvers/queries/quotations/quotations.js.map +1 -1
  299. package/lib/resolvers/queries/users/impersonator.d.ts.map +1 -1
  300. package/lib/resolvers/queries/users/impersonator.js +1 -1
  301. package/lib/resolvers/queries/users/impersonator.js.map +1 -1
  302. package/lib/resolvers/queries/users/user.d.ts.map +1 -1
  303. package/lib/resolvers/queries/users/user.js.map +1 -1
  304. package/lib/resolvers/queries/users/users.d.ts +1 -1
  305. package/lib/resolvers/queries/users/users.d.ts.map +1 -1
  306. package/lib/resolvers/queries/worker/workQueue.d.ts +3 -3
  307. package/lib/resolvers/queries/worker/workQueue.d.ts.map +1 -1
  308. package/lib/resolvers/type/assortment/assortment-filter-types.d.ts +4 -8
  309. package/lib/resolvers/type/assortment/assortment-filter-types.d.ts.map +1 -1
  310. package/lib/resolvers/type/assortment/assortment-filter-types.js +4 -6
  311. package/lib/resolvers/type/assortment/assortment-filter-types.js.map +1 -1
  312. package/lib/resolvers/type/assortment/assortment-link-types.d.ts +2 -2
  313. package/lib/resolvers/type/assortment/assortment-link-types.d.ts.map +1 -1
  314. package/lib/resolvers/type/assortment/assortment-media-types.js +2 -2
  315. package/lib/resolvers/type/assortment/assortment-media-types.js.map +1 -1
  316. package/lib/resolvers/type/assortment/assortment-path-link-types.d.ts +2 -2
  317. package/lib/resolvers/type/assortment/assortment-path-link-types.d.ts.map +1 -1
  318. package/lib/resolvers/type/assortment/assortment-path-link-types.js +2 -2
  319. package/lib/resolvers/type/assortment/assortment-path-link-types.js.map +1 -1
  320. package/lib/resolvers/type/assortment/assortment-product-types.d.ts +2 -2
  321. package/lib/resolvers/type/assortment/assortment-product-types.d.ts.map +1 -1
  322. package/lib/resolvers/type/assortment/assortment-types.d.ts +2 -2
  323. package/lib/resolvers/type/assortment/assortment-types.d.ts.map +1 -1
  324. package/lib/resolvers/type/assortment/assortment-types.js +5 -5
  325. package/lib/resolvers/type/assortment/assortment-types.js.map +1 -1
  326. package/lib/resolvers/type/bookmark-types.d.ts.map +1 -1
  327. package/lib/resolvers/type/bookmark-types.js +2 -3
  328. package/lib/resolvers/type/bookmark-types.js.map +1 -1
  329. package/lib/resolvers/type/country-types.d.ts +1 -1
  330. package/lib/resolvers/type/country-types.d.ts.map +1 -1
  331. package/lib/resolvers/type/country-types.js +4 -7
  332. package/lib/resolvers/type/country-types.js.map +1 -1
  333. package/lib/resolvers/type/delivery-provider-types.d.ts +10 -13
  334. package/lib/resolvers/type/delivery-provider-types.d.ts.map +1 -1
  335. package/lib/resolvers/type/delivery-provider-types.js +8 -9
  336. package/lib/resolvers/type/delivery-provider-types.js.map +1 -1
  337. package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts +2 -6
  338. package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts.map +1 -1
  339. package/lib/resolvers/type/enrollment/enrollment-delivery-types.js +4 -3
  340. package/lib/resolvers/type/enrollment/enrollment-delivery-types.js.map +1 -1
  341. package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts +2 -6
  342. package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts.map +1 -1
  343. package/lib/resolvers/type/enrollment/enrollment-payment-types.js +2 -3
  344. package/lib/resolvers/type/enrollment/enrollment-payment-types.js.map +1 -1
  345. package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts +2 -6
  346. package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts.map +1 -1
  347. package/lib/resolvers/type/enrollment/enrollment-period-types.js +2 -3
  348. package/lib/resolvers/type/enrollment/enrollment-period-types.js.map +1 -1
  349. package/lib/resolvers/type/enrollment/enrollment-plan-tyes.d.ts +2 -6
  350. package/lib/resolvers/type/enrollment/enrollment-plan-tyes.d.ts.map +1 -1
  351. package/lib/resolvers/type/enrollment/enrollment-plan-tyes.js +2 -3
  352. package/lib/resolvers/type/enrollment/enrollment-plan-tyes.js.map +1 -1
  353. package/lib/resolvers/type/enrollment/enrollment-types.d.ts +15 -14
  354. package/lib/resolvers/type/enrollment/enrollment-types.d.ts.map +1 -1
  355. package/lib/resolvers/type/enrollment/enrollment-types.js +3 -6
  356. package/lib/resolvers/type/enrollment/enrollment-types.js.map +1 -1
  357. package/lib/resolvers/type/filter/filter-option-types.d.ts +6 -9
  358. package/lib/resolvers/type/filter/filter-option-types.d.ts.map +1 -1
  359. package/lib/resolvers/type/filter/filter-option-types.js +2 -3
  360. package/lib/resolvers/type/filter/filter-option-types.js.map +1 -1
  361. package/lib/resolvers/type/filter/filter-types.d.ts +16 -8
  362. package/lib/resolvers/type/filter/filter-types.d.ts.map +1 -1
  363. package/lib/resolvers/type/filter/filter-types.js +2 -3
  364. package/lib/resolvers/type/filter/filter-types.js.map +1 -1
  365. package/lib/resolvers/type/filter/loaded-filter-types.d.ts +2 -3
  366. package/lib/resolvers/type/filter/loaded-filter-types.d.ts.map +1 -1
  367. package/lib/resolvers/type/index.d.ts +273 -261
  368. package/lib/resolvers/type/index.d.ts.map +1 -1
  369. package/lib/resolvers/type/login-method-response-types.js +1 -1
  370. package/lib/resolvers/type/login-method-response-types.js.map +1 -1
  371. package/lib/resolvers/type/order/order-delivery-discount-types.d.ts +1 -1
  372. package/lib/resolvers/type/order/order-delivery-discount-types.d.ts.map +1 -1
  373. package/lib/resolvers/type/order/order-delivery-discount-types.js +1 -2
  374. package/lib/resolvers/type/order/order-delivery-discount-types.js.map +1 -1
  375. package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +13 -12
  376. package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts.map +1 -1
  377. package/lib/resolvers/type/order/order-delivery-pickup-types.js +10 -14
  378. package/lib/resolvers/type/order/order-delivery-pickup-types.js.map +1 -1
  379. package/lib/resolvers/type/order/order-delivery-shipping-types.d.ts +12 -12
  380. package/lib/resolvers/type/order/order-delivery-shipping-types.d.ts.map +1 -1
  381. package/lib/resolvers/type/order/order-delivery-shipping-types.js +7 -10
  382. package/lib/resolvers/type/order/order-delivery-shipping-types.js.map +1 -1
  383. package/lib/resolvers/type/order/order-delivery-types.d.ts +1 -1
  384. package/lib/resolvers/type/order/order-delivery-types.d.ts.map +1 -1
  385. package/lib/resolvers/type/order/order-delivery-types.js +2 -3
  386. package/lib/resolvers/type/order/order-delivery-types.js.map +1 -1
  387. package/lib/resolvers/type/order/order-discount-types.d.ts +11 -13
  388. package/lib/resolvers/type/order/order-discount-types.d.ts.map +1 -1
  389. package/lib/resolvers/type/order/order-discount-types.js +9 -16
  390. package/lib/resolvers/type/order/order-discount-types.js.map +1 -1
  391. package/lib/resolvers/type/order/order-global-discount-types.d.ts +1 -1
  392. package/lib/resolvers/type/order/order-global-discount-types.d.ts.map +1 -1
  393. package/lib/resolvers/type/order/order-global-discount-types.js +1 -2
  394. package/lib/resolvers/type/order/order-global-discount-types.js.map +1 -1
  395. package/lib/resolvers/type/order/order-item-discount-types.d.ts +1 -1
  396. package/lib/resolvers/type/order/order-item-discount-types.d.ts.map +1 -1
  397. package/lib/resolvers/type/order/order-item-discount-types.js +1 -2
  398. package/lib/resolvers/type/order/order-item-discount-types.js.map +1 -1
  399. package/lib/resolvers/type/order/order-item-types.d.ts +5 -5
  400. package/lib/resolvers/type/order/order-item-types.d.ts.map +1 -1
  401. package/lib/resolvers/type/order/order-item-types.js +14 -17
  402. package/lib/resolvers/type/order/order-item-types.js.map +1 -1
  403. package/lib/resolvers/type/order/order-payment-card-types.d.ts +11 -10
  404. package/lib/resolvers/type/order/order-payment-card-types.d.ts.map +1 -1
  405. package/lib/resolvers/type/order/order-payment-card-types.js +6 -9
  406. package/lib/resolvers/type/order/order-payment-card-types.js.map +1 -1
  407. package/lib/resolvers/type/order/order-payment-discount-types.d.ts +1 -1
  408. package/lib/resolvers/type/order/order-payment-discount-types.d.ts.map +1 -1
  409. package/lib/resolvers/type/order/order-payment-discount-types.js +2 -4
  410. package/lib/resolvers/type/order/order-payment-discount-types.js.map +1 -1
  411. package/lib/resolvers/type/order/order-payment-generic-types.d.ts +11 -10
  412. package/lib/resolvers/type/order/order-payment-generic-types.d.ts.map +1 -1
  413. package/lib/resolvers/type/order/order-payment-generic-types.js +6 -9
  414. package/lib/resolvers/type/order/order-payment-generic-types.js.map +1 -1
  415. package/lib/resolvers/type/order/order-payment-invoice-types.d.ts +11 -10
  416. package/lib/resolvers/type/order/order-payment-invoice-types.d.ts.map +1 -1
  417. package/lib/resolvers/type/order/order-payment-invoice-types.js +6 -9
  418. package/lib/resolvers/type/order/order-payment-invoice-types.js.map +1 -1
  419. package/lib/resolvers/type/order/order-payment-types.d.ts +1 -1
  420. package/lib/resolvers/type/order/order-payment-types.d.ts.map +1 -1
  421. package/lib/resolvers/type/order/order-payment-types.js +2 -3
  422. package/lib/resolvers/type/order/order-payment-types.js.map +1 -1
  423. package/lib/resolvers/type/order/order-types.d.ts +6 -6
  424. package/lib/resolvers/type/order/order-types.d.ts.map +1 -1
  425. package/lib/resolvers/type/order/order-types.js +7 -15
  426. package/lib/resolvers/type/order/order-types.js.map +1 -1
  427. package/lib/resolvers/type/payment/payment-credentials-types.d.ts.map +1 -1
  428. package/lib/resolvers/type/payment/payment-credentials-types.js +6 -9
  429. package/lib/resolvers/type/payment/payment-credentials-types.js.map +1 -1
  430. package/lib/resolvers/type/payment/payment-provider-types.d.ts +2 -2
  431. package/lib/resolvers/type/payment/payment-provider-types.d.ts.map +1 -1
  432. package/lib/resolvers/type/payment/payment-provider-types.js +8 -9
  433. package/lib/resolvers/type/payment/payment-provider-types.js.map +1 -1
  434. package/lib/resolvers/type/price-types.d.ts +3 -4
  435. package/lib/resolvers/type/price-types.d.ts.map +1 -1
  436. package/lib/resolvers/type/price-types.js +2 -2
  437. package/lib/resolvers/type/price-types.js.map +1 -1
  438. package/lib/resolvers/type/product/product-assortment-path-types.d.ts +1 -1
  439. package/lib/resolvers/type/product/product-assortment-path-types.d.ts.map +1 -1
  440. package/lib/resolvers/type/product/product-bundle-types.d.ts +10 -10
  441. package/lib/resolvers/type/product/product-bundle-types.d.ts.map +1 -1
  442. package/lib/resolvers/type/product/product-catalog-price-types.d.ts.map +1 -1
  443. package/lib/resolvers/type/product/product-catalog-price-types.js +4 -6
  444. package/lib/resolvers/type/product/product-catalog-price-types.js.map +1 -1
  445. package/lib/resolvers/type/product/product-configurable-types.d.ts +20 -20
  446. package/lib/resolvers/type/product/product-configurable-types.d.ts.map +1 -1
  447. package/lib/resolvers/type/product/product-configurable-types.js +10 -12
  448. package/lib/resolvers/type/product/product-configurable-types.js.map +1 -1
  449. package/lib/resolvers/type/product/product-discount.d.ts +1 -1
  450. package/lib/resolvers/type/product/product-discount.js +1 -1
  451. package/lib/resolvers/type/product/product-discount.js.map +1 -1
  452. package/lib/resolvers/type/product/product-media-types.js +2 -2
  453. package/lib/resolvers/type/product/product-media-types.js.map +1 -1
  454. package/lib/resolvers/type/product/product-plan-types.d.ts +18 -18
  455. package/lib/resolvers/type/product/product-plan-types.d.ts.map +1 -1
  456. package/lib/resolvers/type/product/product-plan-types.js +16 -16
  457. package/lib/resolvers/type/product/product-plan-types.js.map +1 -1
  458. package/lib/resolvers/type/product/product-review-types.d.ts +1 -1
  459. package/lib/resolvers/type/product/product-review-types.d.ts.map +1 -1
  460. package/lib/resolvers/type/product/product-review-types.js +2 -3
  461. package/lib/resolvers/type/product/product-review-types.js.map +1 -1
  462. package/lib/resolvers/type/product/product-simple-types.d.ts +22 -22
  463. package/lib/resolvers/type/product/product-simple-types.d.ts.map +1 -1
  464. package/lib/resolvers/type/product/product-simple-types.js +3 -11
  465. package/lib/resolvers/type/product/product-simple-types.js.map +1 -1
  466. package/lib/resolvers/type/product/product-tokenized-types.d.ts +20 -20
  467. package/lib/resolvers/type/product/product-tokenized-types.d.ts.map +1 -1
  468. package/lib/resolvers/type/product/product-tokenized-types.js +1 -5
  469. package/lib/resolvers/type/product/product-tokenized-types.js.map +1 -1
  470. package/lib/resolvers/type/product/product-types.d.ts +9 -9
  471. package/lib/resolvers/type/product/product-types.d.ts.map +1 -1
  472. package/lib/resolvers/type/product/product-types.js +2 -5
  473. package/lib/resolvers/type/product/product-types.js.map +1 -1
  474. package/lib/resolvers/type/product/product-variation-assignment-types.d.ts +2 -2
  475. package/lib/resolvers/type/product/product-variation-assignment-types.d.ts.map +1 -1
  476. package/lib/resolvers/type/product/product-variation-assignment-types.js +1 -1
  477. package/lib/resolvers/type/product/product-variation-assignment-types.js.map +1 -1
  478. package/lib/resolvers/type/product/product-variation-assignment-vector.js +2 -2
  479. package/lib/resolvers/type/product/product-variation-assignment-vector.js.map +1 -1
  480. package/lib/resolvers/type/product/product-variation-option-types.js +3 -3
  481. package/lib/resolvers/type/product/product-variation-option-types.js.map +1 -1
  482. package/lib/resolvers/type/product/product-variation-types.d.ts +2 -2
  483. package/lib/resolvers/type/product/product-variation-types.d.ts.map +1 -1
  484. package/lib/resolvers/type/product/product-variation-types.js +3 -3
  485. package/lib/resolvers/type/product/product-variation-types.js.map +1 -1
  486. package/lib/resolvers/type/product-search-result-types.d.ts +5 -6
  487. package/lib/resolvers/type/product-search-result-types.d.ts.map +1 -1
  488. package/lib/resolvers/type/quotation-types.d.ts +8 -15
  489. package/lib/resolvers/type/quotation-types.d.ts.map +1 -1
  490. package/lib/resolvers/type/quotation-types.js +3 -6
  491. package/lib/resolvers/type/quotation-types.js.map +1 -1
  492. package/lib/resolvers/type/shop-types.d.ts +1 -1
  493. package/lib/resolvers/type/shop-types.d.ts.map +1 -1
  494. package/lib/resolvers/type/shop-types.js +4 -6
  495. package/lib/resolvers/type/shop-types.js.map +1 -1
  496. package/lib/resolvers/type/token-types.d.ts +2 -2
  497. package/lib/resolvers/type/token-types.d.ts.map +1 -1
  498. package/lib/resolvers/type/token-types.js +12 -26
  499. package/lib/resolvers/type/token-types.js.map +1 -1
  500. package/lib/resolvers/type/user-types.d.ts +22 -22
  501. package/lib/resolvers/type/user-types.d.ts.map +1 -1
  502. package/lib/resolvers/type/user-types.js +5 -16
  503. package/lib/resolvers/type/user-types.js.map +1 -1
  504. package/lib/resolvers/type/work-types.d.ts.map +1 -1
  505. package/lib/resolvers/type/work-types.js +0 -1
  506. package/lib/resolvers/type/work-types.js.map +1 -1
  507. package/lib/roles/all.d.ts.map +1 -1
  508. package/lib/roles/all.js +0 -1
  509. package/lib/roles/all.js.map +1 -1
  510. package/lib/schema/types/assortment.js +5 -5
  511. package/lib/schema/types/country.js +1 -1
  512. package/lib/schema/types/delivery.d.ts.map +1 -1
  513. package/lib/schema/types/delivery.js +6 -2
  514. package/lib/schema/types/delivery.js.map +1 -1
  515. package/lib/schema/types/filter.js +3 -3
  516. package/lib/schema/types/payment.d.ts.map +1 -1
  517. package/lib/schema/types/payment.js +6 -2
  518. package/lib/schema/types/payment.js.map +1 -1
  519. package/lib/schema/types/price.js +1 -1
  520. package/lib/schema/types/product/bundle-product.js +1 -1
  521. package/lib/schema/types/product/configurable-product.js +6 -6
  522. package/lib/schema/types/product/plan-product.js +5 -5
  523. package/lib/schema/types/product/product.js +4 -4
  524. package/lib/schema/types/product/simple-product.js +4 -4
  525. package/lib/schema/types/product/tokenized-product.js +5 -5
  526. package/lib/schema/types/warehousing.js +1 -1
  527. package/lib/utils/inputValidation.d.ts.map +1 -0
  528. package/lib/utils/inputValidation.js +51 -0
  529. package/lib/utils/inputValidation.js.map +1 -0
  530. package/package.json +12 -12
  531. package/src/context.ts +3 -3
  532. package/src/createGraphQLServer.ts +2 -2
  533. package/src/errors.ts +10 -0
  534. package/src/express/createERCMetadataMiddleware.ts +11 -5
  535. package/src/express/index.ts +2 -3
  536. package/src/fastify/ercMetadataHandler.ts +11 -5
  537. package/src/fastify/index.ts +2 -3
  538. package/src/loaders/assortmentLinkLoader.ts +32 -0
  539. package/src/loaders/assortmentLinksLoader.ts +46 -0
  540. package/src/loaders/assortmentLoader.ts +20 -0
  541. package/src/loaders/assortmentMediaTextLoader.ts +26 -0
  542. package/src/loaders/assortmentMediasLoader.ts +21 -0
  543. package/src/loaders/assortmentProductLoader.ts +19 -0
  544. package/src/loaders/assortmentProductsLoader.ts +22 -0
  545. package/src/loaders/assortmentTextLoader.ts +24 -0
  546. package/src/loaders/buildTextMap.ts +1 -1
  547. package/src/loaders/countryLoader.ts +20 -0
  548. package/src/loaders/currencyLoader.ts +20 -0
  549. package/src/loaders/deliveryProviderLoader.ts +19 -0
  550. package/src/loaders/fileLoader.ts +19 -0
  551. package/src/loaders/filterLoader.ts +20 -0
  552. package/src/loaders/filterTextLoader.ts +26 -0
  553. package/src/loaders/index.ts +48 -360
  554. package/src/loaders/languageLoader.ts +20 -0
  555. package/src/loaders/orderLoader.ts +22 -0
  556. package/src/loaders/paymentProviderLoader.ts +19 -0
  557. package/src/loaders/productLoader.ts +22 -0
  558. package/src/loaders/productLoaderBySKU.ts +22 -0
  559. package/src/loaders/productMediaTextLoader.ts +24 -0
  560. package/src/loaders/productMediasLoader.ts +21 -0
  561. package/src/loaders/productTextLoader.ts +22 -0
  562. package/src/loaders/userLoader.ts +23 -0
  563. package/src/loaders/utils.ts +35 -0
  564. package/src/locale-context.ts +16 -22
  565. package/src/resolvers/mutations/accounts/createUser.ts +4 -6
  566. package/src/resolvers/mutations/accounts/impersonate.ts +1 -1
  567. package/src/resolvers/mutations/accounts/loginAsGuest.ts +4 -6
  568. package/src/resolvers/mutations/accounts/loginWithPassword.ts +3 -3
  569. package/src/resolvers/mutations/accounts/loginWithWebAuthn.ts +3 -3
  570. package/src/resolvers/mutations/accounts/resetPassword.ts +3 -3
  571. package/src/resolvers/mutations/accounts/stopImpersonation.ts +1 -1
  572. package/src/resolvers/mutations/accounts/verifyEmail.ts +3 -3
  573. package/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts +1 -1
  574. package/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts +1 -1
  575. package/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts +1 -1
  576. package/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts +1 -1
  577. package/src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts +1 -1
  578. package/src/resolvers/mutations/assortments/updateAssortmentTexts.ts +1 -1
  579. package/src/resolvers/mutations/enrollments/createEnrollment.ts +3 -3
  580. package/src/resolvers/mutations/enrollments/updateEnrollment.ts +2 -2
  581. package/src/resolvers/mutations/filters/createFilter.ts +2 -6
  582. package/src/resolvers/mutations/filters/updateFilterTexts.ts +1 -1
  583. package/src/resolvers/mutations/orders/addCartDiscount.ts +1 -1
  584. package/src/resolvers/mutations/orders/addCartProduct.ts +1 -1
  585. package/src/resolvers/mutations/orders/addCartQuotation.ts +2 -2
  586. package/src/resolvers/mutations/orders/addMultipleCartProducts.ts +4 -4
  587. package/src/resolvers/mutations/orders/checkoutCart.ts +1 -1
  588. package/src/resolvers/mutations/orders/createCart.ts +1 -1
  589. package/src/resolvers/mutations/orders/emptyCart.ts +1 -1
  590. package/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts +1 -1
  591. package/src/resolvers/mutations/orders/updateCart.ts +1 -1
  592. package/src/resolvers/mutations/orders/updateCartItem.ts +1 -1
  593. package/src/resolvers/mutations/products/addProductAssignment.ts +50 -3
  594. package/src/resolvers/mutations/products/createProductVariation.ts +5 -1
  595. package/src/resolvers/mutations/products/removeProductAssignment.ts +1 -1
  596. package/src/resolvers/mutations/products/reorderProductMedia.ts +1 -1
  597. package/src/resolvers/mutations/products/updateProductMediaTexts.ts +1 -1
  598. package/src/resolvers/mutations/products/updateProductVariationTexts.ts +1 -1
  599. package/src/resolvers/mutations/quotations/requestQuotation.ts +4 -4
  600. package/src/resolvers/mutations/users/heartbeat.ts +3 -3
  601. package/src/resolvers/mutations/users/setRoles.ts +1 -1
  602. package/src/resolvers/mutations/users/setUserTags.ts +1 -1
  603. package/src/resolvers/mutations/warehousing/invalidateToken.ts +3 -3
  604. package/src/resolvers/mutations/worker/allocateWork.ts +1 -1
  605. package/src/resolvers/queries/assortments/assortments.ts +1 -1
  606. package/src/resolvers/queries/countries/countries.ts +1 -1
  607. package/src/resolvers/queries/currencies/currencies.ts +1 -1
  608. package/src/resolvers/queries/enrollments/enrollments.ts +1 -1
  609. package/src/resolvers/queries/filters/filters.ts +1 -1
  610. package/src/resolvers/queries/filters/searchAssortments.ts +2 -2
  611. package/src/resolvers/queries/filters/searchProducts.ts +3 -3
  612. package/src/resolvers/queries/languages/languages.ts +1 -1
  613. package/src/resolvers/queries/orders/orders.ts +1 -1
  614. package/src/resolvers/queries/products/productReviews.ts +1 -1
  615. package/src/resolvers/queries/products/products.ts +1 -1
  616. package/src/resolvers/queries/quotations/quotations.ts +1 -1
  617. package/src/resolvers/queries/users/impersonator.ts +2 -1
  618. package/src/resolvers/queries/users/user.ts +1 -0
  619. package/src/resolvers/queries/users/users.ts +1 -1
  620. package/src/resolvers/queries/worker/workQueue.ts +3 -3
  621. package/src/resolvers/type/assortment/assortment-filter-types.ts +6 -16
  622. package/src/resolvers/type/assortment/assortment-link-types.ts +2 -2
  623. package/src/resolvers/type/assortment/assortment-media-types.ts +2 -2
  624. package/src/resolvers/type/assortment/assortment-path-link-types.ts +3 -3
  625. package/src/resolvers/type/assortment/assortment-product-types.ts +2 -2
  626. package/src/resolvers/type/assortment/assortment-types.ts +6 -6
  627. package/src/resolvers/type/bookmark-types.ts +2 -3
  628. package/src/resolvers/type/country-types.ts +5 -8
  629. package/src/resolvers/type/delivery-provider-types.ts +26 -47
  630. package/src/resolvers/type/enrollment/enrollment-delivery-types.ts +5 -11
  631. package/src/resolvers/type/enrollment/enrollment-payment-types.ts +3 -11
  632. package/src/resolvers/type/enrollment/enrollment-period-types.ts +3 -11
  633. package/src/resolvers/type/enrollment/enrollment-plan-tyes.ts +3 -11
  634. package/src/resolvers/type/enrollment/enrollment-types.ts +10 -25
  635. package/src/resolvers/type/filter/filter-option-types.ts +10 -15
  636. package/src/resolvers/type/filter/filter-types.ts +5 -13
  637. package/src/resolvers/type/filter/loaded-filter-types.ts +2 -2
  638. package/src/resolvers/type/login-method-response-types.ts +1 -1
  639. package/src/resolvers/type/order/order-delivery-discount-types.ts +1 -2
  640. package/src/resolvers/type/order/order-delivery-pickup-types.ts +12 -28
  641. package/src/resolvers/type/order/order-delivery-shipping-types.ts +9 -23
  642. package/src/resolvers/type/order/order-delivery-types.ts +2 -3
  643. package/src/resolvers/type/order/order-discount-types.ts +12 -39
  644. package/src/resolvers/type/order/order-global-discount-types.ts +1 -2
  645. package/src/resolvers/type/order/order-item-discount-types.ts +1 -2
  646. package/src/resolvers/type/order/order-item-types.ts +19 -27
  647. package/src/resolvers/type/order/order-payment-card-types.ts +8 -21
  648. package/src/resolvers/type/order/order-payment-discount-types.ts +1 -2
  649. package/src/resolvers/type/order/order-payment-generic-types.ts +8 -20
  650. package/src/resolvers/type/order/order-payment-invoice-types.ts +8 -20
  651. package/src/resolvers/type/order/order-payment-types.ts +2 -3
  652. package/src/resolvers/type/order/order-types.ts +10 -22
  653. package/src/resolvers/type/payment/payment-credentials-types.ts +6 -10
  654. package/src/resolvers/type/payment/payment-provider-types.ts +9 -10
  655. package/src/resolvers/type/price-types.ts +4 -4
  656. package/src/resolvers/type/product/product-assortment-path-types.ts +1 -1
  657. package/src/resolvers/type/product/product-bundle-types.ts +1 -1
  658. package/src/resolvers/type/product/product-catalog-price-types.ts +4 -6
  659. package/src/resolvers/type/product/product-configurable-types.ts +20 -21
  660. package/src/resolvers/type/product/product-discount.ts +1 -1
  661. package/src/resolvers/type/product/product-media-types.ts +2 -2
  662. package/src/resolvers/type/product/product-plan-types.ts +22 -22
  663. package/src/resolvers/type/product/product-review-types.ts +3 -4
  664. package/src/resolvers/type/product/product-simple-types.ts +7 -19
  665. package/src/resolvers/type/product/product-tokenized-types.ts +3 -10
  666. package/src/resolvers/type/product/product-types.ts +10 -13
  667. package/src/resolvers/type/product/product-variation-assignment-types.ts +2 -2
  668. package/src/resolvers/type/product/product-variation-assignment-vector.ts +2 -2
  669. package/src/resolvers/type/product/product-variation-option-types.ts +3 -3
  670. package/src/resolvers/type/product/product-variation-types.ts +5 -5
  671. package/src/resolvers/type/product-search-result-types.ts +5 -5
  672. package/src/resolvers/type/quotation-types.ts +11 -25
  673. package/src/resolvers/type/shop-types.ts +5 -7
  674. package/src/resolvers/type/token-types.ts +15 -32
  675. package/src/resolvers/type/user-types.ts +27 -39
  676. package/src/resolvers/type/work-types.ts +0 -2
  677. package/src/roles/all.ts +0 -1
  678. package/src/schema/types/assortment.ts +5 -5
  679. package/src/schema/types/country.ts +1 -1
  680. package/src/schema/types/delivery.ts +6 -2
  681. package/src/schema/types/filter.ts +3 -3
  682. package/src/schema/types/payment.ts +6 -2
  683. package/src/schema/types/price.ts +1 -1
  684. package/src/schema/types/product/bundle-product.ts +1 -1
  685. package/src/schema/types/product/configurable-product.ts +6 -6
  686. package/src/schema/types/product/plan-product.ts +5 -5
  687. package/src/schema/types/product/product.ts +4 -4
  688. package/src/schema/types/product/simple-product.ts +4 -4
  689. package/src/schema/types/product/tokenized-product.ts +5 -5
  690. package/src/schema/types/warehousing.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"product-assortment-path-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-assortment-path-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAExF,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC;AACpF,MAAM,WAAW,gCAAgC;IAC/C,iBAAiB,EAAE,CACjB,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;KAAE,EACnF,CAAC,EAAE,KAAK,EACR,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,qBAAqB,EAAE,gCAOnC,CAAC"}
1
+ {"version":3,"file":"product-assortment-path-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-assortment-path-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAExF,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC;AACpF,MAAM,WAAW,gCAAgC;IAC/C,iBAAiB,EAAE,CACjB,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,kBAAkB,EAAE,CAAA;KAAE,EAC9E,CAAC,EAAE,KAAK,EACR,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,qBAAqB,EAAE,gCAOnC,CAAC"}
@@ -1,23 +1,23 @@
1
1
  import { ProductBundleItem } from '@unchainedshop/core-products';
2
2
  export declare const BundleProduct: {
3
- bundleItems(product: any): Array<ProductBundleItem>;
3
+ bundleItems(product: any): ProductBundleItem[];
4
4
  __resolveType: (product: import("@unchainedshop/core-products").Product) => string;
5
5
  assortmentPaths(product: import("@unchainedshop/core-products").Product, params: {
6
6
  forceLocale?: string;
7
- }, { modules, loaders }: import("../../../context.js").Context): Promise<Array<{
8
- links: Array<import("@unchainedshop/core-assortments").AssortmentPathLink>;
9
- }>>;
7
+ }, { modules, loaders }: import("../../../context.js").Context): Promise<{
8
+ links: import("@unchainedshop/core-assortments").AssortmentPathLink[];
9
+ }[]>;
10
10
  media(product: import("@unchainedshop/core-products").Product, params: {
11
11
  limit: number;
12
12
  offset: number;
13
- tags?: Array<string>;
14
- }, { loaders, modules }: import("../../../context.js").Context): Promise<Array<import("@unchainedshop/core-products").ProductMedia>>;
13
+ tags?: string[];
14
+ }, { loaders, modules }: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductMedia[]>;
15
15
  reviews(product: import("@unchainedshop/core-products").Product, { limit, offset, sort, queryString, }: {
16
16
  queryString?: string;
17
17
  limit?: number;
18
18
  offset?: number;
19
- sort?: Array<import("@unchainedshop/utils").SortOption>;
20
- }, { modules }: import("../../../context.js").Context): Promise<Array<import("@unchainedshop/core-products").ProductReview>>;
19
+ sort?: import("@unchainedshop/utils").SortOption[];
20
+ }, { modules }: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductReview[]>;
21
21
  reviewsCount(product: import("@unchainedshop/core-products").Product, params: {
22
22
  queryString?: string;
23
23
  }, { modules }: import("../../../context.js").Context): Promise<number>;
@@ -26,10 +26,10 @@ export declare const BundleProduct: {
26
26
  limit: number;
27
27
  offset: number;
28
28
  includeInactive: boolean;
29
- }, { modules }: import("../../../context.js").Context): Promise<Array<typeof product>>;
29
+ }, { modules }: import("../../../context.js").Context): Promise<(typeof product)[]>;
30
30
  status(product: import("@unchainedshop/core-products").Product, _: any, { modules }: import("../../../context.js").Context): import("@unchainedshop/core-products").ProductStatus;
31
31
  texts(product: import("@unchainedshop/core-products").Product, { forceLocale, }: {
32
32
  forceLocale?: string;
33
- }, requestContext: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductText>;
33
+ }, { locale, loaders }: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductText>;
34
34
  };
35
35
  //# sourceMappingURL=product-bundle-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-bundle-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-bundle-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,eAAO,MAAM,aAAa;+BAGF,KAAK,CAAC,iBAAiB,CAAC;;;mBAIsc,CAAC;;;;;;;YAA2qB,CAAC;;;mBAA6iB,CAAC;aAAqB,CAAC;cAAsB,CAAC;YAAoB,CAAC;;;mBAAiW,CAAC;;;oBAAuP,CAAC;;;;;;;mBAA06B,CAAC;;CADvxG,CAAC"}
1
+ {"version":3,"file":"product-bundle-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-bundle-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,eAAO,MAAM,aAAa;+BAGF,iBAAiB,EAAE;;;mBAIgd,CAAC;;;;;;;YAAwoB,CAAC;;;mBAAmiB,CAAC;aAAqB,CAAC;cAAsB,CAAC;YAAoB,CAAC;;;mBAA8T,CAAC;;;oBAAuP,CAAC;;;;;;;mBAAu6B,CAAC;;CADzsG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"product-catalog-price-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-catalog-price-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,MAAM,wBAAwB,CAAC,CAAC,EAAE,CAAC,IAAI,CAC3C,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,OAAO,KACb,CAAC,CAAC;AAEP,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEpD,UAAU,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAErD,OAAO,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,QAAQ,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,mBAAmB,EAAE,8BAejC,CAAC"}
1
+ {"version":3,"file":"product-catalog-price-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-catalog-price-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,MAAM,wBAAwB,CAAC,CAAC,EAAE,CAAC,IAAI,CAC3C,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,OAAO,KACb,CAAC,CAAC;AAEP,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEpD,UAAU,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAErD,OAAO,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,QAAQ,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,mBAAmB,EAAE,8BAajC,CAAC"}
@@ -5,13 +5,11 @@ export const ProductCatalogPrice = {
5
5
  isNetPrice: ({ isNetPrice }) => {
6
6
  return isNetPrice || false;
7
7
  },
8
- country: async ({ countryCode }, _, { modules }) => {
9
- // TODO: use loader
10
- return modules.countries.findCountry({ isoCode: countryCode });
8
+ country: async ({ countryCode }, _, { loaders }) => {
9
+ return loaders.countryLoader.load({ isoCode: countryCode });
11
10
  },
12
- currency: async ({ currencyCode }, _, { modules }) => {
13
- // TODO: use loader
14
- return modules.currencies.findCurrency({ isoCode: currencyCode });
11
+ currency: async ({ currencyCode }, _, { loaders }) => {
12
+ return loaders.currencyLoader.load({ isoCode: currencyCode });
15
13
  },
16
14
  };
17
15
  //# sourceMappingURL=product-catalog-price-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-catalog-price-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-catalog-price-types.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,mBAAmB,GAAmC;IACjE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;QAC3B,OAAO,SAAS,IAAI,KAAK,CAAC;IAC5B,CAAC;IACD,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;QAC7B,OAAO,UAAU,IAAI,KAAK,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACjD,mBAAmB;QACnB,OAAO,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACnD,mBAAmB;QACnB,OAAO,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IACpE,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"product-catalog-price-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-catalog-price-types.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,mBAAmB,GAAmC;IACjE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;QAC3B,OAAO,SAAS,IAAI,KAAK,CAAC;IAC5B,CAAC;IACD,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;QAC7B,OAAO,UAAU,IAAI,KAAK,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACjD,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,QAAQ,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACnD,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IAChE,CAAC;CACF,CAAC"}
@@ -3,48 +3,48 @@ import { Context } from '../../../context.js';
3
3
  export declare const ConfigurableProduct: {
4
4
  assignments(product: ProductType, params: {
5
5
  includeInactive: boolean;
6
- }, { modules }: Context): Promise<Array<{
6
+ }, { modules }: Context): Promise<{
7
7
  assignment: ProductAssignment;
8
8
  product: typeof product;
9
- }>>;
9
+ }[]>;
10
10
  products(product: ProductType, { vectors, includeInactive, }: {
11
- vectors: Array<ProductConfiguration>;
11
+ vectors: ProductConfiguration[];
12
12
  includeInactive: boolean;
13
- }, { modules }: Context): Promise<Array<typeof product>>;
14
- catalogPriceRange(product: ProductType, { quantity, vectors, currency: forcedCurrencyCode, includeInactive, }: {
15
- currency?: string;
13
+ }, { modules }: Context): Promise<(typeof product)[]>;
14
+ catalogPriceRange(product: ProductType, { quantity, vectors, currencyCode, includeInactive, }: {
15
+ currencyCode?: string;
16
16
  includeInactive: boolean;
17
17
  quantity: number;
18
- vectors: Array<ProductConfiguration>;
18
+ vectors: ProductConfiguration[];
19
19
  }, requestContext: Context): Promise<ProductPriceRange>;
20
20
  variations(product: ProductType, { limit, offset, }: {
21
21
  limit: number;
22
22
  offset: number;
23
- }, { modules }: Context): Promise<Array<ProductVariation>>;
24
- simulatedPriceRange(product: ProductType, { currency: forcedCurrencyCode, quantity, useNetPrice, vectors, includeInactive, }: {
25
- currency?: string;
23
+ }, { modules }: Context): Promise<ProductVariation[]>;
24
+ simulatedPriceRange(product: ProductType, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, vectors, includeInactive, }: {
25
+ currencyCode?: string;
26
26
  includeInactive: boolean;
27
27
  quantity?: number;
28
- vectors: Array<ProductConfiguration>;
28
+ vectors: ProductConfiguration[];
29
29
  useNetPrice: boolean;
30
30
  }, requestContext: Context): Promise<ProductPriceRange>;
31
31
  __resolveType: (product: ProductType) => string;
32
32
  assortmentPaths(product: ProductType, params: {
33
33
  forceLocale?: string;
34
- }, { modules, loaders }: Context): Promise<Array<{
35
- links: Array<import("@unchainedshop/core-assortments").AssortmentPathLink>;
36
- }>>;
34
+ }, { modules, loaders }: Context): Promise<{
35
+ links: import("@unchainedshop/core-assortments").AssortmentPathLink[];
36
+ }[]>;
37
37
  media(product: ProductType, params: {
38
38
  limit: number;
39
39
  offset: number;
40
- tags?: Array<string>;
41
- }, { loaders, modules }: Context): Promise<Array<import("@unchainedshop/core-products").ProductMedia>>;
40
+ tags?: string[];
41
+ }, { loaders, modules }: Context): Promise<import("@unchainedshop/core-products").ProductMedia[]>;
42
42
  reviews(product: ProductType, { limit, offset, sort, queryString, }: {
43
43
  queryString?: string;
44
44
  limit?: number;
45
45
  offset?: number;
46
- sort?: Array<import("@unchainedshop/utils").SortOption>;
47
- }, { modules }: Context): Promise<Array<import("@unchainedshop/core-products").ProductReview>>;
46
+ sort?: import("@unchainedshop/utils").SortOption[];
47
+ }, { modules }: Context): Promise<import("@unchainedshop/core-products").ProductReview[]>;
48
48
  reviewsCount(product: ProductType, params: {
49
49
  queryString?: string;
50
50
  }, { modules }: Context): Promise<number>;
@@ -53,10 +53,10 @@ export declare const ConfigurableProduct: {
53
53
  limit: number;
54
54
  offset: number;
55
55
  includeInactive: boolean;
56
- }, { modules }: Context): Promise<Array<typeof product>>;
56
+ }, { modules }: Context): Promise<(typeof product)[]>;
57
57
  status(product: ProductType, _: any, { modules }: Context): import("@unchainedshop/core-products").ProductStatus;
58
58
  texts(product: ProductType, { forceLocale, }: {
59
59
  forceLocale?: string;
60
- }, requestContext: Context): Promise<import("@unchainedshop/core-products").ProductText>;
60
+ }, { locale, loaders }: Context): Promise<import("@unchainedshop/core-products").ProductText>;
61
61
  };
62
62
  //# sourceMappingURL=product-configurable-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-configurable-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-configurable-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,eAAO,MAAM,mBAAmB;yBAInB,WAAW,UACZ;QACN,eAAe,EAAE,OAAO,CAAC;KAC1B,eACY,OAAO,GACnB,OAAO,CACR,KAAK,CAAC;QACJ,UAAU,EAAE,iBAAiB,CAAC;QAC9B,OAAO,EAAE,OAAO,OAAO,CAAC;KACzB,CAAC,CACH;sBAKU,WAAW,iCAIjB;QACD,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACrC,eAAe,EAAE,OAAO,CAAC;KAC1B,eACY,OAAO,GACnB,OAAO,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;+BAOtB,WAAW,yEAMjB;QACD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,OAAO,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;KACtC,kBACe,OAAO,GACtB,OAAO,CAAC,iBAAiB,CAAC;wBAalB,WAAW,sBAIjB;QACD,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,eACY,OAAO,GACnB,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;iCAUxB,WAAW,sFAOjB;QACD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC;KACtB,kBACe,OAAO,GACtB,OAAO,CAAC,iBAAiB,CAAC;;;mBAtED,CAAC;;;;;;;YA0BP,CAAC;;;mBA4BR,CAAC;aACR,CAAC;cAEL,CAAJ;YAAoB,CAAC;;;mBAcW,CAAC;;;oBAQ7B,CAAJ;;;;;;;mBAkCE,CAAD;;CAEF,CAAC"}
1
+ {"version":3,"file":"product-configurable-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-configurable-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,gBA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active,
10
10
  });
11
11
  },
12
- async catalogPriceRange(product, { quantity, vectors, currency: forcedCurrencyCode, includeInactive, }, requestContext) {
13
- const { countryContext, modules } = requestContext;
14
- const currencyCode = forcedCurrencyCode || requestContext.currencyContext;
12
+ async catalogPriceRange(product, { quantity, vectors, currencyCode, includeInactive, }, requestContext) {
13
+ const { countryCode, modules } = requestContext;
15
14
  return modules.products.prices.catalogPriceRange(product, {
16
15
  quantity,
17
16
  vectors,
18
17
  includeInactive,
19
- country: countryContext,
20
- currency: currencyCode,
18
+ countryCode,
19
+ currencyCode,
21
20
  });
22
21
  },
23
22
  async variations(product, { limit = 10, offset = 0, }, { modules }) {
24
- // TODO: use loader?
25
23
  return modules.products.variations.findProductVariations({
26
24
  productId: product._id,
27
25
  limit,
28
26
  offset,
29
27
  });
30
28
  },
31
- async simulatedPriceRange(product, { currency: forcedCurrencyCode, quantity, useNetPrice, vectors, includeInactive, }, requestContext) {
32
- const { countryContext, modules, services } = requestContext;
33
- const currency = forcedCurrencyCode || requestContext.currencyContext;
29
+ async simulatedPriceRange(product, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, vectors, includeInactive, }, requestContext) {
30
+ const { countryCode, modules, services } = requestContext;
31
+ const currencyCode = forcedCurrencyCode || requestContext.currencyCode;
34
32
  const products = await modules.products.proxyProducts(product, vectors, {
35
33
  includeInactive,
36
34
  });
@@ -38,8 +36,8 @@ export const ConfigurableProduct = {
38
36
  const pricingContext = {
39
37
  product: proxyProduct,
40
38
  user: requestContext.user,
41
- country: countryContext,
42
- currency,
39
+ countryCode,
40
+ currencyCode,
43
41
  quantity,
44
42
  };
45
43
  const pricing = await services.products.simulateProductPricing(pricingContext);
@@ -50,7 +48,7 @@ export const ConfigurableProduct = {
50
48
  ...unitPrice,
51
49
  isNetPrice: useNetPrice,
52
50
  isTaxable: pricing.taxSum() > 0,
53
- currencyCode: pricing.currency,
51
+ currencyCode: pricing.currencyCode,
54
52
  };
55
53
  }))).filter(Boolean);
56
54
  if (!filteredPrices.length)
@@ -1 +1 @@
1
- {"version":3,"file":"product-configurable-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-configurable-types.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,OAAO;IAEV,KAAK,CAAC,WAAW,CACf,OAAoB,EACpB,MAEC,EACD,EAAE,OAAO,EAAW;QAOpB,OAAO,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAAoB,EACpB,EACE,OAAO,EACP,eAAe,GAIhB,EACD,EAAE,OAAO,EAAW;QAEpB,OAAO,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE;YACtD,eAAe;SAChB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,OAAoB,EACpB,EACE,QAAQ,EACR,OAAO,EACP,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,GAMhB,EACD,cAAuB;QAEvB,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QACnD,MAAM,YAAY,GAAG,kBAAkB,IAAI,cAAc,CAAC,eAAe,CAAC;QAC1E,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE;YACxD,QAAQ;YACR,OAAO;YACP,eAAe;YACf,OAAO,EAAE,cAAc;YACvB,QAAQ,EAAE,YAAY;SACvB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAAoB,EACpB,EACE,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,CAAC,GAIX,EACD,EAAE,OAAO,EAAW;QAEpB,oBAAoB;QACpB,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,C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,MAAM;YAAE,OAAO,IAAI,CAAC;QAExC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC;YAChE,SAAS,EAAE,OAAO,CAAC,GAAa;YAChC,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC;QAEH,OAAO;YACL,QAAQ;YACR,QAAQ;SACT,CAAC;IACJ,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"product-configurable-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-configurable-types.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,OAAO;IAEV,KAAK,CAAC,WAAW,CACf,OAAoB,EACpB,MAEC,EACD,EAAE,OAAO,EAAW;QAOpB,OAAO,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,OAAoB,EACpB,EACE,OAAO,EACP,eAAe,GAIhB,EACD,EAAE,OAAO,EAAW;QAEpB,OAAO,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE;YACtD,eAAe;SAChB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,OAAoB,EACpB,EACE,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,eAAe,GAMhB,EACD,cAAuB;QAEvB,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QAChD,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE;YACxD,QAAQ;YACR,OAAO;YACP,eAAe;YACf,WAAW;YACX,YAAY;SACb,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAAoB,EACpB,EAC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C,YAAY;aACnC,CAAC;QACJ,CAAC,CAAC,CACH,CACF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAElB,IAAI,CAAC,cAAc,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAExC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC;YAChE,SAAS,EAAE,OAAO,CAAC,GAAa;YAChC,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC;QAEH,OAAO;YACL,QAAQ;YACR,QAAQ;SACT,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -9,7 +9,7 @@ export declare const ProductDiscount: {
9
9
  }>;
10
10
  total(productDiscount: ProductDiscountType): {
11
11
  amount: number;
12
- currency: string;
12
+ currencyCode: string;
13
13
  };
14
14
  };
15
15
  //# sourceMappingURL=product-discount.d.ts.map
@@ -17,7 +17,7 @@ export const ProductDiscount = {
17
17
  if (productDiscount.total) {
18
18
  return {
19
19
  amount: total.amount,
20
- currency: total.currency,
20
+ currencyCode: total.currencyCode,
21
21
  };
22
22
  }
23
23
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"product-discount.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-discount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,KAAK,EAAE,eAAoC,EAAE,EAAE;QACxD,MAAM,SAAS,GAAG,uBAAuB,CAAC,UAAU,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QAClF,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC5B,OAAO;YACL,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,uBAAuB,EAAE,MAAM,SAAS,CAAC,uBAAuB,CAAC,eAAe,CAAC,IAAI,CAAC;YACtF,sBAAsB,EAAE,MAAM,SAAS,CAAC,sBAAsB,EAAE;SACjE,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAoC;QACxC,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC;QAClC,IAAI,eAAe,CAAC,KAAK,EAAE,CAAC;YAC1B,OAAO;gBACL,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"product-discount.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-discount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,KAAK,EAAE,eAAoC,EAAE,EAAE;QACxD,MAAM,SAAS,GAAG,uBAAuB,CAAC,UAAU,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QAClF,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC5B,OAAO;YACL,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,uBAAuB,EAAE,MAAM,SAAS,CAAC,uBAAuB,CAAC,eAAe,CAAC,IAAI,CAAC;YACtF,sBAAsB,EAAE,MAAM,SAAS,CAAC,sBAAsB,EAAE;SACjE,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAoC;QACxC,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC;QAClC,IAAI,eAAe,CAAC,KAAK,EAAE,CAAC;YAC1B,OAAO;gBACL,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,YAAY,EAAE,KAAK,CAAC,YAAY;aACjC,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC"}
@@ -1,9 +1,9 @@
1
1
  export const ProductMedia = {
2
2
  async texts(obj, { forceLocale }, requestContext) {
3
- const { localeContext, loaders } = requestContext;
3
+ const { locale, loaders } = requestContext;
4
4
  return loaders.productMediaTextLoader.load({
5
5
  productMediaId: obj._id,
6
- locale: forceLocale || localeContext.baseName,
6
+ locale: forceLocale ? new Intl.Locale(forceLocale) : locale,
7
7
  });
8
8
  },
9
9
  async file(obj, _, requestContext) {
@@ -1 +1 @@
1
- {"version":3,"file":"product-media-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-media-types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,YAAY,GAA4B;IACnD,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,EAAE,cAAc;QAC9C,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QAClD,OAAO,OAAO,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACzC,cAAc,EAAE,GAAG,CAAC,GAAG;YACvB,MAAM,EAAE,WAAW,IAAI,aAAa,CAAC,QAAQ;SAC9C,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,cAAc;QAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QACnC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;YAC7B,MAAM,EAAE,GAAG,CAAC,OAAO;SACpB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"product-media-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-media-types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,YAAY,GAA4B;IACnD,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,EAAE,cAAc;QAC9C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QAC3C,OAAO,OAAO,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACzC,cAAc,EAAE,GAAG,CAAC,GAAG;YACvB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM;SAC5D,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,cAAc;QAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QACnC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;YAC7B,MAAM,EAAE,GAAG,CAAC,OAAO;SACpB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -1,43 +1,43 @@
1
1
  import { ProductConfiguration, ProductPrice, Product as ProductType } from '@unchainedshop/core-products';
2
2
  import { Context } from '../../../context.js';
3
3
  export declare const PlanProduct: {
4
- catalogPrice(product: ProductType, { quantity, currency: forcedCurrencyCode }: {
4
+ catalogPrice(product: ProductType, { quantity, currencyCode: forcedCurrencyCode }: {
5
5
  quantity?: number;
6
- currency?: string;
6
+ currencyCode?: string;
7
7
  }, requestContext: Context): Promise<ProductPrice>;
8
- simulatedPrice(obj: ProductType, { currency: forcedCurrencyCode, quantity, useNetPrice, configuration, }: {
8
+ simulatedPrice(product: ProductType, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, configuration, }: {
9
9
  quantity?: number;
10
- currency?: string;
10
+ currencyCode?: string;
11
11
  useNetPrice?: boolean;
12
- configuration?: Array<ProductConfiguration>;
12
+ configuration?: ProductConfiguration[];
13
13
  }, requestContext: Context): Promise<ProductPrice>;
14
- leveledCatalogPrices(obj: ProductType, { currency: forcedCurrencyCode }: {
15
- currency?: string;
16
- }, requestContext: Context): Promise<Array<{
14
+ leveledCatalogPrices(product: ProductType, { currencyCode: forcedCurrencyCode }: {
15
+ currencyCode?: string;
16
+ }, requestContext: Context): Promise<{
17
17
  minQuantity: number;
18
18
  maxQuantity: number;
19
19
  price: ProductPrice;
20
- }>>;
20
+ }[]>;
21
21
  salesUnit({ commerce }: ProductType): string;
22
22
  salesQuantityPerUnit({ commerce }: ProductType): string;
23
23
  defaultOrderQuantity({ commerce }: ProductType): number;
24
24
  __resolveType: (product: ProductType) => string;
25
25
  assortmentPaths(product: ProductType, params: {
26
26
  forceLocale?: string;
27
- }, { modules, loaders }: Context): Promise<Array<{
28
- links: Array<import("@unchainedshop/core-assortments").AssortmentPathLink>;
29
- }>>;
27
+ }, { modules, loaders }: Context): Promise<{
28
+ links: import("@unchainedshop/core-assortments").AssortmentPathLink[];
29
+ }[]>;
30
30
  media(product: ProductType, params: {
31
31
  limit: number;
32
32
  offset: number;
33
- tags?: Array<string>;
34
- }, { loaders, modules }: Context): Promise<Array<import("@unchainedshop/core-products").ProductMedia>>;
33
+ tags?: string[];
34
+ }, { loaders, modules }: Context): Promise<import("@unchainedshop/core-products").ProductMedia[]>;
35
35
  reviews(product: ProductType, { limit, offset, sort, queryString, }: {
36
36
  queryString?: string;
37
37
  limit?: number;
38
38
  offset?: number;
39
- sort?: Array<import("@unchainedshop/utils").SortOption>;
40
- }, { modules }: Context): Promise<Array<import("@unchainedshop/core-products").ProductReview>>;
39
+ sort?: import("@unchainedshop/utils").SortOption[];
40
+ }, { modules }: Context): Promise<import("@unchainedshop/core-products").ProductReview[]>;
41
41
  reviewsCount(product: ProductType, params: {
42
42
  queryString?: string;
43
43
  }, { modules }: Context): Promise<number>;
@@ -46,10 +46,10 @@ export declare const PlanProduct: {
46
46
  limit: number;
47
47
  offset: number;
48
48
  includeInactive: boolean;
49
- }, { modules }: Context): Promise<Array<typeof product>>;
49
+ }, { modules }: Context): Promise<(typeof product)[]>;
50
50
  status(product: ProductType, _: any, { modules }: Context): import("@unchainedshop/core-products").ProductStatus;
51
51
  texts(product: ProductType, { forceLocale, }: {
52
52
  forceLocale?: string;
53
- }, requestContext: Context): Promise<import("@unchainedshop/core-products").ProductText>;
53
+ }, { locale, loaders }: Context): Promise<import("@unchainedshop/core-products").ProductText>;
54
54
  };
55
55
  //# sourceMappingURL=product-plan-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-plan-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-plan-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,OAAO,IAAI,WAAW,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,eAAO,MAAM,WAAW;0BAIX,WAAW,8CACwB;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,kBACpE,OAAO,GACtB,OAAO,CAAC,YAAY,CAAC;wBAWjB,WAAW,2EAMb;QACD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,aAAa,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;KAC7C,kBACe,OAAO,GACtB,OAAO,CAAC,YAAY,CAAC;8BA0BjB,WAAW,oCACkB;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,kBACvC,OAAO,GACtB,OAAO,CACR,KAAK,CAAC;QACJ,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,YAAY,CAAC;KACrB,CAAC,CACH;4BAMuB,WAAW,GAAG,MAAM;uCAGT,WAAW,GAAG,MAAM;uCAGpB,WAAW,GAAG,MAAM;;;mBA1DtC,CAAC;;;;;;;YA0BhB,CAAH;;;mBAsB0B,CAAC;aAAqB,CAAC;cAAsB,CAAC;YACvD,CAAC;;;mBAUR,CAAC;;;oBAGoM,CAAC;;;;;;;mBAA06B,CAAC;;CAD3nC,CAAC"}
1
+ {"version":3,"file":"product-plan-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-plan-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,OAAO,IAAI,WAAW,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,eAAO,MAAM,WAAW;0BAIX,WAAW,kDAC4B;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,kBAC5E,OAAO,GACtB,OAAO,CAAC,YAAY,CAAC;4BAWb,WAAW,+EAMjB;QACD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,aAAa,CAAC,EAAE,oBAAoB,EAAE,CAAC;KACxC,kBACe,OAAO,GACtB,OAAO,CAAC,YAAY,CAAC;kCA0Bb,WAAW,wCACkB;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,kBAC/C,OAAO,GACtB,OAAO,CACR;QACE,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,YAAY,CAAC;KACrB,EAAE,CACJ;4BAMuB,WAAW,GAAG,MAAM;uCAGT,WAAW,GAAG,MAAM;uCAGpB,WAAW,GAAG,MAAM;;;mBA1DxC,CAAC;;;;;;;YAyBX,CAAA;;;mBAsB8B,CAAC;aAChC,CAAC;cAAsB,CAAC;YAAoB,CAAC;;;mBASjD,CAAA;;;oBAKmI,CAAC;;;;;;;mBAAu6B,CAAC;;CAD7iC,CAAC"}
@@ -1,23 +1,23 @@
1
1
  import { Product } from './product-types.js';
2
2
  export const PlanProduct = {
3
3
  ...Product,
4
- async catalogPrice(product, { quantity, currency: forcedCurrencyCode }, requestContext) {
5
- const { modules, countryContext } = requestContext;
6
- const currency = forcedCurrencyCode || requestContext.currencyContext;
4
+ async catalogPrice(product, { quantity, currencyCode: forcedCurrencyCode }, requestContext) {
5
+ const { modules, countryCode } = requestContext;
6
+ const currencyCode = forcedCurrencyCode || requestContext.currencyCode;
7
7
  return modules.products.prices.price(product, {
8
- country: countryContext,
9
- currency,
8
+ countryCode,
9
+ currencyCode,
10
10
  quantity,
11
11
  });
12
12
  },
13
- async simulatedPrice(obj, { currency: forcedCurrencyCode, quantity, useNetPrice, configuration, }, requestContext) {
14
- const { countryContext, user, services } = requestContext;
15
- const currency = forcedCurrencyCode || requestContext.currencyContext;
13
+ async simulatedPrice(product, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, configuration, }, requestContext) {
14
+ const { countryCode, user, services } = requestContext;
15
+ const currencyCode = forcedCurrencyCode || requestContext.currencyCode;
16
16
  const pricingContext = {
17
- product: obj,
17
+ product,
18
18
  user,
19
- country: countryContext,
20
- currency,
19
+ countryCode,
20
+ currencyCode,
21
21
  quantity,
22
22
  configuration,
23
23
  };
@@ -29,13 +29,13 @@ export const PlanProduct = {
29
29
  ...unitPrice,
30
30
  isNetPrice: useNetPrice,
31
31
  isTaxable: pricing.taxSum() > 0,
32
- currencyCode: pricing.currency,
32
+ currencyCode: pricing.currencyCode,
33
33
  };
34
34
  },
35
- async leveledCatalogPrices(obj, { currency: forcedCurrencyCode }, requestContext) {
36
- const { countryContext, modules } = requestContext;
37
- const currency = forcedCurrencyCode || requestContext.currencyContext;
38
- return modules.products.prices.catalogPricesLeveled(obj, { currency, country: countryContext });
35
+ async leveledCatalogPrices(product, { currencyCode: forcedCurrencyCode }, requestContext) {
36
+ const { countryCode, modules } = requestContext;
37
+ const currencyCode = forcedCurrencyCode || requestContext.currencyCode;
38
+ return modules.products.prices.catalogPricesLeveled(product, { currencyCode, countryCode });
39
39
  },
40
40
  salesUnit({ commerce }) {
41
41
  return commerce?.salesUnit;
@@ -1 +1 @@
1
- {"version":3,"file":"product-plan-types.js","sourceRoot":"","sources":["../../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AAC;IACD,oBAAoB,CAAC,EAAE,QAAQ,EAAe;QAC5C,OAAO,QAAQ,EAAE,oBAAoB,CAAC;IACxC,CAAC;IACD,oBAAoB,CAAC,EAAE,QAAQ,EAAe;QAC5C,OAAO,QAAQ,EAAE,oBAAoB,CAAC;IACxC,CAAC;CACF,CAAC"}
@@ -9,7 +9,7 @@ export interface ProductReviewHelperTypes {
9
9
  voteCount: HelperType<{
10
10
  type: ProductReviewVoteType;
11
11
  }, number>;
12
- ownVotes: HelperType<never, Promise<Array<ProductVote>>>;
12
+ ownVotes: HelperType<never, Promise<ProductVote[]>>;
13
13
  }
14
14
  export declare const ProductReview: ProductReviewHelperTypes;
15
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"product-review-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-review-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,qBAAqB,EACrB,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC;AAEvF,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C,SAAS,EAAE,UAAU,CAAC;QAAE,IAAI,EAAE,qBAAqB,CAAA;KAAE,EAAE,MAAM,CAAC,CAAC;IAC/D,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAC1D;AACD,eAAO,MAAM,aAAa,EAAE,wBAoB3B,CAAC"}
1
+ {"version":3,"file":"product-review-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-review-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,qBAAqB,EACrB,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC;AAEvF,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C,SAAS,EAAE,UAAU,CAAC;QAAE,IAAI,EAAE,qBAAqB,CAAA;KAAE,EAAE,MAAM,CAAC,CAAC;IAC/D,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;CACrD;AACD,eAAO,MAAM,aAAa,EAAE,wBAmB3B,CAAC"}
@@ -1,7 +1,6 @@
1
1
  export const ProductReview = {
2
- author: async (obj, _, { modules }) => {
3
- // TODO: use loader
4
- return modules.users.findUserById(obj.authorId);
2
+ author: async (obj, _, { loaders }) => {
3
+ return loaders.userLoader.load({ userId: obj.authorId });
5
4
  },
6
5
  product: async (review, _, { loaders }) => {
7
6
  const product = await loaders.productLoader.load({
@@ -1 +1 @@
1
- {"version":3,"file":"product-review-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-review-types.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpC,mBAAmB;QACnB,OAAO,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;YAC/C,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;QAC9C,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACxC,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAC/E,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"product-review-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-review-types.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;YAC/C,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;QAC9C,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACxC,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAC/E,CAAC;CACF,CAAC"}
@@ -8,20 +8,20 @@ export declare const SimpleProduct: {
8
8
  referenceDate: Date;
9
9
  quantity: number;
10
10
  deliveryProviderType: DeliveryProviderType;
11
- }, requestContext: Context): Promise<Array<{
11
+ }, requestContext: Context): Promise<{
12
12
  deliveryProvider?: DeliveryProvider;
13
13
  warehousingProvider?: WarehousingProvider;
14
14
  shipping?: Date;
15
15
  earliestDelivery?: Date;
16
- }>>;
16
+ }[]>;
17
17
  simulatedStocks(obj: Product, params: {
18
18
  referenceDate: Date;
19
19
  deliveryProviderType: DeliveryProviderType;
20
- }, requestContext: Context): Promise<Array<{
20
+ }, requestContext: Context): Promise<{
21
21
  deliveryProvider?: DeliveryProvider;
22
22
  warehousingProvider?: WarehousingProvider;
23
23
  quantity?: number;
24
- }>>;
24
+ }[]>;
25
25
  baseUnit({ warehousing }: {
26
26
  warehousing: any;
27
27
  }): string;
@@ -31,43 +31,43 @@ export declare const SimpleProduct: {
31
31
  dimensions({ supply }: {
32
32
  supply: any;
33
33
  }): ProductSupply;
34
- catalogPrice(product: Product, { quantity, currency: forcedCurrencyCode }: {
34
+ catalogPrice(product: Product, { quantity, currencyCode: forcedCurrencyCode }: {
35
35
  quantity?: number;
36
- currency?: string;
36
+ currencyCode?: string;
37
37
  }, requestContext: Context): Promise<import("@unchainedshop/core-products").ProductPrice>;
38
- simulatedPrice(obj: Product, { currency: forcedCurrencyCode, quantity, useNetPrice, configuration, }: {
38
+ simulatedPrice(product: Product, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, configuration, }: {
39
39
  quantity?: number;
40
- currency?: string;
40
+ currencyCode?: string;
41
41
  useNetPrice?: boolean;
42
- configuration?: Array<import("@unchainedshop/core-products").ProductConfiguration>;
42
+ configuration?: import("@unchainedshop/core-products").ProductConfiguration[];
43
43
  }, requestContext: Context): Promise<import("@unchainedshop/core-products").ProductPrice>;
44
- leveledCatalogPrices(obj: Product, { currency: forcedCurrencyCode }: {
45
- currency?: string;
46
- }, requestContext: Context): Promise<Array<{
44
+ leveledCatalogPrices(product: Product, { currencyCode: forcedCurrencyCode }: {
45
+ currencyCode?: string;
46
+ }, requestContext: Context): Promise<{
47
47
  minQuantity: number;
48
48
  maxQuantity: number;
49
49
  price: import("@unchainedshop/core-products").ProductPrice;
50
- }>>;
50
+ }[]>;
51
51
  salesUnit({ commerce }: Product): string;
52
52
  salesQuantityPerUnit({ commerce }: Product): string;
53
53
  defaultOrderQuantity({ commerce }: Product): number;
54
54
  __resolveType: (product: Product) => string;
55
55
  assortmentPaths(product: Product, params: {
56
56
  forceLocale?: string;
57
- }, { modules, loaders }: Context): Promise<Array<{
58
- links: Array<import("@unchainedshop/core-assortments").AssortmentPathLink>;
59
- }>>;
57
+ }, { modules, loaders }: Context): Promise<{
58
+ links: import("@unchainedshop/core-assortments").AssortmentPathLink[];
59
+ }[]>;
60
60
  media(product: Product, params: {
61
61
  limit: number;
62
62
  offset: number;
63
- tags?: Array<string>;
64
- }, { loaders, modules }: Context): Promise<Array<import("@unchainedshop/core-products").ProductMedia>>;
63
+ tags?: string[];
64
+ }, { loaders, modules }: Context): Promise<import("@unchainedshop/core-products").ProductMedia[]>;
65
65
  reviews(product: Product, { limit, offset, sort, queryString, }: {
66
66
  queryString?: string;
67
67
  limit?: number;
68
68
  offset?: number;
69
- sort?: Array<import("@unchainedshop/utils").SortOption>;
70
- }, { modules }: Context): Promise<Array<import("@unchainedshop/core-products").ProductReview>>;
69
+ sort?: import("@unchainedshop/utils").SortOption[];
70
+ }, { modules }: Context): Promise<import("@unchainedshop/core-products").ProductReview[]>;
71
71
  reviewsCount(product: Product, params: {
72
72
  queryString?: string;
73
73
  }, { modules }: Context): Promise<number>;
@@ -76,10 +76,10 @@ export declare const SimpleProduct: {
76
76
  limit: number;
77
77
  offset: number;
78
78
  includeInactive: boolean;
79
- }, { modules }: Context): Promise<Array<typeof product>>;
79
+ }, { modules }: Context): Promise<(typeof product)[]>;
80
80
  status(product: Product, _: any, { modules }: Context): import("@unchainedshop/core-products").ProductStatus;
81
81
  texts(product: Product, { forceLocale, }: {
82
82
  forceLocale?: string;
83
- }, requestContext: Context): Promise<import("@unchainedshop/core-products").ProductText>;
83
+ }, { locale, loaders }: Context): Promise<import("@unchainedshop/core-products").ProductText>;
84
84
  };
85
85
  //# sourceMappingURL=product-simple-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-simple-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-simple-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,eAAO,MAAM,aAAa;6BAIjB,OAAO,UACJ;QAAE,aAAa,EAAE,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,oBAAoB,CAAA;KAAE,kBAC7E,OAAO,GACtB,OAAO,CACR,KAAK,CAAC;QACJ,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;QAC1C,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,gBAAgB,CAAC,EAAE,IAAI,CAAC;KACzB,CAAC,CACH;yBAgBM,OAAO,UACJ;QACN,aAAa,EAAE,IAAI,CAAC;QACpB,oBAAoB,EAAE,oBAAoB,CAAC;KAC5C,kBACe,OAAO,GACtB,OAAO,CACR,KAAK,CAAC;QACJ,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;QAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,CACH;;;QAgB0B,MAAM;;;QAIX,MAAM;;;QAIJ,aAAa;;gBApEY,CAAC;gBAEpD,CADA;;;gBAiBsC,CAAC;gBAE1B,CAAA;mBACE,CAAC;qBAA8B,CAAC;;;gBAiCzC,CAAC;;;;;;;;;;;mBAvCH,CAAA;;;;;;;YA6BA,CAAA;;;mBAwBsB,CAAA;aACrB,CAAC;cAAsB,CAAC;YACV,CAAC;;;mBAS8H,CAAC;;;oBAAuP,CAAC;;;;;;;mBAA06B,CAAC;;CADrzC,CAAC"}
1
+ {"version":3,"file":"product-simple-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-simple-types.ts"],"names":[],"mappings":"AA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