@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
package/lib/api-index.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export type UnchainedServerOptions = {
|
|
|
14
14
|
adminUiConfig?: AdminUiConfig;
|
|
15
15
|
unchainedAPI: UnchainedCore;
|
|
16
16
|
context?: (defaultResolver: UnchainedContextResolver) => UnchainedContextResolver;
|
|
17
|
-
} & GraphQLServerOptions
|
|
17
|
+
} & Partial<GraphQLServerOptions>;
|
|
18
18
|
export declare const startAPIServer: (options: UnchainedServerOptions) => Promise<import("graphql-yoga").YogaServerInstance<any, any>>;
|
|
19
19
|
//# sourceMappingURL=api-index.d.ts.map
|
package/lib/api-index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-index.d.ts","sourceRoot":"","sources":["../src/api-index.ts"],"names":[],"mappings":"AAAA,OAA4B,EAAE,oBAAoB,EAAE,MAAM,0BAA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,yBAAyB,EAAE,CAAC;AAMvF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,EAAE,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,eAAe,EAAE,wBAAwB,KAAK,wBAAwB,CAAC;CACnF,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElC,eAAO,MAAM,cAAc,GAAU,SAAS,sBAAsB,iEAmCnE,CAAC"}
|
package/lib/api-index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { buildDefaultTypeDefs } from './schema/index.js';
|
|
|
12
12
|
import resolvers from './resolvers/index.js';
|
|
13
13
|
import { actions } from './roles/index.js';
|
|
14
14
|
export const startAPIServer = async (options) => {
|
|
15
|
-
const { unchainedAPI, context: customContext, roles, adminUiConfig = {},
|
|
15
|
+
const { unchainedAPI, context: customContext, roles, adminUiConfig = {}, ...serverOptions } = options;
|
|
16
16
|
const contextResolver = createContextResolver(unchainedAPI, {
|
|
17
17
|
roles,
|
|
18
18
|
adminUiConfig,
|
|
@@ -22,14 +22,16 @@ export const startAPIServer = async (options) => {
|
|
|
22
22
|
return customContext(contextResolver)(props, ...rest);
|
|
23
23
|
}
|
|
24
24
|
: contextResolver);
|
|
25
|
+
const additionalTypeDefs = 'typeDefs' in serverOptions ? serverOptions.typeDefs : [];
|
|
26
|
+
const additionalResolvers = 'resolvers' in serverOptions ? serverOptions.resolvers : [];
|
|
25
27
|
return createGraphQLServer({
|
|
26
28
|
typeDefs: [
|
|
27
29
|
...buildDefaultTypeDefs({
|
|
28
30
|
actions: Object.keys(actions),
|
|
29
31
|
}),
|
|
30
|
-
...additionalTypeDefs,
|
|
32
|
+
...(additionalTypeDefs || []),
|
|
31
33
|
],
|
|
32
|
-
resolvers: [resolvers, ...additionalResolvers],
|
|
34
|
+
resolvers: [resolvers, ...(additionalResolvers || [])],
|
|
33
35
|
...serverOptions,
|
|
34
36
|
});
|
|
35
37
|
};
|
package/lib/api-index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-index.js","sourceRoot":"","sources":["../src/api-index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAA6C,MAAM,0BAA0B,CAAC;AACrF,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,GAG1B,MAAM,cAAc,CAAC;AAEtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAS3C,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,OAA+B,EAAE,EAAE;IACtE,MAAM,EACJ,YAAY,EACZ,OAAO,EAAE,aAAa,EACtB,KAAK,EACL,aAAa,GAAG,EAAE,EAClB,
|
|
1
|
+
{"version":3,"file":"api-index.js","sourceRoot":"","sources":["../src/api-index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAA6C,MAAM,0BAA0B,CAAC;AACrF,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,GAG1B,MAAM,cAAc,CAAC;AAEtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAA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CAAC;QACtD,GAAG,aAAa;KACjB,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const defaultSystemPrompt = "YOU MUST FOLLOW THIS RULE: After ANY tool execution, output NOTHING. No text. No explanation. No \"done\". Just STOP. Tool results are shown automatically.\n\nONLY output text when:\n1. No tools were called this turn, OR\n2. User explicitly asks \"explain\" or \"why\"\n\n Rules for using the Unchained MCP tools:\n - All prices are integer type and to correctly determine the currency decimal points check the currencies resource.\n - CRITICAL: Available languages, currencies, and countries are provided as MCP RESOURCES (unchained://shop/languages, unchained://shop/currencies, unchained://shop/countries). You MUST check these resources FIRST - DO NOT use localization_management tools with LIST action to check availability. The resources contain all available options.\n - NEVER call localization_management with action LIST, GET, or COUNT to check if a language/currency/country exists. Use the resources instead.\n - When validating localization codes, ONLY check against the resource data. If a code is not in the resources, it does not exist.\n - If a user requests an operation with a non-existing language/currency/country, respond: \"The [language/currency/country] '[code]' is not registered in the shop. Would you like me to add it first before proceeding?\"\n - If the user agrees, use localization_management with action: CREATE to add it, then proceed with the original operation.\n";
|
|
2
|
+
export default defaultSystemPrompt;
|
|
3
|
+
//# sourceMappingURL=defaultSystemPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultSystemPrompt.d.ts","sourceRoot":"","sources":["../../src/chat/defaultSystemPrompt.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,mBAAmB,k5CAaxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const defaultSystemPrompt = `YOU MUST FOLLOW THIS RULE: After ANY tool execution, output NOTHING. No text. No explanation. No "done". Just STOP. Tool results are shown automatically.
|
|
2
|
+
|
|
3
|
+
ONLY output text when:
|
|
4
|
+
1. No tools were called this turn, OR
|
|
5
|
+
2. User explicitly asks "explain" or "why"
|
|
6
|
+
|
|
7
|
+
Rules for using the Unchained MCP tools:
|
|
8
|
+
- All prices are integer type and to correctly determine the currency decimal points check the currencies resource.
|
|
9
|
+
- CRITICAL: Available languages, currencies, and countries are provided as MCP RESOURCES (unchained://shop/languages, unchained://shop/currencies, unchained://shop/countries). You MUST check these resources FIRST - DO NOT use localization_management tools with LIST action to check availability. The resources contain all available options.
|
|
10
|
+
- NEVER call localization_management with action LIST, GET, or COUNT to check if a language/currency/country exists. Use the resources instead.
|
|
11
|
+
- When validating localization codes, ONLY check against the resource data. If a code is not in the resources, it does not exist.
|
|
12
|
+
- If a user requests an operation with a non-existing language/currency/country, respond: "The [language/currency/country] '[code]' is not registered in the shop. Would you like me to add it first before proceeding?"
|
|
13
|
+
- If the user agrees, use localization_management with action: CREATE to add it, then proceed with the original operation.
|
|
14
|
+
`;
|
|
15
|
+
export default defaultSystemPrompt;
|
|
16
|
+
//# sourceMappingURL=defaultSystemPrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultSystemPrompt.js","sourceRoot":"","sources":["../../src/chat/defaultSystemPrompt.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;CAa3B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ImageModel } from 'ai';
|
|
2
|
+
declare const generateImageHandler: (req: any) => ({ model, uploadUrl, }: {
|
|
3
|
+
model: ImageModel;
|
|
4
|
+
uploadUrl?: string;
|
|
5
|
+
}) => import("ai").Tool<never, any>;
|
|
6
|
+
export default generateImageHandler;
|
|
7
|
+
//# sourceMappingURL=generateImageHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateImageHandler.d.ts","sourceRoot":"","sources":["../../src/chat/generateImageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,UAAU,EAAQ,MAAM,IAAI,CAAC;AAwBlE,QAAA,MAAM,oBAAoB,GACvB,KAAK,GAAG,MACR,uBAGE;IACD,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,kCA2CA,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { experimental_generateImage, tool } from 'ai';
|
|
2
|
+
import { fileTypeFromBuffer } from 'file-type';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
const inputSchema = z.object({
|
|
5
|
+
prompt: z.string().describe('The prompt to generate the image from'),
|
|
6
|
+
size: z
|
|
7
|
+
.enum([
|
|
8
|
+
'512x512',
|
|
9
|
+
'768x768',
|
|
10
|
+
'1024x1024',
|
|
11
|
+
'512x896',
|
|
12
|
+
'640x1120',
|
|
13
|
+
'768x1344',
|
|
14
|
+
'1024x1792',
|
|
15
|
+
'896x512',
|
|
16
|
+
'1120x640',
|
|
17
|
+
'1344x768',
|
|
18
|
+
'1792x1024',
|
|
19
|
+
])
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('The size of the image (default is 1024x1024).'),
|
|
22
|
+
});
|
|
23
|
+
const generateImageHandler = (req) => ({ model, uploadUrl = `${process.env.ROOT_URL}/temp-upload`, }) => {
|
|
24
|
+
return tool({
|
|
25
|
+
description: 'Generate an image based on the prompt',
|
|
26
|
+
inputSchema: inputSchema,
|
|
27
|
+
name: 'generate_image',
|
|
28
|
+
execute: async ({ prompt, size = '1024x1024' }) => {
|
|
29
|
+
try {
|
|
30
|
+
const { image } = await experimental_generateImage({
|
|
31
|
+
model,
|
|
32
|
+
prompt,
|
|
33
|
+
size: size,
|
|
34
|
+
});
|
|
35
|
+
const buffer = Buffer.from(image.base64, 'base64');
|
|
36
|
+
const fileType = await fileTypeFromBuffer(buffer);
|
|
37
|
+
const extension = fileType?.ext || 'png';
|
|
38
|
+
const mime = fileType?.mime || 'image/png';
|
|
39
|
+
const filename = `image-${Date.now()}.${extension}`;
|
|
40
|
+
const file = new File([buffer], filename, { type: mime });
|
|
41
|
+
const formData = new FormData();
|
|
42
|
+
formData.append('image', file);
|
|
43
|
+
const uploadRes = await fetch(uploadUrl, {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
body: formData,
|
|
46
|
+
credentials: 'include',
|
|
47
|
+
headers: {
|
|
48
|
+
Cookie: req?.headers?.cookie || req?.headers?.get('cookie') || '',
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
if (!uploadRes.ok) {
|
|
52
|
+
throw new Error(`Image upload failed: ${uploadRes.statusText}`);
|
|
53
|
+
}
|
|
54
|
+
const { url } = await uploadRes.json();
|
|
55
|
+
return { imageUrl: url, prompt };
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
return `Error Generating image: ${error.message}`;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export default generateImageHandler;
|
|
64
|
+
//# sourceMappingURL=generateImageHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateImageHandler.js","sourceRoot":"","sources":["../../src/chat/generateImageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAc,IAAI,EAAE,MAAM,IAAI,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACpE,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC;QACJ,SAAS;QACT,SAAS;QACT,WAAW;QACX,SAAS;QACT,UAAU;QACV,UAAU;QACV,WAAW;QACX,SAAS;QACT,UAAU;QACV,UAAU;QACV,WAAW;KACZ,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,+CAA+C,CAAC;CAC7D,CAAC,CAAC;AAEH,MAAM,oBAAoB,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GAAG,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE;qBAClE;iBACF,CAAC,CAAC;gBAEH,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;oBAClB,MAAM,IAAI,KAAK,CAAC,wBAAwB,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;gBAClE,CAAC;gBAED,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;gBACvC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;YACnC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,2BAA4B,KAAe,CAAC,OAAO,EAAE,CAAC;YAC/D,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeToolsIndex.d.ts","sourceRoot":"","sources":["../../src/chat/normalizeToolsIndex.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,QAAQ,EAAE,GAAG;;;;;IAQxD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { categorizeTools } from './utils.js';
|
|
2
|
+
export default function normalizeToolsIndex(mcpTools) {
|
|
3
|
+
const tools = Object.entries(mcpTools).map(([name, tool]) => ({
|
|
4
|
+
name,
|
|
5
|
+
description: tool.description || '',
|
|
6
|
+
parameters: tool.parameters || {},
|
|
7
|
+
category: categorizeTools(name),
|
|
8
|
+
}));
|
|
9
|
+
return tools;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=normalizeToolsIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeToolsIndex.js","sourceRoot":"","sources":["../../src/chat/normalizeToolsIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,QAAa;IACvD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAM,EAAE,EAAE,CAAC,CAAC;QACjE,IAAI;QACJ,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;QACnC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC;KAChC,CAAC,CAAC,CAAC;IACJ,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageModel, streamText } from 'ai';
|
|
2
|
+
type StreamTextParams = Parameters<typeof streamText>[0];
|
|
3
|
+
export type ChatConfiguration = Omit<StreamTextParams, 'messages'> & {
|
|
4
|
+
unchainedMCPUrl?: string;
|
|
5
|
+
imageGenerationTool?: {
|
|
6
|
+
model: ImageModel;
|
|
7
|
+
uploadUrl?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const errorHandler: (error: any) => string;
|
|
11
|
+
export declare const categorizeTools: (toolName: string) => string;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyC,UAAU,EAAE,MAAM,IAAI,CAAC;AAEnF,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE;QAAE,KAAK,EAAE,UAAU,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG,KAAG,MAOzC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAYlD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NoSuchToolError, InvalidArgumentError } from 'ai';
|
|
2
|
+
export const errorHandler = (error) => {
|
|
3
|
+
if (NoSuchToolError.isInstance(error))
|
|
4
|
+
return 'NoSuchToolError';
|
|
5
|
+
if (InvalidArgumentError.isInstance(error))
|
|
6
|
+
return 'InvalidToolArgumentsError';
|
|
7
|
+
/* if (ToolExecutionError.isInstance(error)) return 'ToolExecutionError'; */
|
|
8
|
+
if (error?.message?.toLowerCase()?.includes('forbidden'))
|
|
9
|
+
return 'NetworkError';
|
|
10
|
+
if (error?.message?.toLowerCase()?.includes('limit'))
|
|
11
|
+
return 'LimitExceeded';
|
|
12
|
+
return `Failed to stream response: ${error?.message || 'Unknown error'}`;
|
|
13
|
+
};
|
|
14
|
+
export const categorizeTools = (toolName) => {
|
|
15
|
+
const name = toolName.toLowerCase();
|
|
16
|
+
if (name.includes('product'))
|
|
17
|
+
return 'Product Management';
|
|
18
|
+
if (name.includes('order'))
|
|
19
|
+
return 'Order Management';
|
|
20
|
+
if (name.includes('customer') || name.includes('user'))
|
|
21
|
+
return 'Customer Management';
|
|
22
|
+
if (name.includes('shop') || name.includes('settings'))
|
|
23
|
+
return 'Shop Configuration';
|
|
24
|
+
if (name.includes('assortment'))
|
|
25
|
+
return 'Assortments';
|
|
26
|
+
if (name.includes('filter'))
|
|
27
|
+
return 'Filters';
|
|
28
|
+
if (name.includes('image') || name.includes('generate'))
|
|
29
|
+
return 'Media & Content';
|
|
30
|
+
return 'Other Tools';
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=utils.js.map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AY,CAAC;QAAE,OAAO,aAAa,CAAC;IACtD,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAElF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
|
package/lib/context.d.ts
CHANGED
|
@@ -25,6 +25,9 @@ export interface CustomAdminUiProperties {
|
|
|
25
25
|
export interface AdminUiConfig {
|
|
26
26
|
customProperties?: CustomAdminUiProperties[];
|
|
27
27
|
singleSignOnURL?: string;
|
|
28
|
+
defaultProductTags?: string[];
|
|
29
|
+
defaultAssortmentTags?: string[];
|
|
30
|
+
defaultUserTags?: string[];
|
|
28
31
|
}
|
|
29
32
|
export interface UnchainedHTTPServerContext {
|
|
30
33
|
setHeader: (key: string, value: string) => void;
|
package/lib/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAA2B,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAoB,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB,KACE,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,CAA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M,CAAC,EACvE,GAAG,CAAC,EAAE,OAAO,EACb,GAAG,CAAC,EAAE,QAAQ,KACX,OAAO,CAAC,OAAO,CAAC,CAAC;AAOtB,eAAO,MAAM,qBAAqB,GAE9B,cAAc,aAAa,EAC3B,iBAAiB,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,eAAe,CAAC,KACvE,wBA0CF,CAAC"}
|
package/lib/context.js
CHANGED
|
@@ -22,8 +22,11 @@ export const createContextResolver = (unchainedAPI, unchainedConfig) => async ({
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
if (userId && !userContext.userId) {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const user = await unchainedAPI.modules.users.findUserById(userId);
|
|
26
|
+
if (user) {
|
|
27
|
+
userContext.user = user;
|
|
28
|
+
userContext.userId = user._id;
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
return {
|
|
29
32
|
...unchainedAPI,
|
package/lib/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,kBAAwC,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,kBAAwC,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,qBAAqB,CAAC;AAkD/E,IAAI,OAAO,CAAC;AAEZ,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAA6B,EAAE,CAAC,OAAO,CAAC;AAEjF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,UAAoC,EAAE,EAAE;IAChF,OAAO,GAAG,UAAU,CAAC;AACvB,CAAC,CAAC;AAQF,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,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AAW,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;QAChC,CAAC;IACH,CAAC;IAED,OAAO;QACL,GAAG,YAAY;QACf,GAAG,eAAe;QAClB,GAAG,aAAa;QAChB,GAAG,WAAW;QACd,GAAG,yBAAyB;QAC5B,OAAO;QACP,OAAO,EAAE,qBAAqB;KAC/B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { YogaServerOptions } from 'graphql-yoga';
|
|
2
|
-
export type
|
|
3
|
-
typeDefs
|
|
4
|
-
resolvers
|
|
1
|
+
import { YogaServerOptions, YogaSchemaDefinition } from 'graphql-yoga';
|
|
2
|
+
export type UnchainedSchemaExtension = {
|
|
3
|
+
typeDefs: string[];
|
|
4
|
+
resolvers: Record<string, any>[];
|
|
5
|
+
} | {
|
|
6
|
+
schema: YogaSchemaDefinition<any, any>;
|
|
5
7
|
};
|
|
8
|
+
export type GraphQLServerOptions = YogaServerOptions<any, any> & UnchainedSchemaExtension;
|
|
6
9
|
declare const _default: (options: GraphQLServerOptions) => Promise<import("graphql-yoga").YogaServerInstance<any, any>>;
|
|
7
10
|
export default _default;
|
|
8
11
|
//# sourceMappingURL=createGraphQLServer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGraphQLServer.d.ts","sourceRoot":"","sources":["../src/createGraphQLServer.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"createGraphQLServer.d.ts","sourceRoot":"","sources":["../src/createGraphQLServer.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIjG,MAAM,MAAM,wBAAwB,GAChC;IACE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CAClC,GACD;IAAE,MAAM,EAAE,oBAAoB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,wBAAwB,CAAC;yBAEpE,SAAS,oBAAoB;AAAnD,wBAmBE"}
|
|
@@ -2,11 +2,11 @@ import { createLogger } from '@unchainedshop/logger';
|
|
|
2
2
|
import { createYoga, createSchema } from 'graphql-yoga';
|
|
3
3
|
const logger = createLogger('unchained:api');
|
|
4
4
|
export default async (options) => {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
createSchema({
|
|
8
|
-
typeDefs,
|
|
9
|
-
resolvers,
|
|
5
|
+
const schema = 'schema' in options
|
|
6
|
+
? options.schema
|
|
7
|
+
: createSchema({
|
|
8
|
+
typeDefs: options.typeDefs,
|
|
9
|
+
resolvers: options.resolvers,
|
|
10
10
|
});
|
|
11
11
|
const server = createYoga({
|
|
12
12
|
schema,
|
|
@@ -14,7 +14,7 @@ export default async (options) => {
|
|
|
14
14
|
context: async (ctx) => {
|
|
15
15
|
return ctx.req?.unchainedContext;
|
|
16
16
|
},
|
|
17
|
-
...
|
|
17
|
+
...options,
|
|
18
18
|
});
|
|
19
19
|
return server;
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGraphQLServer.js","sourceRoot":"","sources":["../src/createGraphQLServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"createGraphQLServer.js","sourceRoot":"","sources":["../src/createGraphQLServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA2C,MAAM,cAAc,CAAC;AAEjG,MAAM,MAAM,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAW7C,eAAe,KAAK,EAAE,OAA6B,EAAE,EAAE;IACrD,MAAM,MAAM,GACV,QAAQ,IAAI,OAAO;QACjB,CAAC,CAAC,OAAO,CAAC,MAAM;QAChB,CAAC,CAAC,YAAY,CAAC;YACX,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC;IAET,MAAM,MAAM,GAAG,UAAU,CAAC;QACxB,MAAM;QACN,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,KAAK,EAAE,GAAQ,EAAE,EAAE;YAC1B,OAAQ,GAAG,CAAC,GAAW,EAAE,gBAAgB,CAAC;QAC5C,CAAC;QACD,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
package/lib/errors.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const OrderWrongStatusError: any;
|
|
|
42
42
|
export declare const OrderCheckoutError: any;
|
|
43
43
|
export declare const OrderPaymentConfigurationError: any;
|
|
44
44
|
export declare const QuotationWrongStatusError: any;
|
|
45
|
+
export declare const QuotationItemConfigurationError: any;
|
|
45
46
|
export declare const QuotationNotFoundError: any;
|
|
46
47
|
export declare const BookmarkAlreadyExistsError: any;
|
|
47
48
|
export declare const BookmarkNotFoundError: any;
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,SAAS,MAAM,KAAG,GAUzD,CAAC;AAEJ,eAAO,MAAM,qBAAqB,KAAkE,CAAC;AACrG,eAAO,MAAM,iBAAiB,KAAqD,CAAC;AACpF,eAAO,MAAM,oBAAoB,KAA2D,CAAC;AAE7F,eAAO,MAAM,6BAA6B,KAGzC,CAAC;AAEF,eAAO,MAAM,yBAA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AAElG,eAAO,MAAM,2BAA2B,KAGvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,KAGnC,CAAC"}
|
package/lib/errors.js
CHANGED
|
@@ -52,6 +52,7 @@ export const OrderWrongStatusError = createError('OrderWrongStatusError', 'The c
|
|
|
52
52
|
export const OrderCheckoutError = createError('OrderCheckoutError', 'A problem occured while processing the order');
|
|
53
53
|
export const OrderPaymentConfigurationError = createError('OrderPaymentConfigurationError', 'Payment configuration invalid');
|
|
54
54
|
export const QuotationWrongStatusError = createError('QuotationWrongStatusError', 'The current status of the quotation does not allow this operation');
|
|
55
|
+
export const QuotationItemConfigurationError = createError('QuotationItemConfigurationError', 'Could not transform quotation item');
|
|
55
56
|
export const QuotationNotFoundError = createError('QuotationNotFoundError', 'Quotation not found');
|
|
56
57
|
export const BookmarkAlreadyExistsError = createError('BookmarkAlreadyExistsError', 'Bookmark already exists');
|
|
57
58
|
export const BookmarkNotFoundError = createError('BookmarkNotFoundError', 'Bookmark not found');
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,OAAe,EAAO,EAAE,CAChE,KAAM,SAAQ,YAAY;IACxB,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE;QAC/C,KAAK,CAAC,eAAe,IAAI,OAAO,EAAE;YAChC,UAAU,EAAE;gBACV,IAAI;gBACJ,GAAG,IAAI;aACR;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEJ,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC;AACrG,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC,mBAAmB,EAAE,gBAAgB,CA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W,CACpD,6BAA6B,EAC7B,0CAA0C,CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAChD,yBAAyB,EACzB,2CAA2C,CAC5C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Express } from 'express';
|
|
2
|
+
import { ChatConfiguration } from '../chat/utils.js';
|
|
3
|
+
export declare const expressRouter: () => import("express-serve-static-core").Router;
|
|
4
|
+
export declare const connectChat: (app: Express, chatConfiguration: ChatConfiguration) => void;
|
|
5
|
+
//# sourceMappingURL=chatHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatHandler.d.ts","sourceRoot":"","sources":["../../src/express/chatHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAqC,MAAM,SAAS,CAAC;AAW1E,OAAO,EAAE,iBAAiB,EAAgB,MAAM,kBAAkB,CAAC;AAKnE,eAAO,MAAM,aAAa,kDAazB,CAAC;AAqKF,eAAO,MAAM,WAAW,GAAI,KAAK,OAAO,EAAE,mBAAmB,iBAAiB,SAQ7E,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
3
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
4
|
+
import { convertToModelMessages, experimental_createMCPClient as createMCPClient, stepCountIs, streamText, } from 'ai';
|
|
5
|
+
import { errorHandler } from '../chat/utils.js';
|
|
6
|
+
import generateImageHandler from '../chat/generateImageHandler.js';
|
|
7
|
+
import defaultSystemPrompt from '../chat/defaultSystemPrompt.js';
|
|
8
|
+
import normalizeToolsIndex from '../chat/normalizeToolsIndex.js';
|
|
9
|
+
export const expressRouter = () => {
|
|
10
|
+
const router = express.Router();
|
|
11
|
+
const staticURL = import.meta.resolve('@unchainedshop/admin-ui');
|
|
12
|
+
const staticPath = new URL(staticURL).pathname.split('/').slice(0, -1).join('/');
|
|
13
|
+
router.use(express.static(staticPath));
|
|
14
|
+
router.get(/(.*)/, (_, res) => {
|
|
15
|
+
res.sendFile(`${staticPath}/index.html`);
|
|
16
|
+
});
|
|
17
|
+
return router;
|
|
18
|
+
};
|
|
19
|
+
const setupMCPChatHandler = (chatConfiguration) => {
|
|
20
|
+
if (!chatConfiguration || !chatConfiguration.model) {
|
|
21
|
+
throw new Error('Model is required');
|
|
22
|
+
}
|
|
23
|
+
const { tools: additionalTools = {}, unchainedMCPUrl = `${process.env.ROOT_URL}/mcp`, model, imageGenerationTool, ...restChatConfig } = chatConfiguration;
|
|
24
|
+
const system = chatConfiguration.system ?? defaultSystemPrompt;
|
|
25
|
+
const mcpChatHandler = async (req, res) => {
|
|
26
|
+
if (req.method === 'OPTIONS') {
|
|
27
|
+
res.setHeader('access-control-allow-credentials', 'true');
|
|
28
|
+
res.setHeader('access-control-allow-private-network', 'true');
|
|
29
|
+
res.status(200).end();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (req.method !== 'POST' && req.method !== 'GET') {
|
|
33
|
+
res.status(405).json({ error: 'Method Not Allowed. Use POST.' });
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const resourceTransport = new StreamableHTTPClientTransport(new URL(unchainedMCPUrl), {
|
|
37
|
+
requestInit: {
|
|
38
|
+
headers: {
|
|
39
|
+
Cookie: req.headers.cookie || '',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const sdkClient = new Client({ name: 'unchained-chat-client', version: '1.0.0' }, {
|
|
44
|
+
capabilities: { resources: {} },
|
|
45
|
+
});
|
|
46
|
+
await sdkClient.connect(resourceTransport);
|
|
47
|
+
const transport = new StreamableHTTPClientTransport(new URL(unchainedMCPUrl), {
|
|
48
|
+
requestInit: {
|
|
49
|
+
headers: {
|
|
50
|
+
Cookie: req.headers.cookie || '',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
const client = await createMCPClient({
|
|
55
|
+
transport: transport,
|
|
56
|
+
});
|
|
57
|
+
try {
|
|
58
|
+
const defaultUnchainedTools = await client.tools();
|
|
59
|
+
let resourceContext = '';
|
|
60
|
+
try {
|
|
61
|
+
const resources = await sdkClient.listResources();
|
|
62
|
+
if (resources?.resources) {
|
|
63
|
+
const resourceTexts = await Promise.all(resources.resources.map(async (resource) => {
|
|
64
|
+
try {
|
|
65
|
+
const content = await sdkClient.readResource({ uri: resource.uri });
|
|
66
|
+
if (content?.contents?.[0]?.text) {
|
|
67
|
+
return `${resource.name}:\n${content.contents[0].text}`;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
console.error(`Failed to read resource ${resource.uri}:`, e);
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}));
|
|
75
|
+
resourceContext =
|
|
76
|
+
'\n\nAVAILABLE SHOP CONFIGURATION:\n' + resourceTexts.filter(Boolean).join('\n\n');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (e) {
|
|
80
|
+
console.error('Failed to fetch MCP resources:', e);
|
|
81
|
+
}
|
|
82
|
+
const tools = {
|
|
83
|
+
...defaultUnchainedTools,
|
|
84
|
+
...additionalTools,
|
|
85
|
+
};
|
|
86
|
+
if (imageGenerationTool) {
|
|
87
|
+
tools.generateImage = generateImageHandler(req)(imageGenerationTool);
|
|
88
|
+
}
|
|
89
|
+
if (req.method === 'GET') {
|
|
90
|
+
res.status(200).json({
|
|
91
|
+
tools: normalizeToolsIndex(tools),
|
|
92
|
+
cached: false,
|
|
93
|
+
});
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const { messages } = req.body;
|
|
97
|
+
const cacheControlledTools = { ...tools };
|
|
98
|
+
const keys = Object.keys(cacheControlledTools);
|
|
99
|
+
const lastKey = keys[keys.length - 1];
|
|
100
|
+
cacheControlledTools[lastKey] = {
|
|
101
|
+
...cacheControlledTools[lastKey],
|
|
102
|
+
providerOptions: {
|
|
103
|
+
anthropic: { cacheControl: { type: 'ephemeral' } },
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
const normalizedMessages = convertToModelMessages(messages, { tools: cacheControlledTools });
|
|
107
|
+
if (normalizedMessages.length > 0) {
|
|
108
|
+
const lastIndex = normalizedMessages.length - 1;
|
|
109
|
+
normalizedMessages[lastIndex] = {
|
|
110
|
+
...normalizedMessages[lastIndex],
|
|
111
|
+
providerOptions: { anthropic: { cacheControl: { type: 'ephemeral' } } },
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const MAX_MESSAGES = 10;
|
|
115
|
+
let startIndex = Math.max(0, normalizedMessages.length - MAX_MESSAGES);
|
|
116
|
+
while (startIndex < normalizedMessages.length) {
|
|
117
|
+
const msg = normalizedMessages[startIndex];
|
|
118
|
+
const hasOrphanedToolResult = Array.isArray(msg.content) && msg.content.some((c) => c.type === 'tool-result');
|
|
119
|
+
if (!hasOrphanedToolResult)
|
|
120
|
+
break;
|
|
121
|
+
startIndex++;
|
|
122
|
+
}
|
|
123
|
+
const messagesToInclude = normalizedMessages.slice(startIndex);
|
|
124
|
+
const result = streamText({
|
|
125
|
+
stopWhen: stepCountIs(10),
|
|
126
|
+
temperature: 0.2,
|
|
127
|
+
maxRetries: 3,
|
|
128
|
+
...restChatConfig,
|
|
129
|
+
system: system + resourceContext,
|
|
130
|
+
model,
|
|
131
|
+
tools: cacheControlledTools,
|
|
132
|
+
onFinish: async () => {
|
|
133
|
+
await client?.close();
|
|
134
|
+
},
|
|
135
|
+
messages: messagesToInclude,
|
|
136
|
+
providerOptions: {
|
|
137
|
+
anthropic: {
|
|
138
|
+
cacheControl: {
|
|
139
|
+
type: 'ephemeral',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
result.pipeUIMessageStreamToResponse(res, {
|
|
145
|
+
onError: errorHandler,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
await client?.close();
|
|
150
|
+
await sdkClient?.close();
|
|
151
|
+
res.status(500).json({ error: errorHandler(err) });
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return mcpChatHandler;
|
|
155
|
+
};
|
|
156
|
+
export const connectChat = (app, chatConfiguration) => {
|
|
157
|
+
const handler = setupMCPChatHandler(chatConfiguration);
|
|
158
|
+
if (!handler) {
|
|
159
|
+
throw new Error('Invalid chat configuration: model is required.');
|
|
160
|
+
}
|
|
161
|
+
app.post('/chat', express.json({ limit: '10mb' }), handler);
|
|
162
|
+
app.options('/chat', handler);
|
|
163
|
+
app.get('/chat/tools', handler);
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=chatHandler.js.map
|