@unchainedshop/api 4.0.0-rc.2 → 4.0.0-rc.4
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.map +1 -1
- package/lib/api-index.js +4 -1
- package/lib/api-index.js.map +1 -1
- package/lib/errors.d.ts +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/express/chatRouter.d.ts +3 -0
- package/lib/express/chatRouter.d.ts.map +1 -0
- package/lib/express/chatRouter.js +86 -0
- package/lib/express/chatRouter.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 copy.d.ts +6 -0
- package/lib/express/createBulkImportMiddleware copy.d.ts.map +1 -0
- package/lib/express/createBulkImportMiddleware copy.js +49 -0
- package/lib/express/createBulkImportMiddleware copy.js.map +1 -0
- package/lib/express/createMCPMiddleware.d.ts +2 -6
- package/lib/express/createMCPMiddleware.d.ts.map +1 -1
- package/lib/express/createMCPMiddleware.js +73 -42
- 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 +7 -0
- package/lib/express/createTempUploadMiddleware.d.ts.map +1 -0
- package/lib/express/createTempUploadMiddleware.js +48 -0
- package/lib/express/createTempUploadMiddleware.js.map +1 -0
- package/lib/express/index.d.ts.map +1 -1
- package/lib/express/index.js +17 -4
- package/lib/express/index.js.map +1 -1
- package/lib/express/setupMCPChatHandler.d.ts +3 -0
- package/lib/express/setupMCPChatHandler.d.ts.map +1 -0
- package/lib/express/setupMCPChatHandler.js +57 -0
- package/lib/express/setupMCPChatHandler.js.map +1 -0
- package/lib/fastify/index.d.ts.map +1 -1
- package/lib/fastify/index.js +24 -2
- package/lib/fastify/index.js.map +1 -1
- package/lib/fastify/mcpChatHandler.d.ts +3 -0
- package/lib/fastify/mcpChatHandler.d.ts.map +1 -0
- package/lib/fastify/mcpChatHandler.js +60 -0
- package/lib/fastify/mcpChatHandler.js.map +1 -0
- package/lib/fastify/mcpHandler copy.d.ts +4 -0
- package/lib/fastify/mcpHandler copy.d.ts.map +1 -0
- package/lib/fastify/mcpHandler copy.js +72 -0
- package/lib/fastify/mcpHandler copy.js.map +1 -0
- package/lib/fastify/mcpHandler.d.ts +3 -7
- package/lib/fastify/mcpHandler.d.ts.map +1 -1
- package/lib/fastify/mcpHandler.js +71 -39
- package/lib/fastify/mcpHandler.js.map +1 -1
- package/lib/fastify/tempUploadHandler.d.ts +4 -0
- package/lib/fastify/tempUploadHandler.d.ts.map +1 -0
- package/lib/fastify/tempUploadHandler.js +41 -0
- package/lib/fastify/tempUploadHandler.js.map +1 -0
- 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/assortmentMediaTextLoader.js +1 -1
- package/lib/loaders/assortmentMediaTextLoader.js.map +1 -1
- package/lib/loaders/assortmentTextLoader.js +1 -1
- package/lib/loaders/assortmentTextLoader.js.map +1 -1
- package/lib/loaders/buildLocaleMap.d.ts +6 -0
- package/lib/loaders/buildLocaleMap.d.ts.map +1 -0
- package/lib/loaders/buildLocaleMap.js +67 -0
- package/lib/loaders/buildLocaleMap.js.map +1 -0
- package/lib/loaders/buildTextMap.d.ts +1 -1
- package/lib/loaders/buildTextMap.d.ts.map +1 -1
- package/lib/loaders/buildTextMap.js +19 -6
- package/lib/loaders/buildTextMap.js.map +1 -1
- package/lib/loaders/filterTextLoader.js +1 -1
- package/lib/loaders/filterTextLoader.js.map +1 -1
- package/lib/loaders/productMediaTextLoader.d.ts.map +1 -1
- package/lib/loaders/productMediaTextLoader.js +1 -1
- package/lib/loaders/productMediaTextLoader.js.map +1 -1
- package/lib/loaders/productTextLoader.d.ts.map +1 -1
- package/lib/loaders/productTextLoader.js +1 -1
- package/lib/loaders/productTextLoader.js.map +1 -1
- package/lib/locale-context.d.ts.map +1 -1
- package/lib/locale-context.js +2 -2
- package/lib/locale-context.js.map +1 -1
- package/lib/mcp/index.d.ts +3 -94
- package/lib/mcp/index.d.ts.map +1 -1
- package/lib/mcp/index.js +93 -135
- package/lib/mcp/index.js.map +1 -1
- package/lib/mcp/tools/addProductAssignmentHandler.d.ts +52 -0
- package/lib/mcp/tools/addProductAssignmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/addProductAssignmentHandler.js +97 -0
- package/lib/mcp/tools/addProductAssignmentHandler.js.map +1 -0
- package/lib/mcp/tools/addProductMediaUploadHandler.d.ts +28 -0
- package/lib/mcp/tools/addProductMediaUploadHandler.d.ts.map +1 -0
- package/lib/mcp/tools/addProductMediaUploadHandler.js +62 -0
- package/lib/mcp/tools/addProductMediaUploadHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentFilterHandler.d.ts +28 -0
- package/lib/mcp/tools/assortment/addAssortmentFilterHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentFilterHandler.js +57 -0
- package/lib/mcp/tools/assortment/addAssortmentFilterHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentLinkHandler.d.ts +28 -0
- package/lib/mcp/tools/assortment/addAssortmentLinkHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentLinkHandler.js +56 -0
- package/lib/mcp/tools/assortment/addAssortmentLinkHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentMediaUploadHandler.d.ts +28 -0
- package/lib/mcp/tools/assortment/addAssortmentMediaUploadHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentMediaUploadHandler.js +62 -0
- package/lib/mcp/tools/assortment/addAssortmentMediaUploadHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentProductHandler.d.ts +28 -0
- package/lib/mcp/tools/assortment/addAssortmentProductHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/addAssortmentProductHandler.js +53 -0
- package/lib/mcp/tools/assortment/addAssortmentProductHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentChildrenHandler.d.ts +24 -0
- package/lib/mcp/tools/assortment/assortmentChildrenHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentChildrenHandler.js +43 -0
- package/lib/mcp/tools/assortment/assortmentChildrenHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentFiltersHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/assortmentFiltersHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentFiltersHandler.js +37 -0
- package/lib/mcp/tools/assortment/assortmentFiltersHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentHandler.d.ts +30 -0
- package/lib/mcp/tools/assortment/assortmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentHandler.js +52 -0
- package/lib/mcp/tools/assortment/assortmentHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentLinksHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/assortmentLinksHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentLinksHandler.js +49 -0
- package/lib/mcp/tools/assortment/assortmentLinksHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentProductsHandler.d.ts +24 -0
- package/lib/mcp/tools/assortment/assortmentProductsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentProductsHandler.js +44 -0
- package/lib/mcp/tools/assortment/assortmentProductsHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentsCountHandler.d.ts +36 -0
- package/lib/mcp/tools/assortment/assortmentsCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentsCountHandler.js +47 -0
- package/lib/mcp/tools/assortment/assortmentsCountHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/assortmentsHandler.d.ts +82 -0
- package/lib/mcp/tools/assortment/assortmentsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/assortmentsHandler.js +57 -0
- package/lib/mcp/tools/assortment/assortmentsHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/createAssortmentHandler.d.ts +125 -0
- package/lib/mcp/tools/assortment/createAssortmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/createAssortmentHandler.js +57 -0
- package/lib/mcp/tools/assortment/createAssortmentHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentFilterHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/removeAssortmentFilterHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentFilterHandler.js +39 -0
- package/lib/mcp/tools/assortment/removeAssortmentFilterHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/removeAssortmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentHandler.js +38 -0
- package/lib/mcp/tools/assortment/removeAssortmentHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentLinkHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/removeAssortmentLinkHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentLinkHandler.js +39 -0
- package/lib/mcp/tools/assortment/removeAssortmentLinkHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentMediaHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/removeAssortmentMediaHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentMediaHandler.js +40 -0
- package/lib/mcp/tools/assortment/removeAssortmentMediaHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentProductHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/removeAssortmentProductHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/removeAssortmentProductHandler.js +39 -0
- package/lib/mcp/tools/assortment/removeAssortmentProductHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentFiltersHandler.d.ts +54 -0
- package/lib/mcp/tools/assortment/reorderAssortmentFiltersHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentFiltersHandler.js +42 -0
- package/lib/mcp/tools/assortment/reorderAssortmentFiltersHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentLinksHandler.d.ts +54 -0
- package/lib/mcp/tools/assortment/reorderAssortmentLinksHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentLinksHandler.js +42 -0
- package/lib/mcp/tools/assortment/reorderAssortmentLinksHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentMediaHandler.d.ts +54 -0
- package/lib/mcp/tools/assortment/reorderAssortmentMediaHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentMediaHandler.js +42 -0
- package/lib/mcp/tools/assortment/reorderAssortmentMediaHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentProductsHandler.d.ts +54 -0
- package/lib/mcp/tools/assortment/reorderAssortmentProductsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/reorderAssortmentProductsHandler.js +42 -0
- package/lib/mcp/tools/assortment/reorderAssortmentProductsHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/searchAssortmentProductHandler.d.ts +68 -0
- package/lib/mcp/tools/assortment/searchAssortmentProductHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/searchAssortmentProductHandler.js +75 -0
- package/lib/mcp/tools/assortment/searchAssortmentProductHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/setBaseAssortmentHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/setBaseAssortmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/setBaseAssortmentHandler.js +39 -0
- package/lib/mcp/tools/assortment/setBaseAssortmentHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/translatedAssortmentMediaTextsHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/translatedAssortmentMediaTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/translatedAssortmentMediaTextsHandler.js +35 -0
- package/lib/mcp/tools/assortment/translatedAssortmentMediaTextsHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/translatedAssortmentTextsHandler.d.ts +20 -0
- package/lib/mcp/tools/assortment/translatedAssortmentTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/translatedAssortmentTextsHandler.js +33 -0
- package/lib/mcp/tools/assortment/translatedAssortmentTextsHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/updateAssortmentHandler.d.ts +80 -0
- package/lib/mcp/tools/assortment/updateAssortmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/updateAssortmentHandler.js +57 -0
- package/lib/mcp/tools/assortment/updateAssortmentHandler.js.map +1 -0
- package/lib/mcp/tools/assortment/updateAssortmentMediaTextsHandler.d.ts +69 -0
- package/lib/mcp/tools/assortment/updateAssortmentMediaTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/assortment/updateAssortmentMediaTextsHandler.js +48 -0
- package/lib/mcp/tools/assortment/updateAssortmentMediaTextsHandler.js.map +1 -0
- package/lib/mcp/tools/countriesHandler.d.ts +60 -0
- package/lib/mcp/tools/countriesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/countriesHandler.js +48 -0
- package/lib/mcp/tools/countriesHandler.js.map +1 -0
- package/lib/mcp/tools/country/countriesCountHandler.d.ts +24 -0
- package/lib/mcp/tools/country/countriesCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/country/countriesCountHandler.js +41 -0
- package/lib/mcp/tools/country/countriesCountHandler.js.map +1 -0
- package/lib/mcp/tools/country/countriesHandler.d.ts +60 -0
- package/lib/mcp/tools/country/countriesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/country/countriesHandler.js +48 -0
- package/lib/mcp/tools/country/countriesHandler.js.map +1 -0
- package/lib/mcp/tools/country/countryHandler.d.ts +20 -0
- package/lib/mcp/tools/country/countryHandler.d.ts.map +1 -0
- package/lib/mcp/tools/country/countryHandler.js +34 -0
- package/lib/mcp/tools/country/countryHandler.js.map +1 -0
- package/lib/mcp/tools/country/createCountryHandler.d.ts +36 -0
- package/lib/mcp/tools/country/createCountryHandler.d.ts.map +1 -0
- package/lib/mcp/tools/country/createCountryHandler.js +41 -0
- package/lib/mcp/tools/country/createCountryHandler.js.map +1 -0
- package/lib/mcp/tools/country/removeCountryHandler.d.ts +20 -0
- package/lib/mcp/tools/country/removeCountryHandler.d.ts.map +1 -0
- package/lib/mcp/tools/country/removeCountryHandler.js +37 -0
- package/lib/mcp/tools/country/removeCountryHandler.js.map +1 -0
- package/lib/mcp/tools/country/updateCountryHandler.d.ts +56 -0
- package/lib/mcp/tools/country/updateCountryHandler.d.ts.map +1 -0
- package/lib/mcp/tools/country/updateCountryHandler.js +53 -0
- package/lib/mcp/tools/country/updateCountryHandler.js.map +1 -0
- package/lib/mcp/tools/countryHandler.d.ts +20 -0
- package/lib/mcp/tools/countryHandler.d.ts.map +1 -0
- package/lib/mcp/tools/countryHandler.js +34 -0
- package/lib/mcp/tools/countryHandler.js.map +1 -0
- package/lib/mcp/tools/createLanguageHandler.d.ts +36 -0
- package/lib/mcp/tools/createLanguageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/createLanguageHandler.js +39 -0
- package/lib/mcp/tools/createLanguageHandler.js.map +1 -0
- package/lib/mcp/tools/createProduct.d.ts +138 -0
- package/lib/mcp/tools/createProduct.d.ts.map +1 -0
- package/lib/mcp/tools/createProduct.js +60 -0
- package/lib/mcp/tools/createProduct.js.map +1 -0
- package/lib/mcp/tools/createProductVariationHandler.d.ts +84 -0
- package/lib/mcp/tools/createProductVariationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/createProductVariationHandler.js +73 -0
- package/lib/mcp/tools/createProductVariationHandler.js.map +1 -0
- package/lib/mcp/tools/createProductVariationOptionHandler.d.ts +60 -0
- package/lib/mcp/tools/createProductVariationOptionHandler.d.ts.map +1 -0
- package/lib/mcp/tools/createProductVariationOptionHandler.js +59 -0
- package/lib/mcp/tools/createProductVariationOptionHandler.js.map +1 -0
- package/lib/mcp/tools/currenciesHandler.d.ts +60 -0
- package/lib/mcp/tools/currenciesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currenciesHandler.js +50 -0
- package/lib/mcp/tools/currenciesHandler.js.map +1 -0
- package/lib/mcp/tools/currency/createCurrencyHandler.d.ts +52 -0
- package/lib/mcp/tools/currency/createCurrencyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currency/createCurrencyHandler.js +48 -0
- package/lib/mcp/tools/currency/createCurrencyHandler.js.map +1 -0
- package/lib/mcp/tools/currency/currenciesCountHandler.d.ts +24 -0
- package/lib/mcp/tools/currency/currenciesCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currency/currenciesCountHandler.js +40 -0
- package/lib/mcp/tools/currency/currenciesCountHandler.js.map +1 -0
- package/lib/mcp/tools/currency/currenciesHandler.d.ts +60 -0
- package/lib/mcp/tools/currency/currenciesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currency/currenciesHandler.js +50 -0
- package/lib/mcp/tools/currency/currenciesHandler.js.map +1 -0
- package/lib/mcp/tools/currency/currencyHandler.d.ts +20 -0
- package/lib/mcp/tools/currency/currencyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currency/currencyHandler.js +34 -0
- package/lib/mcp/tools/currency/currencyHandler.js.map +1 -0
- package/lib/mcp/tools/currency/removeCurrencyHandler.d.ts +20 -0
- package/lib/mcp/tools/currency/removeCurrencyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currency/removeCurrencyHandler.js +37 -0
- package/lib/mcp/tools/currency/removeCurrencyHandler.js.map +1 -0
- package/lib/mcp/tools/currency/updateCurrencyHandler.d.ts +56 -0
- package/lib/mcp/tools/currency/updateCurrencyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currency/updateCurrencyHandler.js +48 -0
- package/lib/mcp/tools/currency/updateCurrencyHandler.js.map +1 -0
- package/lib/mcp/tools/currencyHandler.d.ts +20 -0
- package/lib/mcp/tools/currencyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currencyHandler.js +34 -0
- package/lib/mcp/tools/currencyHandler.js.map +1 -0
- package/lib/mcp/tools/filter/createFilterHandler.d.ts +114 -0
- package/lib/mcp/tools/filter/createFilterHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/createFilterHandler.js +53 -0
- package/lib/mcp/tools/filter/createFilterHandler.js.map +1 -0
- package/lib/mcp/tools/filter/createFilterOptionHandler.d.ts +73 -0
- package/lib/mcp/tools/filter/createFilterOptionHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/createFilterOptionHandler.js +53 -0
- package/lib/mcp/tools/filter/createFilterOptionHandler.js.map +1 -0
- package/lib/mcp/tools/filter/getFilterHandler.d.ts +20 -0
- package/lib/mcp/tools/filter/getFilterHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/getFilterHandler.js +38 -0
- package/lib/mcp/tools/filter/getFilterHandler.js.map +1 -0
- package/lib/mcp/tools/filter/getFiltersHandler.d.ts +60 -0
- package/lib/mcp/tools/filter/getFiltersHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/getFiltersHandler.js +50 -0
- package/lib/mcp/tools/filter/getFiltersHandler.js.map +1 -0
- package/lib/mcp/tools/filter/removeFilterHandler.d.ts +20 -0
- package/lib/mcp/tools/filter/removeFilterHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/removeFilterHandler.js +39 -0
- package/lib/mcp/tools/filter/removeFilterHandler.js.map +1 -0
- package/lib/mcp/tools/filter/removeFilterOptionHandler.d.ts +24 -0
- package/lib/mcp/tools/filter/removeFilterOptionHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/removeFilterOptionHandler.js +44 -0
- package/lib/mcp/tools/filter/removeFilterOptionHandler.js.map +1 -0
- package/lib/mcp/tools/filter/translatedFilterTextsHandler.d.ts +24 -0
- package/lib/mcp/tools/filter/translatedFilterTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/translatedFilterTextsHandler.js +42 -0
- package/lib/mcp/tools/filter/translatedFilterTextsHandler.js.map +1 -0
- package/lib/mcp/tools/filter/updateFilterHandler.d.ts +58 -0
- package/lib/mcp/tools/filter/updateFilterHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/updateFilterHandler.js +44 -0
- package/lib/mcp/tools/filter/updateFilterHandler.js.map +1 -0
- package/lib/mcp/tools/filter/updateFilterTextsHandler.d.ts +73 -0
- package/lib/mcp/tools/filter/updateFilterTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/filter/updateFilterTextsHandler.js +46 -0
- package/lib/mcp/tools/filter/updateFilterTextsHandler.js.map +1 -0
- package/lib/mcp/tools/getProduct.d.ts +48 -0
- package/lib/mcp/tools/getProduct.d.ts.map +1 -0
- package/lib/mcp/tools/getProduct.js +61 -0
- package/lib/mcp/tools/getProduct.js.map +1 -0
- package/lib/mcp/tools/index.d.ts +87 -0
- package/lib/mcp/tools/index.d.ts.map +1 -0
- package/lib/mcp/tools/index.js +87 -0
- package/lib/mcp/tools/index.js.map +1 -0
- package/lib/mcp/tools/language/createLanguageHandler.d.ts +36 -0
- package/lib/mcp/tools/language/createLanguageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/language/createLanguageHandler.js +39 -0
- package/lib/mcp/tools/language/createLanguageHandler.js.map +1 -0
- package/lib/mcp/tools/language/languageHandler.d.ts +20 -0
- package/lib/mcp/tools/language/languageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/language/languageHandler.js +31 -0
- package/lib/mcp/tools/language/languageHandler.js.map +1 -0
- package/lib/mcp/tools/language/languagesCountHandler.d.ts +24 -0
- package/lib/mcp/tools/language/languagesCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/language/languagesCountHandler.js +36 -0
- package/lib/mcp/tools/language/languagesCountHandler.js.map +1 -0
- package/lib/mcp/tools/language/languagesHandler.d.ts +60 -0
- package/lib/mcp/tools/language/languagesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/language/languagesHandler.js +42 -0
- package/lib/mcp/tools/language/languagesHandler.js.map +1 -0
- package/lib/mcp/tools/language/removeLanguageHandler.d.ts +20 -0
- package/lib/mcp/tools/language/removeLanguageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/language/removeLanguageHandler.js +35 -0
- package/lib/mcp/tools/language/removeLanguageHandler.js.map +1 -0
- package/lib/mcp/tools/language/updateLanguageHandler.d.ts +48 -0
- package/lib/mcp/tools/language/updateLanguageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/language/updateLanguageHandler.js +40 -0
- package/lib/mcp/tools/language/updateLanguageHandler.js.map +1 -0
- package/lib/mcp/tools/languageHandler.d.ts +20 -0
- package/lib/mcp/tools/languageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/languageHandler.js +31 -0
- package/lib/mcp/tools/languageHandler.js.map +1 -0
- package/lib/mcp/tools/languagesHandler.d.ts +60 -0
- package/lib/mcp/tools/languagesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/languagesHandler.js +42 -0
- package/lib/mcp/tools/languagesHandler.js.map +1 -0
- package/lib/mcp/tools/listProducts.d.ts +112 -0
- package/lib/mcp/tools/listProducts.d.ts.map +1 -0
- package/lib/mcp/tools/listProducts.js +110 -0
- package/lib/mcp/tools/listProducts.js.map +1 -0
- package/lib/mcp/tools/normalizeMediaUrl.d.ts +3 -0
- package/lib/mcp/tools/normalizeMediaUrl.d.ts.map +1 -0
- package/lib/mcp/tools/normalizeMediaUrl.js +21 -0
- package/lib/mcp/tools/normalizeMediaUrl.js.map +1 -0
- package/lib/mcp/tools/product/addProductAssignmentHandler.d.ts +52 -0
- package/lib/mcp/tools/product/addProductAssignmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/addProductAssignmentHandler.js +97 -0
- package/lib/mcp/tools/product/addProductAssignmentHandler.js.map +1 -0
- package/lib/mcp/tools/product/addProductMediaUploadHandler.d.ts +28 -0
- package/lib/mcp/tools/product/addProductMediaUploadHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/addProductMediaUploadHandler.js +62 -0
- package/lib/mcp/tools/product/addProductMediaUploadHandler.js.map +1 -0
- package/lib/mcp/tools/product/createProductHandler.d.ts +138 -0
- package/lib/mcp/tools/product/createProductHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/createProductHandler.js +60 -0
- package/lib/mcp/tools/product/createProductHandler.js.map +1 -0
- package/lib/mcp/tools/product/createProductVariationHandler.d.ts +84 -0
- package/lib/mcp/tools/product/createProductVariationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/createProductVariationHandler.js +73 -0
- package/lib/mcp/tools/product/createProductVariationHandler.js.map +1 -0
- package/lib/mcp/tools/product/createProductVariationOptionHandler.d.ts +60 -0
- package/lib/mcp/tools/product/createProductVariationOptionHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/createProductVariationOptionHandler.js +59 -0
- package/lib/mcp/tools/product/createProductVariationOptionHandler.js.map +1 -0
- package/lib/mcp/tools/product/getProduct.d.ts +48 -0
- package/lib/mcp/tools/product/getProduct.d.ts.map +1 -0
- package/lib/mcp/tools/product/getProduct.js +61 -0
- package/lib/mcp/tools/product/getProduct.js.map +1 -0
- package/lib/mcp/tools/product/listProducts.d.ts +112 -0
- package/lib/mcp/tools/product/listProducts.d.ts.map +1 -0
- package/lib/mcp/tools/product/listProducts.js +110 -0
- package/lib/mcp/tools/product/listProducts.js.map +1 -0
- package/lib/mcp/tools/product/productReviewsCountHandler.d.ts +20 -0
- package/lib/mcp/tools/product/productReviewsCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/productReviewsCountHandler.js +30 -0
- package/lib/mcp/tools/product/productReviewsCountHandler.js.map +1 -0
- package/lib/mcp/tools/product/productReviewsHandler.d.ts +56 -0
- package/lib/mcp/tools/product/productReviewsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/productReviewsHandler.js +45 -0
- package/lib/mcp/tools/product/productReviewsHandler.js.map +1 -0
- package/lib/mcp/tools/product/productsCountHandler.d.ts +32 -0
- package/lib/mcp/tools/product/productsCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/productsCountHandler.js +33 -0
- package/lib/mcp/tools/product/productsCountHandler.js.map +1 -0
- package/lib/mcp/tools/product/publishProduct.d.ts +20 -0
- package/lib/mcp/tools/product/publishProduct.d.ts.map +1 -0
- package/lib/mcp/tools/product/publishProduct.js +40 -0
- package/lib/mcp/tools/product/publishProduct.js.map +1 -0
- package/lib/mcp/tools/product/removeProductAssignmentHandler.d.ts +48 -0
- package/lib/mcp/tools/product/removeProductAssignmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/removeProductAssignmentHandler.js +51 -0
- package/lib/mcp/tools/product/removeProductAssignmentHandler.js.map +1 -0
- package/lib/mcp/tools/product/removeProductHandler.d.ts +20 -0
- package/lib/mcp/tools/product/removeProductHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/removeProductHandler.js +34 -0
- package/lib/mcp/tools/product/removeProductHandler.js.map +1 -0
- package/lib/mcp/tools/product/removeProductMediaHandler.d.ts +20 -0
- package/lib/mcp/tools/product/removeProductMediaHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/removeProductMediaHandler.js +42 -0
- package/lib/mcp/tools/product/removeProductMediaHandler.js.map +1 -0
- package/lib/mcp/tools/product/removeProductVariationHandler.d.ts +20 -0
- package/lib/mcp/tools/product/removeProductVariationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/removeProductVariationHandler.js +43 -0
- package/lib/mcp/tools/product/removeProductVariationHandler.js.map +1 -0
- package/lib/mcp/tools/product/removeProductVariationOptionHandler.d.ts +24 -0
- package/lib/mcp/tools/product/removeProductVariationOptionHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/removeProductVariationOptionHandler.js +47 -0
- package/lib/mcp/tools/product/removeProductVariationOptionHandler.js.map +1 -0
- package/lib/mcp/tools/product/reorderProductMediaHandler.d.ts +44 -0
- package/lib/mcp/tools/product/reorderProductMediaHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/reorderProductMediaHandler.js +39 -0
- package/lib/mcp/tools/product/reorderProductMediaHandler.js.map +1 -0
- package/lib/mcp/tools/product/translatedProductMediaTextsHandler.d.ts +20 -0
- package/lib/mcp/tools/product/translatedProductMediaTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/translatedProductMediaTextsHandler.js +33 -0
- package/lib/mcp/tools/product/translatedProductMediaTextsHandler.js.map +1 -0
- package/lib/mcp/tools/product/translatedProductTextsHandler.d.ts +20 -0
- package/lib/mcp/tools/product/translatedProductTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/translatedProductTextsHandler.js +33 -0
- package/lib/mcp/tools/product/translatedProductTextsHandler.js.map +1 -0
- package/lib/mcp/tools/product/translatedProductVariationTextsHandler.d.ts +24 -0
- package/lib/mcp/tools/product/translatedProductVariationTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/translatedProductVariationTextsHandler.js +42 -0
- package/lib/mcp/tools/product/translatedProductVariationTextsHandler.js.map +1 -0
- package/lib/mcp/tools/product/unPublishProduct.d.ts +20 -0
- package/lib/mcp/tools/product/unPublishProduct.d.ts.map +1 -0
- package/lib/mcp/tools/product/unPublishProduct.js +40 -0
- package/lib/mcp/tools/product/unPublishProduct.js.map +1 -0
- package/lib/mcp/tools/product/updateProduct.d.ts +56 -0
- package/lib/mcp/tools/product/updateProduct.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProduct.js +44 -0
- package/lib/mcp/tools/product/updateProduct.js.map +1 -0
- package/lib/mcp/tools/product/updateProductCommerceHandler.d.ts +166 -0
- package/lib/mcp/tools/product/updateProductCommerceHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductCommerceHandler.js +64 -0
- package/lib/mcp/tools/product/updateProductCommerceHandler.js.map +1 -0
- package/lib/mcp/tools/product/updateProductMediaTextsHandler.d.ts +56 -0
- package/lib/mcp/tools/product/updateProductMediaTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductMediaTextsHandler.js +48 -0
- package/lib/mcp/tools/product/updateProductMediaTextsHandler.js.map +1 -0
- package/lib/mcp/tools/product/updateProductPlanHandler.d.ts +72 -0
- package/lib/mcp/tools/product/updateProductPlanHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductPlanHandler.js +51 -0
- package/lib/mcp/tools/product/updateProductPlanHandler.js.map +1 -0
- package/lib/mcp/tools/product/updateProductSupplyHandler.d.ts +64 -0
- package/lib/mcp/tools/product/updateProductSupplyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductSupplyHandler.js +52 -0
- package/lib/mcp/tools/product/updateProductSupplyHandler.js.map +1 -0
- package/lib/mcp/tools/product/updateProductTextsHandler.d.ts +114 -0
- package/lib/mcp/tools/product/updateProductTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductTextsHandler.js +50 -0
- package/lib/mcp/tools/product/updateProductTextsHandler.js.map +1 -0
- package/lib/mcp/tools/product/updateProductTokenizationHandler.d.ts +72 -0
- package/lib/mcp/tools/product/updateProductTokenizationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductTokenizationHandler.js +49 -0
- package/lib/mcp/tools/product/updateProductTokenizationHandler.js.map +1 -0
- package/lib/mcp/tools/product/updateProductWarehousingHandler.d.ts +48 -0
- package/lib/mcp/tools/product/updateProductWarehousingHandler.d.ts.map +1 -0
- package/lib/mcp/tools/product/updateProductWarehousingHandler.js +45 -0
- package/lib/mcp/tools/product/updateProductWarehousingHandler.js.map +1 -0
- package/lib/mcp/tools/productReviewsCountHandler.d.ts +20 -0
- package/lib/mcp/tools/productReviewsCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/productReviewsCountHandler.js +30 -0
- package/lib/mcp/tools/productReviewsCountHandler.js.map +1 -0
- package/lib/mcp/tools/productReviewsHandler.d.ts +56 -0
- package/lib/mcp/tools/productReviewsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/productReviewsHandler.js +45 -0
- package/lib/mcp/tools/productReviewsHandler.js.map +1 -0
- package/lib/mcp/tools/productsCountHandler.d.ts +32 -0
- package/lib/mcp/tools/productsCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/productsCountHandler.js +33 -0
- package/lib/mcp/tools/productsCountHandler.js.map +1 -0
- package/lib/mcp/tools/publishProduct.d.ts +20 -0
- package/lib/mcp/tools/publishProduct.d.ts.map +1 -0
- package/lib/mcp/tools/publishProduct.js +40 -0
- package/lib/mcp/tools/publishProduct.js.map +1 -0
- package/lib/mcp/tools/removeLanguageHandler.d.ts +20 -0
- package/lib/mcp/tools/removeLanguageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeLanguageHandler.js +35 -0
- package/lib/mcp/tools/removeLanguageHandler.js.map +1 -0
- package/lib/mcp/tools/removeProduct.d.ts +20 -0
- package/lib/mcp/tools/removeProduct.d.ts.map +1 -0
- package/lib/mcp/tools/removeProduct.js +34 -0
- package/lib/mcp/tools/removeProduct.js.map +1 -0
- package/lib/mcp/tools/removeProductAssignmentHandler.d.ts +48 -0
- package/lib/mcp/tools/removeProductAssignmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeProductAssignmentHandler.js +51 -0
- package/lib/mcp/tools/removeProductAssignmentHandler.js.map +1 -0
- package/lib/mcp/tools/removeProductHandler.d.ts +20 -0
- package/lib/mcp/tools/removeProductHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeProductHandler.js +34 -0
- package/lib/mcp/tools/removeProductHandler.js.map +1 -0
- package/lib/mcp/tools/removeProductMediaHandler.d.ts +20 -0
- package/lib/mcp/tools/removeProductMediaHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeProductMediaHandler.js +42 -0
- package/lib/mcp/tools/removeProductMediaHandler.js.map +1 -0
- package/lib/mcp/tools/removeProductVariationHandler.d.ts +20 -0
- package/lib/mcp/tools/removeProductVariationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeProductVariationHandler.js +43 -0
- package/lib/mcp/tools/removeProductVariationHandler.js.map +1 -0
- package/lib/mcp/tools/removeProductVariationOptionHandler.d.ts +24 -0
- package/lib/mcp/tools/removeProductVariationOptionHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeProductVariationOptionHandler.js +47 -0
- package/lib/mcp/tools/removeProductVariationOptionHandler.js.map +1 -0
- package/lib/mcp/tools/reorderProductMediaHandler.d.ts +44 -0
- package/lib/mcp/tools/reorderProductMediaHandler.d.ts.map +1 -0
- package/lib/mcp/tools/reorderProductMediaHandler.js +39 -0
- package/lib/mcp/tools/reorderProductMediaHandler.js.map +1 -0
- package/lib/mcp/tools/shopInfoHandler.d.ts +8 -0
- package/lib/mcp/tools/shopInfoHandler.d.ts.map +1 -0
- package/lib/mcp/tools/shopInfoHandler.js +29 -0
- package/lib/mcp/tools/shopInfoHandler.js.map +1 -0
- package/lib/mcp/tools/unPublishProduct.d.ts +20 -0
- package/lib/mcp/tools/unPublishProduct.d.ts.map +1 -0
- package/lib/mcp/tools/unPublishProduct.js +40 -0
- package/lib/mcp/tools/unPublishProduct.js.map +1 -0
- package/lib/mcp/tools/updateLanguageHandler.d.ts +48 -0
- package/lib/mcp/tools/updateLanguageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateLanguageHandler.js +40 -0
- package/lib/mcp/tools/updateLanguageHandler.js.map +1 -0
- package/lib/mcp/tools/updateProduct.d.ts +56 -0
- package/lib/mcp/tools/updateProduct.d.ts.map +1 -0
- package/lib/mcp/tools/updateProduct.js +44 -0
- package/lib/mcp/tools/updateProduct.js.map +1 -0
- package/lib/mcp/tools/updateProductCommerceHandler.d.ts +166 -0
- package/lib/mcp/tools/updateProductCommerceHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductCommerceHandler.js +64 -0
- package/lib/mcp/tools/updateProductCommerceHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductMediaTextsHandler.d.ts +56 -0
- package/lib/mcp/tools/updateProductMediaTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductMediaTextsHandler.js +45 -0
- package/lib/mcp/tools/updateProductMediaTextsHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductPlanHandler.d.ts +72 -0
- package/lib/mcp/tools/updateProductPlanHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductPlanHandler.js +51 -0
- package/lib/mcp/tools/updateProductPlanHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductSupplyHandler.d.ts +64 -0
- package/lib/mcp/tools/updateProductSupplyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductSupplyHandler.js +52 -0
- package/lib/mcp/tools/updateProductSupplyHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductTextsHandler.d.ts +114 -0
- package/lib/mcp/tools/updateProductTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductTextsHandler.js +50 -0
- package/lib/mcp/tools/updateProductTextsHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.d.ts +72 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.js +49 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.d.ts +48 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.js +45 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.js.map +1 -0
- package/lib/mcp/utils/getNormalizedAssortmentDetails.d.ts +21 -0
- package/lib/mcp/utils/getNormalizedAssortmentDetails.d.ts.map +1 -0
- package/lib/mcp/utils/getNormalizedAssortmentDetails.js +32 -0
- package/lib/mcp/utils/getNormalizedAssortmentDetails.js.map +1 -0
- package/lib/mcp/utils/getNormalizedFilterDetails.d.ts +25 -0
- package/lib/mcp/utils/getNormalizedFilterDetails.d.ts.map +1 -0
- package/lib/mcp/utils/getNormalizedFilterDetails.js +19 -0
- package/lib/mcp/utils/getNormalizedFilterDetails.js.map +1 -0
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts +26 -0
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts.map +1 -0
- package/lib/mcp/utils/getNormalizedProductDetails.js +38 -0
- package/lib/mcp/utils/getNormalizedProductDetails.js.map +1 -0
- package/lib/mcp/utils/normalizeMediaUrl.d.ts +3 -0
- package/lib/mcp/utils/normalizeMediaUrl.d.ts.map +1 -0
- package/lib/mcp/utils/normalizeMediaUrl.js +21 -0
- package/lib/mcp/utils/normalizeMediaUrl.js.map +1 -0
- 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/createUser.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.js +5 -0
- package/lib/resolvers/mutations/accounts/createUser.js.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/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/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/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/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/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/products/addProductAssignment.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.js +3 -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/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/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/queries/filters/searchAssortments.d.ts.map +1 -1
- package/lib/resolvers/queries/filters/searchAssortments.js +0 -5
- package/lib/resolvers/queries/filters/searchAssortments.js.map +1 -1
- package/lib/resolvers/queries/filters/searchProducts.d.ts.map +1 -1
- package/lib/resolvers/queries/filters/searchProducts.js +2 -7
- package/lib/resolvers/queries/filters/searchProducts.js.map +1 -1
- package/lib/resolvers/queries/index.js +1 -1
- package/lib/resolvers/queries/index.js.map +1 -1
- 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/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/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/roles/all.d.ts.map +1 -1
- package/lib/roles/all.js +11 -0
- package/lib/roles/all.js.map +1 -1
- package/lib/roles/index.d.ts.map +1 -1
- package/lib/roles/index.js +2 -0
- package/lib/roles/index.js.map +1 -1
- package/lib/roles/loggedIn.d.ts.map +1 -1
- package/lib/roles/loggedIn.js +1 -0
- package/lib/roles/loggedIn.js.map +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 +34 -18
- package/src/api-index.ts +4 -1
- package/src/errors.ts +5 -4
- package/src/express/createMCPMiddleware.ts +91 -0
- package/src/express/createTempUploadMiddleware.ts +60 -0
- package/src/express/index.ts +35 -6
- package/src/fastify/index.ts +32 -2
- package/src/fastify/mcpHandler.ts +97 -0
- package/src/fastify/tempUploadHandler.ts +52 -0
- package/src/loaders/assortmentMediaTextLoader.ts +1 -1
- package/src/loaders/assortmentTextLoader.ts +1 -1
- package/src/loaders/buildLocaleMap.test.ts +65 -0
- package/src/loaders/buildLocaleMap.ts +73 -0
- package/src/loaders/buildTextMap.test.ts +54 -0
- package/src/loaders/buildTextMap.ts +25 -6
- package/src/loaders/filterTextLoader.ts +1 -1
- package/src/loaders/productMediaTextLoader.ts +1 -1
- package/src/loaders/productTextLoader.ts +1 -1
- package/src/locale-context.ts +2 -7
- package/src/mcp/README.md +25 -0
- package/src/mcp/index.ts +718 -0
- package/src/mcp/tools/assortment/addAssortmentFilterHandler.ts +62 -0
- package/src/mcp/tools/assortment/addAssortmentLinkHandler.ts +63 -0
- package/src/mcp/tools/assortment/addAssortmentMediaUploadHandler.ts +79 -0
- package/src/mcp/tools/assortment/addAssortmentProductHandler.ts +57 -0
- package/src/mcp/tools/assortment/assortmentChildrenHandler.ts +54 -0
- package/src/mcp/tools/assortment/assortmentFiltersHandler.ts +46 -0
- package/src/mcp/tools/assortment/assortmentHandler.ts +63 -0
- package/src/mcp/tools/assortment/assortmentLinksHandler.ts +61 -0
- package/src/mcp/tools/assortment/assortmentProductsHandler.ts +56 -0
- package/src/mcp/tools/assortment/assortmentsCountHandler.ts +53 -0
- package/src/mcp/tools/assortment/assortmentsHandler.ts +67 -0
- package/src/mcp/tools/assortment/createAssortmentHandler.ts +71 -0
- package/src/mcp/tools/assortment/removeAssortmentFilterHandler.ts +50 -0
- package/src/mcp/tools/assortment/removeAssortmentHandler.ts +44 -0
- package/src/mcp/tools/assortment/removeAssortmentLinkHandler.ts +47 -0
- package/src/mcp/tools/assortment/removeAssortmentMediaHandler.ts +50 -0
- package/src/mcp/tools/assortment/removeAssortmentProductHandler.ts +49 -0
- package/src/mcp/tools/assortment/reorderAssortmentFiltersHandler.ts +53 -0
- package/src/mcp/tools/assortment/reorderAssortmentLinksHandler.ts +53 -0
- package/src/mcp/tools/assortment/reorderAssortmentMediaHandler.ts +53 -0
- package/src/mcp/tools/assortment/reorderAssortmentProductsHandler.ts +53 -0
- package/src/mcp/tools/assortment/searchAssortmentProductHandler.ts +87 -0
- package/src/mcp/tools/assortment/setBaseAssortmentHandler.ts +46 -0
- package/src/mcp/tools/assortment/translatedAssortmentMediaTextsHandler.ts +47 -0
- package/src/mcp/tools/assortment/translatedAssortmentTextsHandler.ts +43 -0
- package/src/mcp/tools/assortment/updateAssortmentHandler.ts +64 -0
- package/src/mcp/tools/assortment/updateAssortmentMediaTextsHandler.ts +64 -0
- package/src/mcp/tools/country/countriesCountHandler.ts +48 -0
- package/src/mcp/tools/country/countriesHandler.ts +60 -0
- package/src/mcp/tools/country/countryHandler.ts +40 -0
- package/src/mcp/tools/country/createCountryHandler.ts +47 -0
- package/src/mcp/tools/country/removeCountryHandler.ts +46 -0
- package/src/mcp/tools/country/updateCountryHandler.ts +60 -0
- package/src/mcp/tools/currency/createCurrencyHandler.ts +55 -0
- package/src/mcp/tools/currency/currenciesCountHandler.ts +47 -0
- package/src/mcp/tools/currency/currenciesHandler.ts +63 -0
- package/src/mcp/tools/currency/currencyHandler.ts +40 -0
- package/src/mcp/tools/currency/removeCurrencyHandler.ts +46 -0
- package/src/mcp/tools/currency/updateCurrencyHandler.ts +56 -0
- package/src/mcp/tools/filter/createFilterHandler.ts +65 -0
- package/src/mcp/tools/filter/createFilterOptionHandler.ts +64 -0
- package/src/mcp/tools/filter/getFilterHandler.ts +46 -0
- package/src/mcp/tools/filter/getFiltersHandler.ts +59 -0
- package/src/mcp/tools/filter/removeFilterHandler.ts +45 -0
- package/src/mcp/tools/filter/removeFilterOptionHandler.ts +50 -0
- package/src/mcp/tools/filter/translatedFilterTextsHandler.ts +53 -0
- package/src/mcp/tools/filter/updateFilterHandler.ts +51 -0
- package/src/mcp/tools/filter/updateFilterTextsHandler.ts +54 -0
- package/src/mcp/tools/index.ts +89 -0
- package/src/mcp/tools/language/createLanguageHandler.ts +46 -0
- package/src/mcp/tools/language/languageHandler.ts +37 -0
- package/src/mcp/tools/language/languagesCountHandler.ts +43 -0
- package/src/mcp/tools/language/languagesHandler.ts +54 -0
- package/src/mcp/tools/language/removeLanguageHandler.ts +42 -0
- package/src/mcp/tools/language/updateLanguageHandler.ts +47 -0
- package/src/mcp/tools/product/addProductAssignmentHandler.ts +118 -0
- package/src/mcp/tools/product/addProductMediaUploadHandler.ts +79 -0
- package/src/mcp/tools/product/createProductHandler.ts +74 -0
- package/src/mcp/tools/product/createProductVariationHandler.ts +93 -0
- package/src/mcp/tools/product/createProductVariationOptionHandler.ts +73 -0
- package/src/mcp/tools/product/getProduct.ts +74 -0
- package/src/mcp/tools/product/listProducts.ts +148 -0
- package/src/mcp/tools/product/productReviewsCountHandler.ts +36 -0
- package/src/mcp/tools/product/productReviewsHandler.ts +54 -0
- package/src/mcp/tools/product/productsCountHandler.ts +38 -0
- package/src/mcp/tools/product/publishProduct.ts +45 -0
- package/src/mcp/tools/product/removeProductAssignmentHandler.ts +61 -0
- package/src/mcp/tools/product/removeProductHandler.ts +40 -0
- package/src/mcp/tools/product/removeProductMediaHandler.ts +49 -0
- package/src/mcp/tools/product/removeProductVariationHandler.ts +51 -0
- package/src/mcp/tools/product/removeProductVariationOptionHandler.ts +58 -0
- package/src/mcp/tools/product/reorderProductMediaHandler.ts +48 -0
- package/src/mcp/tools/product/translatedProductMediaTextsHandler.ts +43 -0
- package/src/mcp/tools/product/translatedProductTextsHandler.ts +43 -0
- package/src/mcp/tools/product/translatedProductVariationTextsHandler.ts +57 -0
- package/src/mcp/tools/product/unPublishProduct.ts +46 -0
- package/src/mcp/tools/product/updateProduct.ts +51 -0
- package/src/mcp/tools/product/updateProductCommerceHandler.ts +79 -0
- package/src/mcp/tools/product/updateProductMediaTextsHandler.ts +61 -0
- package/src/mcp/tools/product/updateProductPlanHandler.ts +58 -0
- package/src/mcp/tools/product/updateProductSupplyHandler.ts +59 -0
- package/src/mcp/tools/product/updateProductTextsHandler.ts +59 -0
- package/src/mcp/tools/product/updateProductTokenizationHandler.ts +58 -0
- package/src/mcp/tools/product/updateProductWarehousingHandler.ts +54 -0
- package/src/mcp/tools/shopInfoHandler.ts +33 -0
- package/src/mcp/utils/getNormalizedAssortmentDetails.ts +40 -0
- package/src/mcp/utils/getNormalizedFilterDetails.ts +23 -0
- package/src/mcp/utils/getNormalizedProductDetails.ts +42 -0
- package/src/mcp/utils/normalizeMediaUrl.ts +26 -0
- package/src/resolvers/mutations/accounts/createUser.ts +6 -0
- package/src/resolvers/mutations/products/addProductAssignment.ts +3 -0
- package/src/resolvers/queries/filters/searchAssortments.ts +0 -5
- package/src/resolvers/queries/filters/searchProducts.ts +2 -7
- package/src/resolvers/queries/index.ts +1 -1
- package/src/roles/all.ts +11 -0
- package/src/roles/index.ts +2 -0
- package/src/roles/loggedIn.ts +1 -0
- package/lib/express/mcpHandler.d.ts.map +0 -1
- package/lib/express/mcpHandler.js +0 -68
- package/lib/express/mcpHandler.js.map +0 -1
- package/lib/fastify/index copy.d.ts.map +0 -1
- package/lib/fastify/index copy.js +0 -157
- package/lib/fastify/index copy.js.map +0 -1
- package/lib/mcp/server.d.ts +0 -4
- package/lib/mcp/server.d.ts.map +0 -1
- package/lib/mcp/server.js +0 -60
- package/lib/mcp/server.js.map +0 -1
- package/lib/mcp/types.d.ts +0 -28
- package/lib/mcp/types.d.ts.map +0 -1
- package/lib/mcp/types.js +0 -2
- package/lib/mcp/types.js.map +0 -1
- package/lib/middleware/accountLockout.d.ts.map +0 -1
- package/lib/middleware/accountLockout.js +0 -84
- package/lib/middleware/accountLockout.js.map +0 -1
- package/lib/middleware/rateLimiter.d.ts.map +0 -1
- package/lib/middleware/rateLimiter.js +0 -91
- package/lib/middleware/rateLimiter.js.map +0 -1
- package/lib/plugins/inputValidation.d.ts.map +0 -1
- package/lib/plugins/inputValidation.js +0 -95
- package/lib/plugins/inputValidation.js.map +0 -1
- package/lib/utils/inputValidation.d.ts.map +0 -1
- package/lib/utils/inputValidation.js +0 -51
- package/lib/utils/inputValidation.js.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { log } from '@unchainedshop/logger';
|
|
4
|
+
import { ProductMediaNotFoundError } from '../../../errors.js';
|
|
5
|
+
|
|
6
|
+
export const RemoveProductMediaSchema = {
|
|
7
|
+
productMediaId: z.string().min(1).describe('ID of the product media to be removed'),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const RemoveProductMediaZodSchema = z.object(RemoveProductMediaSchema);
|
|
11
|
+
|
|
12
|
+
export type RemoveProductMediaParams = z.infer<typeof RemoveProductMediaZodSchema>;
|
|
13
|
+
|
|
14
|
+
export async function removeProductMediaHandler(context: Context, params: RemoveProductMediaParams) {
|
|
15
|
+
const { productMediaId } = params;
|
|
16
|
+
const { modules, userId } = context;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
log('removeProductMediaHandler', { userId, productMediaId });
|
|
20
|
+
|
|
21
|
+
const productMedia = await modules.products.media.findProductMedia({
|
|
22
|
+
productMediaId,
|
|
23
|
+
});
|
|
24
|
+
if (!productMedia) throw new ProductMediaNotFoundError({ productMediaId });
|
|
25
|
+
|
|
26
|
+
await modules.files.delete(productMedia.mediaId);
|
|
27
|
+
await modules.products.media.delete(productMediaId);
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{
|
|
32
|
+
type: 'text' as const,
|
|
33
|
+
text: JSON.stringify({
|
|
34
|
+
media: productMedia,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
} catch (error) {
|
|
40
|
+
return {
|
|
41
|
+
content: [
|
|
42
|
+
{
|
|
43
|
+
type: 'text' as const,
|
|
44
|
+
text: `Error removing product media: ${(error as Error).message}`,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { ProductVariationNotFoundError } from '../../../errors.js';
|
|
4
|
+
import { getNormalizedProductDetails } from '../../utils/getNormalizedProductDetails.js';
|
|
5
|
+
|
|
6
|
+
export const RemoveProductVariationSchema = {
|
|
7
|
+
productVariationId: z
|
|
8
|
+
.string()
|
|
9
|
+
.min(1)
|
|
10
|
+
.describe('ID of the product variation to remove. it should be a valid product variation ID'),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const RemoveProductVariationZodSchema = z.object(RemoveProductVariationSchema);
|
|
14
|
+
export type RemoveProductVariationParams = z.infer<typeof RemoveProductVariationZodSchema>;
|
|
15
|
+
|
|
16
|
+
export async function removeProductVariationHandler(
|
|
17
|
+
context: Context,
|
|
18
|
+
params: RemoveProductVariationParams,
|
|
19
|
+
) {
|
|
20
|
+
const { productVariationId } = params;
|
|
21
|
+
const { modules } = context;
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const productVariation = await modules.products.variations.findProductVariation({
|
|
25
|
+
productVariationId,
|
|
26
|
+
});
|
|
27
|
+
if (!productVariation) throw new ProductVariationNotFoundError({ productVariationId });
|
|
28
|
+
|
|
29
|
+
await modules.products.variations.delete(productVariationId);
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
type: 'text' as const,
|
|
35
|
+
text: JSON.stringify({
|
|
36
|
+
product: await getNormalizedProductDetails(productVariationId, context),
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
} catch (error) {
|
|
42
|
+
return {
|
|
43
|
+
content: [
|
|
44
|
+
{
|
|
45
|
+
type: 'text' as const,
|
|
46
|
+
text: `Error removing product variation: ${(error as Error).message}`,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { getNormalizedProductDetails } from '../../utils/getNormalizedProductDetails.js';
|
|
4
|
+
import { ProductVariationNotFoundError } from '../../../errors.js';
|
|
5
|
+
|
|
6
|
+
export const RemoveProductVariationOptionSchema = {
|
|
7
|
+
productVariationId: z
|
|
8
|
+
.string()
|
|
9
|
+
.min(1)
|
|
10
|
+
.describe('ID of the product variation, it should be a CONFIGURABLE_PRODUCT type only'),
|
|
11
|
+
productVariationOptionValue: z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1)
|
|
14
|
+
.describe('existing Option value in the product to remove (e.g., "Red")'),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const RemoveProductVariationOptionZodSchema = z.object(RemoveProductVariationOptionSchema);
|
|
18
|
+
export type RemoveProductVariationOptionParams = z.infer<typeof RemoveProductVariationOptionZodSchema>;
|
|
19
|
+
|
|
20
|
+
export async function removeProductVariationOptionHandler(
|
|
21
|
+
context: Context,
|
|
22
|
+
params: RemoveProductVariationOptionParams,
|
|
23
|
+
) {
|
|
24
|
+
const { productVariationId, productVariationOptionValue } = params;
|
|
25
|
+
const { modules } = context;
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const productVariation = await modules.products.variations.findProductVariation({
|
|
29
|
+
productVariationId,
|
|
30
|
+
});
|
|
31
|
+
if (!productVariation) throw new ProductVariationNotFoundError({ productVariationId });
|
|
32
|
+
|
|
33
|
+
await modules.products.variations.removeVariationOption(
|
|
34
|
+
productVariationId,
|
|
35
|
+
productVariationOptionValue,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text' as const,
|
|
42
|
+
text: JSON.stringify({
|
|
43
|
+
product: await getNormalizedProductDetails(productVariation.productId, context),
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
} catch (error) {
|
|
49
|
+
return {
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: 'text' as const,
|
|
53
|
+
text: `Error removing variation option: ${(error as Error).message}`,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { log } from '@unchainedshop/logger';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
export const ReorderProductMediaSchema = {
|
|
6
|
+
sortKeys: z
|
|
7
|
+
.array(
|
|
8
|
+
z.object({
|
|
9
|
+
productMediaId: z.string().min(1).describe('ID of the media asset'),
|
|
10
|
+
sortKey: z.number().int().describe('New sort key for ordering'),
|
|
11
|
+
}),
|
|
12
|
+
)
|
|
13
|
+
.min(1)
|
|
14
|
+
.describe('Array of product media IDs with their sort order'),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const ReorderProductMediaZodSchema = z.object(ReorderProductMediaSchema);
|
|
18
|
+
|
|
19
|
+
export type ReorderProductMediaParams = z.infer<typeof ReorderProductMediaZodSchema>;
|
|
20
|
+
|
|
21
|
+
export async function reorderProductMediaHandler(context: Context, params: ReorderProductMediaParams) {
|
|
22
|
+
const { sortKeys } = params;
|
|
23
|
+
const { modules, userId } = context;
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
log('handler reorderProductMedia', { userId });
|
|
27
|
+
|
|
28
|
+
const reorderedMedia = await modules.products.media.updateManualOrder({ sortKeys: sortKeys as any });
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'text' as const,
|
|
34
|
+
text: JSON.stringify({ reorderedMedia }, null, 2),
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
} catch (error) {
|
|
39
|
+
return {
|
|
40
|
+
content: [
|
|
41
|
+
{
|
|
42
|
+
type: 'text' as const,
|
|
43
|
+
text: `Error reordering product media: ${(error as Error).message}`,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { log } from '@unchainedshop/logger';
|
|
4
|
+
|
|
5
|
+
export const TranslatedProductMediaTextsSchema = {
|
|
6
|
+
productMediaId: z.string().min(1).describe('ID of the product media to fetch translated texts for'),
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const TranslatedProductMediaTextsZodSchema = z.object(TranslatedProductMediaTextsSchema);
|
|
10
|
+
|
|
11
|
+
export type TranslatedProductMediaTextsParams = z.infer<typeof TranslatedProductMediaTextsZodSchema>;
|
|
12
|
+
|
|
13
|
+
export async function translatedProductMediaTextsHandler(
|
|
14
|
+
context: Context,
|
|
15
|
+
params: TranslatedProductMediaTextsParams,
|
|
16
|
+
) {
|
|
17
|
+
const { productMediaId } = params;
|
|
18
|
+
const { modules, userId } = context;
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
log(`handler translatedProductMediaTexts: ${productMediaId}`, { userId });
|
|
22
|
+
|
|
23
|
+
const texts = await modules.products.media.texts.findMediaTexts({ productMediaId });
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: 'text' as const,
|
|
29
|
+
text: JSON.stringify({ texts }),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
content: [
|
|
36
|
+
{
|
|
37
|
+
type: 'text' as const,
|
|
38
|
+
text: `Error getting translated product media texts: ${(error as Error).message}`,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { log } from '@unchainedshop/logger';
|
|
4
|
+
|
|
5
|
+
export const TranslatedProductTextsSchema = {
|
|
6
|
+
productId: z.string().min(1).describe('ID of the product to fetch translated texts for'),
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const TranslatedProductTextsZodSchema = z.object(TranslatedProductTextsSchema);
|
|
10
|
+
|
|
11
|
+
export type TranslatedProductTextsParams = z.infer<typeof TranslatedProductTextsZodSchema>;
|
|
12
|
+
|
|
13
|
+
export async function translatedProductTextsHandler(
|
|
14
|
+
context: Context,
|
|
15
|
+
params: TranslatedProductTextsParams,
|
|
16
|
+
) {
|
|
17
|
+
const { productId } = params;
|
|
18
|
+
const { modules, userId } = context;
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
log(`handler translatedProductTexts: ${productId}`, { userId });
|
|
22
|
+
|
|
23
|
+
const texts = await modules.products.texts.findTexts({ productId });
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: 'text' as const,
|
|
29
|
+
text: JSON.stringify({ texts }),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
content: [
|
|
36
|
+
{
|
|
37
|
+
type: 'text' as const,
|
|
38
|
+
text: `Error getting translated product texts: ${(error as Error).message}`,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { log } from '@unchainedshop/logger';
|
|
4
|
+
|
|
5
|
+
export const TranslatedProductVariationTextsSchema = {
|
|
6
|
+
productVariationId: z.string().min(1).describe('ID of the product variation'),
|
|
7
|
+
productVariationOptionValue: z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe('Optional specific variation option value'),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const TranslatedProductVariationTextsZodSchema = z.object(TranslatedProductVariationTextsSchema);
|
|
14
|
+
|
|
15
|
+
export type TranslatedProductVariationTextsParams = z.infer<
|
|
16
|
+
typeof TranslatedProductVariationTextsZodSchema
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export async function translatedProductVariationTextsHandler(
|
|
20
|
+
context: Context,
|
|
21
|
+
params: TranslatedProductVariationTextsParams,
|
|
22
|
+
) {
|
|
23
|
+
const { productVariationId, productVariationOptionValue } = params;
|
|
24
|
+
const { modules, userId } = context;
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
log(
|
|
28
|
+
`handler translatedProductVariationTexts: ${productVariationId} ${productVariationOptionValue || ''}`,
|
|
29
|
+
{
|
|
30
|
+
userId,
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const texts = await modules.products.variations.texts.findVariationTexts({
|
|
35
|
+
productVariationId,
|
|
36
|
+
productVariationOptionValue,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
content: [
|
|
41
|
+
{
|
|
42
|
+
type: 'text' as const,
|
|
43
|
+
text: JSON.stringify({ texts }),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return {
|
|
49
|
+
content: [
|
|
50
|
+
{
|
|
51
|
+
type: 'text' as const,
|
|
52
|
+
text: `Error getting translated product variation texts: ${(error as Error).message}`,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { ProductNotFoundError, ProductWrongStatusError } from '../../../errors.js';
|
|
4
|
+
import { getNormalizedProductDetails } from '../../utils/getNormalizedProductDetails.js';
|
|
5
|
+
|
|
6
|
+
export const UnpublishProductSchema = {
|
|
7
|
+
productId: z.string().min(1).describe('ID of the product to unpublish'),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const UnpublishProductZodSchema = z.object(UnpublishProductSchema);
|
|
11
|
+
|
|
12
|
+
export type UnpublishProductParams = z.infer<typeof UnpublishProductZodSchema>;
|
|
13
|
+
|
|
14
|
+
export async function unpublishProductHandler(context: Context, params: UnpublishProductParams) {
|
|
15
|
+
const { productId } = params;
|
|
16
|
+
const { modules } = context;
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const product = await modules.products.findProduct({ productId });
|
|
20
|
+
if (!product) throw new ProductNotFoundError({ productId });
|
|
21
|
+
|
|
22
|
+
if (!(await modules.products.unpublish(product))) {
|
|
23
|
+
throw new ProductWrongStatusError({ status: product.status });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
content: [
|
|
28
|
+
{
|
|
29
|
+
type: 'text' as const,
|
|
30
|
+
text: JSON.stringify({
|
|
31
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
} catch (error) {
|
|
37
|
+
return {
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
type: 'text' as const,
|
|
41
|
+
text: `Error unPublishing product: ${(error as Error).message}`,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { ProductNotFoundError } from '../../../errors.js';
|
|
4
|
+
import { getNormalizedProductDetails } from '../../utils/getNormalizedProductDetails.js';
|
|
5
|
+
|
|
6
|
+
export const UpdateProductSchema = {
|
|
7
|
+
productId: z.string().min(1).describe('ID of the product to update'),
|
|
8
|
+
product: z
|
|
9
|
+
.object({
|
|
10
|
+
tags: z.array(z.string().min(1).toLowerCase()).optional().describe('List of lowercase tags'),
|
|
11
|
+
sequence: z.number().int().optional().describe('Sorting sequence'),
|
|
12
|
+
meta: z.record(z.unknown()).optional().describe('Custom metadata as key-value pairs'),
|
|
13
|
+
})
|
|
14
|
+
.describe('Fields to update on the product'),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const UpdateProductZodSchema = z.object(UpdateProductSchema);
|
|
18
|
+
|
|
19
|
+
export type UpdateProductParams = z.infer<typeof UpdateProductZodSchema>;
|
|
20
|
+
|
|
21
|
+
export async function updateProductHandler(context: Context, params: UpdateProductParams) {
|
|
22
|
+
const { productId, product } = params;
|
|
23
|
+
const { modules } = context;
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
if (!(await modules.products.productExists({ productId })))
|
|
27
|
+
throw new ProductNotFoundError({ productId });
|
|
28
|
+
|
|
29
|
+
await modules.products.update(productId, product);
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
type: 'text' as const,
|
|
35
|
+
text: JSON.stringify({
|
|
36
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
} catch (error) {
|
|
42
|
+
return {
|
|
43
|
+
content: [
|
|
44
|
+
{
|
|
45
|
+
type: 'text' as const,
|
|
46
|
+
text: `Error updating product: ${(error as Error).message}`,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { getNormalizedProductDetails } from '../../utils/getNormalizedProductDetails.js';
|
|
4
|
+
|
|
5
|
+
export const UpdateProductCommerceSchema = {
|
|
6
|
+
productId: z
|
|
7
|
+
.string()
|
|
8
|
+
.min(1)
|
|
9
|
+
.describe('ID of the product of all type except for CONFIGURABLE_PRODUCT to update commerce info'),
|
|
10
|
+
commerce: z
|
|
11
|
+
.object({
|
|
12
|
+
pricing: z
|
|
13
|
+
.array(
|
|
14
|
+
z.object({
|
|
15
|
+
amount: z.number().int().describe('Price amount in smallest currency unit (e.g., cents)'),
|
|
16
|
+
maxQuantity: z
|
|
17
|
+
.number()
|
|
18
|
+
.int()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('Optional maximum quantity for this price tier'),
|
|
21
|
+
isTaxable: z.boolean().optional().describe('Whether tax applies to this price'),
|
|
22
|
+
isNetPrice: z.boolean().optional().describe('Whether this is a net price (without tax)'),
|
|
23
|
+
currencyCode: z
|
|
24
|
+
.string()
|
|
25
|
+
.min(3)
|
|
26
|
+
.max(3)
|
|
27
|
+
.describe(
|
|
28
|
+
'ISO currency code (e.g., USD, EUR) always use values registered in the system and if explicitly provided check if it exists',
|
|
29
|
+
),
|
|
30
|
+
countryCode: z
|
|
31
|
+
.string()
|
|
32
|
+
.min(2)
|
|
33
|
+
.max(2)
|
|
34
|
+
.describe(
|
|
35
|
+
'ISO country code (e.g., US, DE) always use values registered in the system and if explicitly provided check if it exists',
|
|
36
|
+
),
|
|
37
|
+
}),
|
|
38
|
+
)
|
|
39
|
+
.nonempty()
|
|
40
|
+
.describe('List of price configurations'),
|
|
41
|
+
})
|
|
42
|
+
.describe('Commerce info to update'),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const UpdateProductCommerceZodSchema = z.object(UpdateProductCommerceSchema);
|
|
46
|
+
|
|
47
|
+
export type UpdateProductCommerceParams = z.infer<typeof UpdateProductCommerceZodSchema>;
|
|
48
|
+
|
|
49
|
+
export async function updateProductCommerceHandler(
|
|
50
|
+
context: Context,
|
|
51
|
+
params: UpdateProductCommerceParams,
|
|
52
|
+
) {
|
|
53
|
+
const { productId, commerce } = params;
|
|
54
|
+
const { modules } = context;
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
await modules.products.update(productId, { commerce });
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: 'text' as const,
|
|
63
|
+
text: JSON.stringify({
|
|
64
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
} catch (error) {
|
|
70
|
+
return {
|
|
71
|
+
content: [
|
|
72
|
+
{
|
|
73
|
+
type: 'text' as const,
|
|
74
|
+
text: `Error updating product commerce info: ${(error as Error).message}`,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { ProductMediaNotFoundError } from '../../../errors.js';
|
|
4
|
+
|
|
5
|
+
export const UpdateProductMediaTextsSchema = {
|
|
6
|
+
productMediaId: z.string().min(1).describe('ID of the media asset to update'),
|
|
7
|
+
texts: z
|
|
8
|
+
.array(
|
|
9
|
+
z.object({
|
|
10
|
+
locale: z
|
|
11
|
+
.string()
|
|
12
|
+
.min(2)
|
|
13
|
+
.describe(
|
|
14
|
+
'locale iso code like "en-US", "de-CH" use default defaultLanguageIsoCode in shop info if not explicitly provided. if language is explicitly provided check if it exists',
|
|
15
|
+
),
|
|
16
|
+
title: z.string().optional().describe('Title in the given locale'),
|
|
17
|
+
subtitle: z.string().optional().describe('Subtitle in the given locale'),
|
|
18
|
+
}),
|
|
19
|
+
)
|
|
20
|
+
.min(1)
|
|
21
|
+
.describe('List of localized texts to update'),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const UpdateProductMediaTextsZodSchema = z.object(UpdateProductMediaTextsSchema);
|
|
25
|
+
|
|
26
|
+
export type UpdateProductMediaTextsParams = z.infer<typeof UpdateProductMediaTextsZodSchema>;
|
|
27
|
+
|
|
28
|
+
export async function updateProductMediaTextsHandler(
|
|
29
|
+
context: Context,
|
|
30
|
+
params: UpdateProductMediaTextsParams,
|
|
31
|
+
) {
|
|
32
|
+
const { productMediaId, texts } = params;
|
|
33
|
+
const { modules } = context;
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const productMedia = await modules.products.media.findProductMedia({
|
|
37
|
+
productMediaId,
|
|
38
|
+
});
|
|
39
|
+
if (!productMedia) throw new ProductMediaNotFoundError({ productMediaId });
|
|
40
|
+
|
|
41
|
+
const updatedTexts = await modules.products.media.texts.updateMediaTexts(productMediaId, texts);
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
content: [
|
|
45
|
+
{
|
|
46
|
+
type: 'text' as const,
|
|
47
|
+
text: JSON.stringify({ texts: updatedTexts }),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
} catch (error) {
|
|
52
|
+
return {
|
|
53
|
+
content: [
|
|
54
|
+
{
|
|
55
|
+
type: 'text' as const,
|
|
56
|
+
text: `Error updating product media texts: ${(error as Error).message}`,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../../context.js';
|
|
3
|
+
import { ProductNotFoundError, ProductWrongStatusError } from '../../../errors.js';
|
|
4
|
+
import { ProductTypes } from '@unchainedshop/core-products';
|
|
5
|
+
import { getNormalizedProductDetails } from '../../utils/getNormalizedProductDetails.js';
|
|
6
|
+
|
|
7
|
+
export const UpdateProductPlanSchema = {
|
|
8
|
+
productId: z.string().min(1).describe('ID of the product of type PLAN_PRODUCT to update only'),
|
|
9
|
+
plan: z.object({
|
|
10
|
+
usageCalculationType: z.string(),
|
|
11
|
+
billingInterval: z.string(),
|
|
12
|
+
billingIntervalCount: z.number().int().positive().optional(),
|
|
13
|
+
trialInterval: z.string().optional(),
|
|
14
|
+
trialIntervalCount: z.number().int().positive().optional(),
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const UpdateProductPlanZodSchema = z.object(UpdateProductPlanSchema);
|
|
19
|
+
|
|
20
|
+
export type UpdateProductPlanParams = z.infer<typeof UpdateProductPlanZodSchema>;
|
|
21
|
+
|
|
22
|
+
export async function updateProductPlanHandler(context: Context, params: UpdateProductPlanParams) {
|
|
23
|
+
const { productId, plan } = params;
|
|
24
|
+
const { modules } = context;
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const product = await modules.products.findProduct({ productId });
|
|
28
|
+
if (!product) throw new ProductNotFoundError({ productId });
|
|
29
|
+
|
|
30
|
+
if (product?.type !== ProductTypes.PlanProduct)
|
|
31
|
+
throw new ProductWrongStatusError({
|
|
32
|
+
received: product?.type,
|
|
33
|
+
required: ProductTypes.PlanProduct,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
await modules.products.update(productId, { plan });
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text' as const,
|
|
42
|
+
text: JSON.stringify({
|
|
43
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
} catch (error) {
|
|
49
|
+
return {
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: 'text' as const,
|
|
53
|
+
text: `Error updating product plan: ${(error as Error).message}`,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|