@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.
- package/lib/api-index.d.ts +1 -1
- package/lib/api-index.d.ts.map +1 -1
- package/lib/api-index.js +5 -3
- package/lib/api-index.js.map +1 -1
- package/lib/chat/defaultSystemPrompt.d.ts +3 -0
- package/lib/chat/defaultSystemPrompt.d.ts.map +1 -0
- package/lib/chat/defaultSystemPrompt.js +16 -0
- package/lib/chat/defaultSystemPrompt.js.map +1 -0
- package/lib/chat/generateImageHandler.d.ts +7 -0
- package/lib/chat/generateImageHandler.d.ts.map +1 -0
- package/lib/chat/generateImageHandler.js +64 -0
- package/lib/chat/generateImageHandler.js.map +1 -0
- package/lib/chat/normalizeToolsIndex.d.ts +7 -0
- package/lib/chat/normalizeToolsIndex.d.ts.map +1 -0
- package/lib/chat/normalizeToolsIndex.js +11 -0
- package/lib/chat/normalizeToolsIndex.js.map +1 -0
- package/lib/chat/utils.d.ts +13 -0
- package/lib/chat/utils.d.ts.map +1 -0
- package/lib/chat/utils.js +32 -0
- package/lib/chat/utils.js.map +1 -0
- package/lib/context.d.ts +3 -0
- package/lib/context.d.ts.map +1 -1
- package/lib/context.js +5 -2
- package/lib/context.js.map +1 -1
- package/lib/createGraphQLServer.d.ts +7 -4
- package/lib/createGraphQLServer.d.ts.map +1 -1
- package/lib/createGraphQLServer.js +6 -6
- package/lib/createGraphQLServer.js.map +1 -1
- package/lib/errors.d.ts +1 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -0
- package/lib/errors.js.map +1 -1
- package/lib/express/chatHandler.d.ts +5 -0
- package/lib/express/chatHandler.d.ts.map +1 -0
- package/lib/express/chatHandler.js +165 -0
- package/lib/express/chatHandler.js.map +1 -0
- package/lib/express/createApolloMiddleware.d.ts +4 -0
- package/lib/express/createApolloMiddleware.d.ts.map +1 -0
- package/lib/express/createApolloMiddleware.js +36 -0
- package/lib/express/createApolloMiddleware.js.map +1 -0
- package/lib/express/createBulkImportMiddleware.d.ts.map +1 -1
- package/lib/express/createBulkImportMiddleware.js +8 -7
- package/lib/express/createBulkImportMiddleware.js.map +1 -1
- package/lib/express/createERCMetadataMiddleware.d.ts.map +1 -1
- package/lib/express/createERCMetadataMiddleware.js +9 -11
- package/lib/express/createERCMetadataMiddleware.js.map +1 -1
- package/lib/express/createMCPMiddleware.js +1 -1
- package/lib/express/createMCPMiddleware.js.map +1 -1
- package/lib/express/createSingleSignOnMiddleware.d.ts +5 -0
- package/lib/express/createSingleSignOnMiddleware.d.ts.map +1 -0
- package/lib/express/createSingleSignOnMiddleware.js +71 -0
- package/lib/express/createSingleSignOnMiddleware.js.map +1 -0
- package/lib/express/createTempUploadMiddleware.d.ts.map +1 -1
- package/lib/express/createTempUploadMiddleware.js +6 -8
- package/lib/express/createTempUploadMiddleware.js.map +1 -1
- package/lib/express/index.d.ts +1 -0
- package/lib/express/index.d.ts.map +1 -1
- package/lib/express/index.js +2 -1
- package/lib/express/index.js.map +1 -1
- package/lib/fastify/bulkImportHandler.d.ts.map +1 -1
- package/lib/fastify/bulkImportHandler.js +7 -6
- package/lib/fastify/bulkImportHandler.js.map +1 -1
- package/lib/fastify/chatHandler.d.ts +4 -0
- package/lib/fastify/chatHandler.d.ts.map +1 -0
- package/lib/fastify/chatHandler.js +157 -0
- package/lib/fastify/chatHandler.js.map +1 -0
- package/lib/fastify/ercMetadataHandler.d.ts.map +1 -1
- package/lib/fastify/ercMetadataHandler.js +4 -7
- package/lib/fastify/ercMetadataHandler.js.map +1 -1
- package/lib/fastify/index.d.ts +6 -1
- package/lib/fastify/index.d.ts.map +1 -1
- package/lib/fastify/index.js +29 -1
- package/lib/fastify/index.js.map +1 -1
- package/lib/fastify/mcpHandler.js +2 -2
- package/lib/fastify/mcpHandler.js.map +1 -1
- package/lib/fastify/tempUploadHandler.d.ts.map +1 -1
- package/lib/fastify/tempUploadHandler.js +5 -6
- package/lib/fastify/tempUploadHandler.js.map +1 -1
- package/lib/hashPassword.d.ts +2 -0
- package/lib/hashPassword.d.ts.map +1 -0
- package/lib/hashPassword.js +5 -0
- package/lib/hashPassword.js.map +1 -0
- package/lib/loaders/assortmentLinksLoader.d.ts.map +1 -1
- package/lib/loaders/assortmentLinksLoader.js +7 -4
- package/lib/loaders/assortmentLinksLoader.js.map +1 -1
- package/lib/loaders/assortmentMediasLoader.d.ts +2 -2
- package/lib/loaders/assortmentMediasLoader.d.ts.map +1 -1
- package/lib/loaders/assortmentMediasLoader.js.map +1 -1
- package/lib/loaders/filterTextLoader.d.ts +2 -2
- package/lib/loaders/filterTextLoader.d.ts.map +1 -1
- package/lib/loaders/filterTextLoader.js.map +1 -1
- package/lib/loaders/index.d.ts +8 -8
- package/lib/loaders/productMediasLoader.d.ts +2 -2
- package/lib/loaders/productMediasLoader.d.ts.map +1 -1
- package/lib/loaders/productMediasLoader.js.map +1 -1
- package/lib/loaders/productProxiesLoader.d.ts +2 -2
- package/lib/loaders/productProxiesLoader.d.ts.map +1 -1
- package/lib/loaders/productProxiesLoader.js.map +1 -1
- package/lib/loaders/utils.js +1 -1
- package/lib/loaders/utils.js.map +1 -1
- package/lib/locale-context.js +2 -2
- package/lib/locale-context.js.map +1 -1
- package/lib/mcp/index.d.ts.map +1 -1
- package/lib/mcp/index.js +4 -0
- package/lib/mcp/index.js.map +1 -1
- package/lib/mcp/resources/localization.d.ts +4 -0
- package/lib/mcp/resources/localization.d.ts.map +1 -0
- package/lib/mcp/resources/localization.js +93 -0
- package/lib/mcp/resources/localization.js.map +1 -0
- package/lib/mcp/tools/assortment/handlers/addAssortmentFilter.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentFilter.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentLink.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentLink.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentMedia.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentMedia.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentProduct.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/addAssortmentProduct.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/createAssortment.d.ts +25 -1
- package/lib/mcp/tools/assortment/handlers/createAssortment.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/getAssortment.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/getAssortment.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/getAssortmentChildren.d.ts +48 -2
- package/lib/mcp/tools/assortment/handlers/getAssortmentChildren.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/getAssortmentFilters.d.ts +33 -10
- package/lib/mcp/tools/assortment/handlers/getAssortmentFilters.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/getAssortmentLinks.d.ts +51 -2
- package/lib/mcp/tools/assortment/handlers/getAssortmentLinks.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/getAssortmentMedia.d.ts +30 -2
- package/lib/mcp/tools/assortment/handlers/getAssortmentMedia.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/getAssortmentProducts.d.ts +46 -18
- package/lib/mcp/tools/assortment/handlers/getAssortmentProducts.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/listAssortments.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/listAssortments.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/removeAssortment.js +2 -2
- package/lib/mcp/tools/assortment/handlers/removeAssortment.js.map +1 -1
- package/lib/mcp/tools/assortment/handlers/removeAssortmentFilter.js +2 -2
- package/lib/mcp/tools/assortment/handlers/removeAssortmentFilter.js.map +1 -1
- package/lib/mcp/tools/assortment/handlers/removeAssortmentLink.js +2 -2
- package/lib/mcp/tools/assortment/handlers/removeAssortmentLink.js.map +1 -1
- package/lib/mcp/tools/assortment/handlers/removeAssortmentProduct.js +2 -2
- package/lib/mcp/tools/assortment/handlers/removeAssortmentProduct.js.map +1 -1
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentFilters.d.ts +9 -9
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentLinks.d.ts +27 -1
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentLinks.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentMedia.d.ts +6 -1
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentMedia.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentProducts.d.ts +22 -17
- package/lib/mcp/tools/assortment/handlers/reorderAssortmentProducts.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/searchAssortmentProducts.d.ts +43 -15
- package/lib/mcp/tools/assortment/handlers/searchAssortmentProducts.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/setAssortmentBase.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/setAssortmentBase.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortment.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortment.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.d.ts +7 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.js.map +1 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortmentStatus.d.ts +24 -1
- package/lib/mcp/tools/assortment/handlers/updateAssortmentStatus.d.ts.map +1 -1
- package/lib/mcp/tools/assortment/schemas.d.ts +478 -478
- package/lib/mcp/tools/assortment/schemas.js +1 -1
- package/lib/mcp/tools/assortment/schemas.js.map +1 -1
- package/lib/mcp/tools/filter/handlers/createFilter.d.ts +12 -11
- package/lib/mcp/tools/filter/handlers/createFilter.d.ts.map +1 -1
- package/lib/mcp/tools/filter/handlers/createFilter.js.map +1 -1
- package/lib/mcp/tools/filter/handlers/createFilterOption.d.ts +14 -11
- package/lib/mcp/tools/filter/handlers/createFilterOption.d.ts.map +1 -1
- package/lib/mcp/tools/filter/handlers/createFilterOption.js +4 -2
- package/lib/mcp/tools/filter/handlers/createFilterOption.js.map +1 -1
- package/lib/mcp/tools/filter/handlers/getFilter.d.ts +10 -10
- package/lib/mcp/tools/filter/handlers/listFilters.d.ts +10 -10
- package/lib/mcp/tools/filter/handlers/removeFilterOption.d.ts +12 -10
- package/lib/mcp/tools/filter/handlers/removeFilterOption.d.ts.map +1 -1
- package/lib/mcp/tools/filter/handlers/removeFilterOption.js +2 -0
- package/lib/mcp/tools/filter/handlers/removeFilterOption.js.map +1 -1
- package/lib/mcp/tools/filter/handlers/updateFilter.d.ts +10 -10
- package/lib/mcp/tools/filter/handlers/updateFilterTexts.d.ts +13 -12
- package/lib/mcp/tools/filter/handlers/updateFilterTexts.d.ts.map +1 -1
- package/lib/mcp/tools/filter/handlers/updateFilterTexts.js.map +1 -1
- package/lib/mcp/tools/filter/schemas.d.ts +266 -266
- package/lib/mcp/tools/localization/handlers/getLocalization.d.ts +1 -1
- package/lib/mcp/tools/localization/index.js +1 -1
- package/lib/mcp/tools/localization/index.js.map +1 -1
- package/lib/mcp/tools/localization/schemas.d.ts +154 -154
- package/lib/mcp/tools/order/handlers/confirmOrder.d.ts +38 -57
- package/lib/mcp/tools/order/handlers/confirmOrder.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/deliverOrder.d.ts +38 -57
- package/lib/mcp/tools/order/handlers/deliverOrder.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/deliverOrder.js +7 -4
- package/lib/mcp/tools/order/handlers/deliverOrder.js.map +1 -1
- package/lib/mcp/tools/order/handlers/getMonthlyBreakdown.d.ts +10 -0
- package/lib/mcp/tools/order/handlers/getMonthlyBreakdown.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/getOrder.d.ts +38 -57
- package/lib/mcp/tools/order/handlers/getOrder.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/getSalesSummary.d.ts +10 -0
- package/lib/mcp/tools/order/handlers/getSalesSummary.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/getTopCustomers.d.ts +13 -13
- package/lib/mcp/tools/order/handlers/getTopCustomers.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/getTopCustomers.js +10 -7
- package/lib/mcp/tools/order/handlers/getTopCustomers.js.map +1 -1
- package/lib/mcp/tools/order/handlers/getTopProducts.d.ts +20 -15
- package/lib/mcp/tools/order/handlers/getTopProducts.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/getUserCart.d.ts +38 -57
- package/lib/mcp/tools/order/handlers/getUserCart.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/listOrders.d.ts +39 -58
- package/lib/mcp/tools/order/handlers/listOrders.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/payOrder.d.ts +38 -57
- package/lib/mcp/tools/order/handlers/payOrder.d.ts.map +1 -1
- package/lib/mcp/tools/order/handlers/payOrder.js +7 -4
- package/lib/mcp/tools/order/handlers/payOrder.js.map +1 -1
- package/lib/mcp/tools/order/handlers/rejectOrder.d.ts +38 -57
- package/lib/mcp/tools/order/handlers/rejectOrder.d.ts.map +1 -1
- package/lib/mcp/tools/order/schemas.d.ts +184 -184
- package/lib/mcp/tools/product/handlers/addBundleItem.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/addBundleItem.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/addBundleItem.js +16 -19
- package/lib/mcp/tools/product/handlers/addBundleItem.js.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductAssignment.d.ts +20 -15
- package/lib/mcp/tools/product/handlers/addProductAssignment.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductAssignment.js.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductMedia.d.ts +31 -1
- package/lib/mcp/tools/product/handlers/addProductMedia.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductMedia.js +4 -4
- package/lib/mcp/tools/product/handlers/addProductMedia.js.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductVariationOption.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/addProductVariationOption.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductVariationOption.js +2 -2
- package/lib/mcp/tools/product/handlers/addProductVariationOption.js.map +1 -1
- package/lib/mcp/tools/product/handlers/createProduct.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/createProduct.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/createProductVariation.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/createProductVariation.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/createProductVariation.js +1 -0
- package/lib/mcp/tools/product/handlers/createProductVariation.js.map +1 -1
- package/lib/mcp/tools/product/handlers/getBundleItems.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/getBundleItems.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/getCatalogPrice.d.ts +4 -2
- package/lib/mcp/tools/product/handlers/getCatalogPrice.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/getCatalogPrice.js +3 -1
- package/lib/mcp/tools/product/handlers/getCatalogPrice.js.map +1 -1
- package/lib/mcp/tools/product/handlers/getProduct.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/getProduct.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/getProductAssignments.d.ts +1 -2
- package/lib/mcp/tools/product/handlers/getProductAssignments.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/getProductAssignments.js +4 -4
- package/lib/mcp/tools/product/handlers/getProductAssignments.js.map +1 -1
- package/lib/mcp/tools/product/handlers/getProductMedia.d.ts +6 -1
- package/lib/mcp/tools/product/handlers/getProductMedia.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/getSiblings.d.ts +19 -14
- package/lib/mcp/tools/product/handlers/getSiblings.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/getVariationProducts.d.ts +19 -14
- package/lib/mcp/tools/product/handlers/getVariationProducts.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/index.d.ts +2 -0
- package/lib/mcp/tools/product/handlers/index.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/index.js +2 -0
- package/lib/mcp/tools/product/handlers/index.js.map +1 -1
- package/lib/mcp/tools/product/handlers/listProducts.d.ts +19 -14
- package/lib/mcp/tools/product/handlers/listProducts.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/removeProduct.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/removeProduct.js +15 -3
- package/lib/mcp/tools/product/handlers/removeProduct.js.map +1 -1
- package/lib/mcp/tools/product/handlers/reorderProductMedia.d.ts +6 -1
- package/lib/mcp/tools/product/handlers/reorderProductMedia.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/simulatePrice.d.ts +4 -2
- package/lib/mcp/tools/product/handlers/simulatePrice.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/simulatePrice.js +2 -0
- package/lib/mcp/tools/product/handlers/simulatePrice.js.map +1 -1
- package/lib/mcp/tools/product/handlers/simulatePriceRange.d.ts +9 -2
- package/lib/mcp/tools/product/handlers/simulatePriceRange.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/simulatePriceRange.js +2 -0
- package/lib/mcp/tools/product/handlers/simulatePriceRange.js.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProduct.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/updateProduct.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProduct.js +10 -2
- package/lib/mcp/tools/product/handlers/updateProduct.js.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProductMediaTexts.d.ts +2 -1
- package/lib/mcp/tools/product/handlers/updateProductMediaTexts.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProductMediaTexts.js.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProductStatus.d.ts +18 -13
- package/lib/mcp/tools/product/handlers/updateProductStatus.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProductTexts.d.ts +6 -0
- package/lib/mcp/tools/product/handlers/updateProductTexts.d.ts.map +1 -0
- package/lib/mcp/tools/product/handlers/updateProductTexts.js +11 -0
- package/lib/mcp/tools/product/handlers/updateProductTexts.js.map +1 -0
- package/lib/mcp/tools/product/schemas.d.ts +1605 -1549
- package/lib/mcp/tools/product/schemas.d.ts.map +1 -1
- package/lib/mcp/tools/product/schemas.js +13 -6
- package/lib/mcp/tools/product/schemas.js.map +1 -1
- package/lib/mcp/tools/provider/handlers/getProvider.d.ts +1 -1
- package/lib/mcp/tools/provider/handlers/getProviderInterfaces.d.ts +1 -1
- package/lib/mcp/tools/provider/schemas.d.ts +110 -110
- package/lib/mcp/tools/quotation/handlers/countQuotations.d.ts +4 -0
- package/lib/mcp/tools/quotation/handlers/countQuotations.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/countQuotations.js +5 -0
- package/lib/mcp/tools/quotation/handlers/countQuotations.js.map +1 -0
- package/lib/mcp/tools/quotation/handlers/getQuotation.d.ts +105 -0
- package/lib/mcp/tools/quotation/handlers/getQuotation.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/getQuotation.js +6 -0
- package/lib/mcp/tools/quotation/handlers/getQuotation.js.map +1 -0
- package/lib/mcp/tools/quotation/handlers/index.d.ts +16 -0
- package/lib/mcp/tools/quotation/handlers/index.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/index.js +15 -0
- package/lib/mcp/tools/quotation/handlers/index.js.map +1 -0
- package/lib/mcp/tools/quotation/handlers/listQuotations.d.ts +107 -0
- package/lib/mcp/tools/quotation/handlers/listQuotations.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/listQuotations.js +9 -0
- package/lib/mcp/tools/quotation/handlers/listQuotations.js.map +1 -0
- package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.d.ts +106 -0
- package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.js +16 -0
- package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.js.map +1 -0
- package/lib/mcp/tools/quotation/handlers/rejectQuotation.d.ts +106 -0
- package/lib/mcp/tools/quotation/handlers/rejectQuotation.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/rejectQuotation.js +16 -0
- package/lib/mcp/tools/quotation/handlers/rejectQuotation.js.map +1 -0
- package/lib/mcp/tools/quotation/handlers/verifyQuotation.d.ts +106 -0
- package/lib/mcp/tools/quotation/handlers/verifyQuotation.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/handlers/verifyQuotation.js +16 -0
- package/lib/mcp/tools/quotation/handlers/verifyQuotation.js.map +1 -0
- package/lib/mcp/tools/quotation/index.d.ts +4 -0
- package/lib/mcp/tools/quotation/index.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/index.js +5 -0
- package/lib/mcp/tools/quotation/index.js.map +1 -0
- package/lib/mcp/tools/quotation/quotationManagement.d.ts +10 -0
- package/lib/mcp/tools/quotation/quotationManagement.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/quotationManagement.js +24 -0
- package/lib/mcp/tools/quotation/quotationManagement.js.map +1 -0
- package/lib/mcp/tools/quotation/schemas.d.ts +240 -0
- package/lib/mcp/tools/quotation/schemas.d.ts.map +1 -0
- package/lib/mcp/tools/quotation/schemas.js +99 -0
- package/lib/mcp/tools/quotation/schemas.js.map +1 -0
- package/lib/mcp/tools/system/handlers/getEvent.d.ts +1 -1
- package/lib/mcp/tools/system/handlers/getShopInfo.d.ts +2 -2
- package/lib/mcp/tools/system/handlers/getWorkStatistics.d.ts +2 -2
- package/lib/mcp/tools/system/handlers/index.d.ts +6 -6
- package/lib/mcp/tools/system/handlers/listWork.d.ts +2 -2
- package/lib/mcp/tools/system/handlers/listWork.d.ts.map +1 -1
- package/lib/mcp/tools/system/handlers/listWork.js.map +1 -1
- package/lib/mcp/tools/system/index.js +1 -1
- package/lib/mcp/tools/system/index.js.map +1 -1
- package/lib/mcp/tools/system/schemas.d.ts +220 -220
- package/lib/mcp/tools/system/schemas.js +2 -2
- package/lib/mcp/tools/system/schemas.js.map +1 -1
- package/lib/mcp/tools/system/types.d.ts +1 -1
- package/lib/mcp/tools/system/types.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/addUserEmail.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/addUserEmail.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/addUserEmail.js +2 -2
- package/lib/mcp/tools/users/handlers/addUserEmail.js.map +1 -1
- package/lib/mcp/tools/users/handlers/createUser.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/createUser.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/enrollUser.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/enrollUser.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/enrollUser.js +1 -1
- package/lib/mcp/tools/users/handlers/enrollUser.js.map +1 -1
- package/lib/mcp/tools/users/handlers/getCurrentUser.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/getCurrentUser.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getCurrentUser.js.map +1 -1
- package/lib/mcp/tools/users/handlers/getUser.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/getUser.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserAvatar.d.ts +7 -2
- package/lib/mcp/tools/users/handlers/getUserAvatar.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserAvatar.js +1 -1
- package/lib/mcp/tools/users/handlers/getUserAvatar.js.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserBookmarks.d.ts +23 -18
- package/lib/mcp/tools/users/handlers/getUserBookmarks.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserEnrollments.d.ts +33 -24
- package/lib/mcp/tools/users/handlers/getUserEnrollments.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserOrders.d.ts +39 -58
- package/lib/mcp/tools/users/handlers/getUserOrders.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserQuotations.d.ts +29 -20
- package/lib/mcp/tools/users/handlers/getUserQuotations.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/getUserReviews.d.ts +23 -18
- package/lib/mcp/tools/users/handlers/getUserReviews.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/listUsers.d.ts +10 -5
- package/lib/mcp/tools/users/handlers/listUsers.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/removeUserEmail.js.map +1 -1
- package/lib/mcp/tools/users/handlers/setUserTags.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/setUserTags.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/setUserUsername.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/setUserUsername.d.ts.map +1 -1
- package/lib/mcp/tools/users/handlers/updateUser.d.ts +9 -4
- package/lib/mcp/tools/users/handlers/updateUser.d.ts.map +1 -1
- package/lib/mcp/tools/users/schemas.d.ts +586 -586
- package/lib/mcp/utils/getNormalizedAssortmentDetails.d.ts +24 -1
- package/lib/mcp/utils/getNormalizedAssortmentDetails.d.ts.map +1 -1
- package/lib/mcp/utils/getNormalizedAssortmentDetails.js +5 -21
- package/lib/mcp/utils/getNormalizedAssortmentDetails.js.map +1 -1
- package/lib/mcp/utils/getNormalizedFilterDetails.d.ts +10 -10
- package/lib/mcp/utils/getNormalizedFilterDetails.js.map +1 -1
- package/lib/mcp/utils/getNormalizedOrderDetails.d.ts +38 -57
- package/lib/mcp/utils/getNormalizedOrderDetails.d.ts.map +1 -1
- package/lib/mcp/utils/getNormalizedOrderDetails.js.map +1 -1
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts +18 -13
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts.map +1 -1
- package/lib/mcp/utils/getNormalizedProductDetails.js +5 -24
- package/lib/mcp/utils/getNormalizedProductDetails.js.map +1 -1
- package/lib/mcp/utils/getNormalizedQuotationDetails.d.ts +104 -0
- package/lib/mcp/utils/getNormalizedQuotationDetails.d.ts.map +1 -0
- package/lib/mcp/utils/getNormalizedQuotationDetails.js +35 -0
- package/lib/mcp/utils/getNormalizedQuotationDetails.js.map +1 -0
- package/lib/mcp/utils/getNormalizedUserDetails.d.ts +9 -4
- package/lib/mcp/utils/getNormalizedUserDetails.d.ts.map +1 -1
- package/lib/mcp/utils/getNormalizedUserDetails.js.map +1 -1
- package/lib/mcp/utils/normalizeMediaUrl.d.ts +8 -1
- package/lib/mcp/utils/normalizeMediaUrl.d.ts.map +1 -1
- package/lib/mcp/utils/normalizeMediaUrl.js.map +1 -1
- package/lib/mcp/utils/normalizeProxyAssignments.d.ts +6 -0
- package/lib/mcp/utils/normalizeProxyAssignments.d.ts.map +1 -0
- package/lib/mcp/utils/normalizeProxyAssignments.js +27 -0
- package/lib/mcp/utils/normalizeProxyAssignments.js.map +1 -0
- package/lib/mcp/utils/orderFilters.d.ts +1 -1
- package/lib/mcp/utils/orderFilters.d.ts.map +1 -1
- package/lib/mcp/utils/sharedSchemas.d.ts +14 -14
- package/lib/mcp/utils/sharedSchemas.js +1 -1
- package/lib/mcp/utils/sharedSchemas.js.map +1 -1
- package/lib/resolvers/mutations/accounts/addEmail.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/addEmail.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/addEmail.js.map +1 -1
- package/lib/resolvers/mutations/accounts/addWeb3Address.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/addWeb3Address.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/addWeb3Address.js.map +1 -1
- package/lib/resolvers/mutations/accounts/addWebAuthnCredentials.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/addWebAuthnCredentials.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/addWebAuthnCredentials.js.map +1 -1
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts +3 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.js +6 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.js.map +1 -0
- package/lib/resolvers/mutations/accounts/changePassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.js +2 -2
- package/lib/resolvers/mutations/accounts/createUser.js.map +1 -1
- package/lib/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.d.ts +2 -2
- package/lib/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.d.ts +2 -2
- package/lib/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/disableTOTP.d.ts +6 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.js +27 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.js.map +1 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.d.ts +6 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.js +20 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.js.map +1 -0
- package/lib/resolvers/mutations/accounts/enrollUser.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/enrollUser.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.d.ts +7 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.js +30 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.js.map +1 -0
- package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/loginAsGuest.js +2 -2
- package/lib/resolvers/mutations/accounts/loginAsGuest.js.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithOAuth.d.ts +8 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.js +25 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.js.map +1 -0
- package/lib/resolvers/mutations/accounts/loginWithPassword.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithPassword.js +2 -2
- package/lib/resolvers/mutations/accounts/loginWithPassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js +2 -2
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js.map +1 -1
- package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts +5 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.js +20 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.js.map +1 -0
- package/lib/resolvers/mutations/accounts/removeEmail.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/removeEmail.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/removeEmail.js.map +1 -1
- package/lib/resolvers/mutations/accounts/removeWeb3Address.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/removeWeb3Address.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/removeWeb3Address.js +2 -2
- package/lib/resolvers/mutations/accounts/removeWeb3Address.js.map +1 -1
- package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.js +2 -2
- package/lib/resolvers/mutations/accounts/removeWebAuthnCredentials.js.map +1 -1
- package/lib/resolvers/mutations/accounts/setPassword.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/setPassword.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/setUsername.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/setUsername.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/stopImpersonation.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/stopImpersonation.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.d.ts +6 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.js +13 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.js.map +1 -0
- package/lib/resolvers/mutations/accounts/verifyEmail.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/verifyEmail.js +2 -2
- package/lib/resolvers/mutations/accounts/verifyEmail.js.map +1 -1
- package/lib/resolvers/mutations/accounts/verifyWeb3Address.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/verifyWeb3Address.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/verifyWeb3Address.js +3 -3
- package/lib/resolvers/mutations/accounts/verifyWeb3Address.js.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts +6 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts.map +1 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.js +18 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.js.map +1 -0
- package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortment.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortment.js +3 -4
- package/lib/resolvers/mutations/assortments/removeAssortment.js.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortment.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +7 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts.map +1 -1
- package/lib/resolvers/mutations/bookmarks/bookmark.d.ts +1 -1
- package/lib/resolvers/mutations/bookmarks/bookmark.d.ts.map +1 -1
- package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts +1 -1
- package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts.map +1 -1
- package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts +1 -1
- package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts.map +1 -1
- package/lib/resolvers/mutations/countries/createCountry.d.ts +1 -1
- package/lib/resolvers/mutations/countries/createCountry.d.ts.map +1 -1
- package/lib/resolvers/mutations/countries/removeCountry.d.ts +1 -1
- package/lib/resolvers/mutations/countries/removeCountry.d.ts.map +1 -1
- package/lib/resolvers/mutations/countries/updateCountry.d.ts +1 -1
- package/lib/resolvers/mutations/countries/updateCountry.d.ts.map +1 -1
- package/lib/resolvers/mutations/currencies/createCurrency.d.ts +1 -1
- package/lib/resolvers/mutations/currencies/createCurrency.d.ts.map +1 -1
- package/lib/resolvers/mutations/currencies/removeCurrency.d.ts +1 -1
- package/lib/resolvers/mutations/currencies/removeCurrency.d.ts.map +1 -1
- package/lib/resolvers/mutations/currencies/updateCurrency.d.ts +1 -1
- package/lib/resolvers/mutations/currencies/updateCurrency.d.ts.map +1 -1
- package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts +2 -2
- package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/delivery/createDeliveryProvider.js.map +1 -1
- package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts +1 -1
- package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts.map +1 -1
- package/lib/resolvers/mutations/enrollments/createEnrollment.js +1 -1
- package/lib/resolvers/mutations/enrollments/createEnrollment.js.map +1 -1
- package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts.map +1 -1
- package/lib/resolvers/mutations/enrollments/updateEnrollment.js +6 -6
- package/lib/resolvers/mutations/enrollments/updateEnrollment.js.map +1 -1
- package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts +1 -1
- package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/createFilterOption.d.ts +1 -1
- package/lib/resolvers/mutations/filters/createFilterOption.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/createFilterOption.js.map +1 -1
- package/lib/resolvers/mutations/filters/removeFilter.d.ts +1 -1
- package/lib/resolvers/mutations/filters/removeFilter.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/removeFilterOption.d.ts +1 -1
- package/lib/resolvers/mutations/filters/removeFilterOption.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/removeFilterOption.js.map +1 -1
- package/lib/resolvers/mutations/filters/updateFilter.d.ts +1 -1
- package/lib/resolvers/mutations/filters/updateFilter.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/updateFilter.js.map +1 -1
- package/lib/resolvers/mutations/languages/createLanguage.d.ts +1 -1
- package/lib/resolvers/mutations/languages/createLanguage.d.ts.map +1 -1
- package/lib/resolvers/mutations/languages/removeLanguage.d.ts +1 -1
- package/lib/resolvers/mutations/languages/removeLanguage.d.ts.map +1 -1
- package/lib/resolvers/mutations/languages/updateLanguage.d.ts +1 -1
- package/lib/resolvers/mutations/languages/updateLanguage.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/addCartDiscount.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addCartDiscount.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/addCartDiscount.js +1 -1
- package/lib/resolvers/mutations/orders/addCartDiscount.js.map +1 -1
- package/lib/resolvers/mutations/orders/addCartProduct.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addCartProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/addCartProduct.js +1 -1
- package/lib/resolvers/mutations/orders/addCartProduct.js.map +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.js +5 -3
- package/lib/resolvers/mutations/orders/addCartQuotation.js.map +1 -1
- package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/addMultipleCartProducts.js +1 -1
- package/lib/resolvers/mutations/orders/addMultipleCartProducts.js.map +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.js +2 -2
- package/lib/resolvers/mutations/orders/checkoutCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/confirmOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/confirmOrder.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/createCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/createCart.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/createCart.js +1 -1
- package/lib/resolvers/mutations/orders/createCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/deliverOrder.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/deliverOrder.js +7 -4
- package/lib/resolvers/mutations/orders/deliverOrder.js.map +1 -1
- package/lib/resolvers/mutations/orders/emptyCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/emptyCart.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/emptyCart.js +1 -1
- package/lib/resolvers/mutations/orders/emptyCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/payOrder.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/payOrder.js +7 -4
- package/lib/resolvers/mutations/orders/payOrder.js.map +1 -1
- package/lib/resolvers/mutations/orders/rejectOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/rejectOrder.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts +1 -1
- package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/removeCartDiscount.js +3 -1
- package/lib/resolvers/mutations/orders/removeCartDiscount.js.map +1 -1
- package/lib/resolvers/mutations/orders/removeCartItem.d.ts +1 -1
- package/lib/resolvers/mutations/orders/removeCartItem.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/removeCartItem.js +3 -1
- package/lib/resolvers/mutations/orders/removeCartItem.js.map +1 -1
- package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts +1 -1
- package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts +1 -1
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js +9 -5
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCart.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateCart.js +1 -1
- package/lib/resolvers/mutations/orders/updateCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.js +4 -2
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.js +4 -2
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartItem.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCartItem.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartItem.js +6 -4
- package/lib/resolvers/mutations/orders/updateCartItem.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.js +4 -2
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.js +4 -2
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts.map +1 -1
- package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts +1 -1
- package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/payment/createPaymentProvider.js.map +1 -1
- package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts +1 -1
- package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts.map +1 -1
- package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.js +1 -1
- package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.js.map +1 -1
- package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts +1 -1
- package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts.map +1 -1
- package/lib/resolvers/mutations/payment/removePaymentCredentials.d.ts +1 -1
- package/lib/resolvers/mutations/payment/removePaymentProvider.d.ts +1 -1
- package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts +1 -1
- package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts.map +1 -1
- package/lib/resolvers/mutations/payment/updatePaymentProvider.d.ts +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.d.ts +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.js.map +1 -1
- package/lib/resolvers/mutations/products/addProductMedia.d.ts +6 -0
- package/lib/resolvers/mutations/products/addProductMedia.d.ts.map +1 -0
- package/lib/resolvers/mutations/products/addProductMedia.js +18 -0
- package/lib/resolvers/mutations/products/addProductMedia.js.map +1 -0
- package/lib/resolvers/mutations/products/addProductReviewVote.d.ts +1 -1
- package/lib/resolvers/mutations/products/addProductReviewVote.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/addProductReviewVote.js +1 -1
- package/lib/resolvers/mutations/products/addProductReviewVote.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductBundleItem.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProductBundleItem.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/createProductReview.d.ts +2 -2
- package/lib/resolvers/mutations/products/createProductReview.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/createProductReview.js +2 -2
- package/lib/resolvers/mutations/products/createProductReview.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductVariationOption.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProductVariationOption.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/publishProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/publishProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeBundleItem.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeBundleItem.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProductAssignment.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductAssignment.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProductMedia.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductMedia.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProductReview.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductReview.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProductVariation.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductVariation.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/unpublishProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/unpublishProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProduct.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductCommerce.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductCommerce.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductPlan.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductPlan.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductReview.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductReview.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductSupply.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductSupply.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductTokenization.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductTokenization.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts.map +1 -1
- package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts.map +1 -1
- package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts.map +1 -1
- package/lib/resolvers/mutations/quotations/requestQuotation.js +1 -1
- package/lib/resolvers/mutations/quotations/requestQuotation.js.map +1 -1
- package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/addPushSubscription.d.ts +2 -2
- package/lib/resolvers/mutations/users/addPushSubscription.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/addPushSubscription.js.map +1 -1
- package/lib/resolvers/mutations/users/heartbeat.d.ts +1 -1
- package/lib/resolvers/mutations/users/heartbeat.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/removePushSubscription.d.ts +1 -1
- package/lib/resolvers/mutations/users/removePushSubscription.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/removePushSubscription.js.map +1 -1
- package/lib/resolvers/mutations/users/removeUser.d.ts +1 -1
- package/lib/resolvers/mutations/users/removeUser.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/removeUser.js.map +1 -1
- package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
- package/lib/resolvers/mutations/users/setRoles.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/setUserTags.d.ts +1 -1
- package/lib/resolvers/mutations/users/setUserTags.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/updateUserAvatar.d.ts +6 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.d.ts.map +1 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.js +22 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.js.map +1 -0
- package/lib/resolvers/mutations/users/updateUserProfile.d.ts +1 -1
- package/lib/resolvers/mutations/users/updateUserProfile.d.ts.map +1 -1
- package/lib/resolvers/mutations/users/updateUserProfile.js.map +1 -1
- package/lib/resolvers/mutations/utils/getOrderCart.d.ts +7 -0
- package/lib/resolvers/mutations/utils/getOrderCart.d.ts.map +1 -0
- package/lib/resolvers/mutations/utils/getOrderCart.js +13 -0
- package/lib/resolvers/mutations/utils/getOrderCart.js.map +1 -0
- package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts +2 -2
- package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/warehousing/createWarehousingProvider.js.map +1 -1
- package/lib/resolvers/mutations/warehousing/exportToken.d.ts +1 -1
- package/lib/resolvers/mutations/warehousing/exportToken.d.ts.map +1 -1
- package/lib/resolvers/mutations/warehousing/invalidateToken.d.ts +1 -1
- package/lib/resolvers/mutations/warehousing/invalidateToken.d.ts.map +1 -1
- package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts +1 -1
- package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts +1 -1
- package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts.map +1 -1
- package/lib/resolvers/mutations/worker/allocateWork.d.ts +3 -3
- package/lib/resolvers/mutations/worker/allocateWork.d.ts.map +1 -1
- package/lib/resolvers/mutations/worker/allocateWork.js.map +1 -1
- package/lib/resolvers/mutations/worker/finishWork.d.ts +2 -2
- package/lib/resolvers/mutations/worker/finishWork.d.ts.map +1 -1
- package/lib/resolvers/mutations/worker/finishWork.js +2 -2
- package/lib/resolvers/mutations/worker/finishWork.js.map +1 -1
- package/lib/resolvers/mutations/worker/processNextWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/processNextWork.d.ts.map +1 -1
- package/lib/resolvers/mutations/worker/removeWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/removeWork.d.ts.map +1 -1
- package/lib/resolvers/queries/assortments/assortment.d.ts +1 -1
- package/lib/resolvers/queries/assortments/assortment.d.ts.map +1 -1
- package/lib/resolvers/queries/countries/country.d.ts +1 -1
- package/lib/resolvers/queries/countries/country.d.ts.map +1 -1
- package/lib/resolvers/queries/currencies/currency.d.ts +1 -1
- package/lib/resolvers/queries/currencies/currency.d.ts.map +1 -1
- package/lib/resolvers/queries/delivery/deliveryProvider.d.ts +1 -1
- package/lib/resolvers/queries/delivery/deliveryProvider.d.ts.map +1 -1
- package/lib/resolvers/queries/enrollments/enrollment.d.ts +1 -1
- package/lib/resolvers/queries/enrollments/enrollment.d.ts.map +1 -1
- package/lib/resolvers/queries/events/event.d.ts +1 -1
- package/lib/resolvers/queries/events/event.d.ts.map +1 -1
- package/lib/resolvers/queries/filters/filter.d.ts +1 -1
- package/lib/resolvers/queries/filters/filter.d.ts.map +1 -1
- package/lib/resolvers/queries/languages/language.d.ts +1 -1
- package/lib/resolvers/queries/languages/language.d.ts.map +1 -1
- package/lib/resolvers/queries/orders/order.d.ts +1 -1
- package/lib/resolvers/queries/orders/order.d.ts.map +1 -1
- package/lib/resolvers/queries/orders/orderStatistics.d.ts +1 -1
- package/lib/resolvers/queries/payment/paymentProvider.d.ts +1 -1
- package/lib/resolvers/queries/payment/paymentProvider.d.ts.map +1 -1
- package/lib/resolvers/queries/products/product.d.ts +1 -1
- package/lib/resolvers/queries/products/product.d.ts.map +1 -1
- package/lib/resolvers/queries/products/product.js +1 -1
- package/lib/resolvers/queries/products/product.js.map +1 -1
- package/lib/resolvers/queries/products/productCatalogPrices.d.ts +1 -1
- package/lib/resolvers/queries/products/productCatalogPrices.d.ts.map +1 -1
- package/lib/resolvers/queries/products/productReview.d.ts +1 -1
- package/lib/resolvers/queries/products/productReview.d.ts.map +1 -1
- package/lib/resolvers/queries/quotations/quotation.d.ts +1 -1
- package/lib/resolvers/queries/quotations/quotation.d.ts.map +1 -1
- package/lib/resolvers/queries/shopInfo.d.ts.map +1 -1
- package/lib/resolvers/queries/shopInfo.js +53 -3
- package/lib/resolvers/queries/shopInfo.js.map +1 -1
- package/lib/resolvers/queries/users/impersonator.d.ts +1 -1
- package/lib/resolvers/queries/users/impersonator.d.ts.map +1 -1
- package/lib/resolvers/queries/users/me.d.ts +1 -1
- package/lib/resolvers/queries/users/me.d.ts.map +1 -1
- package/lib/resolvers/queries/users/user.d.ts +1 -1
- package/lib/resolvers/queries/users/user.d.ts.map +1 -1
- package/lib/resolvers/queries/users/user.js +1 -1
- package/lib/resolvers/queries/users/user.js.map +1 -1
- package/lib/resolvers/queries/warehousing/token.d.ts +1 -1
- package/lib/resolvers/queries/warehousing/token.d.ts.map +1 -1
- package/lib/resolvers/queries/warehousing/tokens.d.ts.map +1 -1
- package/lib/resolvers/queries/warehousing/tokens.js +1 -1
- package/lib/resolvers/queries/warehousing/tokens.js.map +1 -1
- package/lib/resolvers/queries/warehousing/tokensCount.d.ts +1 -1
- package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts +1 -1
- package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts.map +1 -1
- package/lib/resolvers/queries/worker/work.d.ts +1 -1
- package/lib/resolvers/queries/worker/work.d.ts.map +1 -1
- package/lib/resolvers/scalars/LowerCaseString.d.ts +1 -1
- package/lib/resolvers/scalars/LowerCaseString.d.ts.map +1 -1
- package/lib/resolvers/scalars/index.d.ts +1 -1
- package/lib/resolvers/type/country-types.d.ts +2 -2
- package/lib/resolvers/type/country-types.d.ts.map +1 -1
- package/lib/resolvers/type/delivery-provider-types.d.ts +4 -4
- package/lib/resolvers/type/delivery-provider-types.js +1 -1
- package/lib/resolvers/type/delivery-provider-types.js.map +1 -1
- package/lib/resolvers/type/dimensions-types.d.ts +4 -4
- package/lib/resolvers/type/dispatch-types.d.ts +15 -0
- package/lib/resolvers/type/dispatch-types.d.ts.map +1 -0
- package/lib/resolvers/type/dispatch-types.js +16 -0
- package/lib/resolvers/type/dispatch-types.js.map +1 -0
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts +1 -1
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.js +2 -0
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts +1 -1
- package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-payment-types.js +4 -2
- package/lib/resolvers/type/enrollment/enrollment-payment-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts +1 -1
- package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-period-types.js +2 -0
- package/lib/resolvers/type/enrollment/enrollment-period-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-types.d.ts +4 -4
- package/lib/resolvers/type/enrollment/enrollment-types.js +2 -2
- package/lib/resolvers/type/enrollment/enrollment-types.js.map +1 -1
- package/lib/resolvers/type/filter/filter-types.d.ts +3 -3
- package/lib/resolvers/type/filter/loaded-filter-types.d.ts +3 -3
- package/lib/resolvers/type/index.d.ts +73 -90
- package/lib/resolvers/type/index.d.ts.map +1 -1
- package/lib/resolvers/type/index.js +0 -2
- package/lib/resolvers/type/index.js.map +1 -1
- package/lib/resolvers/type/media-types.d.ts +1 -1
- package/lib/resolvers/type/media-types.d.ts.map +1 -1
- package/lib/resolvers/type/media-types.js +5 -1
- package/lib/resolvers/type/media-types.js.map +1 -1
- package/lib/resolvers/type/oauth-account.d.ts +6 -0
- package/lib/resolvers/type/oauth-account.d.ts.map +1 -0
- package/lib/resolvers/type/oauth-account.js +7 -0
- package/lib/resolvers/type/oauth-account.js.map +1 -0
- package/lib/resolvers/type/oauth-provider.d.ts +6 -0
- package/lib/resolvers/type/oauth-provider.d.ts.map +1 -0
- package/lib/resolvers/type/oauth-provider.js +6 -0
- package/lib/resolvers/type/oauth-provider.js.map +1 -0
- package/lib/resolvers/type/order/order-delivery-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-item-types.d.ts +4 -4
- package/lib/resolvers/type/order/order-item-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-item-types.js +8 -3
- package/lib/resolvers/type/order/order-item-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-statistics-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-statistics-types.js.map +1 -1
- package/lib/resolvers/type/order/order-types.d.ts +4 -4
- package/lib/resolvers/type/order/order-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-types.js +18 -7
- package/lib/resolvers/type/order/order-types.js.map +1 -1
- package/lib/resolvers/type/payment/payment-provider-types.d.ts +3 -3
- package/lib/resolvers/type/payment/payment-provider-types.js.map +1 -1
- package/lib/resolvers/type/price-types.d.ts +2 -2
- package/lib/resolvers/type/price-types.d.ts.map +1 -1
- package/lib/resolvers/type/price-types.js +5 -2
- package/lib/resolvers/type/price-types.js.map +1 -1
- package/lib/resolvers/type/product/product-bundle-types.d.ts +5 -5
- package/lib/resolvers/type/product/product-bundle-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.d.ts +2 -2
- package/lib/resolvers/type/product/product-configurable-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.js +3 -2
- package/lib/resolvers/type/product/product-configurable-types.js.map +1 -1
- package/lib/resolvers/type/product/product-discount.d.ts +2 -2
- package/lib/resolvers/type/product/product-discount.js +1 -1
- package/lib/resolvers/type/product/product-discount.js.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.d.ts +5 -5
- package/lib/resolvers/type/product/product-plan-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.js +7 -5
- package/lib/resolvers/type/product/product-plan-types.js.map +1 -1
- package/lib/resolvers/type/product/product-review-types.js +1 -1
- package/lib/resolvers/type/product/product-review-types.js.map +1 -1
- package/lib/resolvers/type/product/product-simple-types.d.ts +6 -6
- package/lib/resolvers/type/product/product-simple-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-tokenized-types.d.ts +8 -8
- package/lib/resolvers/type/product/product-tokenized-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-tokenized-types.js +2 -2
- package/lib/resolvers/type/product/product-tokenized-types.js.map +1 -1
- package/lib/resolvers/type/product/product-variation-assignment-vector.d.ts +2 -2
- package/lib/resolvers/type/product/product-variation-assignment-vector.d.ts.map +1 -1
- package/lib/resolvers/type/product-search-result-types.js +2 -2
- package/lib/resolvers/type/product-search-result-types.js.map +1 -1
- package/lib/resolvers/type/quotation-types.d.ts +2 -2
- package/lib/resolvers/type/quotation-types.js +2 -2
- package/lib/resolvers/type/quotation-types.js.map +1 -1
- package/lib/resolvers/type/shop-types.d.ts.map +1 -1
- package/lib/resolvers/type/shop-types.js +2 -1
- package/lib/resolvers/type/shop-types.js.map +1 -1
- package/lib/resolvers/type/stock-types.d.ts +14 -0
- package/lib/resolvers/type/stock-types.d.ts.map +1 -0
- package/lib/resolvers/type/stock-types.js +15 -0
- package/lib/resolvers/type/stock-types.js.map +1 -0
- package/lib/resolvers/type/token-types.d.ts +2 -2
- package/lib/resolvers/type/user-types.d.ts +3 -3
- package/lib/resolvers/type/user-types.d.ts.map +1 -1
- package/lib/resolvers/type/user-types.js +4 -0
- package/lib/resolvers/type/user-types.js.map +1 -1
- package/lib/resolvers/type/warehousing-provider-types.d.ts +2 -2
- package/lib/resolvers/type/warehousing-provider-types.d.ts.map +1 -1
- package/lib/resolvers/type/web3-address.d.ts +1 -1
- package/lib/resolvers/type/work-types.d.ts +1 -1
- package/lib/resolvers/type/work-types.d.ts.map +1 -1
- package/lib/roles/all.js +2 -2
- package/lib/roles/all.js.map +1 -1
- package/lib/roles/index.d.ts +9 -9
- package/lib/roles/index.d.ts.map +1 -1
- package/lib/roles/index.js +3 -3
- package/lib/roles/index.js.map +1 -1
- package/lib/schema/index.d.ts +1 -1
- package/lib/schema/index.d.ts.map +1 -1
- package/lib/schema/index.js +3 -3
- package/lib/schema/index.js.map +1 -1
- package/lib/schema/query.d.ts.map +1 -1
- package/lib/schema/query.js +2 -0
- package/lib/schema/query.js.map +1 -1
- package/lib/schema/types/shop.d.ts.map +1 -1
- package/lib/schema/types/shop.js +3 -0
- package/lib/schema/types/shop.js.map +1 -1
- package/lib/schema/types/warehousing.js +1 -1
- package/lib/user-context.d.ts +7 -0
- package/lib/user-context.d.ts.map +1 -0
- package/lib/user-context.js +76 -0
- package/lib/user-context.js.map +1 -0
- package/package.json +18 -8
- package/src/api-index.ts +7 -6
- package/src/chat/defaultSystemPrompt.ts +16 -0
- package/src/chat/generateImageHandler.ts +78 -0
- package/src/chat/normalizeToolsIndex.ts +11 -0
- package/src/chat/utils.ts +31 -0
- package/src/context.ts +8 -2
- package/src/createGraphQLServer.ts +16 -13
- package/src/errors.ts +6 -0
- package/src/express/chatHandler.ts +204 -0
- package/src/express/createBulkImportMiddleware.ts +8 -7
- package/src/express/createERCMetadataMiddleware.ts +9 -11
- package/src/express/createMCPMiddleware.ts +1 -1
- package/src/express/createTempUploadMiddleware.ts +5 -9
- package/src/express/index.ts +3 -1
- package/src/fastify/bulkImportHandler.ts +8 -6
- package/src/fastify/chatHandler.ts +198 -0
- package/src/fastify/ercMetadataHandler.ts +4 -7
- package/src/fastify/index.ts +39 -3
- package/src/fastify/mcpHandler.ts +2 -2
- package/src/fastify/tempUploadHandler.ts +4 -6
- package/src/loaders/assortmentLinksLoader.ts +10 -7
- package/src/loaders/assortmentMediasLoader.ts +1 -1
- package/src/loaders/filterTextLoader.ts +16 -15
- package/src/loaders/productMediasLoader.ts +1 -1
- package/src/loaders/productProxiesLoader.ts +1 -1
- package/src/loaders/utils.ts +1 -1
- package/src/locale-context.ts +3 -3
- package/src/mcp/index.ts +6 -0
- package/src/mcp/resources/localization.ts +129 -0
- package/src/mcp/tools/assortment/handlers/removeAssortment.ts +2 -2
- package/src/mcp/tools/assortment/handlers/removeAssortmentFilter.ts +2 -2
- package/src/mcp/tools/assortment/handlers/removeAssortmentLink.ts +2 -2
- package/src/mcp/tools/assortment/handlers/removeAssortmentProduct.ts +2 -2
- package/src/mcp/tools/assortment/handlers/updateAssortmentMediaTexts.ts +2 -1
- package/src/mcp/tools/assortment/schemas.ts +1 -1
- package/src/mcp/tools/filter/handlers/createFilter.ts +2 -1
- package/src/mcp/tools/filter/handlers/createFilterOption.ts +9 -3
- package/src/mcp/tools/filter/handlers/removeFilterOption.ts +3 -0
- package/src/mcp/tools/filter/handlers/updateFilterTexts.ts +2 -1
- package/src/mcp/tools/localization/index.ts +1 -1
- package/src/mcp/tools/order/handlers/deliverOrder.ts +8 -3
- package/src/mcp/tools/order/handlers/getTopCustomers.ts +11 -7
- package/src/mcp/tools/order/handlers/payOrder.ts +8 -3
- package/src/mcp/tools/product/handlers/addBundleItem.ts +21 -20
- package/src/mcp/tools/product/handlers/addProductAssignment.ts +4 -4
- package/src/mcp/tools/product/handlers/addProductMedia.ts +4 -5
- package/src/mcp/tools/product/handlers/addProductVariationOption.ts +3 -2
- package/src/mcp/tools/product/handlers/createProductVariation.ts +1 -0
- package/src/mcp/tools/product/handlers/getCatalogPrice.ts +3 -1
- package/src/mcp/tools/product/handlers/getProductAssignments.ts +8 -4
- package/src/mcp/tools/product/handlers/index.ts +2 -0
- package/src/mcp/tools/product/handlers/removeProduct.ts +23 -3
- package/src/mcp/tools/product/handlers/simulatePrice.ts +2 -0
- package/src/mcp/tools/product/handlers/simulatePriceRange.ts +3 -0
- package/src/mcp/tools/product/handlers/updateProduct.ts +12 -1
- package/src/mcp/tools/product/handlers/updateProductMediaTexts.ts +5 -1
- package/src/mcp/tools/product/handlers/updateProductTexts.ts +16 -0
- package/src/mcp/tools/product/schemas.ts +19 -6
- package/src/mcp/tools/quotation/handlers/countQuotations.ts +8 -0
- package/src/mcp/tools/quotation/handlers/getQuotation.ts +8 -0
- package/src/mcp/tools/quotation/handlers/index.ts +15 -0
- package/src/mcp/tools/quotation/handlers/listQuotations.ts +14 -0
- package/src/mcp/tools/quotation/handlers/makeQuotationProposal.ts +23 -0
- package/src/mcp/tools/quotation/handlers/rejectQuotation.ts +21 -0
- package/src/mcp/tools/quotation/handlers/verifyQuotation.ts +21 -0
- package/src/mcp/tools/quotation/index.ts +12 -0
- package/src/mcp/tools/quotation/quotationManagement.ts +34 -0
- package/src/mcp/tools/quotation/schemas.ts +136 -0
- package/src/mcp/tools/system/handlers/listWork.ts +3 -3
- package/src/mcp/tools/system/index.ts +1 -1
- package/src/mcp/tools/system/schemas.ts +2 -2
- package/src/mcp/tools/system/types.ts +1 -1
- package/src/mcp/tools/users/handlers/addUserEmail.ts +2 -2
- package/src/mcp/tools/users/handlers/enrollUser.ts +1 -1
- package/src/mcp/tools/users/handlers/getCurrentUser.ts +1 -1
- package/src/mcp/tools/users/handlers/getUserAvatar.ts +1 -1
- package/src/mcp/tools/users/handlers/removeUserEmail.ts +2 -2
- package/src/mcp/utils/getNormalizedAssortmentDetails.ts +9 -29
- package/src/mcp/utils/getNormalizedFilterDetails.ts +3 -3
- package/src/mcp/utils/getNormalizedOrderDetails.ts +3 -3
- package/src/mcp/utils/getNormalizedProductDetails.ts +11 -29
- package/src/mcp/utils/getNormalizedQuotationDetails.ts +38 -0
- package/src/mcp/utils/getNormalizedUserDetails.ts +3 -3
- package/src/mcp/utils/normalizeMediaUrl.ts +1 -1
- package/src/mcp/utils/normalizeProxyAssignments.ts +29 -0
- package/src/mcp/utils/sharedSchemas.ts +1 -1
- package/src/resolvers/mutations/accounts/addEmail.ts +3 -3
- package/src/resolvers/mutations/accounts/addWeb3Address.ts +2 -2
- package/src/resolvers/mutations/accounts/addWebAuthnCredentials.ts +2 -2
- package/src/resolvers/mutations/accounts/changePassword.ts +4 -4
- package/src/resolvers/mutations/accounts/createUser.ts +3 -3
- package/src/resolvers/mutations/accounts/loginAsGuest.ts +3 -2
- package/src/resolvers/mutations/accounts/loginWithPassword.ts +4 -3
- package/src/resolvers/mutations/accounts/loginWithWebAuthn.ts +4 -3
- package/src/resolvers/mutations/accounts/removeEmail.ts +3 -3
- package/src/resolvers/mutations/accounts/removeWeb3Address.ts +2 -2
- package/src/resolvers/mutations/accounts/removeWebAuthnCredentials.ts +2 -2
- package/src/resolvers/mutations/accounts/verifyEmail.ts +3 -2
- package/src/resolvers/mutations/accounts/verifyWeb3Address.ts +3 -3
- package/src/resolvers/mutations/assortments/removeAssortment.ts +3 -5
- package/src/resolvers/mutations/delivery/createDeliveryProvider.ts +1 -1
- package/src/resolvers/mutations/enrollments/createEnrollment.ts +1 -1
- package/src/resolvers/mutations/enrollments/updateEnrollment.ts +9 -6
- package/src/resolvers/mutations/filters/createFilterOption.ts +1 -1
- package/src/resolvers/mutations/filters/removeFilterOption.ts +1 -1
- package/src/resolvers/mutations/filters/updateFilter.ts +1 -1
- package/src/resolvers/mutations/orders/addCartDiscount.ts +1 -1
- package/src/resolvers/mutations/orders/addCartProduct.ts +1 -1
- package/src/resolvers/mutations/orders/addCartQuotation.ts +5 -2
- package/src/resolvers/mutations/orders/addMultipleCartProducts.ts +3 -3
- package/src/resolvers/mutations/orders/checkoutCart.ts +2 -2
- package/src/resolvers/mutations/orders/createCart.ts +1 -1
- package/src/resolvers/mutations/orders/deliverOrder.ts +8 -3
- package/src/resolvers/mutations/orders/emptyCart.ts +1 -1
- package/src/resolvers/mutations/orders/payOrder.ts +8 -3
- package/src/resolvers/mutations/orders/removeCartDiscount.ts +10 -2
- package/src/resolvers/mutations/orders/removeCartItem.ts +8 -1
- package/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts +10 -4
- package/src/resolvers/mutations/orders/updateCart.ts +1 -1
- package/src/resolvers/mutations/orders/updateCartDeliveryPickUp.ts +4 -1
- package/src/resolvers/mutations/orders/updateCartDeliveryShipping.ts +4 -1
- package/src/resolvers/mutations/orders/updateCartItem.ts +8 -3
- package/src/resolvers/mutations/orders/updateCartPaymentGeneric.ts +4 -1
- package/src/resolvers/mutations/orders/updateCartPaymentInvoice.ts +4 -1
- package/src/resolvers/mutations/payment/createPaymentProvider.ts +1 -1
- package/src/resolvers/mutations/payment/markPaymentCredentialsPreferred.ts +1 -1
- package/src/resolvers/mutations/products/addProductAssignment.ts +2 -2
- package/src/resolvers/mutations/products/addProductReviewVote.ts +1 -1
- package/src/resolvers/mutations/products/createProductReview.ts +6 -3
- package/src/resolvers/mutations/quotations/requestQuotation.ts +1 -1
- package/src/resolvers/mutations/users/addPushSubscription.ts +2 -2
- package/src/resolvers/mutations/users/removePushSubscription.ts +2 -2
- package/src/resolvers/mutations/users/removeUser.ts +3 -3
- package/src/resolvers/mutations/users/updateUserProfile.ts +2 -2
- package/src/resolvers/mutations/warehousing/createWarehousingProvider.ts +1 -1
- package/src/resolvers/mutations/worker/allocateWork.ts +1 -1
- package/src/resolvers/mutations/worker/finishWork.ts +3 -3
- package/src/resolvers/queries/products/product.ts +1 -1
- package/src/resolvers/queries/shopInfo.ts +52 -3
- package/src/resolvers/queries/users/user.ts +2 -2
- package/src/resolvers/queries/warehousing/tokens.ts +1 -1
- package/src/resolvers/type/country-types.ts +2 -2
- package/src/resolvers/type/delivery-provider-types.ts +1 -1
- package/src/resolvers/type/enrollment/enrollment-delivery-types.ts +1 -0
- package/src/resolvers/type/enrollment/enrollment-payment-types.ts +3 -2
- package/src/resolvers/type/enrollment/enrollment-period-types.ts +1 -0
- package/src/resolvers/type/enrollment/enrollment-types.ts +2 -2
- package/src/resolvers/type/index.ts +0 -2
- package/src/resolvers/type/media-types.ts +6 -2
- package/src/resolvers/type/order/order-item-types.ts +20 -13
- package/src/resolvers/type/order/order-statistics-types.ts +3 -3
- package/src/resolvers/type/order/order-types.ts +22 -11
- package/src/resolvers/type/payment/payment-provider-types.ts +2 -2
- package/src/resolvers/type/price-types.ts +5 -3
- package/src/resolvers/type/product/product-configurable-types.ts +7 -5
- package/src/resolvers/type/product/product-discount.ts +1 -1
- package/src/resolvers/type/product/product-plan-types.ts +12 -10
- package/src/resolvers/type/product/product-review-types.ts +1 -1
- package/src/resolvers/type/product/product-simple-types.ts +1 -1
- package/src/resolvers/type/product/product-tokenized-types.ts +8 -8
- package/src/resolvers/type/product/product-variation-assignment-vector.ts +2 -2
- package/src/resolvers/type/product-search-result-types.ts +2 -2
- package/src/resolvers/type/quotation-types.ts +2 -2
- package/src/resolvers/type/shop-types.ts +3 -3
- package/src/resolvers/type/user-types.ts +5 -4
- package/src/resolvers/type/warehousing-provider-types.ts +2 -2
- package/src/resolvers/type/work-types.ts +1 -1
- package/src/roles/all.ts +2 -2
- package/src/roles/index.ts +9 -3
- package/src/schema/index.ts +4 -4
- package/src/schema/query.ts +2 -0
- package/src/schema/types/shop.ts +3 -0
- package/src/schema/types/warehousing.ts +1 -1
- package/src/resolvers/type/color-types.ts +0 -31
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
2
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { convertToModelMessages, experimental_createMCPClient as createMCPClient, stepCountIs, streamText, } from 'ai';
|
|
4
|
+
import generateImageHandler from '../chat/generateImageHandler.js';
|
|
5
|
+
import defaultSystemPrompt from '../chat/defaultSystemPrompt.js';
|
|
6
|
+
import normalizeToolsIndex from '../chat/normalizeToolsIndex.js';
|
|
7
|
+
import { errorHandler } from '../chat/utils.js';
|
|
8
|
+
import { createLogger } from '@unchainedshop/logger';
|
|
9
|
+
const logger = createLogger('unchained:api:chat');
|
|
10
|
+
const setupMCPChatHandler = (chatConfiguration) => {
|
|
11
|
+
if (!chatConfiguration?.model) {
|
|
12
|
+
throw new Error('Model is required');
|
|
13
|
+
}
|
|
14
|
+
const { tools: additionalTools = {}, unchainedMCPUrl = `${process.env.ROOT_URL}/mcp`, imageGenerationTool, ...restChatConfig } = chatConfiguration;
|
|
15
|
+
const system = chatConfiguration.system ?? defaultSystemPrompt;
|
|
16
|
+
const mcpChatHandler = async (req, res) => {
|
|
17
|
+
let client;
|
|
18
|
+
try {
|
|
19
|
+
if (req.method === 'OPTIONS') {
|
|
20
|
+
res.headers({
|
|
21
|
+
'access-control-allow-credentials': 'true',
|
|
22
|
+
'access-control-allow-private-network': 'true',
|
|
23
|
+
});
|
|
24
|
+
return res.status(200).send();
|
|
25
|
+
}
|
|
26
|
+
const resourceTransport = new StreamableHTTPClientTransport(new URL(unchainedMCPUrl), {
|
|
27
|
+
requestInit: {
|
|
28
|
+
headers: {
|
|
29
|
+
Cookie: req.headers.cookie || '',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const sdkClient = new Client({ name: 'unchained-chat-client', version: '1.0.0' }, {
|
|
34
|
+
capabilities: { resources: {} },
|
|
35
|
+
});
|
|
36
|
+
await sdkClient.connect(resourceTransport);
|
|
37
|
+
const transport = new StreamableHTTPClientTransport(new URL(unchainedMCPUrl), {
|
|
38
|
+
requestInit: {
|
|
39
|
+
headers: {
|
|
40
|
+
Cookie: req.headers.cookie || '',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
client = await createMCPClient({
|
|
45
|
+
transport: transport,
|
|
46
|
+
});
|
|
47
|
+
const defaultUnchainedTools = await client.tools();
|
|
48
|
+
let resourceContext = '';
|
|
49
|
+
try {
|
|
50
|
+
const resources = await sdkClient.listResources();
|
|
51
|
+
if (resources?.resources) {
|
|
52
|
+
const resourceTexts = await Promise.all(resources.resources.map(async (resource) => {
|
|
53
|
+
try {
|
|
54
|
+
const content = await sdkClient.readResource({ uri: resource.uri });
|
|
55
|
+
if (content?.contents?.[0]?.text) {
|
|
56
|
+
return `${resource.name}:\n${content.contents[0].text}`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
logger.error(`Failed to read resource ${resource.uri}:`, e);
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}));
|
|
64
|
+
resourceContext =
|
|
65
|
+
'\n\nAVAILABLE SHOP CONFIGURATION:\n' + resourceTexts.filter(Boolean).join('\n\n');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
logger.error('Failed to fetch MCP resources:', e);
|
|
70
|
+
}
|
|
71
|
+
const tools = {
|
|
72
|
+
...defaultUnchainedTools,
|
|
73
|
+
...additionalTools,
|
|
74
|
+
};
|
|
75
|
+
if (imageGenerationTool) {
|
|
76
|
+
tools.generateImage = generateImageHandler(req)(imageGenerationTool);
|
|
77
|
+
}
|
|
78
|
+
if (req.method === 'GET') {
|
|
79
|
+
return res.status(200).send({
|
|
80
|
+
tools: normalizeToolsIndex(tools),
|
|
81
|
+
cached: false,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const { messages } = req.body;
|
|
85
|
+
const cacheControlledTools = { ...tools };
|
|
86
|
+
const keys = Object.keys(cacheControlledTools);
|
|
87
|
+
const lastKey = keys[keys.length - 1];
|
|
88
|
+
cacheControlledTools[lastKey] = {
|
|
89
|
+
...cacheControlledTools[lastKey],
|
|
90
|
+
providerOptions: {
|
|
91
|
+
anthropic: { cacheControl: { type: 'ephemeral' } },
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
const normalizedMessages = convertToModelMessages(messages, { tools: cacheControlledTools });
|
|
95
|
+
if (normalizedMessages.length > 0) {
|
|
96
|
+
const lastIndex = normalizedMessages.length - 1;
|
|
97
|
+
normalizedMessages[lastIndex] = {
|
|
98
|
+
...normalizedMessages[lastIndex],
|
|
99
|
+
providerOptions: { anthropic: { cacheControl: { type: 'ephemeral' } } },
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const MAX_MESSAGES = 10;
|
|
103
|
+
let startIndex = Math.max(0, normalizedMessages.length - MAX_MESSAGES);
|
|
104
|
+
while (startIndex < normalizedMessages.length) {
|
|
105
|
+
const msg = normalizedMessages[startIndex];
|
|
106
|
+
const hasOrphanedToolResult = Array.isArray(msg.content) && msg.content.some((c) => c.type === 'tool-result');
|
|
107
|
+
if (!hasOrphanedToolResult)
|
|
108
|
+
break;
|
|
109
|
+
startIndex++;
|
|
110
|
+
}
|
|
111
|
+
const messagesToInclude = normalizedMessages.slice(startIndex);
|
|
112
|
+
const result = streamText({
|
|
113
|
+
stopWhen: stepCountIs(500),
|
|
114
|
+
temperature: 0.2,
|
|
115
|
+
maxRetries: 3,
|
|
116
|
+
...restChatConfig,
|
|
117
|
+
messages: messagesToInclude,
|
|
118
|
+
system: system + resourceContext,
|
|
119
|
+
tools: cacheControlledTools,
|
|
120
|
+
onFinish: async () => {
|
|
121
|
+
await client?.close();
|
|
122
|
+
},
|
|
123
|
+
providerOptions: {
|
|
124
|
+
anthropic: {
|
|
125
|
+
cacheControl: {
|
|
126
|
+
type: 'ephemeral',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
return res.send(result.toUIMessageStreamResponse({
|
|
132
|
+
onError: errorHandler,
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
logger.error(err);
|
|
137
|
+
await client?.close();
|
|
138
|
+
res.status(500);
|
|
139
|
+
return res.send({ error: errorHandler(err) });
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
return mcpChatHandler;
|
|
143
|
+
};
|
|
144
|
+
export const connectChat = (app, chatConfiguration) => {
|
|
145
|
+
const handler = setupMCPChatHandler(chatConfiguration);
|
|
146
|
+
app.route({
|
|
147
|
+
url: '/chat',
|
|
148
|
+
method: ['POST', 'OPTIONS'],
|
|
149
|
+
handler,
|
|
150
|
+
});
|
|
151
|
+
app.route({
|
|
152
|
+
url: '/chat/tools',
|
|
153
|
+
method: ['GET', 'OPTIONS'],
|
|
154
|
+
handler,
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=chatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatHandler.js","sourceRoot":"","sources":["../../src/fastify/chatHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,4BAA4B,IAAI,eAAe,EAE/C,WAAW,EACX,UAAU,GAEX,MAAM,IAAI,CAAC;AACZ,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAqB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,MAAM,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAM,mBAAmB,GAAG,CAAC,iBAA0C,EAAE,EAAE;IACzE,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,EACJ,KAAK,EAAE,eAAe,GAAG,EAAE,EAC3B,eAAe,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,MAAM,EAC/C,mBAAmB,EACnB,GAAG,cAAc,EAClB,GAAG,iBAAiB,CAAC;IAEtB,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,IAAI,mBAAmB,CAAC;IAE/D,MAAM,cAAc,GAAuB,KAAK,EAAE,GAAmB,EAAE,GAAG,EAAE,EAAE;QAC5E,IAAI,MAAM,CAAC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AC,MAAM,WAAW,GAAG,CAAC,GAAoB,EAAE,iBAAoC,EAAE,EAAE;IACxF,MAAM,OAAO,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAEvD,GAAG,CAAC,KAAK,CAAC;QACR,GAAG,EAAE,OAAO;QACZ,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;QAC3B,OAAO;KACR,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,CAAC;QACR,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;QAC1B,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ercMetadataHandler.d.ts","sourceRoot":"","sources":["../../src/fastify/ercMetadataHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAY7D,QAAA,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"ercMetadataHandler.d.ts","sourceRoot":"","sources":["../../src/fastify/ercMetadataHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAY7D,QAAA,MAAM,kBAAkB,EAAE,kBAkCzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -15,7 +15,7 @@ const ercMetadataHandler = async (req, res) => {
|
|
|
15
15
|
const { productId, localeOrTokenFilename, tokenFileName } = req.params;
|
|
16
16
|
const product = await loaders.productLoader.load({ productId });
|
|
17
17
|
const [token] = await modules.warehousing.findTokens({
|
|
18
|
-
|
|
18
|
+
tokenSerialNumber: (tokenFileName || localeOrTokenFilename).toLowerCase().replace('.json', ''),
|
|
19
19
|
contractAddress: product?.tokenization?.contractAddress,
|
|
20
20
|
});
|
|
21
21
|
const ercMetadata = await services.warehousing.ercMetadata({
|
|
@@ -25,16 +25,13 @@ const ercMetadataHandler = async (req, res) => {
|
|
|
25
25
|
});
|
|
26
26
|
if (!ercMetadata)
|
|
27
27
|
return notFoundHandler(res);
|
|
28
|
-
const body = JSON.stringify(ercMetadata);
|
|
29
28
|
res.status(200);
|
|
30
|
-
res.
|
|
31
|
-
res.header('Content-Type', 'application/json');
|
|
32
|
-
return res.send(body);
|
|
29
|
+
return res.send(ercMetadata);
|
|
33
30
|
}
|
|
34
31
|
catch (e) {
|
|
35
|
-
logger.error(e
|
|
32
|
+
logger.error(e);
|
|
36
33
|
res.status(503);
|
|
37
|
-
return res.send(
|
|
34
|
+
return res.send({ name: e.name, code: e.code, message: e.message });
|
|
38
35
|
}
|
|
39
36
|
};
|
|
40
37
|
export default ercMetadataHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ercMetadataHandler.js","sourceRoot":"","sources":["../../src/fastify/ercMetadataHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD,MAAM,MAAM,GAAG,YAAY,CAAC,wBAAwB,CAAC,CAAC;AAEtD,MAAM,EAAE,QAAQ,GAAG,uBAAuB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAE3D,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,EAAE;IAC9B,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACjD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChB,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAuB,KAAK,EAClD,GAAmD,EACnD,GAAG,EACH,EAAE;IACF,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,gBAAgB,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAEvC,IAAI,CAAC,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BAAkB,CAAC"}
|
package/lib/fastify/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { YogaServerInstance } from 'graphql-yoga';
|
|
2
2
|
import { mongodb } from '@unchainedshop/mongodb';
|
|
3
3
|
import { UnchainedCore } from '@unchainedshop/core';
|
|
4
|
-
import { FastifyBaseLogger, FastifyInstance } from 'fastify';
|
|
4
|
+
import { FastifyBaseLogger, FastifyInstance, FastifyPluginAsync } from 'fastify';
|
|
5
|
+
export * from './chatHandler.js';
|
|
5
6
|
export declare const unchainedLogger: (prefix: string) => FastifyBaseLogger;
|
|
6
7
|
export declare const connect: (fastify: FastifyInstance, { graphqlHandler, db, }: {
|
|
7
8
|
graphqlHandler: YogaServerInstance<any, any>;
|
|
@@ -10,4 +11,8 @@ export declare const connect: (fastify: FastifyInstance, { graphqlHandler, db, }
|
|
|
10
11
|
}, { allowRemoteToLocalhostSecureCookies, }?: {
|
|
11
12
|
allowRemoteToLocalhostSecureCookies?: boolean;
|
|
12
13
|
}) => void;
|
|
14
|
+
interface FastifyRouterOptions {
|
|
15
|
+
prefix?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const fastifyRouter: FastifyPluginAsync<FastifyRouterOptions>;
|
|
13
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fastify/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fastify/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAkB,MAAM,SAAS,CAAC;AAKjG,cAAc,kBAAkB,CAAC;AAiFjC,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,iBAehD,CAAC;AAEF,eAAO,MAAM,OAAO,GAClB,SAAS,eAAe,EACxB,yBAGG;IACD,cAAc,EAAE,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7C,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;IACf,YAAY,EAAE,aAAa,CAAC;CAC7B,EACD,2CAEG;IAAE,mCAAmC,CAAC,EAAE,OAAO,CAAA;CAAO,SA6G1D,CAAC;AAEF,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,kBAAkB,CAAC,oBAAoB,CA4BlE,CAAC"}
|
package/lib/fastify/index.js
CHANGED
|
@@ -10,6 +10,8 @@ import fastifyMultipart from '@fastify/multipart';
|
|
|
10
10
|
import { createLogger } from '@unchainedshop/logger';
|
|
11
11
|
import mcpHandler from './mcpHandler.js';
|
|
12
12
|
import tempUploadHandler from './tempUploadHandler.js';
|
|
13
|
+
import fastifyStatic from '@fastify/static';
|
|
14
|
+
export * from './chatHandler.js';
|
|
13
15
|
const resolveUserRemoteAddress = (req) => {
|
|
14
16
|
const remoteAddress = req.headers['x-real-ip'] ||
|
|
15
17
|
req.headers['x-forwarded-for'] ||
|
|
@@ -17,7 +19,7 @@ const resolveUserRemoteAddress = (req) => {
|
|
|
17
19
|
const remotePort = req.socket?.remotePort;
|
|
18
20
|
return { remoteAddress, remotePort };
|
|
19
21
|
};
|
|
20
|
-
const { MCP_API_PATH = '/mcp', GRAPHQL_API_PATH = '/graphql', BULK_IMPORT_API_PATH = '/bulk-import', TEMP_UPLOAD_API_PATH = '/temp-upload', ERC_METADATA_API_PATH = '/erc-metadata/:productId/:localeOrTokenFilename/:tokenFileName?', UNCHAINED_COOKIE_NAME = 'unchained_token', UNCHAINED_COOKIE_PATH = '/', UNCHAINED_COOKIE_DOMAIN, UNCHAINED_COOKIE_SAMESITE, UNCHAINED_COOKIE_INSECURE, } = process.env;
|
|
22
|
+
const { MCP_API_PATH = '/mcp', GRAPHQL_API_PATH = '/graphql', BULK_IMPORT_API_PATH = '/bulk-import', TEMP_UPLOAD_API_PATH = '/temp-upload', ERC_METADATA_API_PATH = '/erc-metadata/:productId/:localeOrTokenFilename/:tokenFileName?', UNCHAINED_COOKIE_NAME = 'unchained_token', UNCHAINED_COOKIE_PATH = '/', UNCHAINED_COOKIE_DOMAIN, UNCHAINED_COOKIE_SAMESITE = 'none', UNCHAINED_COOKIE_INSECURE, } = process.env;
|
|
21
23
|
const middlewareHook = async function middlewareHook(req, reply) {
|
|
22
24
|
const setHeader = (key, value) => reply.header(key, value);
|
|
23
25
|
const getHeader = (key) => req.headers[key];
|
|
@@ -176,4 +178,30 @@ export const connect = (fastify, { graphqlHandler, db, }, { allowRemoteToLocalho
|
|
|
176
178
|
registered();
|
|
177
179
|
});
|
|
178
180
|
};
|
|
181
|
+
export const fastifyRouter = async (fastify, opts) => {
|
|
182
|
+
try {
|
|
183
|
+
const staticURL = import.meta.resolve('@unchainedshop/admin-ui');
|
|
184
|
+
const staticPath = new URL(staticURL).pathname.split('/').slice(0, -1).join('/');
|
|
185
|
+
await fastify.register(fastifyStatic, {
|
|
186
|
+
root: staticPath,
|
|
187
|
+
prefix: opts.prefix || '/',
|
|
188
|
+
});
|
|
189
|
+
fastify.setNotFoundHandler((request, reply) => {
|
|
190
|
+
if (request.raw.method === 'GET') {
|
|
191
|
+
return reply.type('text/html').sendFile('index.html');
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
return reply.status(404).send();
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
200
|
+
// Trying the default admin ui dev port
|
|
201
|
+
fastify.get('/', async (request, reply) => {
|
|
202
|
+
return reply.redirect('http://localhost:3000');
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
179
207
|
//# sourceMappingURL=index.js.map
|
package/lib/fastify/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAqB,MAAM,eAAe,CAAC;AAC7E,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,UAAU,MAAM,eAAe,CAAC;AAIvC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAqB,MAAM,eAAe,CAAC;AAC7E,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,UAAU,MAAM,eAAe,CAAC;AAIvC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EA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AC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -66,8 +66,8 @@ const mcpHandler = async (req, res) => {
|
|
|
66
66
|
return res.status(405).send('Method Not Allowed');
|
|
67
67
|
}
|
|
68
68
|
catch (e) {
|
|
69
|
-
logger.error(e
|
|
70
|
-
return res.status(503).send(
|
|
69
|
+
logger.error(e);
|
|
70
|
+
return res.status(503).send({ name: e.name, code: e.code, message: e.message });
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
export default mcpHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpHandler.js","sourceRoot":"","sources":["../../src/fastify/mcpHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,eAAe,MAAM,iBAAiB,CAAC;AAE9C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD,MAAM,UAAU,GAAkD,EAAE,CAAC;AAErE,MAAM,UAAU,GAAuB,KAAK,EAC1C,GAAmD,EACnD,GAAG,EACH,EAAE;IACF,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;QAC/B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,GAAG,CAAC,MAAM,CACR,kBAAkB,EAClB,kEAAkE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,uBAAuB,IAAI,CACtH,CAAC;QACF,OAAO,GAAG,CAAC,IAAI,CACb,IAAI,CAAC,SAAS,CAAC;YACb,KAAK,EAAE,eAAe;YACtB,iBAAiB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,uBAAuB,uCAAuC;SAC7G,CAAC,CACH,CAAC;IACJ,CAAC;IAED,IA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GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;YACxC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;YAChD,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tempUploadHandler.d.ts","sourceRoot":"","sources":["../../src/fastify/tempUploadHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7D,QAAA,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"tempUploadHandler.d.ts","sourceRoot":"","sources":["../../src/fastify/tempUploadHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7D,QAAA,MAAM,iBAAiB,EAAE,kBAsCxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -24,17 +24,16 @@ const tempUploadHandler = async (req, res) => {
|
|
|
24
24
|
});
|
|
25
25
|
const fileUploadAdapter = getFileAdapter();
|
|
26
26
|
const rawUrl = await fileUploadAdapter.createDownloadURL(file);
|
|
27
|
+
if (!rawUrl)
|
|
28
|
+
throw new Error('Could not create download URL for file');
|
|
27
29
|
const url = context.modules.files.normalizeUrl(rawUrl, {});
|
|
28
|
-
const body = JSON.stringify({ fileId: file._id, url, expires: expires.toISOString() });
|
|
29
30
|
res.status(200);
|
|
30
|
-
res.
|
|
31
|
-
res.header('Content-Type', 'application/json');
|
|
32
|
-
return res.send(body);
|
|
31
|
+
return res.send({ fileId: file._id, url, expires: expires.toISOString() });
|
|
33
32
|
}
|
|
34
33
|
catch (e) {
|
|
35
|
-
logger.error(e
|
|
34
|
+
logger.error(e);
|
|
36
35
|
res.status(503);
|
|
37
|
-
return res.send(
|
|
36
|
+
return res.send({ name: e.name, code: e.code, message: e.message });
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
39
|
export default tempUploadHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tempUploadHandler.js","sourceRoot":"","sources":["../../src/fastify/tempUploadHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD,MAAM,iBAAiB,GAAuB,KAAK,EACjD,GAA8D,EAC9D,GAAG,EACH,EAAE;IACF,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,GAAG,CAAC,gBAAgB,CAAC;QAErC,MAAM,WAAW,CAAC,OAAO,EAAG,OAAe,CAAC,cAAc,CAAC,CAAC;QAE5D,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CAAC;YAC7D,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;gBACvB,QAA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E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAChB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashPassword.d.ts","sourceRoot":"","sources":["../src/hashPassword.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,aAAc,MAAM,KAAG,MAE/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashPassword.js","sourceRoot":"","sources":["../src/hashPassword.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAU,EAAE;IACvD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assortmentLinksLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/assortmentLinksLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;yBAEhB,MAAM;wBAAsB,MAAM;mBAAiB,MAAM;;yBAAzD,MAAM;wBAAsB,MAAM;mBAAiB,MAAM;;AAFpF,
|
|
1
|
+
{"version":3,"file":"assortmentLinksLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/assortmentLinksLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;yBAEhB,MAAM;wBAAsB,MAAM;mBAAiB,MAAM;;yBAAzD,MAAM;wBAAsB,MAAM;mBAAiB,MAAM;;AAFpF,wBA4CK"}
|
|
@@ -29,10 +29,13 @@ export default (unchainedAPI) => new DataLoader(async (queries) => {
|
|
|
29
29
|
else if (q.childAssortmentId) {
|
|
30
30
|
return childAssortmentLinkMap[q.childAssortmentId] || [];
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
if (q.assortmentId) {
|
|
33
|
+
return [
|
|
34
|
+
...(parentAssortmentLinkMap[q.assortmentId] || []),
|
|
35
|
+
...(childAssortmentLinkMap[q.assortmentId] || []),
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
return [];
|
|
36
39
|
});
|
|
37
40
|
});
|
|
38
41
|
//# sourceMappingURL=assortmentLinksLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assortmentLinksLoader.js","sourceRoot":"","sources":["../../src/loaders/assortmentLinksLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,CAGZ,KAAK,EAAE,OAAO,EAAE,EAAE;IAClB,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"assortmentLinksLoader.js","s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AC9D,CAAC;QAED,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACpD,sBAAsB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACN,sBAAsB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACvB,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;YACzB,OAAO,uBAAuB,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;QAC7D,CAAC;aAAM,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;YAC/B,OAAO,sBAAsB,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;QAC3D,CAAC;QACD,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;YACnB,OAAO;gBACL,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;gBAClD,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;aAClD,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { UnchainedCore } from '@unchainedshop/core';
|
|
|
2
2
|
import { AssortmentMediaType } from '@unchainedshop/core-assortments';
|
|
3
3
|
import DataLoader from 'dataloader';
|
|
4
4
|
declare const _default: (unchainedAPI: UnchainedCore) => DataLoader<{
|
|
5
|
-
assortmentId
|
|
5
|
+
assortmentId: string;
|
|
6
6
|
}, AssortmentMediaType[], {
|
|
7
|
-
assortmentId
|
|
7
|
+
assortmentId: string;
|
|
8
8
|
}>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=assortmentMediasLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assortmentMediasLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/assortmentMediasLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;
|
|
1
|
+
{"version":3,"file":"assortmentMediasLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/assortmentMediasLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;kBACV,MAAM;;kBAAN,MAAM;;AADvC,wBAgBK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assortmentMediasLoader.js","sourceRoot":"","sources":["../../src/loaders/assortmentMediasLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"assortmentMediasLoader.js","sourceRoot":"","sources":["../../src/loaders/assortmentMediasLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,CAAkD,KAAK,EAAE,OAAO,EAAE,EAAE;IAChF,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACvF,MAAM,oBAAoB,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC;QAC7F,YAAY,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE;KACrC,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAC9B,KAAK,MAAM,eAAe,IAAI,oBAAoB,EAAE,CAAC;QACnD,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,CAAC;YACtD,kBAAkB,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,kBAAkB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC"}
|
|
@@ -3,11 +3,11 @@ import DataLoader from 'dataloader';
|
|
|
3
3
|
import { FilterText } from '@unchainedshop/core-filters';
|
|
4
4
|
declare const _default: (unchainedAPI: UnchainedCore) => DataLoader<{
|
|
5
5
|
filterId: string;
|
|
6
|
-
filterOptionValue?: string;
|
|
6
|
+
filterOptionValue?: string | null;
|
|
7
7
|
locale: Intl.Locale;
|
|
8
8
|
}, FilterText, {
|
|
9
9
|
filterId: string;
|
|
10
|
-
filterOptionValue?: string;
|
|
10
|
+
filterOptionValue?: string | null;
|
|
11
11
|
locale: Intl.Locale;
|
|
12
12
|
}>;
|
|
13
13
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterTextLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/filterTextLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;yBAGzC,cAAc,aAAa;
|
|
1
|
+
{"version":3,"file":"filterTextLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/filterTextLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;yBAGzC,cAAc,aAAa;cAE3B,MAAM;wBAAsB,MAAM,GAAG,IAAI;YAAU,IAAI,CAAC,MAAM;;cAA9D,MAAM;wBAAsB,MAAM,GAAG,IAAI;YAAU,IAAI,CAAC,MAAM;;AAF9E,wBAoBK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterTextLoader.js","sourceRoot":"","sources":["../../src/loaders/filterTextLoader.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"filterTextLoader.js","sourceRoot":"","sources":["../../src/loaders/filterTextLoader.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,CAGZ,KAAK,EAAE,OAAO,EAAE,EAAE;IAClB,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAE/E,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAC9D,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAChC;QACE,IAAI,EAAE;YACJ,QAAQ,EAAE,CAAC;SACZ;KACF,CACF,CAAC;IAEF,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAElG,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AACnF,CAAC,CAAC,CAAC"}
|
package/lib/loaders/index.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ declare const loaders: (unchainedAPI: UnchainedCore) => {
|
|
|
20
20
|
locale: Intl.Locale;
|
|
21
21
|
}>;
|
|
22
22
|
assortmentMediasLoader: import("dataloader")<{
|
|
23
|
-
assortmentId
|
|
23
|
+
assortmentId: string;
|
|
24
24
|
}, import("@unchainedshop/core-assortments").AssortmentMediaType[], {
|
|
25
|
-
assortmentId
|
|
25
|
+
assortmentId: string;
|
|
26
26
|
}>;
|
|
27
27
|
assortmentLinkLoader: import("dataloader")<{
|
|
28
28
|
parentAssortmentId: string;
|
|
@@ -59,11 +59,11 @@ declare const loaders: (unchainedAPI: UnchainedCore) => {
|
|
|
59
59
|
}>;
|
|
60
60
|
filterTextLoader: import("dataloader")<{
|
|
61
61
|
filterId: string;
|
|
62
|
-
filterOptionValue?: string;
|
|
62
|
+
filterOptionValue?: string | null;
|
|
63
63
|
locale: Intl.Locale;
|
|
64
64
|
}, import("@unchainedshop/core-filters").FilterText, {
|
|
65
65
|
filterId: string;
|
|
66
|
-
filterOptionValue?: string;
|
|
66
|
+
filterOptionValue?: string | null;
|
|
67
67
|
locale: Intl.Locale;
|
|
68
68
|
}>;
|
|
69
69
|
productLoader: import("dataloader")<{
|
|
@@ -91,14 +91,14 @@ declare const loaders: (unchainedAPI: UnchainedCore) => {
|
|
|
91
91
|
locale: Intl.Locale;
|
|
92
92
|
}>;
|
|
93
93
|
productMediasLoader: import("dataloader")<{
|
|
94
|
-
productId
|
|
94
|
+
productId: string;
|
|
95
95
|
}, import("@unchainedshop/core-products").ProductMedia[], {
|
|
96
|
-
productId
|
|
96
|
+
productId: string;
|
|
97
97
|
}>;
|
|
98
98
|
productProxiesLoader: import("dataloader")<{
|
|
99
|
-
productId
|
|
99
|
+
productId: string;
|
|
100
100
|
}, import("@unchainedshop/core-products").Product[], {
|
|
101
|
-
productId
|
|
101
|
+
productId: string;
|
|
102
102
|
}>;
|
|
103
103
|
fileLoader: import("dataloader")<{
|
|
104
104
|
fileId: string;
|
|
@@ -2,9 +2,9 @@ import { UnchainedCore } from '@unchainedshop/core';
|
|
|
2
2
|
import { ProductMedia } from '@unchainedshop/core-products';
|
|
3
3
|
import DataLoader from 'dataloader';
|
|
4
4
|
declare const _default: (unchainedAPI: UnchainedCore) => DataLoader<{
|
|
5
|
-
productId
|
|
5
|
+
productId: string;
|
|
6
6
|
}, ProductMedia[], {
|
|
7
|
-
productId
|
|
7
|
+
productId: string;
|
|
8
8
|
}>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=productMediasLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productMediasLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/productMediasLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;
|
|
1
|
+
{"version":3,"file":"productMediasLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/productMediasLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;eACb,MAAM;;eAAN,MAAM;;AADpC,wBAgBK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productMediasLoader.js","sourceRoot":"","sources":["../../src/loaders/productMediasLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"productMediasLoader.js","sourceRoot":"","sources":["../../src/loaders/productMediasLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,CAAwC,KAAK,EAAE,OAAO,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACjF,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACpF,SAAS,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE;KAC/B,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,EAAE,CAAC;IAC3B,KAAK,MAAM,YAAY,IAAI,iBAAiB,EAAE,CAAC;QAC7C,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7C,eAAe,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;AAChE,CAAC,CAAC,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { UnchainedCore } from '@unchainedshop/core';
|
|
|
2
2
|
import { Product } from '@unchainedshop/core-products';
|
|
3
3
|
import DataLoader from 'dataloader';
|
|
4
4
|
declare const _default: (unchainedAPI: UnchainedCore) => DataLoader<{
|
|
5
|
-
productId
|
|
5
|
+
productId: string;
|
|
6
6
|
}, Product[], {
|
|
7
|
-
productId
|
|
7
|
+
productId: string;
|
|
8
8
|
}>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=productProxiesLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productProxiesLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/productProxiesLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;
|
|
1
|
+
{"version":3,"file":"productProxiesLoader.d.ts","sourceRoot":"","sources":["../../src/loaders/productProxiesLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,UAAU,MAAM,YAAY,CAAC;yBAEpB,cAAc,aAAa;eACb,MAAM;;eAAN,MAAM;;AADpC,wBAgCK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productProxiesLoader.js","sourceRoot":"","sources":["../../src/loaders/productProxiesLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"productProxiesLoader.js","sourceRoot":"","sources":["../../src/loaders/productProxiesLoader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,eAAe,CAAC,YAA2B,EAAE,EAAE,CAC7C,IAAI,UAAU,CAAmC,KAAK,EAAE,OAAO,EAAE,EAAE;IACjE,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAEjF,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;QACtE,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE;YACf,GAAG,EAAE;gBACH;oBACE,uBAAuB,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE;iBAC7C;gBACD;oBACE,6BAA6B,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE;iBACnD;aACF;SACF;KACF,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,EAAE,CAAC;IAC3B,KAAK,MAAM,YAAY,IAAI,cAAc,EAAE,CAAC;QAC1C,MAAM,aAAa,GAAG,YAAY,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,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