@unchainedshop/api 3.1.13 → 4.0.0-rc.3
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/context.d.ts +2 -2
- package/lib/context.d.ts.map +1 -1
- package/lib/context.js +1 -1
- package/lib/context.js.map +1 -1
- package/lib/createGraphQLServer.d.ts +2 -2
- package/lib/createGraphQLServer.d.ts.map +1 -1
- package/lib/errors.d.ts +2 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +2 -1
- package/lib/errors.js.map +1 -1
- 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/createERCMetadataMiddleware.d.ts.map +1 -1
- package/lib/express/createERCMetadataMiddleware.js +9 -5
- package/lib/express/createERCMetadataMiddleware.js.map +1 -1
- package/lib/express/createMCPMiddleware.d.ts.map +1 -1
- package/lib/express/createMCPMiddleware.js +12 -3
- package/lib/express/createMCPMiddleware.js.map +1 -1
- 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 -6
- 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/ercMetadataHandler.d.ts.map +1 -1
- package/lib/fastify/ercMetadataHandler.js +9 -5
- package/lib/fastify/ercMetadataHandler.js.map +1 -1
- package/lib/fastify/index.d.ts.map +1 -1
- package/lib/fastify/index.js +24 -5
- 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 +4 -0
- package/lib/fastify/mcpHandler.d.ts.map +1 -0
- package/lib/fastify/mcpHandler.js +78 -0
- package/lib/fastify/mcpHandler.js.map +1 -0
- 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/loaders/buildLocaleMap.d.ts +4 -4
- package/lib/loaders/buildLocaleMap.d.ts.map +1 -1
- package/lib/loaders/buildLocaleMap.js +34 -5
- package/lib/loaders/buildLocaleMap.js.map +1 -1
- package/lib/loaders/buildTextMap.d.ts +2 -2
- package/lib/loaders/buildTextMap.d.ts.map +1 -1
- package/lib/loaders/buildTextMap.js +3 -0
- package/lib/loaders/buildTextMap.js.map +1 -1
- package/lib/loaders/index.d.ts +79 -49
- package/lib/loaders/index.d.ts.map +1 -1
- package/lib/loaders/index.js +47 -240
- package/lib/loaders/index.js.map +1 -1
- package/lib/locale-context.d.ts +3 -3
- package/lib/locale-context.d.ts.map +1 -1
- package/lib/locale-context.js +9 -10
- package/lib/locale-context.js.map +1 -1
- package/lib/mcp/index.d.ts +1 -1
- package/lib/mcp/index.d.ts.map +1 -1
- package/lib/mcp/index.js +38 -2
- package/lib/mcp/index.js.map +1 -1
- package/lib/mcp/tools/addProductAssignmentHandler.js.map +1 -1
- 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/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/createProductVariationHandler.d.ts +2 -2
- package/lib/mcp/tools/createProductVariationHandler.d.ts.map +1 -1
- package/lib/mcp/tools/createProductVariationHandler.js +10 -4
- package/lib/mcp/tools/createProductVariationHandler.js.map +1 -1
- 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/getProduct.d.ts.map +1 -1
- package/lib/mcp/tools/getProduct.js +2 -45
- package/lib/mcp/tools/getProduct.js.map +1 -1
- package/lib/mcp/tools/index.d.ts +33 -0
- package/lib/mcp/tools/index.d.ts.map +1 -1
- package/lib/mcp/tools/index.js +33 -0
- package/lib/mcp/tools/index.js.map +1 -1
- package/lib/mcp/tools/listProducts.d.ts.map +1 -1
- package/lib/mcp/tools/listProducts.js +29 -17
- package/lib/mcp/tools/listProducts.js.map +1 -1
- 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/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/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/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/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/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/utils/getNormalizedProductDetails.d.ts.map +1 -1
- package/lib/mcp/utils/getNormalizedProductDetails.js +2 -0
- package/lib/mcp/utils/getNormalizedProductDetails.js.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.js +4 -5
- package/lib/resolvers/mutations/accounts/createUser.js.map +1 -1
- package/lib/resolvers/mutations/accounts/impersonate.js +1 -1
- package/lib/resolvers/mutations/accounts/impersonate.js.map +1 -1
- package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts.map +1 -1
- package/lib/resolvers/mutations/accounts/loginAsGuest.js +4 -5
- package/lib/resolvers/mutations/accounts/loginAsGuest.js.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithPassword.js +3 -3
- package/lib/resolvers/mutations/accounts/loginWithPassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js +3 -3
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js.map +1 -1
- package/lib/resolvers/mutations/accounts/resetPassword.js +3 -3
- package/lib/resolvers/mutations/accounts/resetPassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/stopImpersonation.js +1 -1
- package/lib/resolvers/mutations/accounts/stopImpersonation.js.map +1 -1
- package/lib/resolvers/mutations/accounts/verifyEmail.js +3 -3
- package/lib/resolvers/mutations/accounts/verifyEmail.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts +2 -2
- package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts +2 -2
- package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts +2 -2
- package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts +2 -2
- package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.js.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.js.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentTexts.js.map +1 -1
- package/lib/resolvers/mutations/enrollments/createEnrollment.js +3 -3
- package/lib/resolvers/mutations/enrollments/createEnrollment.js.map +1 -1
- package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts +2 -2
- package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/createFilter.d.ts.map +1 -1
- package/lib/resolvers/mutations/filters/createFilter.js +2 -6
- package/lib/resolvers/mutations/filters/createFilter.js.map +1 -1
- package/lib/resolvers/mutations/filters/updateFilterTexts.d.ts +2 -2
- package/lib/resolvers/mutations/filters/updateFilterTexts.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.js +1 -1
- package/lib/resolvers/mutations/orders/addCartProduct.js.map +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +2 -2
- package/lib/resolvers/mutations/orders/addCartQuotation.d.ts.map +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.js +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.js.map +1 -1
- package/lib/resolvers/mutations/orders/addMultipleCartProducts.d.ts +4 -4
- 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.js +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.js.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/emptyCart.js +1 -1
- package/lib/resolvers/mutations/orders/emptyCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js +1 -1
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.js.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/updateCartItem.d.ts +2 -2
- package/lib/resolvers/mutations/orders/updateCartItem.d.ts.map +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 +35 -2
- package/lib/resolvers/mutations/products/addProductAssignment.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductVariation.d.ts +2 -2
- package/lib/resolvers/mutations/products/createProductVariation.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/createProductVariation.js.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/removeProductAssignment.js.map +1 -1
- package/lib/resolvers/mutations/products/reorderProductMedia.d.ts +2 -2
- package/lib/resolvers/mutations/products/reorderProductMedia.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/reorderProductMedia.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductMediaTexts.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts.map +1 -1
- package/lib/resolvers/mutations/quotations/requestQuotation.d.ts +2 -2
- package/lib/resolvers/mutations/quotations/requestQuotation.d.ts.map +1 -1
- package/lib/resolvers/mutations/quotations/requestQuotation.js +3 -3
- package/lib/resolvers/mutations/quotations/requestQuotation.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/heartbeat.js +3 -3
- package/lib/resolvers/mutations/users/heartbeat.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/setRoles.js.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/setUserTags.js.map +1 -1
- package/lib/resolvers/mutations/warehousing/invalidateToken.js +1 -3
- package/lib/resolvers/mutations/warehousing/invalidateToken.js.map +1 -1
- package/lib/resolvers/mutations/worker/allocateWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/allocateWork.d.ts.map +1 -1
- package/lib/resolvers/mutations/worker/allocateWork.js.map +1 -1
- package/lib/resolvers/queries/assortments/assortments.d.ts +1 -1
- package/lib/resolvers/queries/assortments/assortments.d.ts.map +1 -1
- package/lib/resolvers/queries/countries/countries.d.ts +1 -1
- package/lib/resolvers/queries/countries/countries.d.ts.map +1 -1
- package/lib/resolvers/queries/countries/countries.js.map +1 -1
- package/lib/resolvers/queries/currencies/currencies.d.ts +1 -1
- package/lib/resolvers/queries/currencies/currencies.d.ts.map +1 -1
- package/lib/resolvers/queries/currencies/currencies.js.map +1 -1
- package/lib/resolvers/queries/enrollments/enrollments.d.ts +1 -1
- package/lib/resolvers/queries/enrollments/enrollments.d.ts.map +1 -1
- package/lib/resolvers/queries/filters/filters.d.ts +1 -1
- package/lib/resolvers/queries/filters/filters.d.ts.map +1 -1
- package/lib/resolvers/queries/filters/searchAssortments.d.ts.map +1 -1
- package/lib/resolvers/queries/filters/searchAssortments.js +2 -7
- 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 +3 -8
- package/lib/resolvers/queries/filters/searchProducts.js.map +1 -1
- package/lib/resolvers/queries/languages/languages.d.ts +1 -1
- package/lib/resolvers/queries/languages/languages.d.ts.map +1 -1
- package/lib/resolvers/queries/languages/languages.js.map +1 -1
- package/lib/resolvers/queries/orders/orders.d.ts +1 -1
- package/lib/resolvers/queries/orders/orders.d.ts.map +1 -1
- package/lib/resolvers/queries/orders/orders.js.map +1 -1
- package/lib/resolvers/queries/products/productReviews.d.ts +1 -1
- package/lib/resolvers/queries/products/productReviews.d.ts.map +1 -1
- package/lib/resolvers/queries/products/products.d.ts +1 -1
- package/lib/resolvers/queries/products/products.d.ts.map +1 -1
- package/lib/resolvers/queries/quotations/quotations.d.ts +1 -1
- package/lib/resolvers/queries/quotations/quotations.d.ts.map +1 -1
- package/lib/resolvers/queries/quotations/quotations.js.map +1 -1
- package/lib/resolvers/queries/users/impersonator.d.ts.map +1 -1
- package/lib/resolvers/queries/users/impersonator.js +1 -1
- package/lib/resolvers/queries/users/impersonator.js.map +1 -1
- package/lib/resolvers/queries/users/user.d.ts.map +1 -1
- package/lib/resolvers/queries/users/user.js.map +1 -1
- package/lib/resolvers/queries/users/users.d.ts +1 -1
- package/lib/resolvers/queries/users/users.d.ts.map +1 -1
- package/lib/resolvers/queries/worker/workQueue.d.ts +3 -3
- package/lib/resolvers/queries/worker/workQueue.d.ts.map +1 -1
- package/lib/resolvers/type/assortment/assortment-filter-types.d.ts +4 -8
- package/lib/resolvers/type/assortment/assortment-filter-types.d.ts.map +1 -1
- package/lib/resolvers/type/assortment/assortment-filter-types.js +4 -6
- package/lib/resolvers/type/assortment/assortment-filter-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-link-types.d.ts +2 -2
- package/lib/resolvers/type/assortment/assortment-link-types.d.ts.map +1 -1
- package/lib/resolvers/type/assortment/assortment-media-types.js +2 -2
- package/lib/resolvers/type/assortment/assortment-media-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-path-link-types.d.ts +2 -2
- package/lib/resolvers/type/assortment/assortment-path-link-types.d.ts.map +1 -1
- package/lib/resolvers/type/assortment/assortment-path-link-types.js +2 -2
- package/lib/resolvers/type/assortment/assortment-path-link-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-product-types.d.ts +2 -2
- package/lib/resolvers/type/assortment/assortment-product-types.d.ts.map +1 -1
- package/lib/resolvers/type/assortment/assortment-types.d.ts +2 -2
- package/lib/resolvers/type/assortment/assortment-types.d.ts.map +1 -1
- package/lib/resolvers/type/assortment/assortment-types.js +5 -5
- package/lib/resolvers/type/assortment/assortment-types.js.map +1 -1
- package/lib/resolvers/type/bookmark-types.d.ts.map +1 -1
- package/lib/resolvers/type/bookmark-types.js +2 -3
- package/lib/resolvers/type/bookmark-types.js.map +1 -1
- package/lib/resolvers/type/country-types.d.ts +1 -1
- package/lib/resolvers/type/country-types.d.ts.map +1 -1
- package/lib/resolvers/type/country-types.js +4 -7
- package/lib/resolvers/type/country-types.js.map +1 -1
- package/lib/resolvers/type/delivery-provider-types.d.ts +10 -13
- package/lib/resolvers/type/delivery-provider-types.d.ts.map +1 -1
- package/lib/resolvers/type/delivery-provider-types.js +8 -9
- package/lib/resolvers/type/delivery-provider-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts +2 -6
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.js +4 -3
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts +2 -6
- package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-payment-types.js +2 -3
- package/lib/resolvers/type/enrollment/enrollment-payment-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts +2 -6
- package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-period-types.js +2 -3
- package/lib/resolvers/type/enrollment/enrollment-period-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.d.ts +2 -6
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.js +2 -3
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-types.d.ts +15 -14
- package/lib/resolvers/type/enrollment/enrollment-types.d.ts.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-types.js +3 -6
- package/lib/resolvers/type/enrollment/enrollment-types.js.map +1 -1
- package/lib/resolvers/type/filter/filter-option-types.d.ts +6 -9
- package/lib/resolvers/type/filter/filter-option-types.d.ts.map +1 -1
- package/lib/resolvers/type/filter/filter-option-types.js +2 -3
- package/lib/resolvers/type/filter/filter-option-types.js.map +1 -1
- package/lib/resolvers/type/filter/filter-types.d.ts +16 -8
- package/lib/resolvers/type/filter/filter-types.d.ts.map +1 -1
- package/lib/resolvers/type/filter/filter-types.js +2 -3
- package/lib/resolvers/type/filter/filter-types.js.map +1 -1
- package/lib/resolvers/type/filter/loaded-filter-types.d.ts +2 -3
- package/lib/resolvers/type/filter/loaded-filter-types.d.ts.map +1 -1
- package/lib/resolvers/type/index.d.ts +273 -261
- package/lib/resolvers/type/index.d.ts.map +1 -1
- package/lib/resolvers/type/login-method-response-types.js +1 -1
- package/lib/resolvers/type/login-method-response-types.js.map +1 -1
- package/lib/resolvers/type/order/order-delivery-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-delivery-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-delivery-discount-types.js +1 -2
- package/lib/resolvers/type/order/order-delivery-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +13 -12
- package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-delivery-pickup-types.js +10 -14
- package/lib/resolvers/type/order/order-delivery-pickup-types.js.map +1 -1
- package/lib/resolvers/type/order/order-delivery-shipping-types.d.ts +12 -12
- package/lib/resolvers/type/order/order-delivery-shipping-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-delivery-shipping-types.js +7 -10
- package/lib/resolvers/type/order/order-delivery-shipping-types.js.map +1 -1
- package/lib/resolvers/type/order/order-delivery-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-delivery-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-delivery-types.js +2 -3
- package/lib/resolvers/type/order/order-delivery-types.js.map +1 -1
- package/lib/resolvers/type/order/order-discount-types.d.ts +11 -13
- package/lib/resolvers/type/order/order-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-discount-types.js +9 -16
- package/lib/resolvers/type/order/order-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.js +1 -2
- package/lib/resolvers/type/order/order-global-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.js +1 -2
- package/lib/resolvers/type/order/order-item-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-item-types.d.ts +5 -5
- package/lib/resolvers/type/order/order-item-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-item-types.js +14 -17
- package/lib/resolvers/type/order/order-item-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-card-types.d.ts +11 -10
- package/lib/resolvers/type/order/order-payment-card-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-card-types.js +6 -9
- package/lib/resolvers/type/order/order-payment-card-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.js +2 -4
- package/lib/resolvers/type/order/order-payment-discount-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-generic-types.d.ts +11 -10
- package/lib/resolvers/type/order/order-payment-generic-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-generic-types.js +6 -9
- package/lib/resolvers/type/order/order-payment-generic-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-invoice-types.d.ts +11 -10
- package/lib/resolvers/type/order/order-payment-invoice-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-invoice-types.js +6 -9
- package/lib/resolvers/type/order/order-payment-invoice-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-payment-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-types.js +2 -3
- package/lib/resolvers/type/order/order-payment-types.js.map +1 -1
- package/lib/resolvers/type/order/order-types.d.ts +6 -6
- package/lib/resolvers/type/order/order-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-types.js +7 -15
- package/lib/resolvers/type/order/order-types.js.map +1 -1
- package/lib/resolvers/type/payment/payment-credentials-types.d.ts.map +1 -1
- package/lib/resolvers/type/payment/payment-credentials-types.js +6 -9
- package/lib/resolvers/type/payment/payment-credentials-types.js.map +1 -1
- package/lib/resolvers/type/payment/payment-provider-types.d.ts +2 -2
- package/lib/resolvers/type/payment/payment-provider-types.d.ts.map +1 -1
- package/lib/resolvers/type/payment/payment-provider-types.js +8 -9
- package/lib/resolvers/type/payment/payment-provider-types.js.map +1 -1
- package/lib/resolvers/type/price-types.d.ts +3 -4
- package/lib/resolvers/type/price-types.d.ts.map +1 -1
- package/lib/resolvers/type/price-types.js +2 -2
- package/lib/resolvers/type/price-types.js.map +1 -1
- package/lib/resolvers/type/product/product-assortment-path-types.d.ts +1 -1
- package/lib/resolvers/type/product/product-assortment-path-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-bundle-types.d.ts +10 -10
- package/lib/resolvers/type/product/product-bundle-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-catalog-price-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-catalog-price-types.js +4 -6
- package/lib/resolvers/type/product/product-catalog-price-types.js.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.d.ts +20 -20
- package/lib/resolvers/type/product/product-configurable-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.js +10 -12
- package/lib/resolvers/type/product/product-configurable-types.js.map +1 -1
- package/lib/resolvers/type/product/product-discount.d.ts +1 -1
- 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-media-types.js +2 -2
- package/lib/resolvers/type/product/product-media-types.js.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.d.ts +18 -18
- package/lib/resolvers/type/product/product-plan-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.js +16 -16
- package/lib/resolvers/type/product/product-plan-types.js.map +1 -1
- package/lib/resolvers/type/product/product-review-types.d.ts +1 -1
- package/lib/resolvers/type/product/product-review-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-review-types.js +2 -3
- package/lib/resolvers/type/product/product-review-types.js.map +1 -1
- package/lib/resolvers/type/product/product-simple-types.d.ts +22 -22
- package/lib/resolvers/type/product/product-simple-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-simple-types.js +3 -11
- package/lib/resolvers/type/product/product-simple-types.js.map +1 -1
- package/lib/resolvers/type/product/product-tokenized-types.d.ts +20 -20
- package/lib/resolvers/type/product/product-tokenized-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-tokenized-types.js +1 -5
- package/lib/resolvers/type/product/product-tokenized-types.js.map +1 -1
- package/lib/resolvers/type/product/product-types.d.ts +9 -9
- package/lib/resolvers/type/product/product-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-types.js +2 -5
- package/lib/resolvers/type/product/product-types.js.map +1 -1
- package/lib/resolvers/type/product/product-variation-assignment-types.d.ts +2 -2
- package/lib/resolvers/type/product/product-variation-assignment-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-variation-assignment-types.js +1 -1
- package/lib/resolvers/type/product/product-variation-assignment-types.js.map +1 -1
- package/lib/resolvers/type/product/product-variation-assignment-vector.js +2 -2
- package/lib/resolvers/type/product/product-variation-assignment-vector.js.map +1 -1
- package/lib/resolvers/type/product/product-variation-option-types.js +3 -3
- package/lib/resolvers/type/product/product-variation-option-types.js.map +1 -1
- package/lib/resolvers/type/product/product-variation-types.d.ts +2 -2
- package/lib/resolvers/type/product/product-variation-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-variation-types.js +3 -3
- package/lib/resolvers/type/product/product-variation-types.js.map +1 -1
- package/lib/resolvers/type/product-search-result-types.d.ts +5 -6
- package/lib/resolvers/type/product-search-result-types.d.ts.map +1 -1
- package/lib/resolvers/type/quotation-types.d.ts +8 -15
- package/lib/resolvers/type/quotation-types.d.ts.map +1 -1
- package/lib/resolvers/type/quotation-types.js +3 -6
- package/lib/resolvers/type/quotation-types.js.map +1 -1
- package/lib/resolvers/type/shop-types.d.ts +1 -1
- package/lib/resolvers/type/shop-types.d.ts.map +1 -1
- package/lib/resolvers/type/shop-types.js +4 -6
- package/lib/resolvers/type/shop-types.js.map +1 -1
- package/lib/resolvers/type/token-types.d.ts +2 -2
- package/lib/resolvers/type/token-types.d.ts.map +1 -1
- package/lib/resolvers/type/token-types.js +12 -26
- package/lib/resolvers/type/token-types.js.map +1 -1
- package/lib/resolvers/type/user-types.d.ts +22 -22
- package/lib/resolvers/type/user-types.d.ts.map +1 -1
- package/lib/resolvers/type/user-types.js +5 -16
- package/lib/resolvers/type/user-types.js.map +1 -1
- package/lib/resolvers/type/work-types.d.ts.map +1 -1
- package/lib/resolvers/type/work-types.js +0 -1
- package/lib/resolvers/type/work-types.js.map +1 -1
- package/lib/roles/all.js +1 -1
- package/lib/roles/all.js.map +1 -1
- package/lib/roles/index.d.ts.map +1 -1
- package/lib/roles/index.js +1 -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/schema/types/assortment.js +5 -5
- package/lib/schema/types/country.js +1 -1
- package/lib/schema/types/delivery.d.ts.map +1 -1
- package/lib/schema/types/delivery.js +6 -2
- package/lib/schema/types/delivery.js.map +1 -1
- package/lib/schema/types/filter.js +3 -3
- package/lib/schema/types/payment.d.ts.map +1 -1
- package/lib/schema/types/payment.js +6 -2
- package/lib/schema/types/payment.js.map +1 -1
- package/lib/schema/types/price.js +1 -1
- package/lib/schema/types/product/bundle-product.js +1 -1
- package/lib/schema/types/product/configurable-product.js +6 -6
- package/lib/schema/types/product/plan-product.js +5 -5
- package/lib/schema/types/product/product.js +4 -4
- package/lib/schema/types/product/simple-product.js +4 -4
- package/lib/schema/types/product/tokenized-product.js +5 -5
- package/lib/schema/types/warehousing.js +1 -1
- package/package.json +32 -16
- package/src/api-index.ts +4 -1
- package/src/context.ts +3 -3
- package/src/createGraphQLServer.ts +2 -2
- package/src/errors.ts +10 -4
- package/src/express/createERCMetadataMiddleware.ts +11 -5
- package/src/express/createMCPMiddleware.ts +91 -0
- package/src/express/createTempUploadMiddleware.ts +60 -0
- package/src/express/index.ts +37 -9
- package/src/fastify/ercMetadataHandler.ts +11 -5
- package/src/fastify/index.ts +34 -5
- package/src/fastify/mcpHandler.ts +97 -0
- package/src/fastify/tempUploadHandler.ts +52 -0
- package/src/loaders/assortmentLinkLoader.ts +32 -0
- package/src/loaders/assortmentLinksLoader.ts +46 -0
- package/src/loaders/assortmentLoader.ts +20 -0
- package/src/loaders/assortmentMediaTextLoader.ts +26 -0
- package/src/loaders/assortmentMediasLoader.ts +21 -0
- package/src/loaders/assortmentProductLoader.ts +19 -0
- package/src/loaders/assortmentProductsLoader.ts +22 -0
- package/src/loaders/assortmentTextLoader.ts +24 -0
- package/src/loaders/buildLocaleMap.test.ts +9 -5
- package/src/loaders/buildLocaleMap.ts +43 -9
- package/src/loaders/buildTextMap.ts +4 -1
- package/src/loaders/countryLoader.ts +20 -0
- package/src/loaders/currencyLoader.ts +20 -0
- package/src/loaders/deliveryProviderLoader.ts +19 -0
- package/src/loaders/fileLoader.ts +19 -0
- package/src/loaders/filterLoader.ts +20 -0
- package/src/loaders/filterTextLoader.ts +26 -0
- package/src/loaders/index.ts +48 -329
- package/src/loaders/languageLoader.ts +20 -0
- package/src/loaders/orderLoader.ts +22 -0
- package/src/loaders/paymentProviderLoader.ts +19 -0
- package/src/loaders/productLoader.ts +22 -0
- package/src/loaders/productLoaderBySKU.ts +22 -0
- package/src/loaders/productMediaTextLoader.ts +24 -0
- package/src/loaders/productMediasLoader.ts +21 -0
- package/src/loaders/productTextLoader.ts +22 -0
- package/src/loaders/userLoader.ts +23 -0
- package/src/loaders/utils.ts +35 -0
- package/src/locale-context.ts +16 -22
- package/src/mcp/README.md +25 -0
- package/src/mcp/index.ts +313 -0
- package/src/mcp/tools/addProductAssignmentHandler.ts +118 -0
- package/src/mcp/tools/addProductMediaUploadHandler.ts +79 -0
- package/src/mcp/tools/countriesHandler.ts +60 -0
- package/src/mcp/tools/countryHandler.ts +40 -0
- package/src/mcp/tools/createLanguageHandler.ts +46 -0
- package/src/mcp/tools/createProduct.ts +75 -0
- package/src/mcp/tools/createProductVariationHandler.ts +93 -0
- package/src/mcp/tools/createProductVariationOptionHandler.ts +73 -0
- package/src/mcp/tools/currenciesHandler.ts +63 -0
- package/src/mcp/tools/currencyHandler.ts +40 -0
- package/src/mcp/tools/getProduct.ts +74 -0
- package/src/mcp/tools/index.ts +39 -0
- package/src/mcp/tools/languageHandler.ts +37 -0
- package/src/mcp/tools/languagesHandler.ts +54 -0
- package/src/mcp/tools/listProducts.ts +148 -0
- package/src/mcp/tools/productReviewsCountHandler.ts +36 -0
- package/src/mcp/tools/productReviewsHandler.ts +54 -0
- package/src/mcp/tools/productsCountHandler.ts +38 -0
- package/src/mcp/tools/publishProduct.ts +45 -0
- package/src/mcp/tools/removeLanguageHandler.ts +42 -0
- package/src/mcp/tools/removeProductAssignmentHandler.ts +61 -0
- package/src/mcp/tools/removeProductHandler.ts +40 -0
- package/src/mcp/tools/removeProductMediaHandler.ts +49 -0
- package/src/mcp/tools/removeProductVariationHandler.ts +51 -0
- package/src/mcp/tools/removeProductVariationOptionHandler.ts +58 -0
- package/src/mcp/tools/reorderProductMediaHandler.ts +48 -0
- package/src/mcp/tools/unPublishProduct.ts +46 -0
- package/src/mcp/tools/updateLanguageHandler.ts +47 -0
- package/src/mcp/tools/updateProduct.ts +51 -0
- package/src/mcp/tools/updateProductCommerceHandler.ts +79 -0
- package/src/mcp/tools/updateProductMediaTextsHandler.ts +56 -0
- package/src/mcp/tools/updateProductPlanHandler.ts +58 -0
- package/src/mcp/tools/updateProductSupplyHandler.ts +59 -0
- package/src/mcp/tools/updateProductTextsHandler.ts +59 -0
- package/src/mcp/tools/updateProductTokenizationHandler.ts +58 -0
- package/src/mcp/tools/updateProductWarehousingHandler.ts +54 -0
- package/src/mcp/utils/getNormalizedProductDetails.ts +42 -0
- package/src/mcp/utils/normalizeMediaUrl.ts +26 -0
- package/src/resolvers/mutations/accounts/createUser.ts +4 -6
- package/src/resolvers/mutations/accounts/impersonate.ts +1 -1
- package/src/resolvers/mutations/accounts/loginAsGuest.ts +4 -6
- package/src/resolvers/mutations/accounts/loginWithPassword.ts +3 -3
- package/src/resolvers/mutations/accounts/loginWithWebAuthn.ts +3 -3
- package/src/resolvers/mutations/accounts/resetPassword.ts +3 -3
- package/src/resolvers/mutations/accounts/stopImpersonation.ts +1 -1
- package/src/resolvers/mutations/accounts/verifyEmail.ts +3 -3
- package/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts +1 -1
- package/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts +1 -1
- package/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts +1 -1
- package/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts +1 -1
- package/src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts +1 -1
- package/src/resolvers/mutations/assortments/updateAssortmentTexts.ts +1 -1
- package/src/resolvers/mutations/enrollments/createEnrollment.ts +3 -3
- package/src/resolvers/mutations/enrollments/updateEnrollment.ts +2 -2
- package/src/resolvers/mutations/filters/createFilter.ts +2 -6
- package/src/resolvers/mutations/filters/updateFilterTexts.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 +2 -2
- package/src/resolvers/mutations/orders/addMultipleCartProducts.ts +4 -4
- package/src/resolvers/mutations/orders/checkoutCart.ts +1 -1
- package/src/resolvers/mutations/orders/createCart.ts +1 -1
- package/src/resolvers/mutations/orders/emptyCart.ts +1 -1
- package/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts +1 -1
- package/src/resolvers/mutations/orders/updateCart.ts +1 -1
- package/src/resolvers/mutations/orders/updateCartItem.ts +1 -1
- package/src/resolvers/mutations/products/addProductAssignment.ts +45 -2
- package/src/resolvers/mutations/products/createProductVariation.ts +5 -1
- package/src/resolvers/mutations/products/removeProductAssignment.ts +1 -1
- package/src/resolvers/mutations/products/reorderProductMedia.ts +1 -1
- package/src/resolvers/mutations/products/updateProductMediaTexts.ts +1 -1
- package/src/resolvers/mutations/products/updateProductVariationTexts.ts +1 -1
- package/src/resolvers/mutations/quotations/requestQuotation.ts +4 -4
- package/src/resolvers/mutations/users/heartbeat.ts +3 -3
- package/src/resolvers/mutations/users/setRoles.ts +1 -1
- package/src/resolvers/mutations/users/setUserTags.ts +1 -1
- package/src/resolvers/mutations/warehousing/invalidateToken.ts +3 -3
- package/src/resolvers/mutations/worker/allocateWork.ts +1 -1
- package/src/resolvers/queries/assortments/assortments.ts +1 -1
- package/src/resolvers/queries/countries/countries.ts +1 -1
- package/src/resolvers/queries/currencies/currencies.ts +1 -1
- package/src/resolvers/queries/enrollments/enrollments.ts +1 -1
- package/src/resolvers/queries/filters/filters.ts +1 -1
- package/src/resolvers/queries/filters/searchAssortments.ts +2 -7
- package/src/resolvers/queries/filters/searchProducts.ts +3 -8
- package/src/resolvers/queries/languages/languages.ts +1 -1
- package/src/resolvers/queries/orders/orders.ts +1 -1
- package/src/resolvers/queries/products/productReviews.ts +1 -1
- package/src/resolvers/queries/products/products.ts +1 -1
- package/src/resolvers/queries/quotations/quotations.ts +1 -1
- package/src/resolvers/queries/users/impersonator.ts +2 -1
- package/src/resolvers/queries/users/user.ts +1 -0
- package/src/resolvers/queries/users/users.ts +1 -1
- package/src/resolvers/queries/worker/workQueue.ts +3 -3
- package/src/resolvers/type/assortment/assortment-filter-types.ts +6 -16
- package/src/resolvers/type/assortment/assortment-link-types.ts +2 -2
- package/src/resolvers/type/assortment/assortment-media-types.ts +2 -2
- package/src/resolvers/type/assortment/assortment-path-link-types.ts +3 -3
- package/src/resolvers/type/assortment/assortment-product-types.ts +2 -2
- package/src/resolvers/type/assortment/assortment-types.ts +6 -6
- package/src/resolvers/type/bookmark-types.ts +2 -3
- package/src/resolvers/type/country-types.ts +5 -8
- package/src/resolvers/type/delivery-provider-types.ts +26 -47
- package/src/resolvers/type/enrollment/enrollment-delivery-types.ts +5 -11
- package/src/resolvers/type/enrollment/enrollment-payment-types.ts +3 -11
- package/src/resolvers/type/enrollment/enrollment-period-types.ts +3 -11
- package/src/resolvers/type/enrollment/enrollment-plan-tyes.ts +3 -11
- package/src/resolvers/type/enrollment/enrollment-types.ts +10 -25
- package/src/resolvers/type/filter/filter-option-types.ts +10 -15
- package/src/resolvers/type/filter/filter-types.ts +5 -13
- package/src/resolvers/type/filter/loaded-filter-types.ts +2 -2
- package/src/resolvers/type/login-method-response-types.ts +1 -1
- package/src/resolvers/type/order/order-delivery-discount-types.ts +1 -2
- package/src/resolvers/type/order/order-delivery-pickup-types.ts +12 -28
- package/src/resolvers/type/order/order-delivery-shipping-types.ts +9 -23
- package/src/resolvers/type/order/order-delivery-types.ts +2 -3
- package/src/resolvers/type/order/order-discount-types.ts +12 -39
- package/src/resolvers/type/order/order-global-discount-types.ts +1 -2
- package/src/resolvers/type/order/order-item-discount-types.ts +1 -2
- package/src/resolvers/type/order/order-item-types.ts +19 -27
- package/src/resolvers/type/order/order-payment-card-types.ts +8 -21
- package/src/resolvers/type/order/order-payment-discount-types.ts +1 -2
- package/src/resolvers/type/order/order-payment-generic-types.ts +8 -20
- package/src/resolvers/type/order/order-payment-invoice-types.ts +8 -20
- package/src/resolvers/type/order/order-payment-types.ts +2 -3
- package/src/resolvers/type/order/order-types.ts +10 -22
- package/src/resolvers/type/payment/payment-credentials-types.ts +6 -10
- package/src/resolvers/type/payment/payment-provider-types.ts +9 -10
- package/src/resolvers/type/price-types.ts +4 -4
- package/src/resolvers/type/product/product-assortment-path-types.ts +1 -1
- package/src/resolvers/type/product/product-bundle-types.ts +1 -1
- package/src/resolvers/type/product/product-catalog-price-types.ts +4 -6
- package/src/resolvers/type/product/product-configurable-types.ts +20 -21
- package/src/resolvers/type/product/product-discount.ts +1 -1
- package/src/resolvers/type/product/product-media-types.ts +2 -2
- package/src/resolvers/type/product/product-plan-types.ts +22 -22
- package/src/resolvers/type/product/product-review-types.ts +3 -4
- package/src/resolvers/type/product/product-simple-types.ts +7 -19
- package/src/resolvers/type/product/product-tokenized-types.ts +3 -10
- package/src/resolvers/type/product/product-types.ts +10 -13
- package/src/resolvers/type/product/product-variation-assignment-types.ts +2 -2
- package/src/resolvers/type/product/product-variation-assignment-vector.ts +2 -2
- package/src/resolvers/type/product/product-variation-option-types.ts +3 -3
- package/src/resolvers/type/product/product-variation-types.ts +5 -5
- package/src/resolvers/type/product-search-result-types.ts +5 -5
- package/src/resolvers/type/quotation-types.ts +11 -25
- package/src/resolvers/type/shop-types.ts +5 -7
- package/src/resolvers/type/token-types.ts +15 -32
- package/src/resolvers/type/user-types.ts +27 -39
- package/src/resolvers/type/work-types.ts +0 -2
- package/src/roles/all.ts +1 -1
- package/src/roles/index.ts +1 -0
- package/src/roles/loggedIn.ts +1 -0
- package/src/schema/types/assortment.ts +5 -5
- package/src/schema/types/country.ts +1 -1
- package/src/schema/types/delivery.ts +6 -2
- package/src/schema/types/filter.ts +3 -3
- package/src/schema/types/payment.ts +6 -2
- package/src/schema/types/price.ts +1 -1
- package/src/schema/types/product/bundle-product.ts +1 -1
- package/src/schema/types/product/configurable-product.ts +6 -6
- package/src/schema/types/product/plan-product.ts +5 -5
- package/src/schema/types/product/product.ts +4 -4
- package/src/schema/types/product/simple-product.ts +4 -4
- package/src/schema/types/product/tokenized-product.ts +5 -5
- package/src/schema/types/warehousing.ts +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const RemoveProductVariationOptionSchema: {
|
|
4
|
+
productVariationId: z.ZodString;
|
|
5
|
+
productVariationOptionValue: z.ZodString;
|
|
6
|
+
};
|
|
7
|
+
export declare const RemoveProductVariationOptionZodSchema: z.ZodObject<{
|
|
8
|
+
productVariationId: z.ZodString;
|
|
9
|
+
productVariationOptionValue: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
productVariationId?: string;
|
|
12
|
+
productVariationOptionValue?: string;
|
|
13
|
+
}, {
|
|
14
|
+
productVariationId?: string;
|
|
15
|
+
productVariationOptionValue?: string;
|
|
16
|
+
}>;
|
|
17
|
+
export type RemoveProductVariationOptionParams = z.infer<typeof RemoveProductVariationOptionZodSchema>;
|
|
18
|
+
export declare function removeProductVariationOptionHandler(context: Context, params: RemoveProductVariationOptionParams): Promise<{
|
|
19
|
+
content: {
|
|
20
|
+
type: "text";
|
|
21
|
+
text: string;
|
|
22
|
+
}[];
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=removeProductVariationOptionHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeProductVariationOptionHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/removeProductVariationOptionHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,eAAO,MAAM,kCAAkC;;;CAS9C,CAAC;AAEF,eAAO,MAAM,qCAAqC;;;;;;;;;EAA+C,CAAC;AAClG,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEvG,wBAAsB,mCAAmC,CACvD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,kCAAkC;;;;;GAoC3C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getNormalizedProductDetails } from '../utils/getNormalizedProductDetails.js';
|
|
3
|
+
import { ProductVariationNotFoundError } from '../../errors.js';
|
|
4
|
+
export const RemoveProductVariationOptionSchema = {
|
|
5
|
+
productVariationId: z
|
|
6
|
+
.string()
|
|
7
|
+
.min(1)
|
|
8
|
+
.describe('ID of the product variation, it should be a CONFIGURABLE_PRODUCT type only'),
|
|
9
|
+
productVariationOptionValue: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.describe('existing Option value in the product to remove (e.g., "Red")'),
|
|
13
|
+
};
|
|
14
|
+
export const RemoveProductVariationOptionZodSchema = z.object(RemoveProductVariationOptionSchema);
|
|
15
|
+
export async function removeProductVariationOptionHandler(context, params) {
|
|
16
|
+
const { productVariationId, productVariationOptionValue } = params;
|
|
17
|
+
const { modules } = context;
|
|
18
|
+
try {
|
|
19
|
+
const productVariation = await modules.products.variations.findProductVariation({
|
|
20
|
+
productVariationId,
|
|
21
|
+
});
|
|
22
|
+
if (!productVariation)
|
|
23
|
+
throw new ProductVariationNotFoundError({ productVariationId });
|
|
24
|
+
await modules.products.variations.removeVariationOption(productVariationId, productVariationOptionValue);
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: 'text',
|
|
29
|
+
text: JSON.stringify({
|
|
30
|
+
product: await getNormalizedProductDetails(productVariation.productId, context),
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
return {
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
type: 'text',
|
|
41
|
+
text: `Error removing variation option: ${error.message}`,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=removeProductVariationOptionHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeProductVariationOptionHandler.js","sourceRoot":"","sources":["../../../src/mcp/tools/removeProductVariationOptionHandler.ts"],"names":[],"mappings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,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,oCAAqC,KAAe,CAAC,OAAO,EAAE;iBACrE;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Context } from '../../context.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const ReorderProductMediaSchema: {
|
|
4
|
+
sortKeys: z.ZodArray<z.ZodObject<{
|
|
5
|
+
productMediaId: z.ZodString;
|
|
6
|
+
sortKey: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
sortKey?: number;
|
|
9
|
+
productMediaId?: string;
|
|
10
|
+
}, {
|
|
11
|
+
sortKey?: number;
|
|
12
|
+
productMediaId?: string;
|
|
13
|
+
}>, "many">;
|
|
14
|
+
};
|
|
15
|
+
export declare const ReorderProductMediaZodSchema: z.ZodObject<{
|
|
16
|
+
sortKeys: z.ZodArray<z.ZodObject<{
|
|
17
|
+
productMediaId: z.ZodString;
|
|
18
|
+
sortKey: z.ZodNumber;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
sortKey?: number;
|
|
21
|
+
productMediaId?: string;
|
|
22
|
+
}, {
|
|
23
|
+
sortKey?: number;
|
|
24
|
+
productMediaId?: string;
|
|
25
|
+
}>, "many">;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
sortKeys?: {
|
|
28
|
+
sortKey?: number;
|
|
29
|
+
productMediaId?: string;
|
|
30
|
+
}[];
|
|
31
|
+
}, {
|
|
32
|
+
sortKeys?: {
|
|
33
|
+
sortKey?: number;
|
|
34
|
+
productMediaId?: string;
|
|
35
|
+
}[];
|
|
36
|
+
}>;
|
|
37
|
+
export type ReorderProductMediaParams = z.infer<typeof ReorderProductMediaZodSchema>;
|
|
38
|
+
export declare function reorderProductMediaHandler(context: Context, params: ReorderProductMediaParams): Promise<{
|
|
39
|
+
content: {
|
|
40
|
+
type: "text";
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=reorderProductMediaHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorderProductMediaHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/reorderProductMediaHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB;;;;;;;;;;;CAUrC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAErF,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,yBAAyB;;;;;GA2BnG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { log } from '@unchainedshop/logger';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const ReorderProductMediaSchema = {
|
|
4
|
+
sortKeys: z
|
|
5
|
+
.array(z.object({
|
|
6
|
+
productMediaId: z.string().min(1).describe('ID of the media asset'),
|
|
7
|
+
sortKey: z.number().int().describe('New sort key for ordering'),
|
|
8
|
+
}))
|
|
9
|
+
.min(1)
|
|
10
|
+
.describe('Array of product media IDs with their sort order'),
|
|
11
|
+
};
|
|
12
|
+
export const ReorderProductMediaZodSchema = z.object(ReorderProductMediaSchema);
|
|
13
|
+
export async function reorderProductMediaHandler(context, params) {
|
|
14
|
+
const { sortKeys } = params;
|
|
15
|
+
const { modules, userId } = context;
|
|
16
|
+
try {
|
|
17
|
+
log('mutation reorderProductMedia', { userId });
|
|
18
|
+
const reorderedMedia = await modules.products.media.updateManualOrder({ sortKeys: sortKeys });
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: 'text',
|
|
23
|
+
text: JSON.stringify({ reorderedMedia }, null, 2),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{
|
|
32
|
+
type: 'text',
|
|
33
|
+
text: `Error reordering product media: ${error.message}`,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=reorderProductMediaHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorderProductMediaHandler.js","sourceRoot":"","sources":["../../../src/mcp/tools/reorderProductMediaHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ,EAAE,CAAC;SACR,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACnE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;KAChE,CAAC,CACH;SACA,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,kDAAkD,CAAC;CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAIhF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,OAAgB,EAAE,MAAiC;IAClG,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEpC,IAAI,CAAC;QACH,GAAG,CAAC,8BAA8B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAEhD,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,CAAC,CAAC;QAErG,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBAClD;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,mCAAoC,KAAe,CAAC,OAAO,EAAE;iBACpE;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const UpdateLanguageSchema: {
|
|
4
|
+
languageId: z.ZodString;
|
|
5
|
+
language: z.ZodObject<{
|
|
6
|
+
isoCode: z.ZodString;
|
|
7
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
isoCode?: string;
|
|
11
|
+
}, {
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
isoCode?: string;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
export declare const UpdateLanguageZodSchema: z.ZodObject<{
|
|
17
|
+
languageId: z.ZodString;
|
|
18
|
+
language: z.ZodObject<{
|
|
19
|
+
isoCode: z.ZodString;
|
|
20
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
isActive?: boolean;
|
|
23
|
+
isoCode?: string;
|
|
24
|
+
}, {
|
|
25
|
+
isActive?: boolean;
|
|
26
|
+
isoCode?: string;
|
|
27
|
+
}>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
languageId?: string;
|
|
30
|
+
language?: {
|
|
31
|
+
isActive?: boolean;
|
|
32
|
+
isoCode?: string;
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
languageId?: string;
|
|
36
|
+
language?: {
|
|
37
|
+
isActive?: boolean;
|
|
38
|
+
isoCode?: string;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
export type UpdateLanguageParams = z.infer<typeof UpdateLanguageZodSchema>;
|
|
42
|
+
export declare function updateLanguageHandler(context: Context, params: UpdateLanguageParams): Promise<{
|
|
43
|
+
content: {
|
|
44
|
+
type: "text";
|
|
45
|
+
text: string;
|
|
46
|
+
}[];
|
|
47
|
+
}>;
|
|
48
|
+
//# sourceMappingURL=updateLanguageHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateLanguageHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/updateLanguageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAQ3C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;CAGhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;EAAiC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB;;;;;GA6BzF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LanguageNotFoundError } from '../../errors.js';
|
|
3
|
+
const UpdateLanguageInputSchema = z.object({
|
|
4
|
+
isoCode: z.string().min(2).max(10).describe('Updated ISO code for the language'),
|
|
5
|
+
isActive: z.boolean().optional().describe('Whether the language is active'),
|
|
6
|
+
});
|
|
7
|
+
export const UpdateLanguageSchema = {
|
|
8
|
+
languageId: z.string().min(1).describe('ID of the language to update'),
|
|
9
|
+
language: UpdateLanguageInputSchema,
|
|
10
|
+
};
|
|
11
|
+
export const UpdateLanguageZodSchema = z.object(UpdateLanguageSchema);
|
|
12
|
+
export async function updateLanguageHandler(context, params) {
|
|
13
|
+
const { languageId, language } = params;
|
|
14
|
+
const { modules } = context;
|
|
15
|
+
try {
|
|
16
|
+
if (!(await modules.languages.languageExists({ languageId })))
|
|
17
|
+
throw new LanguageNotFoundError({ languageId });
|
|
18
|
+
await modules.languages.update(languageId, language);
|
|
19
|
+
const updatedLanguage = await modules.languages.findLanguage({ languageId });
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: JSON.stringify({ language: updatedLanguage }),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'text',
|
|
34
|
+
text: `Error updating language: ${error.message}`,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=updateLanguageHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateLanguageHandler.js","sourceRoot":"","sources":["../../../src/mcp/tools/updateLanguageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,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AAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;iBACpD;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,4BAA6B,KAAe,CAAC,OAAO,EAAE;iBAC7D;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const UpdateProductMediaTextsSchema: {
|
|
4
|
+
productMediaId: z.ZodString;
|
|
5
|
+
texts: z.ZodArray<z.ZodObject<{
|
|
6
|
+
locale: z.ZodString;
|
|
7
|
+
title: z.ZodOptional<z.ZodString>;
|
|
8
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
locale?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
}, {
|
|
14
|
+
locale?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
}>, "many">;
|
|
18
|
+
};
|
|
19
|
+
export declare const UpdateProductMediaTextsZodSchema: z.ZodObject<{
|
|
20
|
+
productMediaId: z.ZodString;
|
|
21
|
+
texts: z.ZodArray<z.ZodObject<{
|
|
22
|
+
locale: z.ZodString;
|
|
23
|
+
title: z.ZodOptional<z.ZodString>;
|
|
24
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
locale?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
subtitle?: string;
|
|
29
|
+
}, {
|
|
30
|
+
locale?: string;
|
|
31
|
+
title?: string;
|
|
32
|
+
subtitle?: string;
|
|
33
|
+
}>, "many">;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
productMediaId?: string;
|
|
36
|
+
texts?: {
|
|
37
|
+
locale?: string;
|
|
38
|
+
title?: string;
|
|
39
|
+
subtitle?: string;
|
|
40
|
+
}[];
|
|
41
|
+
}, {
|
|
42
|
+
productMediaId?: string;
|
|
43
|
+
texts?: {
|
|
44
|
+
locale?: string;
|
|
45
|
+
title?: string;
|
|
46
|
+
subtitle?: string;
|
|
47
|
+
}[];
|
|
48
|
+
}>;
|
|
49
|
+
export type UpdateProductMediaTextsParams = z.infer<typeof UpdateProductMediaTextsZodSchema>;
|
|
50
|
+
export declare function updateProductMediaTextsHandler(context: Context, params: UpdateProductMediaTextsParams): Promise<{
|
|
51
|
+
content: {
|
|
52
|
+
type: "text";
|
|
53
|
+
text: string;
|
|
54
|
+
}[];
|
|
55
|
+
}>;
|
|
56
|
+
//# sourceMappingURL=updateProductMediaTextsHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProductMediaTextsHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/updateProductMediaTextsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CAYzC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0C,CAAC;AAExF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE7F,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,6BAA6B;;;;;GA+BtC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ProductMediaNotFoundError } from '../../errors.js';
|
|
3
|
+
export const UpdateProductMediaTextsSchema = {
|
|
4
|
+
productMediaId: z.string().min(1).describe('ID of the media asset to update'),
|
|
5
|
+
texts: z
|
|
6
|
+
.array(z.object({
|
|
7
|
+
locale: z.string().min(2).describe('Locale of the text, e.g. "en", "fr", etc.'),
|
|
8
|
+
title: z.string().optional().describe('Title in the given locale'),
|
|
9
|
+
subtitle: z.string().optional().describe('Subtitle in the given locale'),
|
|
10
|
+
}))
|
|
11
|
+
.min(1)
|
|
12
|
+
.describe('List of localized texts to update'),
|
|
13
|
+
};
|
|
14
|
+
export const UpdateProductMediaTextsZodSchema = z.object(UpdateProductMediaTextsSchema);
|
|
15
|
+
export async function updateProductMediaTextsHandler(context, params) {
|
|
16
|
+
const { productMediaId, texts } = params;
|
|
17
|
+
const { modules } = context;
|
|
18
|
+
try {
|
|
19
|
+
const productMedia = await modules.products.media.findProductMedia({
|
|
20
|
+
productMediaId,
|
|
21
|
+
});
|
|
22
|
+
if (!productMedia)
|
|
23
|
+
throw new ProductMediaNotFoundError({ productMediaId });
|
|
24
|
+
const updatedTexts = await modules.products.media.texts.updateMediaTexts(productMediaId, texts);
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: 'text',
|
|
29
|
+
text: JSON.stringify({ texts: updatedTexts }),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return {
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
type: 'text',
|
|
39
|
+
text: `Error updating product media texts: ${error.message}`,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=updateProductMediaTextsHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProductMediaTextsHandler.js","sourceRoot":"","sources":["../../../src/mcp/tools/updateProductMediaTextsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAA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gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAEhG,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;iBAC9C;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,uCAAwC,KAAe,CAAC,OAAO,EAAE;iBACxE;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNormalizedProductDetails.d.ts","sourceRoot":"","sources":["../../../src/mcp/utils/getNormalizedProductDetails.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,wBAAsB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getNormalizedProductDetails.d.ts","sourceRoot":"","sources":["../../../src/mcp/utils/getNormalizedProductDetails.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,wBAAsB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;GAqCpF"}
|
|
@@ -3,6 +3,8 @@ import normalizeMediaUrl from './normalizeMediaUrl.js';
|
|
|
3
3
|
export async function getNormalizedProductDetails(productId, context) {
|
|
4
4
|
const { modules, locale, loaders } = context;
|
|
5
5
|
const product = await modules.products.findProduct({ productId });
|
|
6
|
+
if (!product)
|
|
7
|
+
return null;
|
|
6
8
|
const texts = await loaders.productTextLoader.load({
|
|
7
9
|
productId,
|
|
8
10
|
locale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNormalizedProductDetails.js","sourceRoot":"","sources":["../../../src/mcp/utils/getNormalizedProductDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,SAAiB,EAAE,OAAgB;IACnF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"getNormalizedProductDetails.js","sourceRoot":"","sources":["../../../src/mcp/utils/getNormalizedProductDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,SAAiB,EAAE,OAAgB;IACnF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC7C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAElE,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC;QACjD,SAAS;QACT,MAAM;KACP,CAAC,CAAC;IACH,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,CAAC,mBAAmB;QACnD,UAAU,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;YAC3E,SAAS,EAAE,OAAO,CAAC,GAAG;SACvB,CAAC,CAAC;IAEL,0BAA0B;IAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;YAC7D,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,kDAAkD;QAClD,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACpF,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAE9D,OAAO;QACL,GAAG,OAAO;QACV,KAAK;QACL,KAAK;QACL,UAAU;QACV,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUser.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/createUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAW9C,wBAA8B,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO;;;
|
|
1
|
+
{"version":3,"file":"createUser.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/createUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAW9C,wBAA8B,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO;;;GAyCnG"}
|
|
@@ -14,15 +14,14 @@ export default async function createUser(root, params, context) {
|
|
|
14
14
|
...params,
|
|
15
15
|
initialPassword: false,
|
|
16
16
|
}, {});
|
|
17
|
-
|
|
18
|
-
user = await context.modules.users.updateHeartbeat(user._id, {
|
|
17
|
+
const user = await context.modules.users.updateHeartbeat(newUserId, {
|
|
19
18
|
remoteAddress: context.remoteAddress,
|
|
20
19
|
remotePort: context.remotePort,
|
|
21
20
|
userAgent: context.getHeader('user-agent'),
|
|
22
|
-
locale: context.
|
|
23
|
-
countryCode: context.
|
|
21
|
+
locale: context.locale.baseName,
|
|
22
|
+
countryCode: context.countryCode,
|
|
24
23
|
});
|
|
25
|
-
await context.services.orders.nextUserCart({ user, countryCode: context.
|
|
24
|
+
await context.services.orders.nextUserCart({ user, countryCode: context.countryCode });
|
|
26
25
|
return context.login(user);
|
|
27
26
|
}
|
|
28
27
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUser.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/createUser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,wCAAwC,EACxC,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,UAAU,CAAC,IAAW,EAAE,MAA4B,EAAE,OAAgB;IAClG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEpC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvF,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACtC,MAAM,IAAI,4BAA4B,CAAC,EAAE,CAAC,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C;IAC/F,CAAC;AACH,CAAC"}
|
|
@@ -11,7 +11,7 @@ const impersonate = async (root, { userId }, context) => {
|
|
|
11
11
|
}
|
|
12
12
|
await context.services.orders.nextUserCart({
|
|
13
13
|
user: userToImpersonate,
|
|
14
|
-
countryCode: context.
|
|
14
|
+
countryCode: context.countryCode,
|
|
15
15
|
});
|
|
16
16
|
return context.login(userToImpersonate, {
|
|
17
17
|
impersonator: context.user,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impersonate.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/impersonate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGpF,MAAM,WAAW,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,OAAgB,EAAE,EAAE;IAC/D,GAAG,CAAC,wBAAwB,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAElE,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAE3E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,2BAA2B,CAAC,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"impersonate.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/impersonate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGpF,MAAM,WAAW,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,OAAgB,EAAE,EAAE;IAC/D,GAAG,CAAC,wBAAwB,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAElE,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAE3E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,2BAA2B,CAAC,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE;QACtC,YAAY,EAAE,OAAO,CAAC,IAAI;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginAsGuest.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/loginAsGuest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO;;;
|
|
1
|
+
{"version":3,"file":"loginAsGuest.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/loginAsGuest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO;;;GAyB/E"}
|
|
@@ -10,15 +10,14 @@ export default async function loginAsGuest(root, _, context) {
|
|
|
10
10
|
password: null,
|
|
11
11
|
initialPassword: true,
|
|
12
12
|
}, { skipMessaging: true });
|
|
13
|
-
|
|
14
|
-
user = await context.modules.users.updateHeartbeat(user._id, {
|
|
13
|
+
const user = await context.modules.users.updateHeartbeat(guestUserId, {
|
|
15
14
|
remoteAddress: context.remoteAddress,
|
|
16
15
|
remotePort: context.remotePort,
|
|
17
16
|
userAgent: context.getHeader('user-agent'),
|
|
18
|
-
locale: context.
|
|
19
|
-
countryCode: context.
|
|
17
|
+
locale: context.locale.baseName,
|
|
18
|
+
countryCode: context.countryCode,
|
|
20
19
|
});
|
|
21
|
-
await context.services.orders.nextUserCart({ user, countryCode: context.
|
|
20
|
+
await context.services.orders.nextUserCart({ user, countryCode: context.countryCode });
|
|
22
21
|
return context.login(user);
|
|
23
22
|
}
|
|
24
23
|
//# sourceMappingURL=loginAsGuest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginAsGuest.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/loginAsGuest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AA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AE,aAAa,EAAE,IAAI,EAAE,CACxB,CAAC;IAEF,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,EAAE;QACpE,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC;QAC1C,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;QAC/B,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEvF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -21,13 +21,13 @@ export default async function loginWithPassword(root, params, context) {
|
|
|
21
21
|
remoteAddress: context.remoteAddress,
|
|
22
22
|
remotePort: context.remotePort,
|
|
23
23
|
userAgent: context.getHeader('user-agent'),
|
|
24
|
-
locale: context.
|
|
25
|
-
countryCode: context.
|
|
24
|
+
locale: context.locale.baseName,
|
|
25
|
+
countryCode: context.countryCode,
|
|
26
26
|
});
|
|
27
27
|
if (context.userId) {
|
|
28
28
|
await context.services.users.migrateUserData(context.userId, user._id);
|
|
29
29
|
}
|
|
30
|
-
await context.services.orders.nextUserCart({ user, countryCode: context.
|
|
30
|
+
await context.services.orders.nextUserCart({ user, countryCode: context.countryCode });
|
|
31
31
|
return context.login(user);
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=loginWithPassword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginWithPassword.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/loginWithPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB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C,CAAC;IAEjF,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,uBAAuB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAEtE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE;QAC3D,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC;QAC1C,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;QAC/B,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEvF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -13,13 +13,13 @@ export default async function loginWithWebAuthn(root, params, context) {
|
|
|
13
13
|
remoteAddress: context.remoteAddress,
|
|
14
14
|
remotePort: context.remotePort,
|
|
15
15
|
userAgent: context.getHeader('user-agent'),
|
|
16
|
-
locale: context.
|
|
17
|
-
countryCode: context.
|
|
16
|
+
locale: context.locale.baseName,
|
|
17
|
+
countryCode: context.countryCode,
|
|
18
18
|
});
|
|
19
19
|
if (context.userId) {
|
|
20
20
|
await context.services.users.migrateUserData(context.userId, user._id);
|
|
21
21
|
}
|
|
22
|
-
await context.services.orders.nextUserCart({ user, countryCode: context.
|
|
22
|
+
await context.services.orders.nextUserCart({ user, countryCode: context.countryCode });
|
|
23
23
|
return context.login(user);
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=loginWithWebAuthn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginWithWebAuthn.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/loginWithWebAuthn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAC7C,IAAW,EACX,MAEC,EACD,OAAgB;IAEhB,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAElC,MAAM,QAAQ,GACZ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,4BAA4B,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;IAEpG,IAAI,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACpE,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAErD,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAC/E,IAAI,CAAC,QAAQ,EAAE,QAAQ,EACvB,IAAI,CAAC,QAAQ,EACb,MAAM,CAAC,4BAA4B,CACpC,CAAC;IAEF,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,qBAAqB,EAAE,CAAC;IAErD,IAAI,GAAG,MAAM,OAAO,C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AC,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE;QAC3D,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC;QAC1C,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;QAC/B,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEvF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -11,13 +11,13 @@ export default async function resetPassword(root, params, context) {
|
|
|
11
11
|
remoteAddress: context.remoteAddress,
|
|
12
12
|
remotePort: context.remotePort,
|
|
13
13
|
userAgent: context.getHeader('user-agent'),
|
|
14
|
-
locale: context.
|
|
15
|
-
countryCode: context.
|
|
14
|
+
locale: context.locale.baseName,
|
|
15
|
+
countryCode: context.countryCode,
|
|
16
16
|
});
|
|
17
17
|
if (context.userId) {
|
|
18
18
|
await context.services.users.migrateUserData(context.userId, user._id);
|
|
19
19
|
}
|
|
20
|
-
await context.services.orders.nextUserCart({ user, countryCode: context.
|
|
20
|
+
await context.services.orders.nextUserCart({ user, countryCode: context.countryCode });
|
|
21
21
|
return context.login(user);
|
|
22
22
|
}
|
|
23
23
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetPassword.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/resetPassword.ts"],"names":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CAAC,CAAC;IAE1C,IAAI,CAAC;QACH,IAAI,IAAI,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QAC/E,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,sBAAsB,CAAC,EAAE,CAAC,CAAC;QAEhD,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE;YAC3D,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC;YAC1C,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;YAC/B,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACzE,CAAC;QAED,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;QAEvF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,CAAC,KAAK,KAAK,kBAAkB;YAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAC;;YAClE,MAAM,CAAC,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -11,7 +11,7 @@ export default async function stopImpersonation(root, _, context) {
|
|
|
11
11
|
await context.logout();
|
|
12
12
|
await context.services.orders.nextUserCart({
|
|
13
13
|
user: impersonator,
|
|
14
|
-
countryCode: context.
|
|
14
|
+
countryCode: context.countryCode,
|
|
15
15
|
});
|
|
16
16
|
return context.login(impersonator);
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stopImpersonation.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/stopImpersonation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAW,EAAE,CAAC,EAAE,OAAgB;IAC9E,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IAEpD,GAAG,CAAC,kCAAkC,MAAM,EAAE,CAAC,CAAC;IAEhD,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IAEtE,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;IAE3E,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC;IAEvB,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"stopImpersonation.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/stopImpersonation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAW,EAAE,CAAC,EAAE,OAAgB;IAC9E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