@unchainedshop/api 4.0.0-rc.15 → 4.0.0-rc.17

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 (1145) hide show
  1. package/lib/api-index.d.ts +1 -1
  2. package/lib/api-index.d.ts.map +1 -1
  3. package/lib/api-index.js +5 -3
  4. package/lib/api-index.js.map +1 -1
  5. package/lib/chat/defaultSystemPrompt.d.ts +3 -0
  6. package/lib/chat/defaultSystemPrompt.d.ts.map +1 -0
  7. package/lib/chat/defaultSystemPrompt.js +16 -0
  8. package/lib/chat/defaultSystemPrompt.js.map +1 -0
  9. package/lib/chat/generateImageHandler.d.ts +7 -0
  10. package/lib/chat/generateImageHandler.d.ts.map +1 -0
  11. package/lib/chat/generateImageHandler.js +64 -0
  12. package/lib/chat/generateImageHandler.js.map +1 -0
  13. package/lib/chat/normalizeToolsIndex.d.ts +7 -0
  14. package/lib/chat/normalizeToolsIndex.d.ts.map +1 -0
  15. package/lib/chat/normalizeToolsIndex.js +11 -0
  16. package/lib/chat/normalizeToolsIndex.js.map +1 -0
  17. package/lib/chat/utils.d.ts +13 -0
  18. package/lib/chat/utils.d.ts.map +1 -0
  19. package/lib/chat/utils.js +32 -0
  20. package/lib/chat/utils.js.map +1 -0
  21. package/lib/context.d.ts +3 -0
  22. package/lib/context.d.ts.map +1 -1
  23. package/lib/context.js +5 -2
  24. package/lib/context.js.map +1 -1
  25. package/lib/createGraphQLServer.d.ts +7 -4
  26. package/lib/createGraphQLServer.d.ts.map +1 -1
  27. package/lib/createGraphQLServer.js +6 -6
  28. package/lib/createGraphQLServer.js.map +1 -1
  29. package/lib/errors.d.ts +1 -0
  30. package/lib/errors.d.ts.map +1 -1
  31. package/lib/errors.js +1 -0
  32. package/lib/errors.js.map +1 -1
  33. package/lib/express/chatHandler.d.ts +5 -0
  34. package/lib/express/chatHandler.d.ts.map +1 -0
  35. package/lib/express/chatHandler.js +165 -0
  36. package/lib/express/chatHandler.js.map +1 -0
  37. package/lib/express/createApolloMiddleware.d.ts +4 -0
  38. package/lib/express/createApolloMiddleware.d.ts.map +1 -0
  39. package/lib/express/createApolloMiddleware.js +36 -0
  40. package/lib/express/createApolloMiddleware.js.map +1 -0
  41. package/lib/express/createBulkImportMiddleware.d.ts.map +1 -1
  42. package/lib/express/createBulkImportMiddleware.js +8 -7
  43. package/lib/express/createBulkImportMiddleware.js.map +1 -1
  44. package/lib/express/createERCMetadataMiddleware.d.ts.map +1 -1
  45. package/lib/express/createERCMetadataMiddleware.js +9 -11
  46. package/lib/express/createERCMetadataMiddleware.js.map +1 -1
  47. package/lib/express/createMCPMiddleware.js +1 -1
  48. package/lib/express/createMCPMiddleware.js.map +1 -1
  49. package/lib/express/createSingleSignOnMiddleware.d.ts +5 -0
  50. package/lib/express/createSingleSignOnMiddleware.d.ts.map +1 -0
  51. package/lib/express/createSingleSignOnMiddleware.js +71 -0
  52. package/lib/express/createSingleSignOnMiddleware.js.map +1 -0
  53. package/lib/express/createTempUploadMiddleware.d.ts.map +1 -1
  54. package/lib/express/createTempUploadMiddleware.js +6 -8
  55. package/lib/express/createTempUploadMiddleware.js.map +1 -1
  56. package/lib/express/index.d.ts +1 -0
  57. package/lib/express/index.d.ts.map +1 -1
  58. package/lib/express/index.js +2 -1
  59. package/lib/express/index.js.map +1 -1
  60. package/lib/fastify/bulkImportHandler.d.ts.map +1 -1
  61. package/lib/fastify/bulkImportHandler.js +7 -6
  62. package/lib/fastify/bulkImportHandler.js.map +1 -1
  63. package/lib/fastify/chatHandler.d.ts +4 -0
  64. package/lib/fastify/chatHandler.d.ts.map +1 -0
  65. package/lib/fastify/chatHandler.js +157 -0
  66. package/lib/fastify/chatHandler.js.map +1 -0
  67. package/lib/fastify/ercMetadataHandler.d.ts.map +1 -1
  68. package/lib/fastify/ercMetadataHandler.js +4 -7
  69. package/lib/fastify/ercMetadataHandler.js.map +1 -1
  70. package/lib/fastify/index.d.ts +6 -1
  71. package/lib/fastify/index.d.ts.map +1 -1
  72. package/lib/fastify/index.js +29 -1
  73. package/lib/fastify/index.js.map +1 -1
  74. package/lib/fastify/mcpHandler.js +2 -2
  75. package/lib/fastify/mcpHandler.js.map +1 -1
  76. package/lib/fastify/tempUploadHandler.d.ts.map +1 -1
  77. package/lib/fastify/tempUploadHandler.js +5 -6
  78. package/lib/fastify/tempUploadHandler.js.map +1 -1
  79. package/lib/hashPassword.d.ts +2 -0
  80. package/lib/hashPassword.d.ts.map +1 -0
  81. package/lib/hashPassword.js +5 -0
  82. package/lib/hashPassword.js.map +1 -0
  83. package/lib/loaders/assortmentLinksLoader.d.ts.map +1 -1
  84. package/lib/loaders/assortmentLinksLoader.js +7 -4
  85. package/lib/loaders/assortmentLinksLoader.js.map +1 -1
  86. package/lib/loaders/assortmentMediasLoader.d.ts +2 -2
  87. package/lib/loaders/assortmentMediasLoader.d.ts.map +1 -1
  88. package/lib/loaders/assortmentMediasLoader.js.map +1 -1
  89. package/lib/loaders/filterTextLoader.d.ts +2 -2
  90. package/lib/loaders/filterTextLoader.d.ts.map +1 -1
  91. package/lib/loaders/filterTextLoader.js.map +1 -1
  92. package/lib/loaders/index.d.ts +8 -8
  93. package/lib/loaders/productMediasLoader.d.ts +2 -2
  94. package/lib/loaders/productMediasLoader.d.ts.map +1 -1
  95. package/lib/loaders/productMediasLoader.js.map +1 -1
  96. package/lib/loaders/productProxiesLoader.d.ts +2 -2
  97. package/lib/loaders/productProxiesLoader.d.ts.map +1 -1
  98. package/lib/loaders/productProxiesLoader.js.map +1 -1
  99. package/lib/loaders/utils.js +1 -1
  100. package/lib/loaders/utils.js.map +1 -1
  101. package/lib/locale-context.js +2 -2
  102. package/lib/locale-context.js.map +1 -1
  103. package/lib/mcp/index.d.ts.map +1 -1
  104. package/lib/mcp/index.js +4 -0
  105. package/lib/mcp/index.js.map +1 -1
  106. package/lib/mcp/resources/localization.d.ts +4 -0
  107. package/lib/mcp/resources/localization.d.ts.map +1 -0
  108. package/lib/mcp/resources/localization.js +93 -0
  109. package/lib/mcp/resources/localization.js.map +1 -0
  110. package/lib/mcp/tools/assortment/handlers/addAssortmentFilter.d.ts +24 -1
  111. package/lib/mcp/tools/assortment/handlers/addAssortmentFilter.d.ts.map +1 -1
  112. package/lib/mcp/tools/assortment/handlers/addAssortmentLink.d.ts +24 -1
  113. package/lib/mcp/tools/assortment/handlers/addAssortmentLink.d.ts.map +1 -1
  114. package/lib/mcp/tools/assortment/handlers/addAssortmentMedia.d.ts +24 -1
  115. package/lib/mcp/tools/assortment/handlers/addAssortmentMedia.d.ts.map +1 -1
  116. package/lib/mcp/tools/assortment/handlers/addAssortmentProduct.d.ts +24 -1
  117. package/lib/mcp/tools/assortment/handlers/addAssortmentProduct.d.ts.map +1 -1
  118. package/lib/mcp/tools/assortment/handlers/createAssortment.d.ts +25 -1
  119. package/lib/mcp/tools/assortment/handlers/createAssortment.d.ts.map +1 -1
  120. package/lib/mcp/tools/assortment/handlers/getAssortment.d.ts +24 -1
  121. package/lib/mcp/tools/assortment/handlers/getAssortment.d.ts.map +1 -1
  122. package/lib/mcp/tools/assortment/handlers/getAssortmentChildren.d.ts +48 -2
  123. package/lib/mcp/tools/assortment/handlers/getAssortmentChildren.d.ts.map +1 -1
  124. package/lib/mcp/tools/assortment/handlers/getAssortmentFilters.d.ts +33 -10
  125. package/lib/mcp/tools/assortment/handlers/getAssortmentFilters.d.ts.map +1 -1
  126. package/lib/mcp/tools/assortment/handlers/getAssortmentLinks.d.ts +51 -2
  127. package/lib/mcp/tools/assortment/handlers/getAssortmentLinks.d.ts.map +1 -1
  128. package/lib/mcp/tools/assortment/handlers/getAssortmentMedia.d.ts +30 -2
  129. package/lib/mcp/tools/assortment/handlers/getAssortmentMedia.d.ts.map +1 -1
  130. package/lib/mcp/tools/assortment/handlers/getAssortmentProducts.d.ts +46 -18
  131. package/lib/mcp/tools/assortment/handlers/getAssortmentProducts.d.ts.map +1 -1
  132. package/lib/mcp/tools/assortment/handlers/listAssortments.d.ts +24 -1
  133. package/lib/mcp/tools/assortment/handlers/listAssortments.d.ts.map +1 -1
  134. package/lib/mcp/tools/assortment/handlers/removeAssortment.js +2 -2
  135. package/lib/mcp/tools/assortment/handlers/removeAssortment.js.map +1 -1
  136. package/lib/mcp/tools/assortment/handlers/removeAssortmentFilter.js +2 -2
  137. package/lib/mcp/tools/assortment/handlers/removeAssortmentFilter.js.map +1 -1
  138. package/lib/mcp/tools/assortment/handlers/removeAssortmentLink.js +2 -2
  139. package/lib/mcp/tools/assortment/handlers/removeAssortmentLink.js.map +1 -1
  140. package/lib/mcp/tools/assortment/handlers/removeAssortmentProduct.js +2 -2
  141. package/lib/mcp/tools/assortment/handlers/removeAssortmentProduct.js.map +1 -1
  142. package/lib/mcp/tools/assortment/handlers/reorderAssortmentFilters.d.ts +9 -9
  143. package/lib/mcp/tools/assortment/handlers/reorderAssortmentLinks.d.ts +27 -1
  144. package/lib/mcp/tools/assortment/handlers/reorderAssortmentLinks.d.ts.map +1 -1
  145. package/lib/mcp/tools/assortment/handlers/reorderAssortmentMedia.d.ts +6 -1
  146. package/lib/mcp/tools/assortment/handlers/reorderAssortmentMedia.d.ts.map +1 -1
  147. package/lib/mcp/tools/assortment/handlers/reorderAssortmentProducts.d.ts +22 -17
  148. package/lib/mcp/tools/assortment/handlers/reorderAssortmentProducts.d.ts.map +1 -1
  149. package/lib/mcp/tools/assortment/handlers/searchAssortmentProducts.d.ts +43 -15
  150. package/lib/mcp/tools/assortment/handlers/searchAssortmentProducts.d.ts.map +1 -1
  151. package/lib/mcp/tools/assortment/handlers/setAssortmentBase.d.ts +24 -1
  152. package/lib/mcp/tools/assortment/handlers/setAssortmentBase.d.ts.map +1 -1
  153. package/lib/mcp/tools/assortment/handlers/updateAssortment.d.ts +24 -1
  154. package/lib/mcp/tools/assortment/handlers/updateAssortment.d.ts.map +1 -1
  155. package/lib/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.d.ts +7 -1
  156. package/lib/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.d.ts.map +1 -1
  157. package/lib/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.js.map +1 -1
  158. package/lib/mcp/tools/assortment/handlers/updateAssortmentStatus.d.ts +24 -1
  159. package/lib/mcp/tools/assortment/handlers/updateAssortmentStatus.d.ts.map +1 -1
  160. package/lib/mcp/tools/assortment/schemas.d.ts +478 -478
  161. package/lib/mcp/tools/assortment/schemas.js +1 -1
  162. package/lib/mcp/tools/assortment/schemas.js.map +1 -1
  163. package/lib/mcp/tools/filter/handlers/createFilter.d.ts +12 -11
  164. package/lib/mcp/tools/filter/handlers/createFilter.d.ts.map +1 -1
  165. package/lib/mcp/tools/filter/handlers/createFilter.js.map +1 -1
  166. package/lib/mcp/tools/filter/handlers/createFilterOption.d.ts +14 -11
  167. package/lib/mcp/tools/filter/handlers/createFilterOption.d.ts.map +1 -1
  168. package/lib/mcp/tools/filter/handlers/createFilterOption.js +4 -2
  169. package/lib/mcp/tools/filter/handlers/createFilterOption.js.map +1 -1
  170. package/lib/mcp/tools/filter/handlers/getFilter.d.ts +10 -10
  171. package/lib/mcp/tools/filter/handlers/listFilters.d.ts +10 -10
  172. package/lib/mcp/tools/filter/handlers/removeFilterOption.d.ts +12 -10
  173. package/lib/mcp/tools/filter/handlers/removeFilterOption.d.ts.map +1 -1
  174. package/lib/mcp/tools/filter/handlers/removeFilterOption.js +2 -0
  175. package/lib/mcp/tools/filter/handlers/removeFilterOption.js.map +1 -1
  176. package/lib/mcp/tools/filter/handlers/updateFilter.d.ts +10 -10
  177. package/lib/mcp/tools/filter/handlers/updateFilterTexts.d.ts +13 -12
  178. package/lib/mcp/tools/filter/handlers/updateFilterTexts.d.ts.map +1 -1
  179. package/lib/mcp/tools/filter/handlers/updateFilterTexts.js.map +1 -1
  180. package/lib/mcp/tools/filter/schemas.d.ts +266 -266
  181. package/lib/mcp/tools/localization/handlers/getLocalization.d.ts +1 -1
  182. package/lib/mcp/tools/localization/index.js +1 -1
  183. package/lib/mcp/tools/localization/index.js.map +1 -1
  184. package/lib/mcp/tools/localization/schemas.d.ts +154 -154
  185. package/lib/mcp/tools/order/handlers/confirmOrder.d.ts +38 -57
  186. package/lib/mcp/tools/order/handlers/confirmOrder.d.ts.map +1 -1
  187. package/lib/mcp/tools/order/handlers/deliverOrder.d.ts +38 -57
  188. package/lib/mcp/tools/order/handlers/deliverOrder.d.ts.map +1 -1
  189. package/lib/mcp/tools/order/handlers/deliverOrder.js +7 -4
  190. package/lib/mcp/tools/order/handlers/deliverOrder.js.map +1 -1
  191. package/lib/mcp/tools/order/handlers/getMonthlyBreakdown.d.ts +10 -0
  192. package/lib/mcp/tools/order/handlers/getMonthlyBreakdown.d.ts.map +1 -1
  193. package/lib/mcp/tools/order/handlers/getOrder.d.ts +38 -57
  194. package/lib/mcp/tools/order/handlers/getOrder.d.ts.map +1 -1
  195. package/lib/mcp/tools/order/handlers/getSalesSummary.d.ts +10 -0
  196. package/lib/mcp/tools/order/handlers/getSalesSummary.d.ts.map +1 -1
  197. package/lib/mcp/tools/order/handlers/getTopCustomers.d.ts +13 -13
  198. package/lib/mcp/tools/order/handlers/getTopCustomers.d.ts.map +1 -1
  199. package/lib/mcp/tools/order/handlers/getTopCustomers.js +10 -7
  200. package/lib/mcp/tools/order/handlers/getTopCustomers.js.map +1 -1
  201. package/lib/mcp/tools/order/handlers/getTopProducts.d.ts +20 -15
  202. package/lib/mcp/tools/order/handlers/getTopProducts.d.ts.map +1 -1
  203. package/lib/mcp/tools/order/handlers/getUserCart.d.ts +38 -57
  204. package/lib/mcp/tools/order/handlers/getUserCart.d.ts.map +1 -1
  205. package/lib/mcp/tools/order/handlers/listOrders.d.ts +39 -58
  206. package/lib/mcp/tools/order/handlers/listOrders.d.ts.map +1 -1
  207. package/lib/mcp/tools/order/handlers/payOrder.d.ts +38 -57
  208. package/lib/mcp/tools/order/handlers/payOrder.d.ts.map +1 -1
  209. package/lib/mcp/tools/order/handlers/payOrder.js +7 -4
  210. package/lib/mcp/tools/order/handlers/payOrder.js.map +1 -1
  211. package/lib/mcp/tools/order/handlers/rejectOrder.d.ts +38 -57
  212. package/lib/mcp/tools/order/handlers/rejectOrder.d.ts.map +1 -1
  213. package/lib/mcp/tools/order/schemas.d.ts +184 -184
  214. package/lib/mcp/tools/product/handlers/addBundleItem.d.ts +18 -13
  215. package/lib/mcp/tools/product/handlers/addBundleItem.d.ts.map +1 -1
  216. package/lib/mcp/tools/product/handlers/addBundleItem.js +16 -19
  217. package/lib/mcp/tools/product/handlers/addBundleItem.js.map +1 -1
  218. package/lib/mcp/tools/product/handlers/addProductAssignment.d.ts +20 -15
  219. package/lib/mcp/tools/product/handlers/addProductAssignment.d.ts.map +1 -1
  220. package/lib/mcp/tools/product/handlers/addProductAssignment.js.map +1 -1
  221. package/lib/mcp/tools/product/handlers/addProductMedia.d.ts +31 -1
  222. package/lib/mcp/tools/product/handlers/addProductMedia.d.ts.map +1 -1
  223. package/lib/mcp/tools/product/handlers/addProductMedia.js +4 -4
  224. package/lib/mcp/tools/product/handlers/addProductMedia.js.map +1 -1
  225. package/lib/mcp/tools/product/handlers/addProductVariationOption.d.ts +18 -13
  226. package/lib/mcp/tools/product/handlers/addProductVariationOption.d.ts.map +1 -1
  227. package/lib/mcp/tools/product/handlers/addProductVariationOption.js +2 -2
  228. package/lib/mcp/tools/product/handlers/addProductVariationOption.js.map +1 -1
  229. package/lib/mcp/tools/product/handlers/createProduct.d.ts +18 -13
  230. package/lib/mcp/tools/product/handlers/createProduct.d.ts.map +1 -1
  231. package/lib/mcp/tools/product/handlers/createProductVariation.d.ts +18 -13
  232. package/lib/mcp/tools/product/handlers/createProductVariation.d.ts.map +1 -1
  233. package/lib/mcp/tools/product/handlers/createProductVariation.js +1 -0
  234. package/lib/mcp/tools/product/handlers/createProductVariation.js.map +1 -1
  235. package/lib/mcp/tools/product/handlers/getBundleItems.d.ts +18 -13
  236. package/lib/mcp/tools/product/handlers/getBundleItems.d.ts.map +1 -1
  237. package/lib/mcp/tools/product/handlers/getCatalogPrice.d.ts +4 -2
  238. package/lib/mcp/tools/product/handlers/getCatalogPrice.d.ts.map +1 -1
  239. package/lib/mcp/tools/product/handlers/getCatalogPrice.js +3 -1
  240. package/lib/mcp/tools/product/handlers/getCatalogPrice.js.map +1 -1
  241. package/lib/mcp/tools/product/handlers/getProduct.d.ts +18 -13
  242. package/lib/mcp/tools/product/handlers/getProduct.d.ts.map +1 -1
  243. package/lib/mcp/tools/product/handlers/getProductAssignments.d.ts +1 -2
  244. package/lib/mcp/tools/product/handlers/getProductAssignments.d.ts.map +1 -1
  245. package/lib/mcp/tools/product/handlers/getProductAssignments.js +4 -4
  246. package/lib/mcp/tools/product/handlers/getProductAssignments.js.map +1 -1
  247. package/lib/mcp/tools/product/handlers/getProductMedia.d.ts +6 -1
  248. package/lib/mcp/tools/product/handlers/getProductMedia.d.ts.map +1 -1
  249. package/lib/mcp/tools/product/handlers/getSiblings.d.ts +19 -14
  250. package/lib/mcp/tools/product/handlers/getSiblings.d.ts.map +1 -1
  251. package/lib/mcp/tools/product/handlers/getVariationProducts.d.ts +19 -14
  252. package/lib/mcp/tools/product/handlers/getVariationProducts.d.ts.map +1 -1
  253. package/lib/mcp/tools/product/handlers/index.d.ts +2 -0
  254. package/lib/mcp/tools/product/handlers/index.d.ts.map +1 -1
  255. package/lib/mcp/tools/product/handlers/index.js +2 -0
  256. package/lib/mcp/tools/product/handlers/index.js.map +1 -1
  257. package/lib/mcp/tools/product/handlers/listProducts.d.ts +19 -14
  258. package/lib/mcp/tools/product/handlers/listProducts.d.ts.map +1 -1
  259. package/lib/mcp/tools/product/handlers/removeProduct.d.ts.map +1 -1
  260. package/lib/mcp/tools/product/handlers/removeProduct.js +15 -3
  261. package/lib/mcp/tools/product/handlers/removeProduct.js.map +1 -1
  262. package/lib/mcp/tools/product/handlers/reorderProductMedia.d.ts +6 -1
  263. package/lib/mcp/tools/product/handlers/reorderProductMedia.d.ts.map +1 -1
  264. package/lib/mcp/tools/product/handlers/simulatePrice.d.ts +4 -2
  265. package/lib/mcp/tools/product/handlers/simulatePrice.d.ts.map +1 -1
  266. package/lib/mcp/tools/product/handlers/simulatePrice.js +2 -0
  267. package/lib/mcp/tools/product/handlers/simulatePrice.js.map +1 -1
  268. package/lib/mcp/tools/product/handlers/simulatePriceRange.d.ts +9 -2
  269. package/lib/mcp/tools/product/handlers/simulatePriceRange.d.ts.map +1 -1
  270. package/lib/mcp/tools/product/handlers/simulatePriceRange.js +2 -0
  271. package/lib/mcp/tools/product/handlers/simulatePriceRange.js.map +1 -1
  272. package/lib/mcp/tools/product/handlers/updateProduct.d.ts +18 -13
  273. package/lib/mcp/tools/product/handlers/updateProduct.d.ts.map +1 -1
  274. package/lib/mcp/tools/product/handlers/updateProduct.js +10 -2
  275. package/lib/mcp/tools/product/handlers/updateProduct.js.map +1 -1
  276. package/lib/mcp/tools/product/handlers/updateProductMediaTexts.d.ts +2 -1
  277. package/lib/mcp/tools/product/handlers/updateProductMediaTexts.d.ts.map +1 -1
  278. package/lib/mcp/tools/product/handlers/updateProductMediaTexts.js.map +1 -1
  279. package/lib/mcp/tools/product/handlers/updateProductStatus.d.ts +18 -13
  280. package/lib/mcp/tools/product/handlers/updateProductStatus.d.ts.map +1 -1
  281. package/lib/mcp/tools/product/handlers/updateProductTexts.d.ts +6 -0
  282. package/lib/mcp/tools/product/handlers/updateProductTexts.d.ts.map +1 -0
  283. package/lib/mcp/tools/product/handlers/updateProductTexts.js +11 -0
  284. package/lib/mcp/tools/product/handlers/updateProductTexts.js.map +1 -0
  285. package/lib/mcp/tools/product/schemas.d.ts +1605 -1549
  286. package/lib/mcp/tools/product/schemas.d.ts.map +1 -1
  287. package/lib/mcp/tools/product/schemas.js +13 -6
  288. package/lib/mcp/tools/product/schemas.js.map +1 -1
  289. package/lib/mcp/tools/provider/handlers/getProvider.d.ts +1 -1
  290. package/lib/mcp/tools/provider/handlers/getProviderInterfaces.d.ts +1 -1
  291. package/lib/mcp/tools/provider/schemas.d.ts +110 -110
  292. package/lib/mcp/tools/quotation/handlers/countQuotations.d.ts +4 -0
  293. package/lib/mcp/tools/quotation/handlers/countQuotations.d.ts.map +1 -0
  294. package/lib/mcp/tools/quotation/handlers/countQuotations.js +5 -0
  295. package/lib/mcp/tools/quotation/handlers/countQuotations.js.map +1 -0
  296. package/lib/mcp/tools/quotation/handlers/getQuotation.d.ts +105 -0
  297. package/lib/mcp/tools/quotation/handlers/getQuotation.d.ts.map +1 -0
  298. package/lib/mcp/tools/quotation/handlers/getQuotation.js +6 -0
  299. package/lib/mcp/tools/quotation/handlers/getQuotation.js.map +1 -0
  300. package/lib/mcp/tools/quotation/handlers/index.d.ts +16 -0
  301. package/lib/mcp/tools/quotation/handlers/index.d.ts.map +1 -0
  302. package/lib/mcp/tools/quotation/handlers/index.js +15 -0
  303. package/lib/mcp/tools/quotation/handlers/index.js.map +1 -0
  304. package/lib/mcp/tools/quotation/handlers/listQuotations.d.ts +107 -0
  305. package/lib/mcp/tools/quotation/handlers/listQuotations.d.ts.map +1 -0
  306. package/lib/mcp/tools/quotation/handlers/listQuotations.js +9 -0
  307. package/lib/mcp/tools/quotation/handlers/listQuotations.js.map +1 -0
  308. package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.d.ts +106 -0
  309. package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.d.ts.map +1 -0
  310. package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.js +16 -0
  311. package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.js.map +1 -0
  312. package/lib/mcp/tools/quotation/handlers/rejectQuotation.d.ts +106 -0
  313. package/lib/mcp/tools/quotation/handlers/rejectQuotation.d.ts.map +1 -0
  314. package/lib/mcp/tools/quotation/handlers/rejectQuotation.js +16 -0
  315. package/lib/mcp/tools/quotation/handlers/rejectQuotation.js.map +1 -0
  316. package/lib/mcp/tools/quotation/handlers/verifyQuotation.d.ts +106 -0
  317. package/lib/mcp/tools/quotation/handlers/verifyQuotation.d.ts.map +1 -0
  318. package/lib/mcp/tools/quotation/handlers/verifyQuotation.js +16 -0
  319. package/lib/mcp/tools/quotation/handlers/verifyQuotation.js.map +1 -0
  320. package/lib/mcp/tools/quotation/index.d.ts +4 -0
  321. package/lib/mcp/tools/quotation/index.d.ts.map +1 -0
  322. package/lib/mcp/tools/quotation/index.js +5 -0
  323. package/lib/mcp/tools/quotation/index.js.map +1 -0
  324. package/lib/mcp/tools/quotation/quotationManagement.d.ts +10 -0
  325. package/lib/mcp/tools/quotation/quotationManagement.d.ts.map +1 -0
  326. package/lib/mcp/tools/quotation/quotationManagement.js +24 -0
  327. package/lib/mcp/tools/quotation/quotationManagement.js.map +1 -0
  328. package/lib/mcp/tools/quotation/schemas.d.ts +240 -0
  329. package/lib/mcp/tools/quotation/schemas.d.ts.map +1 -0
  330. package/lib/mcp/tools/quotation/schemas.js +99 -0
  331. package/lib/mcp/tools/quotation/schemas.js.map +1 -0
  332. package/lib/mcp/tools/system/handlers/getEvent.d.ts +1 -1
  333. package/lib/mcp/tools/system/handlers/getShopInfo.d.ts +2 -2
  334. package/lib/mcp/tools/system/handlers/getWorkStatistics.d.ts +2 -2
  335. package/lib/mcp/tools/system/handlers/index.d.ts +6 -6
  336. package/lib/mcp/tools/system/handlers/listWork.d.ts +2 -2
  337. package/lib/mcp/tools/system/handlers/listWork.d.ts.map +1 -1
  338. package/lib/mcp/tools/system/handlers/listWork.js.map +1 -1
  339. package/lib/mcp/tools/system/index.js +1 -1
  340. package/lib/mcp/tools/system/index.js.map +1 -1
  341. package/lib/mcp/tools/system/schemas.d.ts +220 -220
  342. package/lib/mcp/tools/system/schemas.js +2 -2
  343. package/lib/mcp/tools/system/schemas.js.map +1 -1
  344. package/lib/mcp/tools/system/types.d.ts +1 -1
  345. package/lib/mcp/tools/system/types.d.ts.map +1 -1
  346. package/lib/mcp/tools/users/handlers/addUserEmail.d.ts +9 -4
  347. package/lib/mcp/tools/users/handlers/addUserEmail.d.ts.map +1 -1
  348. package/lib/mcp/tools/users/handlers/addUserEmail.js +2 -2
  349. package/lib/mcp/tools/users/handlers/addUserEmail.js.map +1 -1
  350. package/lib/mcp/tools/users/handlers/createUser.d.ts +9 -4
  351. package/lib/mcp/tools/users/handlers/createUser.d.ts.map +1 -1
  352. package/lib/mcp/tools/users/handlers/enrollUser.d.ts +9 -4
  353. package/lib/mcp/tools/users/handlers/enrollUser.d.ts.map +1 -1
  354. package/lib/mcp/tools/users/handlers/enrollUser.js +1 -1
  355. package/lib/mcp/tools/users/handlers/enrollUser.js.map +1 -1
  356. package/lib/mcp/tools/users/handlers/getCurrentUser.d.ts +9 -4
  357. package/lib/mcp/tools/users/handlers/getCurrentUser.d.ts.map +1 -1
  358. package/lib/mcp/tools/users/handlers/getCurrentUser.js.map +1 -1
  359. package/lib/mcp/tools/users/handlers/getUser.d.ts +9 -4
  360. package/lib/mcp/tools/users/handlers/getUser.d.ts.map +1 -1
  361. package/lib/mcp/tools/users/handlers/getUserAvatar.d.ts +7 -2
  362. package/lib/mcp/tools/users/handlers/getUserAvatar.d.ts.map +1 -1
  363. package/lib/mcp/tools/users/handlers/getUserAvatar.js +1 -1
  364. package/lib/mcp/tools/users/handlers/getUserAvatar.js.map +1 -1
  365. package/lib/mcp/tools/users/handlers/getUserBookmarks.d.ts +23 -18
  366. package/lib/mcp/tools/users/handlers/getUserBookmarks.d.ts.map +1 -1
  367. package/lib/mcp/tools/users/handlers/getUserEnrollments.d.ts +33 -24
  368. package/lib/mcp/tools/users/handlers/getUserEnrollments.d.ts.map +1 -1
  369. package/lib/mcp/tools/users/handlers/getUserOrders.d.ts +39 -58
  370. package/lib/mcp/tools/users/handlers/getUserOrders.d.ts.map +1 -1
  371. package/lib/mcp/tools/users/handlers/getUserQuotations.d.ts +29 -20
  372. package/lib/mcp/tools/users/handlers/getUserQuotations.d.ts.map +1 -1
  373. package/lib/mcp/tools/users/handlers/getUserReviews.d.ts +23 -18
  374. package/lib/mcp/tools/users/handlers/getUserReviews.d.ts.map +1 -1
  375. package/lib/mcp/tools/users/handlers/listUsers.d.ts +10 -5
  376. package/lib/mcp/tools/users/handlers/listUsers.d.ts.map +1 -1
  377. package/lib/mcp/tools/users/handlers/removeUserEmail.js.map +1 -1
  378. package/lib/mcp/tools/users/handlers/setUserTags.d.ts +9 -4
  379. package/lib/mcp/tools/users/handlers/setUserTags.d.ts.map +1 -1
  380. package/lib/mcp/tools/users/handlers/setUserUsername.d.ts +9 -4
  381. package/lib/mcp/tools/users/handlers/setUserUsername.d.ts.map +1 -1
  382. package/lib/mcp/tools/users/handlers/updateUser.d.ts +9 -4
  383. package/lib/mcp/tools/users/handlers/updateUser.d.ts.map +1 -1
  384. package/lib/mcp/tools/users/schemas.d.ts +586 -586
  385. package/lib/mcp/utils/getNormalizedAssortmentDetails.d.ts +24 -1
  386. package/lib/mcp/utils/getNormalizedAssortmentDetails.d.ts.map +1 -1
  387. package/lib/mcp/utils/getNormalizedAssortmentDetails.js +5 -21
  388. package/lib/mcp/utils/getNormalizedAssortmentDetails.js.map +1 -1
  389. package/lib/mcp/utils/getNormalizedFilterDetails.d.ts +10 -10
  390. package/lib/mcp/utils/getNormalizedFilterDetails.js.map +1 -1
  391. package/lib/mcp/utils/getNormalizedOrderDetails.d.ts +38 -57
  392. package/lib/mcp/utils/getNormalizedOrderDetails.d.ts.map +1 -1
  393. package/lib/mcp/utils/getNormalizedOrderDetails.js.map +1 -1
  394. package/lib/mcp/utils/getNormalizedProductDetails.d.ts +18 -13
  395. package/lib/mcp/utils/getNormalizedProductDetails.d.ts.map +1 -1
  396. package/lib/mcp/utils/getNormalizedProductDetails.js +5 -24
  397. package/lib/mcp/utils/getNormalizedProductDetails.js.map +1 -1
  398. package/lib/mcp/utils/getNormalizedQuotationDetails.d.ts +104 -0
  399. package/lib/mcp/utils/getNormalizedQuotationDetails.d.ts.map +1 -0
  400. package/lib/mcp/utils/getNormalizedQuotationDetails.js +35 -0
  401. package/lib/mcp/utils/getNormalizedQuotationDetails.js.map +1 -0
  402. package/lib/mcp/utils/getNormalizedUserDetails.d.ts +9 -4
  403. package/lib/mcp/utils/getNormalizedUserDetails.d.ts.map +1 -1
  404. package/lib/mcp/utils/getNormalizedUserDetails.js.map +1 -1
  405. package/lib/mcp/utils/normalizeMediaUrl.d.ts +8 -1
  406. package/lib/mcp/utils/normalizeMediaUrl.d.ts.map +1 -1
  407. package/lib/mcp/utils/normalizeMediaUrl.js.map +1 -1
  408. package/lib/mcp/utils/normalizeProxyAssignments.d.ts +6 -0
  409. package/lib/mcp/utils/normalizeProxyAssignments.d.ts.map +1 -0
  410. package/lib/mcp/utils/normalizeProxyAssignments.js +27 -0
  411. package/lib/mcp/utils/normalizeProxyAssignments.js.map +1 -0
  412. package/lib/mcp/utils/orderFilters.d.ts +1 -1
  413. package/lib/mcp/utils/orderFilters.d.ts.map +1 -1
  414. package/lib/mcp/utils/sharedSchemas.d.ts +14 -14
  415. package/lib/mcp/utils/sharedSchemas.js +1 -1
  416. package/lib/mcp/utils/sharedSchemas.js.map +1 -1
  417. package/lib/resolvers/mutations/accounts/addEmail.d.ts +1 -1
  418. package/lib/resolvers/mutations/accounts/addEmail.d.ts.map +1 -1
  419. package/lib/resolvers/mutations/accounts/addEmail.js.map +1 -1
  420. package/lib/resolvers/mutations/accounts/addWeb3Address.d.ts +1 -1
  421. package/lib/resolvers/mutations/accounts/addWeb3Address.d.ts.map +1 -1
  422. package/lib/resolvers/mutations/accounts/addWeb3Address.js.map +1 -1
  423. package/lib/resolvers/mutations/accounts/addWebAuthnCredentials.d.ts +1 -1
  424. package/lib/resolvers/mutations/accounts/addWebAuthnCredentials.d.ts.map +1 -1
  425. package/lib/resolvers/mutations/accounts/addWebAuthnCredentials.js.map +1 -1
  426. package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts +3 -0
  427. package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts.map +1 -0
  428. package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.js +6 -0
  429. package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.js.map +1 -0
  430. package/lib/resolvers/mutations/accounts/changePassword.js.map +1 -1
  431. package/lib/resolvers/mutations/accounts/createUser.d.ts.map +1 -1
  432. package/lib/resolvers/mutations/accounts/createUser.js +2 -2
  433. package/lib/resolvers/mutations/accounts/createUser.js.map +1 -1
  434. package/lib/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.d.ts +2 -2
  435. package/lib/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.d.ts.map +1 -1
  436. package/lib/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.d.ts +2 -2
  437. package/lib/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.d.ts.map +1 -1
  438. package/lib/resolvers/mutations/accounts/disableTOTP.d.ts +6 -0
  439. package/lib/resolvers/mutations/accounts/disableTOTP.d.ts.map +1 -0
  440. package/lib/resolvers/mutations/accounts/disableTOTP.js +27 -0
  441. package/lib/resolvers/mutations/accounts/disableTOTP.js.map +1 -0
  442. package/lib/resolvers/mutations/accounts/enableTOTP.d.ts +6 -0
  443. package/lib/resolvers/mutations/accounts/enableTOTP.d.ts.map +1 -0
  444. package/lib/resolvers/mutations/accounts/enableTOTP.js +20 -0
  445. package/lib/resolvers/mutations/accounts/enableTOTP.js.map +1 -0
  446. package/lib/resolvers/mutations/accounts/enrollUser.d.ts +1 -1
  447. package/lib/resolvers/mutations/accounts/enrollUser.d.ts.map +1 -1
  448. package/lib/resolvers/mutations/accounts/linkOAuthAccount.d.ts +7 -0
  449. package/lib/resolvers/mutations/accounts/linkOAuthAccount.d.ts.map +1 -0
  450. package/lib/resolvers/mutations/accounts/linkOAuthAccount.js +30 -0
  451. package/lib/resolvers/mutations/accounts/linkOAuthAccount.js.map +1 -0
  452. package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts.map +1 -1
  453. package/lib/resolvers/mutations/accounts/loginAsGuest.js +2 -2
  454. package/lib/resolvers/mutations/accounts/loginAsGuest.js.map +1 -1
  455. package/lib/resolvers/mutations/accounts/loginWithOAuth.d.ts +8 -0
  456. package/lib/resolvers/mutations/accounts/loginWithOAuth.d.ts.map +1 -0
  457. package/lib/resolvers/mutations/accounts/loginWithOAuth.js +25 -0
  458. package/lib/resolvers/mutations/accounts/loginWithOAuth.js.map +1 -0
  459. package/lib/resolvers/mutations/accounts/loginWithPassword.d.ts.map +1 -1
  460. package/lib/resolvers/mutations/accounts/loginWithPassword.js +2 -2
  461. package/lib/resolvers/mutations/accounts/loginWithPassword.js.map +1 -1
  462. package/lib/resolvers/mutations/accounts/loginWithWebAuthn.d.ts.map +1 -1
  463. package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js +2 -2
  464. package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js.map +1 -1
  465. package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts +5 -0
  466. package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts.map +1 -0
  467. package/lib/resolvers/mutations/accounts/logoutAllSessions.js +20 -0
  468. package/lib/resolvers/mutations/accounts/logoutAllSessions.js.map +1 -0
  469. package/lib/resolvers/mutations/accounts/removeEmail.d.ts +1 -1
  470. package/lib/resolvers/mutations/accounts/removeEmail.d.ts.map +1 -1
  471. package/lib/resolvers/mutations/accounts/removeEmail.js.map +1 -1
  472. package/lib/resolvers/mutations/accounts/removeWeb3Address.d.ts +1 -1
  473. package/lib/resolvers/mutations/accounts/removeWeb3Address.d.ts.map +1 -1
  474. package/lib/resolvers/mutations/accounts/removeWeb3Address.js +2 -2
  475. package/lib/resolvers/mutations/accounts/removeWeb3Address.js.map +1 -1
  476. package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.d.ts +1 -1
  477. package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.d.ts.map +1 -1
  478. package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.js +2 -2
  479. package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.js.map +1 -1
  480. package/lib/resolvers/mutations/accounts/setPassword.d.ts +1 -1
  481. package/lib/resolvers/mutations/accounts/setPassword.d.ts.map +1 -1
  482. package/lib/resolvers/mutations/accounts/setUsername.d.ts +1 -1
  483. package/lib/resolvers/mutations/accounts/setUsername.d.ts.map +1 -1
  484. package/lib/resolvers/mutations/accounts/stopImpersonation.d.ts +1 -1
  485. package/lib/resolvers/mutations/accounts/stopImpersonation.d.ts.map +1 -1
  486. package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.d.ts +6 -0
  487. package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.d.ts.map +1 -0
  488. package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.js +13 -0
  489. package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.js.map +1 -0
  490. package/lib/resolvers/mutations/accounts/verifyEmail.d.ts.map +1 -1
  491. package/lib/resolvers/mutations/accounts/verifyEmail.js +2 -2
  492. package/lib/resolvers/mutations/accounts/verifyEmail.js.map +1 -1
  493. package/lib/resolvers/mutations/accounts/verifyWeb3Address.d.ts +1 -1
  494. package/lib/resolvers/mutations/accounts/verifyWeb3Address.d.ts.map +1 -1
  495. package/lib/resolvers/mutations/accounts/verifyWeb3Address.js +3 -3
  496. package/lib/resolvers/mutations/accounts/verifyWeb3Address.js.map +1 -1
  497. package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts +1 -1
  498. package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts.map +1 -1
  499. package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts +1 -1
  500. package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts.map +1 -1
  501. package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts +6 -0
  502. package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts.map +1 -0
  503. package/lib/resolvers/mutations/assortments/addAssortmentMedia.js +18 -0
  504. package/lib/resolvers/mutations/assortments/addAssortmentMedia.js.map +1 -0
  505. package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts +1 -1
  506. package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts.map +1 -1
  507. package/lib/resolvers/mutations/assortments/removeAssortment.d.ts +1 -1
  508. package/lib/resolvers/mutations/assortments/removeAssortment.d.ts.map +1 -1
  509. package/lib/resolvers/mutations/assortments/removeAssortment.js +3 -4
  510. package/lib/resolvers/mutations/assortments/removeAssortment.js.map +1 -1
  511. package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts +1 -1
  512. package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts.map +1 -1
  513. package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts +1 -1
  514. package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts.map +1 -1
  515. package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts +1 -1
  516. package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts.map +1 -1
  517. package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts +1 -1
  518. package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts.map +1 -1
  519. package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts +1 -1
  520. package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts.map +1 -1
  521. package/lib/resolvers/mutations/assortments/updateAssortment.d.ts +1 -1
  522. package/lib/resolvers/mutations/assortments/updateAssortment.d.ts.map +1 -1
  523. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +7 -1
  524. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts.map +1 -1
  525. package/lib/resolvers/mutations/bookmarks/bookmark.d.ts +1 -1
  526. package/lib/resolvers/mutations/bookmarks/bookmark.d.ts.map +1 -1
  527. package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts +1 -1
  528. package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts.map +1 -1
  529. package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts +1 -1
  530. package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts.map +1 -1
  531. package/lib/resolvers/mutations/countries/createCountry.d.ts +1 -1
  532. package/lib/resolvers/mutations/countries/createCountry.d.ts.map +1 -1
  533. package/lib/resolvers/mutations/countries/removeCountry.d.ts +1 -1
  534. package/lib/resolvers/mutations/countries/removeCountry.d.ts.map +1 -1
  535. package/lib/resolvers/mutations/countries/updateCountry.d.ts +1 -1
  536. package/lib/resolvers/mutations/countries/updateCountry.d.ts.map +1 -1
  537. package/lib/resolvers/mutations/currencies/createCurrency.d.ts +1 -1
  538. package/lib/resolvers/mutations/currencies/createCurrency.d.ts.map +1 -1
  539. package/lib/resolvers/mutations/currencies/removeCurrency.d.ts +1 -1
  540. package/lib/resolvers/mutations/currencies/removeCurrency.d.ts.map +1 -1
  541. package/lib/resolvers/mutations/currencies/updateCurrency.d.ts +1 -1
  542. package/lib/resolvers/mutations/currencies/updateCurrency.d.ts.map +1 -1
  543. package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts +2 -2
  544. package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts.map +1 -1
  545. package/lib/resolvers/mutations/delivery/createDeliveryProvider.js.map +1 -1
  546. package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts +1 -1
  547. package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts.map +1 -1
  548. package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts +1 -1
  549. package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts.map +1 -1
  550. package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts +1 -1
  551. package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts.map +1 -1
  552. package/lib/resolvers/mutations/enrollments/createEnrollment.js +1 -1
  553. package/lib/resolvers/mutations/enrollments/createEnrollment.js.map +1 -1
  554. package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts.map +1 -1
  555. package/lib/resolvers/mutations/enrollments/updateEnrollment.js +6 -6
  556. package/lib/resolvers/mutations/enrollments/updateEnrollment.js.map +1 -1
  557. package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts +1 -1
  558. package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts.map +1 -1
  559. package/lib/resolvers/mutations/filters/createFilterOption.d.ts +1 -1
  560. package/lib/resolvers/mutations/filters/createFilterOption.d.ts.map +1 -1
  561. package/lib/resolvers/mutations/filters/createFilterOption.js.map +1 -1
  562. package/lib/resolvers/mutations/filters/removeFilter.d.ts +1 -1
  563. package/lib/resolvers/mutations/filters/removeFilter.d.ts.map +1 -1
  564. package/lib/resolvers/mutations/filters/removeFilterOption.d.ts +1 -1
  565. package/lib/resolvers/mutations/filters/removeFilterOption.d.ts.map +1 -1
  566. package/lib/resolvers/mutations/filters/removeFilterOption.js.map +1 -1
  567. package/lib/resolvers/mutations/filters/updateFilter.d.ts +1 -1
  568. package/lib/resolvers/mutations/filters/updateFilter.d.ts.map +1 -1
  569. package/lib/resolvers/mutations/filters/updateFilter.js.map +1 -1
  570. package/lib/resolvers/mutations/languages/createLanguage.d.ts +1 -1
  571. package/lib/resolvers/mutations/languages/createLanguage.d.ts.map +1 -1
  572. package/lib/resolvers/mutations/languages/removeLanguage.d.ts +1 -1
  573. package/lib/resolvers/mutations/languages/removeLanguage.d.ts.map +1 -1
  574. package/lib/resolvers/mutations/languages/updateLanguage.d.ts +1 -1
  575. package/lib/resolvers/mutations/languages/updateLanguage.d.ts.map +1 -1
  576. package/lib/resolvers/mutations/orders/addCartDiscount.d.ts +1 -1
  577. package/lib/resolvers/mutations/orders/addCartDiscount.d.ts.map +1 -1
  578. package/lib/resolvers/mutations/orders/addCartDiscount.js +1 -1
  579. package/lib/resolvers/mutations/orders/addCartDiscount.js.map +1 -1
  580. package/lib/resolvers/mutations/orders/addCartProduct.d.ts +1 -1
  581. package/lib/resolvers/mutations/orders/addCartProduct.d.ts.map +1 -1
  582. package/lib/resolvers/mutations/orders/addCartProduct.js +1 -1
  583. package/lib/resolvers/mutations/orders/addCartProduct.js.map +1 -1
  584. package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +1 -1
  585. package/lib/resolvers/mutations/orders/addCartQuotation.d.ts.map +1 -1
  586. package/lib/resolvers/mutations/orders/addCartQuotation.js +5 -3
  587. package/lib/resolvers/mutations/orders/addCartQuotation.js.map +1 -1
  588. package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts +1 -1
  589. package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts.map +1 -1
  590. package/lib/resolvers/mutations/orders/addMultipleCartProducts.js +1 -1
  591. package/lib/resolvers/mutations/orders/addMultipleCartProducts.js.map +1 -1
  592. package/lib/resolvers/mutations/orders/checkoutCart.d.ts +1 -1
  593. package/lib/resolvers/mutations/orders/checkoutCart.d.ts.map +1 -1
  594. package/lib/resolvers/mutations/orders/checkoutCart.js +2 -2
  595. package/lib/resolvers/mutations/orders/checkoutCart.js.map +1 -1
  596. package/lib/resolvers/mutations/orders/confirmOrder.d.ts +1 -1
  597. package/lib/resolvers/mutations/orders/confirmOrder.d.ts.map +1 -1
  598. package/lib/resolvers/mutations/orders/createCart.d.ts +1 -1
  599. package/lib/resolvers/mutations/orders/createCart.d.ts.map +1 -1
  600. package/lib/resolvers/mutations/orders/createCart.js +1 -1
  601. package/lib/resolvers/mutations/orders/createCart.js.map +1 -1
  602. package/lib/resolvers/mutations/orders/deliverOrder.d.ts.map +1 -1
  603. package/lib/resolvers/mutations/orders/deliverOrder.js +7 -4
  604. package/lib/resolvers/mutations/orders/deliverOrder.js.map +1 -1
  605. package/lib/resolvers/mutations/orders/emptyCart.d.ts +1 -1
  606. package/lib/resolvers/mutations/orders/emptyCart.d.ts.map +1 -1
  607. package/lib/resolvers/mutations/orders/emptyCart.js +1 -1
  608. package/lib/resolvers/mutations/orders/emptyCart.js.map +1 -1
  609. package/lib/resolvers/mutations/orders/payOrder.d.ts.map +1 -1
  610. package/lib/resolvers/mutations/orders/payOrder.js +7 -4
  611. package/lib/resolvers/mutations/orders/payOrder.js.map +1 -1
  612. package/lib/resolvers/mutations/orders/rejectOrder.d.ts +1 -1
  613. package/lib/resolvers/mutations/orders/rejectOrder.d.ts.map +1 -1
  614. package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts +1 -1
  615. package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts.map +1 -1
  616. package/lib/resolvers/mutations/orders/removeCartDiscount.js +3 -1
  617. package/lib/resolvers/mutations/orders/removeCartDiscount.js.map +1 -1
  618. package/lib/resolvers/mutations/orders/removeCartItem.d.ts +1 -1
  619. package/lib/resolvers/mutations/orders/removeCartItem.d.ts.map +1 -1
  620. package/lib/resolvers/mutations/orders/removeCartItem.js +3 -1
  621. package/lib/resolvers/mutations/orders/removeCartItem.js.map +1 -1
  622. package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts +1 -1
  623. package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts.map +1 -1
  624. package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts +1 -1
  625. package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts.map +1 -1
  626. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts +1 -1
  627. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts.map +1 -1
  628. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js +9 -5
  629. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js.map +1 -1
  630. package/lib/resolvers/mutations/orders/updateCart.d.ts +1 -1
  631. package/lib/resolvers/mutations/orders/updateCart.d.ts.map +1 -1
  632. package/lib/resolvers/mutations/orders/updateCart.js +1 -1
  633. package/lib/resolvers/mutations/orders/updateCart.js.map +1 -1
  634. package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.d.ts +1 -1
  635. package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.d.ts.map +1 -1
  636. package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.js +4 -2
  637. package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.js.map +1 -1
  638. package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.d.ts +1 -1
  639. package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.d.ts.map +1 -1
  640. package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.js +4 -2
  641. package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.js.map +1 -1
  642. package/lib/resolvers/mutations/orders/updateCartItem.d.ts +1 -1
  643. package/lib/resolvers/mutations/orders/updateCartItem.d.ts.map +1 -1
  644. package/lib/resolvers/mutations/orders/updateCartItem.js +6 -4
  645. package/lib/resolvers/mutations/orders/updateCartItem.js.map +1 -1
  646. package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.d.ts +1 -1
  647. package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.d.ts.map +1 -1
  648. package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.js +4 -2
  649. package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.js.map +1 -1
  650. package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.d.ts +1 -1
  651. package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.d.ts.map +1 -1
  652. package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.js +4 -2
  653. package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.js.map +1 -1
  654. package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts +1 -1
  655. package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts.map +1 -1
  656. package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts +1 -1
  657. package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts.map +1 -1
  658. package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts +1 -1
  659. package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts.map +1 -1
  660. package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts +1 -1
  661. package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts.map +1 -1
  662. package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts +1 -1
  663. package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts.map +1 -1
  664. package/lib/resolvers/mutations/payment/createPaymentProvider.js.map +1 -1
  665. package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts +1 -1
  666. package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts.map +1 -1
  667. package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.js +1 -1
  668. package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.js.map +1 -1
  669. package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts +1 -1
  670. package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts.map +1 -1
  671. package/lib/resolvers/mutations/payment/removePaymentCredentials.d.ts +1 -1
  672. package/lib/resolvers/mutations/payment/removePaymentProvider.d.ts +1 -1
  673. package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts +1 -1
  674. package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts.map +1 -1
  675. package/lib/resolvers/mutations/payment/updatePaymentProvider.d.ts +1 -1
  676. package/lib/resolvers/mutations/products/addProductAssignment.d.ts +1 -1
  677. package/lib/resolvers/mutations/products/addProductAssignment.d.ts.map +1 -1
  678. package/lib/resolvers/mutations/products/addProductAssignment.js.map +1 -1
  679. package/lib/resolvers/mutations/products/addProductMedia.d.ts +6 -0
  680. package/lib/resolvers/mutations/products/addProductMedia.d.ts.map +1 -0
  681. package/lib/resolvers/mutations/products/addProductMedia.js +18 -0
  682. package/lib/resolvers/mutations/products/addProductMedia.js.map +1 -0
  683. package/lib/resolvers/mutations/products/addProductReviewVote.d.ts +1 -1
  684. package/lib/resolvers/mutations/products/addProductReviewVote.d.ts.map +1 -1
  685. package/lib/resolvers/mutations/products/addProductReviewVote.js +1 -1
  686. package/lib/resolvers/mutations/products/addProductReviewVote.js.map +1 -1
  687. package/lib/resolvers/mutations/products/createProductBundleItem.d.ts +1 -1
  688. package/lib/resolvers/mutations/products/createProductBundleItem.d.ts.map +1 -1
  689. package/lib/resolvers/mutations/products/createProductReview.d.ts +2 -2
  690. package/lib/resolvers/mutations/products/createProductReview.d.ts.map +1 -1
  691. package/lib/resolvers/mutations/products/createProductReview.js +2 -2
  692. package/lib/resolvers/mutations/products/createProductReview.js.map +1 -1
  693. package/lib/resolvers/mutations/products/createProductVariationOption.d.ts +1 -1
  694. package/lib/resolvers/mutations/products/createProductVariationOption.d.ts.map +1 -1
  695. package/lib/resolvers/mutations/products/publishProduct.d.ts +1 -1
  696. package/lib/resolvers/mutations/products/publishProduct.d.ts.map +1 -1
  697. package/lib/resolvers/mutations/products/removeBundleItem.d.ts +1 -1
  698. package/lib/resolvers/mutations/products/removeBundleItem.d.ts.map +1 -1
  699. package/lib/resolvers/mutations/products/removeProduct.d.ts +1 -1
  700. package/lib/resolvers/mutations/products/removeProduct.d.ts.map +1 -1
  701. package/lib/resolvers/mutations/products/removeProductAssignment.d.ts +1 -1
  702. package/lib/resolvers/mutations/products/removeProductAssignment.d.ts.map +1 -1
  703. package/lib/resolvers/mutations/products/removeProductMedia.d.ts +1 -1
  704. package/lib/resolvers/mutations/products/removeProductMedia.d.ts.map +1 -1
  705. package/lib/resolvers/mutations/products/removeProductReview.d.ts +1 -1
  706. package/lib/resolvers/mutations/products/removeProductReview.d.ts.map +1 -1
  707. package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts +1 -1
  708. package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts.map +1 -1
  709. package/lib/resolvers/mutations/products/removeProductVariation.d.ts +1 -1
  710. package/lib/resolvers/mutations/products/removeProductVariation.d.ts.map +1 -1
  711. package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts +1 -1
  712. package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts.map +1 -1
  713. package/lib/resolvers/mutations/products/unpublishProduct.d.ts +1 -1
  714. package/lib/resolvers/mutations/products/unpublishProduct.d.ts.map +1 -1
  715. package/lib/resolvers/mutations/products/updateProduct.d.ts +1 -1
  716. package/lib/resolvers/mutations/products/updateProduct.d.ts.map +1 -1
  717. package/lib/resolvers/mutations/products/updateProductCommerce.d.ts +1 -1
  718. package/lib/resolvers/mutations/products/updateProductCommerce.d.ts.map +1 -1
  719. package/lib/resolvers/mutations/products/updateProductPlan.d.ts +1 -1
  720. package/lib/resolvers/mutations/products/updateProductPlan.d.ts.map +1 -1
  721. package/lib/resolvers/mutations/products/updateProductReview.d.ts +1 -1
  722. package/lib/resolvers/mutations/products/updateProductReview.d.ts.map +1 -1
  723. package/lib/resolvers/mutations/products/updateProductSupply.d.ts +1 -1
  724. package/lib/resolvers/mutations/products/updateProductSupply.d.ts.map +1 -1
  725. package/lib/resolvers/mutations/products/updateProductTokenization.d.ts +1 -1
  726. package/lib/resolvers/mutations/products/updateProductTokenization.d.ts.map +1 -1
  727. package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts +1 -1
  728. package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts.map +1 -1
  729. package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts +1 -1
  730. package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts.map +1 -1
  731. package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts +1 -1
  732. package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts.map +1 -1
  733. package/lib/resolvers/mutations/quotations/requestQuotation.js +1 -1
  734. package/lib/resolvers/mutations/quotations/requestQuotation.js.map +1 -1
  735. package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts +1 -1
  736. package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts.map +1 -1
  737. package/lib/resolvers/mutations/users/addPushSubscription.d.ts +2 -2
  738. package/lib/resolvers/mutations/users/addPushSubscription.d.ts.map +1 -1
  739. package/lib/resolvers/mutations/users/addPushSubscription.js.map +1 -1
  740. package/lib/resolvers/mutations/users/heartbeat.d.ts +1 -1
  741. package/lib/resolvers/mutations/users/heartbeat.d.ts.map +1 -1
  742. package/lib/resolvers/mutations/users/removePushSubscription.d.ts +1 -1
  743. package/lib/resolvers/mutations/users/removePushSubscription.d.ts.map +1 -1
  744. package/lib/resolvers/mutations/users/removePushSubscription.js.map +1 -1
  745. package/lib/resolvers/mutations/users/removeUser.d.ts +1 -1
  746. package/lib/resolvers/mutations/users/removeUser.d.ts.map +1 -1
  747. package/lib/resolvers/mutations/users/removeUser.js.map +1 -1
  748. package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
  749. package/lib/resolvers/mutations/users/setRoles.d.ts.map +1 -1
  750. package/lib/resolvers/mutations/users/setUserTags.d.ts +1 -1
  751. package/lib/resolvers/mutations/users/setUserTags.d.ts.map +1 -1
  752. package/lib/resolvers/mutations/users/updateUserAvatar.d.ts +6 -0
  753. package/lib/resolvers/mutations/users/updateUserAvatar.d.ts.map +1 -0
  754. package/lib/resolvers/mutations/users/updateUserAvatar.js +22 -0
  755. package/lib/resolvers/mutations/users/updateUserAvatar.js.map +1 -0
  756. package/lib/resolvers/mutations/users/updateUserProfile.d.ts +1 -1
  757. package/lib/resolvers/mutations/users/updateUserProfile.d.ts.map +1 -1
  758. package/lib/resolvers/mutations/users/updateUserProfile.js.map +1 -1
  759. package/lib/resolvers/mutations/utils/getOrderCart.d.ts +7 -0
  760. package/lib/resolvers/mutations/utils/getOrderCart.d.ts.map +1 -0
  761. package/lib/resolvers/mutations/utils/getOrderCart.js +13 -0
  762. package/lib/resolvers/mutations/utils/getOrderCart.js.map +1 -0
  763. package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts +2 -2
  764. package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts.map +1 -1
  765. package/lib/resolvers/mutations/warehousing/createWarehousingProvider.js.map +1 -1
  766. package/lib/resolvers/mutations/warehousing/exportToken.d.ts +1 -1
  767. package/lib/resolvers/mutations/warehousing/exportToken.d.ts.map +1 -1
  768. package/lib/resolvers/mutations/warehousing/invalidateToken.d.ts +1 -1
  769. package/lib/resolvers/mutations/warehousing/invalidateToken.d.ts.map +1 -1
  770. package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts +1 -1
  771. package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts.map +1 -1
  772. package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts +1 -1
  773. package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts.map +1 -1
  774. package/lib/resolvers/mutations/worker/allocateWork.d.ts +3 -3
  775. package/lib/resolvers/mutations/worker/allocateWork.d.ts.map +1 -1
  776. package/lib/resolvers/mutations/worker/allocateWork.js.map +1 -1
  777. package/lib/resolvers/mutations/worker/finishWork.d.ts +2 -2
  778. package/lib/resolvers/mutations/worker/finishWork.d.ts.map +1 -1
  779. package/lib/resolvers/mutations/worker/finishWork.js +2 -2
  780. package/lib/resolvers/mutations/worker/finishWork.js.map +1 -1
  781. package/lib/resolvers/mutations/worker/processNextWork.d.ts +1 -1
  782. package/lib/resolvers/mutations/worker/processNextWork.d.ts.map +1 -1
  783. package/lib/resolvers/mutations/worker/removeWork.d.ts +1 -1
  784. package/lib/resolvers/mutations/worker/removeWork.d.ts.map +1 -1
  785. package/lib/resolvers/queries/assortments/assortment.d.ts +1 -1
  786. package/lib/resolvers/queries/assortments/assortment.d.ts.map +1 -1
  787. package/lib/resolvers/queries/countries/country.d.ts +1 -1
  788. package/lib/resolvers/queries/countries/country.d.ts.map +1 -1
  789. package/lib/resolvers/queries/currencies/currency.d.ts +1 -1
  790. package/lib/resolvers/queries/currencies/currency.d.ts.map +1 -1
  791. package/lib/resolvers/queries/delivery/deliveryProvider.d.ts +1 -1
  792. package/lib/resolvers/queries/delivery/deliveryProvider.d.ts.map +1 -1
  793. package/lib/resolvers/queries/enrollments/enrollment.d.ts +1 -1
  794. package/lib/resolvers/queries/enrollments/enrollment.d.ts.map +1 -1
  795. package/lib/resolvers/queries/events/event.d.ts +1 -1
  796. package/lib/resolvers/queries/events/event.d.ts.map +1 -1
  797. package/lib/resolvers/queries/filters/filter.d.ts +1 -1
  798. package/lib/resolvers/queries/filters/filter.d.ts.map +1 -1
  799. package/lib/resolvers/queries/languages/language.d.ts +1 -1
  800. package/lib/resolvers/queries/languages/language.d.ts.map +1 -1
  801. package/lib/resolvers/queries/orders/order.d.ts +1 -1
  802. package/lib/resolvers/queries/orders/order.d.ts.map +1 -1
  803. package/lib/resolvers/queries/orders/orderStatistics.d.ts +1 -1
  804. package/lib/resolvers/queries/payment/paymentProvider.d.ts +1 -1
  805. package/lib/resolvers/queries/payment/paymentProvider.d.ts.map +1 -1
  806. package/lib/resolvers/queries/products/product.d.ts +1 -1
  807. package/lib/resolvers/queries/products/product.d.ts.map +1 -1
  808. package/lib/resolvers/queries/products/product.js +1 -1
  809. package/lib/resolvers/queries/products/product.js.map +1 -1
  810. package/lib/resolvers/queries/products/productCatalogPrices.d.ts +1 -1
  811. package/lib/resolvers/queries/products/productCatalogPrices.d.ts.map +1 -1
  812. package/lib/resolvers/queries/products/productReview.d.ts +1 -1
  813. package/lib/resolvers/queries/products/productReview.d.ts.map +1 -1
  814. package/lib/resolvers/queries/quotations/quotation.d.ts +1 -1
  815. package/lib/resolvers/queries/quotations/quotation.d.ts.map +1 -1
  816. package/lib/resolvers/queries/shopInfo.d.ts.map +1 -1
  817. package/lib/resolvers/queries/shopInfo.js +53 -3
  818. package/lib/resolvers/queries/shopInfo.js.map +1 -1
  819. package/lib/resolvers/queries/users/impersonator.d.ts +1 -1
  820. package/lib/resolvers/queries/users/impersonator.d.ts.map +1 -1
  821. package/lib/resolvers/queries/users/me.d.ts +1 -1
  822. package/lib/resolvers/queries/users/me.d.ts.map +1 -1
  823. package/lib/resolvers/queries/users/user.d.ts +1 -1
  824. package/lib/resolvers/queries/users/user.d.ts.map +1 -1
  825. package/lib/resolvers/queries/users/user.js +1 -1
  826. package/lib/resolvers/queries/users/user.js.map +1 -1
  827. package/lib/resolvers/queries/warehousing/token.d.ts +1 -1
  828. package/lib/resolvers/queries/warehousing/token.d.ts.map +1 -1
  829. package/lib/resolvers/queries/warehousing/tokens.d.ts.map +1 -1
  830. package/lib/resolvers/queries/warehousing/tokens.js +1 -1
  831. package/lib/resolvers/queries/warehousing/tokens.js.map +1 -1
  832. package/lib/resolvers/queries/warehousing/tokensCount.d.ts +1 -1
  833. package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts +1 -1
  834. package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts.map +1 -1
  835. package/lib/resolvers/queries/worker/work.d.ts +1 -1
  836. package/lib/resolvers/queries/worker/work.d.ts.map +1 -1
  837. package/lib/resolvers/scalars/LowerCaseString.d.ts +1 -1
  838. package/lib/resolvers/scalars/LowerCaseString.d.ts.map +1 -1
  839. package/lib/resolvers/scalars/index.d.ts +1 -1
  840. package/lib/resolvers/type/country-types.d.ts +2 -2
  841. package/lib/resolvers/type/country-types.d.ts.map +1 -1
  842. package/lib/resolvers/type/delivery-provider-types.d.ts +4 -4
  843. package/lib/resolvers/type/delivery-provider-types.js +1 -1
  844. package/lib/resolvers/type/delivery-provider-types.js.map +1 -1
  845. package/lib/resolvers/type/dimensions-types.d.ts +4 -4
  846. package/lib/resolvers/type/dispatch-types.d.ts +15 -0
  847. package/lib/resolvers/type/dispatch-types.d.ts.map +1 -0
  848. package/lib/resolvers/type/dispatch-types.js +16 -0
  849. package/lib/resolvers/type/dispatch-types.js.map +1 -0
  850. package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts +1 -1
  851. package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts.map +1 -1
  852. package/lib/resolvers/type/enrollment/enrollment-delivery-types.js +2 -0
  853. package/lib/resolvers/type/enrollment/enrollment-delivery-types.js.map +1 -1
  854. package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts +1 -1
  855. package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts.map +1 -1
  856. package/lib/resolvers/type/enrollment/enrollment-payment-types.js +4 -2
  857. package/lib/resolvers/type/enrollment/enrollment-payment-types.js.map +1 -1
  858. package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts +1 -1
  859. package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts.map +1 -1
  860. package/lib/resolvers/type/enrollment/enrollment-period-types.js +2 -0
  861. package/lib/resolvers/type/enrollment/enrollment-period-types.js.map +1 -1
  862. package/lib/resolvers/type/enrollment/enrollment-types.d.ts +4 -4
  863. package/lib/resolvers/type/enrollment/enrollment-types.js +2 -2
  864. package/lib/resolvers/type/enrollment/enrollment-types.js.map +1 -1
  865. package/lib/resolvers/type/filter/filter-types.d.ts +3 -3
  866. package/lib/resolvers/type/filter/loaded-filter-types.d.ts +3 -3
  867. package/lib/resolvers/type/index.d.ts +73 -90
  868. package/lib/resolvers/type/index.d.ts.map +1 -1
  869. package/lib/resolvers/type/index.js +0 -2
  870. package/lib/resolvers/type/index.js.map +1 -1
  871. package/lib/resolvers/type/media-types.d.ts +1 -1
  872. package/lib/resolvers/type/media-types.d.ts.map +1 -1
  873. package/lib/resolvers/type/media-types.js +5 -1
  874. package/lib/resolvers/type/media-types.js.map +1 -1
  875. package/lib/resolvers/type/oauth-account.d.ts +6 -0
  876. package/lib/resolvers/type/oauth-account.d.ts.map +1 -0
  877. package/lib/resolvers/type/oauth-account.js +7 -0
  878. package/lib/resolvers/type/oauth-account.js.map +1 -0
  879. package/lib/resolvers/type/oauth-provider.d.ts +6 -0
  880. package/lib/resolvers/type/oauth-provider.d.ts.map +1 -0
  881. package/lib/resolvers/type/oauth-provider.js +6 -0
  882. package/lib/resolvers/type/oauth-provider.js.map +1 -0
  883. package/lib/resolvers/type/order/order-delivery-discount-types.d.ts +1 -1
  884. package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +1 -1
  885. package/lib/resolvers/type/order/order-discount-types.d.ts +1 -1
  886. package/lib/resolvers/type/order/order-global-discount-types.d.ts +1 -1
  887. package/lib/resolvers/type/order/order-item-discount-types.d.ts +1 -1
  888. package/lib/resolvers/type/order/order-item-types.d.ts +4 -4
  889. package/lib/resolvers/type/order/order-item-types.d.ts.map +1 -1
  890. package/lib/resolvers/type/order/order-item-types.js +8 -3
  891. package/lib/resolvers/type/order/order-item-types.js.map +1 -1
  892. package/lib/resolvers/type/order/order-payment-discount-types.d.ts +1 -1
  893. package/lib/resolvers/type/order/order-statistics-types.d.ts.map +1 -1
  894. package/lib/resolvers/type/order/order-statistics-types.js.map +1 -1
  895. package/lib/resolvers/type/order/order-types.d.ts +4 -4
  896. package/lib/resolvers/type/order/order-types.d.ts.map +1 -1
  897. package/lib/resolvers/type/order/order-types.js +18 -7
  898. package/lib/resolvers/type/order/order-types.js.map +1 -1
  899. package/lib/resolvers/type/payment/payment-provider-types.d.ts +3 -3
  900. package/lib/resolvers/type/payment/payment-provider-types.js.map +1 -1
  901. package/lib/resolvers/type/price-types.d.ts +2 -2
  902. package/lib/resolvers/type/price-types.d.ts.map +1 -1
  903. package/lib/resolvers/type/price-types.js +5 -2
  904. package/lib/resolvers/type/price-types.js.map +1 -1
  905. package/lib/resolvers/type/product/product-bundle-types.d.ts +5 -5
  906. package/lib/resolvers/type/product/product-bundle-types.d.ts.map +1 -1
  907. package/lib/resolvers/type/product/product-configurable-types.d.ts +2 -2
  908. package/lib/resolvers/type/product/product-configurable-types.d.ts.map +1 -1
  909. package/lib/resolvers/type/product/product-configurable-types.js +3 -2
  910. package/lib/resolvers/type/product/product-configurable-types.js.map +1 -1
  911. package/lib/resolvers/type/product/product-discount.d.ts +2 -2
  912. package/lib/resolvers/type/product/product-discount.js +1 -1
  913. package/lib/resolvers/type/product/product-discount.js.map +1 -1
  914. package/lib/resolvers/type/product/product-plan-types.d.ts +5 -5
  915. package/lib/resolvers/type/product/product-plan-types.d.ts.map +1 -1
  916. package/lib/resolvers/type/product/product-plan-types.js +7 -5
  917. package/lib/resolvers/type/product/product-plan-types.js.map +1 -1
  918. package/lib/resolvers/type/product/product-review-types.js +1 -1
  919. package/lib/resolvers/type/product/product-review-types.js.map +1 -1
  920. package/lib/resolvers/type/product/product-simple-types.d.ts +6 -6
  921. package/lib/resolvers/type/product/product-simple-types.d.ts.map +1 -1
  922. package/lib/resolvers/type/product/product-tokenized-types.d.ts +8 -8
  923. package/lib/resolvers/type/product/product-tokenized-types.d.ts.map +1 -1
  924. package/lib/resolvers/type/product/product-tokenized-types.js +2 -2
  925. package/lib/resolvers/type/product/product-tokenized-types.js.map +1 -1
  926. package/lib/resolvers/type/product/product-variation-assignment-vector.d.ts +2 -2
  927. package/lib/resolvers/type/product/product-variation-assignment-vector.d.ts.map +1 -1
  928. package/lib/resolvers/type/product-search-result-types.js +2 -2
  929. package/lib/resolvers/type/product-search-result-types.js.map +1 -1
  930. package/lib/resolvers/type/quotation-types.d.ts +2 -2
  931. package/lib/resolvers/type/quotation-types.js +2 -2
  932. package/lib/resolvers/type/quotation-types.js.map +1 -1
  933. package/lib/resolvers/type/shop-types.d.ts.map +1 -1
  934. package/lib/resolvers/type/shop-types.js +2 -1
  935. package/lib/resolvers/type/shop-types.js.map +1 -1
  936. package/lib/resolvers/type/stock-types.d.ts +14 -0
  937. package/lib/resolvers/type/stock-types.d.ts.map +1 -0
  938. package/lib/resolvers/type/stock-types.js +15 -0
  939. package/lib/resolvers/type/stock-types.js.map +1 -0
  940. package/lib/resolvers/type/token-types.d.ts +2 -2
  941. package/lib/resolvers/type/user-types.d.ts +3 -3
  942. package/lib/resolvers/type/user-types.d.ts.map +1 -1
  943. package/lib/resolvers/type/user-types.js +4 -0
  944. package/lib/resolvers/type/user-types.js.map +1 -1
  945. package/lib/resolvers/type/warehousing-provider-types.d.ts +2 -2
  946. package/lib/resolvers/type/warehousing-provider-types.d.ts.map +1 -1
  947. package/lib/resolvers/type/web3-address.d.ts +1 -1
  948. package/lib/resolvers/type/work-types.d.ts +1 -1
  949. package/lib/resolvers/type/work-types.d.ts.map +1 -1
  950. package/lib/roles/all.js +2 -2
  951. package/lib/roles/all.js.map +1 -1
  952. package/lib/roles/index.d.ts +9 -9
  953. package/lib/roles/index.d.ts.map +1 -1
  954. package/lib/roles/index.js +3 -3
  955. package/lib/roles/index.js.map +1 -1
  956. package/lib/schema/index.d.ts +1 -1
  957. package/lib/schema/index.d.ts.map +1 -1
  958. package/lib/schema/index.js +3 -3
  959. package/lib/schema/index.js.map +1 -1
  960. package/lib/schema/query.d.ts.map +1 -1
  961. package/lib/schema/query.js +2 -0
  962. package/lib/schema/query.js.map +1 -1
  963. package/lib/schema/types/shop.d.ts.map +1 -1
  964. package/lib/schema/types/shop.js +3 -0
  965. package/lib/schema/types/shop.js.map +1 -1
  966. package/lib/schema/types/warehousing.js +1 -1
  967. package/lib/user-context.d.ts +7 -0
  968. package/lib/user-context.d.ts.map +1 -0
  969. package/lib/user-context.js +76 -0
  970. package/lib/user-context.js.map +1 -0
  971. package/package.json +18 -8
  972. package/src/api-index.ts +7 -6
  973. package/src/chat/defaultSystemPrompt.ts +16 -0
  974. package/src/chat/generateImageHandler.ts +78 -0
  975. package/src/chat/normalizeToolsIndex.ts +11 -0
  976. package/src/chat/utils.ts +31 -0
  977. package/src/context.ts +8 -2
  978. package/src/createGraphQLServer.ts +16 -13
  979. package/src/errors.ts +6 -0
  980. package/src/express/chatHandler.ts +204 -0
  981. package/src/express/createBulkImportMiddleware.ts +8 -7
  982. package/src/express/createERCMetadataMiddleware.ts +9 -11
  983. package/src/express/createMCPMiddleware.ts +1 -1
  984. package/src/express/createTempUploadMiddleware.ts +5 -9
  985. package/src/express/index.ts +3 -1
  986. package/src/fastify/bulkImportHandler.ts +8 -6
  987. package/src/fastify/chatHandler.ts +198 -0
  988. package/src/fastify/ercMetadataHandler.ts +4 -7
  989. package/src/fastify/index.ts +39 -3
  990. package/src/fastify/mcpHandler.ts +2 -2
  991. package/src/fastify/tempUploadHandler.ts +4 -6
  992. package/src/loaders/assortmentLinksLoader.ts +10 -7
  993. package/src/loaders/assortmentMediasLoader.ts +1 -1
  994. package/src/loaders/filterTextLoader.ts +16 -15
  995. package/src/loaders/productMediasLoader.ts +1 -1
  996. package/src/loaders/productProxiesLoader.ts +1 -1
  997. package/src/loaders/utils.ts +1 -1
  998. package/src/locale-context.ts +3 -3
  999. package/src/mcp/index.ts +6 -0
  1000. package/src/mcp/resources/localization.ts +129 -0
  1001. package/src/mcp/tools/assortment/handlers/removeAssortment.ts +2 -2
  1002. package/src/mcp/tools/assortment/handlers/removeAssortmentFilter.ts +2 -2
  1003. package/src/mcp/tools/assortment/handlers/removeAssortmentLink.ts +2 -2
  1004. package/src/mcp/tools/assortment/handlers/removeAssortmentProduct.ts +2 -2
  1005. package/src/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.ts +2 -1
  1006. package/src/mcp/tools/assortment/schemas.ts +1 -1
  1007. package/src/mcp/tools/filter/handlers/createFilter.ts +2 -1
  1008. package/src/mcp/tools/filter/handlers/createFilterOption.ts +9 -3
  1009. package/src/mcp/tools/filter/handlers/removeFilterOption.ts +3 -0
  1010. package/src/mcp/tools/filter/handlers/updateFilterTexts.ts +2 -1
  1011. package/src/mcp/tools/localization/index.ts +1 -1
  1012. package/src/mcp/tools/order/handlers/deliverOrder.ts +8 -3
  1013. package/src/mcp/tools/order/handlers/getTopCustomers.ts +11 -7
  1014. package/src/mcp/tools/order/handlers/payOrder.ts +8 -3
  1015. package/src/mcp/tools/product/handlers/addBundleItem.ts +21 -20
  1016. package/src/mcp/tools/product/handlers/addProductAssignment.ts +4 -4
  1017. package/src/mcp/tools/product/handlers/addProductMedia.ts +4 -5
  1018. package/src/mcp/tools/product/handlers/addProductVariationOption.ts +3 -2
  1019. package/src/mcp/tools/product/handlers/createProductVariation.ts +1 -0
  1020. package/src/mcp/tools/product/handlers/getCatalogPrice.ts +3 -1
  1021. package/src/mcp/tools/product/handlers/getProductAssignments.ts +8 -4
  1022. package/src/mcp/tools/product/handlers/index.ts +2 -0
  1023. package/src/mcp/tools/product/handlers/removeProduct.ts +23 -3
  1024. package/src/mcp/tools/product/handlers/simulatePrice.ts +2 -0
  1025. package/src/mcp/tools/product/handlers/simulatePriceRange.ts +3 -0
  1026. package/src/mcp/tools/product/handlers/updateProduct.ts +12 -1
  1027. package/src/mcp/tools/product/handlers/updateProductMediaTexts.ts +5 -1
  1028. package/src/mcp/tools/product/handlers/updateProductTexts.ts +16 -0
  1029. package/src/mcp/tools/product/schemas.ts +19 -6
  1030. package/src/mcp/tools/quotation/handlers/countQuotations.ts +8 -0
  1031. package/src/mcp/tools/quotation/handlers/getQuotation.ts +8 -0
  1032. package/src/mcp/tools/quotation/handlers/index.ts +15 -0
  1033. package/src/mcp/tools/quotation/handlers/listQuotations.ts +14 -0
  1034. package/src/mcp/tools/quotation/handlers/makeQuotationProposal.ts +23 -0
  1035. package/src/mcp/tools/quotation/handlers/rejectQuotation.ts +21 -0
  1036. package/src/mcp/tools/quotation/handlers/verifyQuotation.ts +21 -0
  1037. package/src/mcp/tools/quotation/index.ts +12 -0
  1038. package/src/mcp/tools/quotation/quotationManagement.ts +34 -0
  1039. package/src/mcp/tools/quotation/schemas.ts +136 -0
  1040. package/src/mcp/tools/system/handlers/listWork.ts +3 -3
  1041. package/src/mcp/tools/system/index.ts +1 -1
  1042. package/src/mcp/tools/system/schemas.ts +2 -2
  1043. package/src/mcp/tools/system/types.ts +1 -1
  1044. package/src/mcp/tools/users/handlers/addUserEmail.ts +2 -2
  1045. package/src/mcp/tools/users/handlers/enrollUser.ts +1 -1
  1046. package/src/mcp/tools/users/handlers/getCurrentUser.ts +1 -1
  1047. package/src/mcp/tools/users/handlers/getUserAvatar.ts +1 -1
  1048. package/src/mcp/tools/users/handlers/removeUserEmail.ts +2 -2
  1049. package/src/mcp/utils/getNormalizedAssortmentDetails.ts +9 -29
  1050. package/src/mcp/utils/getNormalizedFilterDetails.ts +3 -3
  1051. package/src/mcp/utils/getNormalizedOrderDetails.ts +3 -3
  1052. package/src/mcp/utils/getNormalizedProductDetails.ts +11 -29
  1053. package/src/mcp/utils/getNormalizedQuotationDetails.ts +38 -0
  1054. package/src/mcp/utils/getNormalizedUserDetails.ts +3 -3
  1055. package/src/mcp/utils/normalizeMediaUrl.ts +1 -1
  1056. package/src/mcp/utils/normalizeProxyAssignments.ts +29 -0
  1057. package/src/mcp/utils/sharedSchemas.ts +1 -1
  1058. package/src/resolvers/mutations/accounts/addEmail.ts +3 -3
  1059. package/src/resolvers/mutations/accounts/addWeb3Address.ts +2 -2
  1060. package/src/resolvers/mutations/accounts/addWebAuthnCredentials.ts +2 -2
  1061. package/src/resolvers/mutations/accounts/changePassword.ts +4 -4
  1062. package/src/resolvers/mutations/accounts/createUser.ts +3 -3
  1063. package/src/resolvers/mutations/accounts/loginAsGuest.ts +3 -2
  1064. package/src/resolvers/mutations/accounts/loginWithPassword.ts +4 -3
  1065. package/src/resolvers/mutations/accounts/loginWithWebAuthn.ts +4 -3
  1066. package/src/resolvers/mutations/accounts/removeEmail.ts +3 -3
  1067. package/src/resolvers/mutations/accounts/removeWeb3Address.ts +2 -2
  1068. package/src/resolvers/mutations/accounts/removeWebAuthnCredentials.ts +2 -2
  1069. package/src/resolvers/mutations/accounts/verifyEmail.ts +3 -2
  1070. package/src/resolvers/mutations/accounts/verifyWeb3Address.ts +3 -3
  1071. package/src/resolvers/mutations/assortments/removeAssortment.ts +3 -5
  1072. package/src/resolvers/mutations/delivery/createDeliveryProvider.ts +1 -1
  1073. package/src/resolvers/mutations/enrollments/createEnrollment.ts +1 -1
  1074. package/src/resolvers/mutations/enrollments/updateEnrollment.ts +9 -6
  1075. package/src/resolvers/mutations/filters/createFilterOption.ts +1 -1
  1076. package/src/resolvers/mutations/filters/removeFilterOption.ts +1 -1
  1077. package/src/resolvers/mutations/filters/updateFilter.ts +1 -1
  1078. package/src/resolvers/mutations/orders/addCartDiscount.ts +1 -1
  1079. package/src/resolvers/mutations/orders/addCartProduct.ts +1 -1
  1080. package/src/resolvers/mutations/orders/addCartQuotation.ts +5 -2
  1081. package/src/resolvers/mutations/orders/addMultipleCartProducts.ts +3 -3
  1082. package/src/resolvers/mutations/orders/checkoutCart.ts +2 -2
  1083. package/src/resolvers/mutations/orders/createCart.ts +1 -1
  1084. package/src/resolvers/mutations/orders/deliverOrder.ts +8 -3
  1085. package/src/resolvers/mutations/orders/emptyCart.ts +1 -1
  1086. package/src/resolvers/mutations/orders/payOrder.ts +8 -3
  1087. package/src/resolvers/mutations/orders/removeCartDiscount.ts +10 -2
  1088. package/src/resolvers/mutations/orders/removeCartItem.ts +8 -1
  1089. package/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts +10 -4
  1090. package/src/resolvers/mutations/orders/updateCart.ts +1 -1
  1091. package/src/resolvers/mutations/orders/updateCartDeliveryPickUp.ts +4 -1
  1092. package/src/resolvers/mutations/orders/updateCartDeliveryShipping.ts +4 -1
  1093. package/src/resolvers/mutations/orders/updateCartItem.ts +8 -3
  1094. package/src/resolvers/mutations/orders/updateCartPaymentGeneric.ts +4 -1
  1095. package/src/resolvers/mutations/orders/updateCartPaymentInvoice.ts +4 -1
  1096. package/src/resolvers/mutations/payment/createPaymentProvider.ts +1 -1
  1097. package/src/resolvers/mutations/payment/markPaymentCredentialsPreferred.ts +1 -1
  1098. package/src/resolvers/mutations/products/addProductAssignment.ts +2 -2
  1099. package/src/resolvers/mutations/products/addProductReviewVote.ts +1 -1
  1100. package/src/resolvers/mutations/products/createProductReview.ts +6 -3
  1101. package/src/resolvers/mutations/quotations/requestQuotation.ts +1 -1
  1102. package/src/resolvers/mutations/users/addPushSubscription.ts +2 -2
  1103. package/src/resolvers/mutations/users/removePushSubscription.ts +2 -2
  1104. package/src/resolvers/mutations/users/removeUser.ts +3 -3
  1105. package/src/resolvers/mutations/users/updateUserProfile.ts +2 -2
  1106. package/src/resolvers/mutations/warehousing/createWarehousingProvider.ts +1 -1
  1107. package/src/resolvers/mutations/worker/allocateWork.ts +1 -1
  1108. package/src/resolvers/mutations/worker/finishWork.ts +3 -3
  1109. package/src/resolvers/queries/products/product.ts +1 -1
  1110. package/src/resolvers/queries/shopInfo.ts +52 -3
  1111. package/src/resolvers/queries/users/user.ts +2 -2
  1112. package/src/resolvers/queries/warehousing/tokens.ts +1 -1
  1113. package/src/resolvers/type/country-types.ts +2 -2
  1114. package/src/resolvers/type/delivery-provider-types.ts +1 -1
  1115. package/src/resolvers/type/enrollment/enrollment-delivery-types.ts +1 -0
  1116. package/src/resolvers/type/enrollment/enrollment-payment-types.ts +3 -2
  1117. package/src/resolvers/type/enrollment/enrollment-period-types.ts +1 -0
  1118. package/src/resolvers/type/enrollment/enrollment-types.ts +2 -2
  1119. package/src/resolvers/type/index.ts +0 -2
  1120. package/src/resolvers/type/media-types.ts +6 -2
  1121. package/src/resolvers/type/order/order-item-types.ts +20 -13
  1122. package/src/resolvers/type/order/order-statistics-types.ts +3 -3
  1123. package/src/resolvers/type/order/order-types.ts +22 -11
  1124. package/src/resolvers/type/payment/payment-provider-types.ts +2 -2
  1125. package/src/resolvers/type/price-types.ts +5 -3
  1126. package/src/resolvers/type/product/product-configurable-types.ts +7 -5
  1127. package/src/resolvers/type/product/product-discount.ts +1 -1
  1128. package/src/resolvers/type/product/product-plan-types.ts +12 -10
  1129. package/src/resolvers/type/product/product-review-types.ts +1 -1
  1130. package/src/resolvers/type/product/product-simple-types.ts +1 -1
  1131. package/src/resolvers/type/product/product-tokenized-types.ts +8 -8
  1132. package/src/resolvers/type/product/product-variation-assignment-vector.ts +2 -2
  1133. package/src/resolvers/type/product-search-result-types.ts +2 -2
  1134. package/src/resolvers/type/quotation-types.ts +2 -2
  1135. package/src/resolvers/type/shop-types.ts +3 -3
  1136. package/src/resolvers/type/user-types.ts +5 -4
  1137. package/src/resolvers/type/warehousing-provider-types.ts +2 -2
  1138. package/src/resolvers/type/work-types.ts +1 -1
  1139. package/src/roles/all.ts +2 -2
  1140. package/src/roles/index.ts +9 -3
  1141. package/src/schema/index.ts +4 -4
  1142. package/src/schema/query.ts +2 -0
  1143. package/src/schema/types/shop.ts +3 -0
  1144. package/src/schema/types/warehousing.ts +1 -1
  1145. package/src/resolvers/type/color-types.ts +0 -31
@@ -11,10 +11,8 @@ export default async function removeAssortment(
11
11
 
12
12
  if (!assortmentId) throw new InvalidIdError({ assortmentId });
13
13
 
14
- const assortment = await modules.assortments.findAssortment({ assortmentId });
15
- if (!assortment) throw new AssortmentNotFoundError({ assortmentId });
14
+ const deletedAssortment = await modules.assortments.delete(assortmentId);
15
+ if (!deletedAssortment) throw new AssortmentNotFoundError({ assortmentId });
16
16
 
17
- await modules.assortments.delete(assortmentId);
18
-
19
- return assortment;
17
+ return deletedAssortment;
20
18
  }
@@ -6,7 +6,7 @@ import { DeliveryDirector } from '@unchainedshop/core';
6
6
 
7
7
  export default async function createDeliveryProvider(
8
8
  root: never,
9
- { deliveryProvider }: { deliveryProvider: DeliveryProvider },
9
+ { deliveryProvider }: { deliveryProvider: Pick<DeliveryProvider, 'type' | 'adapterKey'> },
10
10
  { modules, userId }: Context,
11
11
  ) {
12
12
  log('mutation createDeliveryProvider', { userId });
@@ -45,7 +45,7 @@ export default async function createEnrollment(
45
45
  payment,
46
46
  productId,
47
47
  quantity,
48
- userId,
48
+ userId: userId!,
49
49
  });
50
50
 
51
51
  return await services.enrollments.initializeEnrollment(enrollment, {
@@ -38,23 +38,26 @@ export default async function updateEnrollment(
38
38
  }
39
39
 
40
40
  if (meta) {
41
- enrollment = await modules.enrollments.updateContext(enrollmentId, meta);
41
+ enrollment = (await modules.enrollments.updateContext(enrollmentId, meta)) as Enrollment;
42
42
  }
43
43
 
44
44
  if (billingAddress) {
45
- enrollment = await modules.enrollments.updateBillingAddress(enrollmentId, billingAddress);
45
+ enrollment = (await modules.enrollments.updateBillingAddress(
46
+ enrollmentId,
47
+ billingAddress,
48
+ )) as Enrollment;
46
49
  }
47
50
 
48
51
  if (contact) {
49
- enrollment = await modules.enrollments.updateContact(enrollmentId, contact);
52
+ enrollment = (await modules.enrollments.updateContact(enrollmentId, contact)) as Enrollment;
50
53
  }
51
54
 
52
55
  if (payment) {
53
- enrollment = await modules.enrollments.updatePayment(enrollmentId, payment);
56
+ enrollment = (await modules.enrollments.updatePayment(enrollmentId, payment)) as Enrollment;
54
57
  }
55
58
 
56
59
  if (delivery) {
57
- enrollment = await modules.enrollments.updateDelivery(enrollmentId, delivery);
60
+ enrollment = (await modules.enrollments.updateDelivery(enrollmentId, delivery)) as Enrollment;
58
61
  }
59
62
 
60
63
  if (plan) {
@@ -64,7 +67,7 @@ export default async function updateEnrollment(
64
67
  'TODO: Unchained currently does not support order splitting for enrollments, therefore updates to quantity, product and configuration of a enrollment is forbidden for non initial enrollments',
65
68
  );
66
69
  }
67
- enrollment = await modules.enrollments.updatePlan(enrollmentId, plan);
70
+ enrollment = (await modules.enrollments.updatePlan(enrollmentId, plan)) as Enrollment;
68
71
  enrollment = await services.enrollments.initializeEnrollment(enrollment, { reason: 'updated_plan' });
69
72
  }
70
73
 
@@ -18,7 +18,7 @@ export default async function createFilterOption(
18
18
  if (!(await modules.filters.filterExists({ filterId }))) throw new FilterNotFoundError({ filterId });
19
19
 
20
20
  const filter = await modules.filters.createFilterOption(filterId, { value: option });
21
- await FilterDirector.invalidateProductIdCache(filter, context);
21
+ await FilterDirector.invalidateProductIdCache(filter!, context);
22
22
 
23
23
  if (texts) {
24
24
  await modules.filters.texts.updateTexts({ filterId, filterOptionValue: option }, texts);
@@ -19,7 +19,7 @@ export default async function removeFilterOption(
19
19
  filterId,
20
20
  filterOptionValue,
21
21
  });
22
- await FilterDirector.invalidateProductIdCache(filter, context);
22
+ await FilterDirector.invalidateProductIdCache(filter!, context);
23
23
 
24
24
  return filter;
25
25
  }
@@ -18,7 +18,7 @@ export default async function updateFilter(
18
18
  if (!(await modules.filters.filterExists({ filterId }))) throw new FilterNotFoundError({ filterId });
19
19
 
20
20
  const updatedFilter = await modules.filters.update(filterId, filter);
21
- await FilterDirector.invalidateProductIdCache(updatedFilter, context);
21
+ await FilterDirector.invalidateProductIdCache(updatedFilter!, context);
22
22
 
23
23
  return updatedFilter;
24
24
  }
@@ -18,7 +18,7 @@ export default async function addCartDiscount(
18
18
 
19
19
  const order = await services.orders.findOrInitCart({
20
20
  orderId,
21
- user,
21
+ user: user!,
22
22
  countryCode: context.countryCode,
23
23
  });
24
24
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -31,7 +31,7 @@ export default async function addCartProduct(
31
31
 
32
32
  const order = await services.orders.findOrInitCart({
33
33
  orderId,
34
- user,
34
+ user: user!,
35
35
  countryCode: context.countryCode,
36
36
  });
37
37
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -9,6 +9,7 @@ import {
9
9
  OrderWrongStatusError,
10
10
  ProductNotFoundError,
11
11
  OrderNotFoundError,
12
+ QuotationItemConfigurationError,
12
13
  } from '../../../errors.js';
13
14
  import { QuotationDirector } from '@unchainedshop/core';
14
15
 
@@ -45,7 +46,7 @@ export default async function addCartQuotation(
45
46
 
46
47
  const order = await services.orders.findOrInitCart({
47
48
  orderId,
48
- user,
49
+ user: user!,
49
50
  countryCode: context.countryCode,
50
51
  });
51
52
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -64,8 +65,10 @@ export default async function addCartQuotation(
64
65
  configuration,
65
66
  });
66
67
 
68
+ if (!quotationConfiguration) throw new QuotationItemConfigurationError({ configuration });
69
+
67
70
  const updatedOrderPosition = await modules.orders.positions.addProductItem({
68
- quantity: quotationConfiguration.quantity,
71
+ quantity: quotationConfiguration.quantity || 1,
69
72
  configuration: quotationConfiguration.configuration,
70
73
  quotationId,
71
74
  productId: quotation.productId,
@@ -6,7 +6,7 @@ import {
6
6
  OrderWrongStatusError,
7
7
  OrderNotFoundError,
8
8
  } from '../../../errors.js';
9
- import { ordersSettings } from '@unchainedshop/core-orders';
9
+ import { OrderPosition, ordersSettings } from '@unchainedshop/core-orders';
10
10
 
11
11
  export default async function addMultipleCartProducts(
12
12
  root: never,
@@ -43,7 +43,7 @@ export default async function addMultipleCartProducts(
43
43
 
44
44
  const order = await services.orders.findOrInitCart({
45
45
  orderId,
46
- user,
46
+ user: user!,
47
47
  countryCode: context.countryCode,
48
48
  });
49
49
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -52,7 +52,7 @@ export default async function addMultipleCartProducts(
52
52
  // Reduce is used to wait for each product to be added before processing the next (sequential processing)
53
53
  await itemsWithProducts.reduce(
54
54
  async (positionsPromise, { originalProduct, quantity, configuration }) => {
55
- const positions = await positionsPromise;
55
+ const positions: OrderPosition[] = await positionsPromise;
56
56
  if (quantity < 1)
57
57
  throw new OrderQuantityTooLowError({
58
58
  quantity,
@@ -21,7 +21,7 @@ export default async function checkoutCart(
21
21
  // Do not check for order status here! The checkout method will act accordingly
22
22
  const order = await services.orders.findOrInitCart({
23
23
  orderId: forceOrderId,
24
- user,
24
+ user: user!,
25
25
  countryCode: context.countryCode,
26
26
  });
27
27
  if (!order) throw new OrderNotFoundError({ orderId: forceOrderId });
@@ -30,7 +30,7 @@ export default async function checkoutCart(
30
30
  const checkedOutOrder = await services.orders.checkoutOrder(order._id, transactionContext);
31
31
  return checkedOutOrder;
32
32
  } catch (error) {
33
- logger.error(error.message, { userId, orderId: order._id });
33
+ logger.error(error, { userId, orderId: order._id });
34
34
  throw new OrderCheckoutError({
35
35
  userId,
36
36
  orderId: order._id,
@@ -14,7 +14,7 @@ export default async function createCart(
14
14
  if (order) throw new OrderNumberAlreadyExistsError({ orderNumber });
15
15
 
16
16
  return services.orders.nextUserCart({
17
- user,
17
+ user: user!,
18
18
  orderNumber,
19
19
  countryCode: context.countryCode,
20
20
  forceCartCreation: true,
@@ -6,6 +6,7 @@ import {
6
6
  OrderWrongDeliveryStatusError,
7
7
  OrderWrongStatusError,
8
8
  InvalidIdError,
9
+ OrderDeliveryNotFoundError,
9
10
  } from '../../../errors.js';
10
11
 
11
12
  export default async function deliverOrder(
@@ -25,9 +26,13 @@ export default async function deliverOrder(
25
26
  throw new OrderWrongStatusError({ status: order.status });
26
27
  }
27
28
 
28
- const orderDelivery = await modules.orders.deliveries.findDelivery({
29
- orderDeliveryId: order.deliveryId,
30
- });
29
+ const orderDelivery =
30
+ order.deliveryId &&
31
+ (await modules.orders.deliveries.findDelivery({
32
+ orderDeliveryId: order.deliveryId,
33
+ }));
34
+
35
+ if (!orderDelivery) throw new OrderDeliveryNotFoundError({ orderDeliveryId: order.deliveryId });
31
36
 
32
37
  if (
33
38
  modules.orders.deliveries.normalizedStatus(orderDelivery) !== OrderDeliveryStatus.OPEN &&
@@ -13,7 +13,7 @@ export default async function emptyCart(
13
13
 
14
14
  const order = await services.orders.findOrInitCart({
15
15
  orderId,
16
- user,
16
+ user: user!,
17
17
  countryCode: context.countryCode,
18
18
  });
19
19
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -6,6 +6,7 @@ import {
6
6
  OrderWrongPaymentStatusError,
7
7
  OrderWrongStatusError,
8
8
  InvalidIdError,
9
+ OrderPaymentNotFoundError,
9
10
  } from '../../../errors.js';
10
11
 
11
12
  export default async function payOrder(root: never, { orderId }: { orderId: string }, context: Context) {
@@ -22,9 +23,13 @@ export default async function payOrder(root: never, { orderId }: { orderId: stri
22
23
  throw new OrderWrongStatusError({ status: order.status });
23
24
  }
24
25
 
25
- const payment = await modules.orders.payments.findOrderPayment({
26
- orderPaymentId: order.paymentId,
27
- });
26
+ const payment =
27
+ order.paymentId &&
28
+ (await modules.orders.payments.findOrderPayment({
29
+ orderPaymentId: order.paymentId,
30
+ }));
31
+
32
+ if (!payment) throw new OrderPaymentNotFoundError({ orderPaymentId: order.paymentId });
28
33
 
29
34
  if (modules.orders.payments.normalizedStatus(payment) !== OrderPaymentStatus.OPEN) {
30
35
  throw new OrderWrongPaymentStatusError({
@@ -1,7 +1,12 @@
1
1
  import { log } from '@unchainedshop/logger';
2
2
  import { Context } from '../../../context.js';
3
3
 
4
- import { OrderDiscountNotFoundError, OrderWrongStatusError, InvalidIdError } from '../../../errors.js';
4
+ import {
5
+ OrderDiscountNotFoundError,
6
+ OrderWrongStatusError,
7
+ InvalidIdError,
8
+ OrderNotFoundError,
9
+ } from '../../../errors.js';
5
10
  import { OrderDiscountTrigger } from '@unchainedshop/core-orders';
6
11
  import { OrderDiscountDirector } from '@unchainedshop/core';
7
12
 
@@ -24,8 +29,11 @@ export default async function removeCartDiscount(
24
29
  const order = await modules.orders.findOrder({
25
30
  orderId: orderDiscount.orderId,
26
31
  });
32
+
33
+ if (!order) throw new OrderNotFoundError({ orderId: orderDiscount.orderId });
34
+
27
35
  if (!modules.orders.isCart(order)) {
28
- throw new OrderWrongStatusError({ status: order.status });
36
+ throw new OrderWrongStatusError({ status: order!.status });
29
37
  }
30
38
 
31
39
  if (orderDiscount.trigger === OrderDiscountTrigger.USER) {
@@ -1,6 +1,11 @@
1
1
  import { log } from '@unchainedshop/logger';
2
2
  import { Context } from '../../../context.js';
3
- import { OrderItemNotFoundError, OrderWrongStatusError, InvalidIdError } from '../../../errors.js';
3
+ import {
4
+ OrderItemNotFoundError,
5
+ OrderWrongStatusError,
6
+ InvalidIdError,
7
+ OrderNotFoundError,
8
+ } from '../../../errors.js';
4
9
 
5
10
  export default async function removeCartItem(
6
11
  root: never,
@@ -20,6 +25,8 @@ export default async function removeCartItem(
20
25
 
21
26
  const order = await modules.orders.findOrder({ orderId: orderItem.orderId });
22
27
 
28
+ if (!order) throw new OrderNotFoundError({ orderId: orderItem.orderId });
29
+
23
30
  if (!modules.orders.isCart(order)) {
24
31
  throw new OrderWrongStatusError({ status: order.status });
25
32
  }
@@ -7,6 +7,7 @@ import {
7
7
  OrderPaymentNotFoundError,
8
8
  OrderPaymentTypeError,
9
9
  OrderWrongPaymentStatusError,
10
+ PaymentProviderNotFoundError,
10
11
  UserNoCartError,
11
12
  } from '../../../errors.js';
12
13
  import { PaymentDirector } from '@unchainedshop/core';
@@ -33,18 +34,23 @@ export default async function signPaymentProviderForCheckout(
33
34
  } else {
34
35
  const order = await modules.orders.cart({
35
36
  countryCode: context.countryCode,
36
- userId,
37
+ userId: userId!,
37
38
  });
38
39
  if (!order) throw new UserNoCartError({ userId });
39
- orderPayment = await modules.orders.payments.findOrderPayment({
40
- orderPaymentId: order.paymentId,
41
- });
40
+ orderPayment =
41
+ order.paymentId &&
42
+ (await modules.orders.payments.findOrderPayment({
43
+ orderPaymentId: order.paymentId,
44
+ }));
42
45
  if (!orderPayment) throw new OrderPaymentNotFoundError({ orderPaymentId });
43
46
  }
44
47
 
45
48
  const provider = await modules.payment.paymentProviders.findProvider({
46
49
  paymentProviderId: orderPayment.paymentProviderId,
47
50
  });
51
+
52
+ if (!provider) throw new PaymentProviderNotFoundError({ id: orderPayment.paymentProviderId });
53
+
48
54
  const providerType = provider?.type;
49
55
 
50
56
  if (providerType !== PaymentProviderType.GENERIC)
@@ -21,7 +21,7 @@ export default async function updateCart(root: never, params: UpdateCartParams,
21
21
 
22
22
  const order = await services.orders.findOrInitCart({
23
23
  orderId,
24
- user,
24
+ user: user!,
25
25
  countryCode: context.countryCode,
26
26
  });
27
27
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -3,6 +3,7 @@ import { DeliveryProviderType } from '@unchainedshop/core-delivery';
3
3
  import { log } from '@unchainedshop/logger';
4
4
  import {
5
5
  InvalidIdError,
6
+ OrderDeliveryNotFoundError,
6
7
  OrderDeliveryTypeError,
7
8
  OrderNotFoundError,
8
9
  OrderWrongStatusError,
@@ -23,7 +24,7 @@ export default async function updateCartDeliveryPickUp(
23
24
 
24
25
  let order = await services.orders.findOrInitCart({
25
26
  orderId,
26
- user,
27
+ user: user!,
27
28
  countryCode: context.countryCode,
28
29
  });
29
30
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -43,6 +44,8 @@ export default async function updateCartDeliveryPickUp(
43
44
 
44
45
  order = (await modules.orders.setDeliveryProvider(order._id, deliveryProviderId)) || order;
45
46
 
47
+ if (!order.deliveryId) throw new OrderDeliveryNotFoundError({ orderId: order._id });
48
+
46
49
  await modules.orders.deliveries.updateContext(order.deliveryId, {
47
50
  orderPickUpLocationId,
48
51
  meta,
@@ -3,6 +3,7 @@ import { DeliveryProviderType } from '@unchainedshop/core-delivery';
3
3
  import { log } from '@unchainedshop/logger';
4
4
  import {
5
5
  InvalidIdError,
6
+ OrderDeliveryNotFoundError,
6
7
  OrderDeliveryTypeError,
7
8
  OrderNotFoundError,
8
9
  OrderWrongStatusError,
@@ -23,7 +24,7 @@ export default async function updateCartDeliveryShipping(
23
24
 
24
25
  let order = await services.orders.findOrInitCart({
25
26
  orderId,
26
- user,
27
+ user: user!,
27
28
  countryCode: context.countryCode,
28
29
  });
29
30
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -43,6 +44,8 @@ export default async function updateCartDeliveryShipping(
43
44
 
44
45
  order = (await modules.orders.setDeliveryProvider(order._id, deliveryProviderId)) || order;
45
46
 
47
+ if (!order.deliveryId) throw new OrderDeliveryNotFoundError({ orderId: order._id });
48
+
46
49
  await modules.orders.deliveries.updateContext(order.deliveryId, {
47
50
  address,
48
51
  meta,
@@ -6,6 +6,7 @@ import {
6
6
  OrderWrongStatusError,
7
7
  ProductNotFoundError,
8
8
  InvalidIdError,
9
+ OrderNotFoundError,
9
10
  } from '../../../errors.js';
10
11
  import { ordersSettings } from '@unchainedshop/core-orders';
11
12
 
@@ -19,7 +20,7 @@ export default async function updateCartItem(
19
20
  context: Context,
20
21
  ) {
21
22
  const { modules, services, userId } = context;
22
- const { itemId, configuration = null, quantity = null } = params;
23
+ const { itemId, configuration, quantity = 1 } = params;
23
24
 
24
25
  log(`mutation updateCartItem ${itemId} ${quantity} ${JSON.stringify(configuration)}`, { userId });
25
26
 
@@ -29,6 +30,9 @@ export default async function updateCartItem(
29
30
  if (!item) throw new OrderItemNotFoundError({ itemId });
30
31
 
31
32
  const order = await modules.orders.findOrder({ orderId: item.orderId });
33
+
34
+ if (!order) throw new OrderNotFoundError({ orderId: item.orderId });
35
+
32
36
  if (!modules.orders.isCart(order)) {
33
37
  throw new OrderWrongStatusError({ status: order.status });
34
38
  }
@@ -50,11 +54,12 @@ export default async function updateCartItem(
50
54
  context,
51
55
  );
52
56
 
53
- const updatedOrderPosition = await modules.orders.positions.updateProductItem({
57
+ await modules.orders.positions.updateProductItem({
54
58
  orderPositionId: item._id,
55
59
  quantity,
56
60
  configuration,
57
61
  });
62
+
58
63
  await services.orders.updateCalculation(order._id);
59
- return modules.orders.positions.findOrderPosition({ itemId: updatedOrderPosition._id });
64
+ return modules.orders.positions.findOrderPosition({ itemId: item._id });
60
65
  }
@@ -4,6 +4,7 @@ import { log } from '@unchainedshop/logger';
4
4
  import {
5
5
  InvalidIdError,
6
6
  OrderNotFoundError,
7
+ OrderPaymentNotFoundError,
7
8
  OrderPaymentTypeError,
8
9
  OrderWrongStatusError,
9
10
  } from '../../../errors.js';
@@ -23,7 +24,7 @@ export default async function updateCartPaymentGeneric(
23
24
 
24
25
  let order = await services.orders.findOrInitCart({
25
26
  orderId,
26
- user,
27
+ user: user!,
27
28
  countryCode: context.countryCode,
28
29
  });
29
30
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -43,6 +44,8 @@ export default async function updateCartPaymentGeneric(
43
44
 
44
45
  order = (await modules.orders.setPaymentProvider(order._id, paymentProviderId)) || order;
45
46
 
47
+ if (!order.paymentId) throw new OrderPaymentNotFoundError({ orderId: order._id });
48
+
46
49
  await modules.orders.payments.updateContext(order.paymentId, {
47
50
  meta,
48
51
  });
@@ -4,6 +4,7 @@ import { log } from '@unchainedshop/logger';
4
4
  import {
5
5
  InvalidIdError,
6
6
  OrderNotFoundError,
7
+ OrderPaymentNotFoundError,
7
8
  OrderPaymentTypeError,
8
9
  OrderWrongStatusError,
9
10
  } from '../../../errors.js';
@@ -23,7 +24,7 @@ export default async function updateCartPaymentInvoice(
23
24
 
24
25
  let order = await services.orders.findOrInitCart({
25
26
  orderId,
26
- user,
27
+ user: user!,
27
28
  countryCode: context.countryCode,
28
29
  });
29
30
  if (!order) throw new OrderNotFoundError({ orderId });
@@ -43,6 +44,8 @@ export default async function updateCartPaymentInvoice(
43
44
 
44
45
  order = (await modules.orders.setPaymentProvider(order._id, paymentProviderId)) || order;
45
46
 
47
+ if (!order.paymentId) throw new OrderPaymentNotFoundError({ orderId: order._id });
48
+
46
49
  await modules.orders.payments.updateContext(order.paymentId, {
47
50
  meta,
48
51
  });
@@ -6,7 +6,7 @@ import { PaymentDirector } from '@unchainedshop/core';
6
6
 
7
7
  export default async (
8
8
  root: never,
9
- { paymentProvider }: { paymentProvider: PaymentProvider },
9
+ { paymentProvider }: { paymentProvider: Pick<PaymentProvider, 'type' | 'adapterKey'> },
10
10
  { modules, userId }: Context,
11
11
  ) => {
12
12
  log('mutation createPaymentProvider', { userId });
@@ -22,7 +22,7 @@ export default async function makePaymentCredentialsPreferred(
22
22
 
23
23
  await modules.payment.paymentCredentials.markPreferred({
24
24
  paymentCredentialsId,
25
- userId,
25
+ userId: userId!,
26
26
  });
27
27
 
28
28
  return modules.payment.paymentCredentials.findPaymentCredential({
@@ -1,5 +1,5 @@
1
1
  import { log } from '@unchainedshop/logger';
2
- import { ProductTypes } from '@unchainedshop/core-products';
2
+ import { ProductTypes, ProductVariation } from '@unchainedshop/core-products';
3
3
 
4
4
  import { Context } from '../../../context.js';
5
5
  import { ProductConfiguration } from '@unchainedshop/core-products';
@@ -11,7 +11,7 @@ import {
11
11
  ProductVariationVectorAlreadySet,
12
12
  ProductVariationInfinityLoop,
13
13
  } from '../../../errors.js';
14
- const extractVariationMatrix = (variations = []) => {
14
+ const extractVariationMatrix = (variations: ProductVariation[] = []) => {
15
15
  const cartesianProduct = (arrays) => {
16
16
  return arrays.reduce(
17
17
  (acc, array) => acc.flatMap((item) => array.map((value) => [...item, value])),
@@ -18,5 +18,5 @@ export default async function addProductReviewVote(
18
18
  });
19
19
  if (!productReview) throw new ProductReviewNotFoundError({ productReviewId });
20
20
 
21
- return modules.products.reviews.votes.addVote(productReview, { meta, type, userId });
21
+ return modules.products.reviews.votes.addVote(productReview, { meta, type, userId: userId! });
22
22
  }
@@ -6,7 +6,10 @@ import { InvalidIdError, ProductNotFoundError } from '../../../errors.js';
6
6
 
7
7
  export default async function createProductReview(
8
8
  root: never,
9
- { productId, productReview }: { productId: string; productReview: ProductReview },
9
+ {
10
+ productId,
11
+ productReview,
12
+ }: { productId: string; productReview: Pick<ProductReview, 'title' | 'rating' | 'meta'> },
10
13
  { modules, userId }: Context,
11
14
  ) {
12
15
  log('mutation createProductReview', { userId, productId });
@@ -17,8 +20,8 @@ export default async function createProductReview(
17
20
  throw new ProductNotFoundError({ productId });
18
21
 
19
22
  return modules.products.reviews.create({
20
- productId,
21
- authorId: userId,
22
23
  ...productReview,
24
+ productId,
25
+ authorId: userId!,
23
26
  });
24
27
  }
@@ -20,7 +20,7 @@ export default async function requestQuotation(
20
20
  throw new ProductNotFoundError({ productId });
21
21
 
22
22
  const newQuotation = await modules.quotations.create({
23
- userId,
23
+ userId: userId!,
24
24
  productId,
25
25
  countryCode,
26
26
  currencyCode,
@@ -10,12 +10,12 @@ const addPushSubscription = async (
10
10
  const userAgent = context.getHeader('user-agent');
11
11
  log(`mutation addPushSubscription ${userAgent}`, { userId });
12
12
 
13
- await modules.users.addPushSubscription(userId, subscription, {
13
+ await modules.users.addPushSubscription(userId!, subscription, {
14
14
  userAgent,
15
15
  unsubscribeFromOtherUsers,
16
16
  });
17
17
 
18
- return modules.users.findUserById(userId);
18
+ return modules.users.findUserById(userId!);
19
19
  };
20
20
 
21
21
  export default addPushSubscription;
@@ -7,9 +7,9 @@ const removePushSubscription = async (_, { p256dh }, context: Context) => {
7
7
 
8
8
  log(`mutation removePushSubscription ${userId} ${userAgent}`, { userId });
9
9
 
10
- await modules.users.removePushSubscription(userId, p256dh);
10
+ await modules.users.removePushSubscription(userId!, p256dh);
11
11
 
12
- return modules.users.findUserById(userId);
12
+ return modules.users.findUserById(userId!);
13
13
  };
14
14
 
15
15
  export default removePushSubscription;
@@ -13,11 +13,11 @@ export default async function removeUser(
13
13
 
14
14
  log(`mutation removeUser ${normalizedUserId}`, { userId: currentUserId });
15
15
 
16
- if (!(await modules.users.userExists({ userId: normalizedUserId })))
16
+ if (!(await modules.users.userExists({ userId: normalizedUserId! })))
17
17
  throw new UserNotFoundError({ userId: normalizedUserId });
18
18
 
19
19
  if (removeUserReviews) {
20
- await modules.products.reviews.deleteMany({ authorId: normalizedUserId });
20
+ await modules.products.reviews.deleteMany({ authorId: normalizedUserId! });
21
21
  }
22
- return services.users.deleteUser({ userId: normalizedUserId });
22
+ return services.users.deleteUser({ userId: normalizedUserId! });
23
23
  }
@@ -13,8 +13,8 @@ export default async function updateUserProfile(
13
13
 
14
14
  log(`mutation updateUserProfile ${normalizedUserId}`, { userId });
15
15
 
16
- if (!(await modules.users.userExists({ userId: normalizedUserId })))
16
+ if (!(await modules.users.userExists({ userId: normalizedUserId! })))
17
17
  throw UserNotFoundError({ userId: normalizedUserId });
18
18
 
19
- return modules.users.updateProfile(normalizedUserId, profile);
19
+ return modules.users.updateProfile(normalizedUserId!, profile);
20
20
  }