@unchainedshop/api 3.1.11 → 4.0.0-rc.2
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/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 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +2 -0
- package/lib/errors.js.map +1 -1
- 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 +8 -0
- package/lib/express/createMCPMiddleware.d.ts.map +1 -0
- package/lib/express/createMCPMiddleware.js +46 -0
- package/lib/express/createMCPMiddleware.js.map +1 -0
- package/lib/express/index.d.ts.map +1 -1
- package/lib/express/index.js +0 -2
- package/lib/express/index.js.map +1 -1
- package/lib/express/mcpHandler.d.ts.map +1 -0
- package/lib/express/mcpHandler.js +68 -0
- package/lib/express/mcpHandler.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 copy.d.ts.map +1 -0
- package/lib/fastify/index copy.js +157 -0
- package/lib/fastify/index copy.js.map +1 -0
- package/lib/fastify/index.d.ts.map +1 -1
- package/lib/fastify/index.js +0 -3
- package/lib/fastify/index.js.map +1 -1
- package/lib/fastify/mcpHandler.d.ts +8 -0
- package/lib/fastify/mcpHandler.d.ts.map +1 -0
- package/lib/fastify/mcpHandler.js +46 -0
- package/lib/fastify/mcpHandler.js.map +1 -0
- package/lib/loaders/assortmentLinkLoader.d.ts +12 -0
- package/lib/loaders/assortmentLinkLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentLinkLoader.js +23 -0
- package/lib/loaders/assortmentLinkLoader.js.map +1 -0
- package/lib/loaders/assortmentLinksLoader.d.ts +14 -0
- package/lib/loaders/assortmentLinksLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentLinksLoader.js +38 -0
- package/lib/loaders/assortmentLinksLoader.js.map +1 -0
- package/lib/loaders/assortmentLoader.d.ts +10 -0
- package/lib/loaders/assortmentLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentLoader.js +15 -0
- package/lib/loaders/assortmentLoader.js.map +1 -0
- package/lib/loaders/assortmentMediaTextLoader.d.ts +12 -0
- package/lib/loaders/assortmentMediaTextLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentMediaTextLoader.js +15 -0
- package/lib/loaders/assortmentMediaTextLoader.js.map +1 -0
- package/lib/loaders/assortmentMediasLoader.d.ts +10 -0
- package/lib/loaders/assortmentMediasLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentMediasLoader.js +18 -0
- package/lib/loaders/assortmentMediasLoader.js.map +1 -0
- package/lib/loaders/assortmentProductLoader.d.ts +12 -0
- package/lib/loaders/assortmentProductLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentProductLoader.js +14 -0
- package/lib/loaders/assortmentProductLoader.js.map +1 -0
- package/lib/loaders/assortmentProductsLoader.d.ts +10 -0
- package/lib/loaders/assortmentProductsLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentProductsLoader.js +18 -0
- package/lib/loaders/assortmentProductsLoader.js.map +1 -0
- package/lib/loaders/assortmentTextLoader.d.ts +12 -0
- package/lib/loaders/assortmentTextLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentTextLoader.js +15 -0
- package/lib/loaders/assortmentTextLoader.js.map +1 -0
- package/lib/loaders/buildTextMap.d.ts +2 -2
- package/lib/loaders/buildTextMap.d.ts.map +1 -1
- package/lib/loaders/countryLoader.d.ts +10 -0
- package/lib/loaders/countryLoader.d.ts.map +1 -0
- package/lib/loaders/countryLoader.js +14 -0
- package/lib/loaders/countryLoader.js.map +1 -0
- package/lib/loaders/currencyLoader.d.ts +10 -0
- package/lib/loaders/currencyLoader.d.ts.map +1 -0
- package/lib/loaders/currencyLoader.js +14 -0
- package/lib/loaders/currencyLoader.js.map +1 -0
- package/lib/loaders/deliveryProviderLoader.d.ts +10 -0
- package/lib/loaders/deliveryProviderLoader.d.ts.map +1 -0
- package/lib/loaders/deliveryProviderLoader.js +13 -0
- package/lib/loaders/deliveryProviderLoader.js.map +1 -0
- package/lib/loaders/fileLoader.d.ts +10 -0
- package/lib/loaders/fileLoader.d.ts.map +1 -0
- package/lib/loaders/fileLoader.js +13 -0
- package/lib/loaders/fileLoader.js.map +1 -0
- package/lib/loaders/filterLoader.d.ts +10 -0
- package/lib/loaders/filterLoader.d.ts.map +1 -0
- package/lib/loaders/filterLoader.js +14 -0
- package/lib/loaders/filterLoader.js.map +1 -0
- package/lib/loaders/filterTextLoader.d.ts +14 -0
- package/lib/loaders/filterTextLoader.d.ts.map +1 -0
- package/lib/loaders/filterTextLoader.js +15 -0
- package/lib/loaders/filterTextLoader.js.map +1 -0
- package/lib/loaders/index.d.ts +79 -49
- package/lib/loaders/index.d.ts.map +1 -1
- package/lib/loaders/index.js +47 -268
- package/lib/loaders/index.js.map +1 -1
- package/lib/loaders/languageLoader.d.ts +10 -0
- package/lib/loaders/languageLoader.d.ts.map +1 -0
- package/lib/loaders/languageLoader.js +14 -0
- package/lib/loaders/languageLoader.js.map +1 -0
- package/lib/loaders/orderLoader.d.ts +10 -0
- package/lib/loaders/orderLoader.d.ts.map +1 -0
- package/lib/loaders/orderLoader.js +16 -0
- package/lib/loaders/orderLoader.js.map +1 -0
- package/lib/loaders/paymentProviderLoader.d.ts +10 -0
- package/lib/loaders/paymentProviderLoader.d.ts.map +1 -0
- package/lib/loaders/paymentProviderLoader.js +13 -0
- package/lib/loaders/paymentProviderLoader.js.map +1 -0
- package/lib/loaders/productLoader.d.ts +10 -0
- package/lib/loaders/productLoader.d.ts.map +1 -0
- package/lib/loaders/productLoader.js +16 -0
- package/lib/loaders/productLoader.js.map +1 -0
- package/lib/loaders/productLoaderBySKU.d.ts +10 -0
- package/lib/loaders/productLoaderBySKU.d.ts.map +1 -0
- package/lib/loaders/productLoaderBySKU.js +16 -0
- package/lib/loaders/productLoaderBySKU.js.map +1 -0
- package/lib/loaders/productMediaTextLoader.d.ts +12 -0
- package/lib/loaders/productMediaTextLoader.d.ts.map +1 -0
- package/lib/loaders/productMediaTextLoader.js +15 -0
- package/lib/loaders/productMediaTextLoader.js.map +1 -0
- package/lib/loaders/productMediasLoader.d.ts +10 -0
- package/lib/loaders/productMediasLoader.d.ts.map +1 -0
- package/lib/loaders/productMediasLoader.js +18 -0
- package/lib/loaders/productMediasLoader.js.map +1 -0
- package/lib/loaders/productTextLoader.d.ts +12 -0
- package/lib/loaders/productTextLoader.d.ts.map +1 -0
- package/lib/loaders/productTextLoader.js +15 -0
- package/lib/loaders/productTextLoader.js.map +1 -0
- package/lib/loaders/userLoader.d.ts +10 -0
- package/lib/loaders/userLoader.d.ts.map +1 -0
- package/lib/loaders/userLoader.js +17 -0
- package/lib/loaders/userLoader.js.map +1 -0
- package/lib/loaders/utils.d.ts +7 -0
- package/lib/loaders/utils.d.ts.map +1 -0
- package/lib/loaders/utils.js +29 -0
- package/lib/loaders/utils.js.map +1 -0
- 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 +95 -0
- package/lib/mcp/index.d.ts.map +1 -0
- package/lib/mcp/index.js +138 -0
- package/lib/mcp/index.js.map +1 -0
- package/lib/mcp/server.d.ts +4 -0
- package/lib/mcp/server.d.ts.map +1 -0
- package/lib/mcp/server.js +60 -0
- package/lib/mcp/server.js.map +1 -0
- package/lib/mcp/types.d.ts +28 -0
- package/lib/mcp/types.d.ts.map +1 -0
- package/lib/mcp/types.js +2 -0
- package/lib/mcp/types.js.map +1 -0
- package/lib/middleware/accountLockout.d.ts.map +1 -0
- package/lib/middleware/accountLockout.js +84 -0
- package/lib/middleware/accountLockout.js.map +1 -0
- package/lib/middleware/rateLimiter.d.ts.map +1 -0
- package/lib/middleware/rateLimiter.js +91 -0
- package/lib/middleware/rateLimiter.js.map +1 -0
- package/lib/plugins/inputValidation.d.ts.map +1 -0
- package/lib/plugins/inputValidation.js +95 -0
- package/lib/plugins/inputValidation.js.map +1 -0
- 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.js +2 -2
- package/lib/resolvers/queries/filters/searchAssortments.js.map +1 -1
- package/lib/resolvers/queries/filters/searchProducts.js +3 -3
- 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.d.ts.map +1 -1
- package/lib/roles/all.js +0 -1
- package/lib/roles/all.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/lib/utils/inputValidation.d.ts.map +1 -0
- package/lib/utils/inputValidation.js +51 -0
- package/lib/utils/inputValidation.js.map +1 -0
- package/package.json +12 -12
- package/src/context.ts +3 -3
- package/src/createGraphQLServer.ts +2 -2
- package/src/errors.ts +10 -0
- package/src/express/createERCMetadataMiddleware.ts +11 -5
- package/src/express/index.ts +2 -3
- package/src/fastify/ercMetadataHandler.ts +11 -5
- package/src/fastify/index.ts +2 -3
- 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/buildTextMap.ts +1 -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 -360
- 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/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 +50 -3
- 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 -2
- package/src/resolvers/queries/filters/searchProducts.ts +3 -3
- 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 +0 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCart.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/createCart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAGnE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,UAAU,CACtC,IAAW,EACX,EAAE,WAAW,EAA2B,EACxC,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACpD,GAAG,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9D,IAAI,KAAK;QAAE,MAAM,IAAI,6BAA6B,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAEpE,OAAO,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;QAClC,IAAI;QACJ,WAAW;QACX,WAAW,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"createCart.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/createCart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAGnE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,UAAU,CACtC,IAAW,EACX,EAAE,WAAW,EAA2B,EACxC,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACpD,GAAG,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9D,IAAI,KAAK;QAAE,MAAM,IAAI,6BAA6B,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAEpE,OAAO,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;QAClC,IAAI;QACJ,WAAW;QACX,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,iBAAiB,EAAE,IAAI;KACxB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,7 +6,7 @@ export default async function emptyCart(root, { orderId }, context) {
|
|
|
6
6
|
const order = await services.orders.findOrInitCart({
|
|
7
7
|
orderId,
|
|
8
8
|
user,
|
|
9
|
-
countryCode: context.
|
|
9
|
+
countryCode: context.countryCode,
|
|
10
10
|
});
|
|
11
11
|
if (!order)
|
|
12
12
|
throw new OrderNotFoundError({ orderId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyCart.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/emptyCart.ts"],"names":[],"mappings":"AAAA,OA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MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,qBAAqB,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAE7F,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAEvE,OAAO,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signPaymentProviderForCheckout.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,8BAA8B,CAC1D,IAAW,EACX,MAA2D,EAC3D,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IAEtD,GAAG,CAAC,2CAA2C,cAAc,EAAE,EAAE;QAC/D,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,YAAY,CAAC;IAEjB,IAAI,cAAc,EAAE,CAAC;QACnB,YAAY,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAC5D,cAAc;SACf,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YAAE,MAAM,IAAI,yBAAyB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7E,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;YACtC,WAAW,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"signPaymentProviderForCheckout.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,8BAA8B,CAC1D,IAAW,EACX,MAA2D,EAC3D,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IAEtD,GAAG,CAAC,2CAA2C,cAAc,EAAE,EAAE;QAC/D,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,YAAY,CAAC;IAEjB,IAAI,cAAc,EAAE,CAAC;QACnB,YAAY,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAC5D,cAAc;SACf,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YAAE,MAAM,IAAI,yBAAyB,CAAC,EAAE,cAAc,EAAE,CAAC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CAAC,IAAI,EAAE,CAAC;QAElC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,8BAA8B,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;AACH,CAAC"}
|
|
@@ -7,7 +7,7 @@ export default async function updateCart(root, params, context) {
|
|
|
7
7
|
let order = await services.orders.findOrInitCart({
|
|
8
8
|
orderId,
|
|
9
9
|
user,
|
|
10
|
-
countryCode: context.
|
|
10
|
+
countryCode: context.countryCode,
|
|
11
11
|
});
|
|
12
12
|
if (!order)
|
|
13
13
|
throw new OrderNotFoundError({ orderId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCart.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/updateCart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAY/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,UAAU,CAAC,IAAW,EAAE,MAAwB,EAAE,OAAgB;IAC9F,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAEjG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEpD,GAAG,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvC,IAAI,KAAK,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;QAC/C,OAAO;QACP,IAAI;QACJ,WAAW,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"updateCart.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/updateCart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,M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AAO,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,iBAAiB,EAAE,CAAC;QACtB,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAChF,CAAC;IAED,IAAI,kBAAkB,EAAE,CAAC;QACvB,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;IAClF,CAAC;IAED,2BAA2B;IAC3B,OAAO,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { Context } from '../../../context.js';
|
|
|
2
2
|
export default function updateCartItem(root: never, params: {
|
|
3
3
|
itemId: string;
|
|
4
4
|
quantity?: number;
|
|
5
|
-
configuration?:
|
|
5
|
+
configuration?: {
|
|
6
6
|
key: string;
|
|
7
7
|
value: string;
|
|
8
|
-
}
|
|
8
|
+
}[];
|
|
9
9
|
}, context: Context): Promise<import("@unchainedshop/core-orders").OrderPosition>;
|
|
10
10
|
//# sourceMappingURL=updateCartItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCartItem.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/updateCartItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAU9C,wBAA8B,cAAc,CAC1C,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IACN,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE
|
|
1
|
+
{"version":3,"file":"updateCartItem.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/orders/updateCartItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAU9C,wBAA8B,cAAc,CAC1C,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IACN,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClD,EACD,OAAO,EAAE,OAAO,+DAyCjB"}
|
|
@@ -3,6 +3,6 @@ import { ProductConfiguration } from '@unchainedshop/core-products';
|
|
|
3
3
|
export default function addProductAssignment(root: never, params: {
|
|
4
4
|
proxyId: string;
|
|
5
5
|
productId: string;
|
|
6
|
-
vectors:
|
|
6
|
+
vectors: ProductConfiguration[];
|
|
7
7
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-products").Product>;
|
|
8
8
|
//# sourceMappingURL=addProductAssignment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProductAssignment.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/addProductAssignment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"addProductAssignment.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/addProductAssignment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAmCpE,wBAA8B,oBAAoB,CAChD,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IACN,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC,EACD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,2DA6C7B"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
2
|
import { ProductTypes } from '@unchainedshop/core-products';
|
|
3
|
-
import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js';
|
|
3
|
+
import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError, ProductVariationVectorInvalid, ProductVariationVectorAlreadySet, } from '../../../errors.js';
|
|
4
|
+
const extractVariationMatrix = (variations = []) => {
|
|
5
|
+
const cartesianProduct = (arrays) => {
|
|
6
|
+
return arrays.reduce((acc, array) => acc.flatMap((item) => array.map((value) => [...item, value])), [[]]);
|
|
7
|
+
};
|
|
8
|
+
const keys = variations.map((item) => item.key);
|
|
9
|
+
const options = variations.map((item) => item.options);
|
|
10
|
+
const combinations = cartesianProduct(options);
|
|
11
|
+
return combinations.map((combination) => combination.reduce((acc, value, index) => {
|
|
12
|
+
acc[keys[index]] = value;
|
|
13
|
+
return acc;
|
|
14
|
+
}, {}));
|
|
15
|
+
};
|
|
16
|
+
const combinationExists = (matrix, combination) => {
|
|
17
|
+
return matrix.some((variation) => {
|
|
18
|
+
return (Object.keys(variation).length === Object.keys(combination).length && // Ensure both have the same number of keys
|
|
19
|
+
Object.entries(combination).every(([key, value]) => variation[key] === value));
|
|
20
|
+
});
|
|
21
|
+
};
|
|
4
22
|
export default async function addProductAssignment(root, params, { modules, userId }) {
|
|
5
23
|
const { proxyId, productId, vectors } = params;
|
|
6
24
|
log(`mutation addProductAssignment ${proxyId} ${productId}`, { userId });
|
|
@@ -21,10 +39,25 @@ export default async function addProductAssignment(root, params, { modules, user
|
|
|
21
39
|
received: proxyProduct.type,
|
|
22
40
|
required: ProductTypes.ConfigurableProduct,
|
|
23
41
|
});
|
|
24
|
-
await modules.products.
|
|
42
|
+
const variations = await modules.products.variations.findProductVariations({
|
|
43
|
+
productId: proxyId,
|
|
44
|
+
});
|
|
45
|
+
const variationMatrix = extractVariationMatrix(variations);
|
|
46
|
+
const normalizedVectors = vectors?.reduce((prev, { key, value }) => {
|
|
47
|
+
return {
|
|
48
|
+
...prev,
|
|
49
|
+
[key]: value,
|
|
50
|
+
};
|
|
51
|
+
}, {});
|
|
52
|
+
if (!combinationExists(variationMatrix, normalizedVectors))
|
|
53
|
+
throw new ProductVariationVectorInvalid({ proxyId, vectors });
|
|
54
|
+
const added = await modules.products.assignments.addProxyAssignment({
|
|
55
|
+
productId,
|
|
25
56
|
proxyId,
|
|
26
57
|
vectors,
|
|
27
58
|
});
|
|
59
|
+
if (!added)
|
|
60
|
+
throw new ProductVariationVectorAlreadySet({ proxyId, vectors });
|
|
28
61
|
return modules.products.findProduct({ productId: proxyId });
|
|
29
62
|
}
|
|
30
63
|
//# sourceMappingURL=addProductAssignment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProductAssignment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/addProductAssignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D,OAAO,
|
|
1
|
+
{"version":3,"file":"addProductAssignment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/addProductAssignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,oBAAoB,CAAC;AAC5B,MAAM,sBAAsB,GAAG,CAAC,UAAU,GAAG,EAAE,EAAE,EAAE;IACjD,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,EAAE;QAClC,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,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AAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE;QACjE,OAAO;YACL,GAAG,IAAI;YACP,CAAC,GAAG,CAAC,EAAE,KAAK;SACb,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,iBAAiB,CAAC;QACxD,MAAM,IAAI,6BAA6B,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAEhE,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,kBAAkB,CAAC;QAClE,SAAS;QACT,OAAO;QACP,OAAO;KACR,CAAC,CAAC;IAEH,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,gCAAgC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAE7E,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Context } from '../../../context.js';
|
|
2
2
|
import { ProductVariationType } from '@unchainedshop/core-products';
|
|
3
|
-
export
|
|
3
|
+
export interface VariationInputText {
|
|
4
4
|
locale: string;
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: string;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
export default function F(root: never, params: {
|
|
9
9
|
productId: string;
|
|
10
10
|
variation: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProductVariation.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/createProductVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,
|
|
1
|
+
{"version":3,"file":"createProductVariation.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/createProductVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAA8B,CAAC,CAC7B,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,oBAAoB,CAAC;KAC5B,CAAC;IACF,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B,EACD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,oEA6B7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProductVariation.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/createProductVariation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"createProductVariation.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/createProductVariation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AASjG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,CAC7B,IAAW,EACX,MAOC,EACD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAE/C,GAAG,CAAC,mCAAmC,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEhE,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAClE,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAE5D,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,CAAC,mBAAmB;QACnD,MAAM,IAAI,qBAAqB,CAAC;YAC9B,SAAS;YACT,QAAQ,EAAE,OAAO,CAAC,IAAI;YACtB,QAAQ,EAAE,YAAY,CAAC,mBAAmB;SAC3C,CAAC,CAAC;IAEL,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC;QAC5D,OAAO,EAAE,EAAE;QACX,SAAS;QACT,GAAG,SAAS;KACb,CAAC,CAAC;IAEH,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,oBAAoB,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACxF,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -2,6 +2,6 @@ import { Context } from '../../../context.js';
|
|
|
2
2
|
import { ProductConfiguration } from '@unchainedshop/core-products';
|
|
3
3
|
export default function removeProductAssignment(root: never, params: {
|
|
4
4
|
proxyId: string;
|
|
5
|
-
vectors:
|
|
5
|
+
vectors: ProductConfiguration[];
|
|
6
6
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-products").Product>;
|
|
7
7
|
//# sourceMappingURL=removeProductAssignment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeProductAssignment.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/removeProductAssignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAKpE,wBAA8B,uBAAuB,CACnD,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"removeProductAssignment.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/removeProductAssignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAKpE,wBAA8B,uBAAuB,CACnD,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAAE,EAC5D,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,2DAoB7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeProductAssignment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/removeProductAssignment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,uBAAuB,CACnD,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"removeProductAssignment.js","sourceRoot":"","sources":["../../../../src/resolv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.js';
|
|
2
2
|
export default function reorderProductMedia(root: never, params: {
|
|
3
|
-
sortKeys:
|
|
3
|
+
sortKeys: {
|
|
4
4
|
productMediaId: string;
|
|
5
5
|
sortKey: number;
|
|
6
|
-
}
|
|
6
|
+
}[];
|
|
7
7
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-products").ProductMedia[]>;
|
|
8
8
|
//# sourceMappingURL=reorderProductMedia.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorderProductMedia.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/reorderProductMedia.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,mBAAmB,CAC/C,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,QAAQ,EAAE
|
|
1
|
+
{"version":3,"file":"reorderProductMedia.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/reorderProductMedia.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,mBAAmB,CAC/C,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,QAAQ,EAAE;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EACnE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,kEAO7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorderProductMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/reorderProductMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,mBAAmB,CAC/C,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"reorderProductMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/reorderProductMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,mBAAmB,CAC/C,IAAW,EACX,MAAmE,EACnE,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAEjC,GAAG,CAAC,8BAA8B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEhD,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -2,6 +2,6 @@ import { Context } from '../../../context.js';
|
|
|
2
2
|
import { ProductMediaText } from '@unchainedshop/core-products';
|
|
3
3
|
export default function updateProductMediaTexts(root: never, { productMediaId, texts }: {
|
|
4
4
|
productMediaId: string;
|
|
5
|
-
texts:
|
|
5
|
+
texts: ProductMediaText[];
|
|
6
6
|
}, { modules, userId }: Context): Promise<ProductMediaText[]>;
|
|
7
7
|
//# sourceMappingURL=updateProductMediaTexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProductMediaTexts.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductMediaTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,wBAA8B,uBAAuB,CACnD,IAAI,EAAE,KAAK,EACX,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"updateProductMediaTexts.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductMediaTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,wBAA8B,uBAAuB,CACnD,IAAI,EAAE,KAAK,EACX,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,EAChF,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,+BAY7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProductMediaTexts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductMediaTexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,uBAAuB,CACnD,IAAW,EACX,EAAE,cAAc,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"updateProductMediaTexts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductMediaTexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,uBAAuB,CACnD,IAAW,EACX,EAAE,cAAc,EAAE,KAAK,EAAyD,EAChF,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,oCAAoC,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtE,IAAI,CAAC,cAAc;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;IAElE,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC;QACjE,cAAc;KACf,CAAC,CAAC;IACH,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,yBAAyB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;IAE3E,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { ProductVariationText } from '@unchainedshop/core-products';
|
|
|
3
3
|
export default function F(root: never, params: {
|
|
4
4
|
productVariationId: string;
|
|
5
5
|
productVariationOptionValue?: string;
|
|
6
|
-
texts:
|
|
6
|
+
texts: ProductVariationText[];
|
|
7
7
|
}, { modules, userId }: Context): Promise<ProductVariationText[]>;
|
|
8
8
|
//# sourceMappingURL=updateProductVariationTexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProductVariationTexts.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductVariationTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,wBAA8B,CAAC,CAC7B,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IACN,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"updateProductVariationTexts.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductVariationTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,wBAA8B,CAAC,CAC7B,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IACN,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,KAAK,EAAE,oBAAoB,EAAE,CAAC;CAC/B,EACD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,mCAkB7B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Context } from '../../../context.js';
|
|
2
2
|
export default function requestQuotation(root: never, params: {
|
|
3
3
|
productId: string;
|
|
4
|
-
configuration:
|
|
4
|
+
configuration: {
|
|
5
5
|
key: string;
|
|
6
6
|
value: string;
|
|
7
|
-
}
|
|
7
|
+
}[];
|
|
8
8
|
}, context: Context): Promise<import("@unchainedshop/core-quotations").Quotation>;
|
|
9
9
|
//# sourceMappingURL=requestQuotation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestQuotation.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/quotations/requestQuotation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,gBAAgB,CAC5C,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE
|
|
1
|
+
{"version":3,"file":"requestQuotation.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/quotations/requestQuotation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,gBAAgB,CAC5C,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EAC9E,OAAO,EAAE,OAAO,+DAuBjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
2
|
import { ProductNotFoundError, InvalidIdError } from '../../../errors.js';
|
|
3
3
|
export default async function requestQuotation(root, params, context) {
|
|
4
|
-
const {
|
|
4
|
+
const { countryCode, currencyCode, modules, services, userId } = context;
|
|
5
5
|
const { productId, configuration } = params;
|
|
6
6
|
log(`mutation requestQuotation ${productId} ${configuration ? JSON.stringify(configuration) : ''}`, {
|
|
7
7
|
userId,
|
|
@@ -13,8 +13,8 @@ export default async function requestQuotation(root, params, context) {
|
|
|
13
13
|
const newQuotation = await modules.quotations.create({
|
|
14
14
|
userId,
|
|
15
15
|
productId,
|
|
16
|
-
countryCode
|
|
17
|
-
|
|
16
|
+
countryCode,
|
|
17
|
+
currencyCode,
|
|
18
18
|
configuration,
|
|
19
19
|
});
|
|
20
20
|
return services.quotations.processQuotation(newQuotation, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestQuotation.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/quotations/requestQuotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"requestQuotation.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/quotations/requestQuotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAW,EACX,MAA8E,EAC9E,OAAgB;IAEhB,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACzE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;IAE5C,GAAG,CAAC,6BAA6B,SAAS,IAAI,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;QAClG,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACxD,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAEhD,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QACnD,MAAM;QACN,SAAS;QACT,WAAW;QACX,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Context } from '../../../context.js';
|
|
2
|
-
export default function heartbeat(root: never, _: any, {
|
|
2
|
+
export default function heartbeat(root: never, _: any, { countryCode, locale, modules, remoteAddress, remotePort, userId, getHeader }: Context): Promise<import("@unchainedshop/core-users").User>;
|
|
3
3
|
//# sourceMappingURL=heartbeat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/heartbeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,SAAS,CACrC,IAAI,EAAE,KAAK,EACX,CAAC,EAAE,GAAG,EACN,EAAE,
|
|
1
|
+
{"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/heartbeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,SAAS,CACrC,IAAI,EAAE,KAAK,EACX,CAAC,EAAE,GAAG,EACN,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,OAAO,qDAmBxF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
2
|
import { UserNotFoundError } from '../../../errors.js';
|
|
3
|
-
export default async function heartbeat(root, _, {
|
|
3
|
+
export default async function heartbeat(root, _, { countryCode, locale, modules, remoteAddress, remotePort, userId, getHeader }) {
|
|
4
4
|
log(`mutation heartbeat`, { userId });
|
|
5
5
|
if (!userId)
|
|
6
6
|
throw new UserNotFoundError({ userId });
|
|
@@ -8,8 +8,8 @@ export default async function heartbeat(root, _, { countryContext, localeContext
|
|
|
8
8
|
throw new UserNotFoundError({ userId });
|
|
9
9
|
}
|
|
10
10
|
const user = await modules.users.updateHeartbeat(userId, {
|
|
11
|
-
countryCode
|
|
12
|
-
locale:
|
|
11
|
+
countryCode,
|
|
12
|
+
locale: locale.baseName,
|
|
13
13
|
remoteAddress,
|
|
14
14
|
remotePort,
|
|
15
15
|
userAgent: getHeader('user-agent'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/heartbeat.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,SAAS,CACrC,IAAW,EACX,CAAM,EACN,EAAE,
|
|
1
|
+
{"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/heartbeat.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,SAAS,CACrC,IAAW,EACX,CAAM,EACN,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAW;IAEvF,GAAG,CAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAErD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE;QACvD,WAAW;QACX,MAAM,EAAE,MAAM,CAAC,QAAQ;QACvB,aAAa;QACb,UAAU;QACV,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC;KACnC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from '../../../context.js';
|
|
2
2
|
export default function setRoles(root: never, params: {
|
|
3
|
-
roles:
|
|
3
|
+
roles: string[];
|
|
4
4
|
userId: string;
|
|
5
5
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-users").User>;
|
|
6
6
|
//# sourceMappingURL=setRoles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setRoles.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setRoles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,wBAA8B,QAAQ,CACpC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"setRoles.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setRoles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,wBAA8B,QAAQ,CACpC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,qDAW7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setRoles.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setRoles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,QAAQ,CACpC,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"setRoles.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setRoles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,QAAQ,CACpC,IAAW,EACX,MAA2C,EAC3C,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IAEpC,GAAG,CAAC,qBAAqB,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtD,IAAI,CAAC,aAAa;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC;IAChE,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;QAC9D,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;IAEzD,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from '../../../context.js';
|
|
2
2
|
export default function setUserTags(root: never, params: {
|
|
3
|
-
tags:
|
|
3
|
+
tags: string[];
|
|
4
4
|
userId: string;
|
|
5
5
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-users").User>;
|
|
6
6
|
//# sourceMappingURL=setUserTags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setUserTags.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setUserTags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,wBAA8B,WAAW,CACvC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"setUserTags.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setUserTags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,wBAA8B,WAAW,CACvC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC1C,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,qDAW7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setUserTags.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setUserTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,WAAW,CACvC,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"setUserTags.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/users/setUserTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,WAAW,CACvC,IAAW,EACX,MAA0C,EAC1C,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAEvC,GAAG,CAAC,wBAAwB,gBAAgB,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE5D,IAAI,CAAC,gBAAgB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACtE,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAE5D,OAAO,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -15,9 +15,7 @@ export default async function invalidateToken(root, { tokenId }, context) {
|
|
|
15
15
|
const product = await modules.products.findProduct({ productId: token.productId });
|
|
16
16
|
if (!product)
|
|
17
17
|
throw new ProductNotFoundError({ productId: token.productId });
|
|
18
|
-
const virtualProviders = await context.modules.warehousing.
|
|
19
|
-
type: WarehousingProviderType.VIRTUAL,
|
|
20
|
-
});
|
|
18
|
+
const virtualProviders = (await context.modules.warehousing.allProviders()).filter(({ type }) => type === WarehousingProviderType.VIRTUAL);
|
|
21
19
|
const isInvalidateable = await WarehousingDirector.isInvalidateable(virtualProviders, {
|
|
22
20
|
token,
|
|
23
21
|
product,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invalidateToken.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/warehousing/invalidateToken.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,eAAe,CAC3C,IAAW,EACX,EAAE,OAAO,EAAuB,EAChC,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACpC,GAAG,CAAC,4BAA4B,OAAO,EAAE,EAAE;QACzC,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAEpD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/D,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,kBAAkB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAEtD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,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C,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IAE7E,MAAM,gBAAgB,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,MAAM,CAChF,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,uBAAuB,CAAC,OAAO,CACvD,CAAC;IAEF,MAAM,gBAAgB,GAAG,MAAM,mBAAmB,CAAC,gBAAgB,CACjE,gBAAgB,EAChB;QACE,KAAK;QACL,OAAO;QACP,QAAQ,EAAE,KAAK,EAAE,QAAQ,IAAI,CAAC;QAC9B,aAAa,EAAE,IAAI,IAAI,EAAE;KAC1B,EACD,OAAO,CACR,CAAC;IAEF,IAAI,CAAC,gBAAgB;QAAE,MAAM,IAAI,qBAAqB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAEpE,OAAO,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from '../../../context.js';
|
|
2
2
|
export default function allocateWork(root: never, { types, worker }: {
|
|
3
|
-
types?:
|
|
3
|
+
types?: string[];
|
|
4
4
|
worker?: string;
|
|
5
5
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-worker").Work>;
|
|
6
6
|
//# sourceMappingURL=allocateWork.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocateWork.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/worker/allocateWork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,YAAY,CACxC,IAAI,EAAE,KAAK,EACX,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"allocateWork.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/mutations/worker/allocateWork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,wBAA8B,YAAY,CACxC,IAAI,EAAE,KAAK,EACX,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EACxD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,sDAO7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocateWork.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/worker/allocateWork.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,YAAY,CACxC,IAAW,EACX,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"allocateWork.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/worker/allocateWork.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,YAAY,CACxC,IAAW,EACX,EAAE,KAAK,EAAE,MAAM,EAAyC,EACxD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,yBAAyB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,EAAE,EAAE;QAChE,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -4,6 +4,6 @@ import { Context } from '../../../context.js';
|
|
|
4
4
|
export default function assortments(root: never, params: AssortmentQuery & {
|
|
5
5
|
limit?: number;
|
|
6
6
|
offset?: number;
|
|
7
|
-
sort?:
|
|
7
|
+
sort?: SortOption[];
|
|
8
8
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-assortments").Assortment[]>;
|
|
9
9
|
//# sourceMappingURL=assortments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assortments.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/assortments/assortments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,WAAW,CACvC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,eAAe,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"assortments.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/assortments/assortments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,WAAW,CACvC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,eAAe,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;CACrB,EACD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,mEAU7B"}
|
|
@@ -4,6 +4,6 @@ import { Context } from '../../../context.js';
|
|
|
4
4
|
export default function countries(root: never, params: CountryQuery & {
|
|
5
5
|
limit?: number;
|
|
6
6
|
offset?: number;
|
|
7
|
-
sort?:
|
|
7
|
+
sort?: SortOption[];
|
|
8
8
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-countries").Country[]>;
|
|
9
9
|
//# sourceMappingURL=countries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/countries/countries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,SAAS,CACrC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,YAAY,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/countries/countries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,SAAS,CACrC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,YAAY,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAA;CAAE,EAC/E,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,8DAU7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countries.js","sourceRoot":"","sources":["../../../../src/resolvers/queries/countries/countries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,SAAS,CACrC,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"countries.js","sourceRoot":"","sources":["../../../../src/resolvers/queries/countries/countries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,SAAS,CACrC,IAAW,EACX,MAA+E,EAC/E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CACD,oBAAoB,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,IAC/C,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAC/C,EAAE,EACF,EAAE,MAAM,EAAE,CACX,CAAC;IAEF,OAAO,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -4,6 +4,6 @@ import { Context } from '../../../context.js';
|
|
|
4
4
|
export default function currencies(root: never, params: CurrencyQuery & {
|
|
5
5
|
limit: number;
|
|
6
6
|
offset: number;
|
|
7
|
-
sort?:
|
|
7
|
+
sort?: SortOption[];
|
|
8
8
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-currencies").Currency[]>;
|
|
9
9
|
//# sourceMappingURL=currencies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/currencies/currencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,UAAU,CACtC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/currencies/currencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,UAAU,CACtC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAA;CAAE,EAC9E,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,gEAS7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currencies.js","sourceRoot":"","sources":["../../../../src/resolvers/queries/currencies/currencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,UAAU,CACtC,IAAW,EACX,
|
|
1
|
+
{"version":3,"file":"currencies.js","sourceRoot":"","sources":["../../../../src/resolvers/queries/currencies/currencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,UAAU,CACtC,IAAW,EACX,MAA8E,EAC9E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CACD,qBAAqB,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,IAChD,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAC/C,EAAE,EACF,EAAE,MAAM,EAAE,CACX,CAAC;IACF,OAAO,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -4,6 +4,6 @@ import { Context } from '../../../context.js';
|
|
|
4
4
|
export default function enrollments(root: never, params: EnrollmentQuery & {
|
|
5
5
|
limit?: number;
|
|
6
6
|
offset?: number;
|
|
7
|
-
sort?:
|
|
7
|
+
sort?: SortOption[];
|
|
8
8
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-enrollments").Enrollment[]>;
|
|
9
9
|
//# sourceMappingURL=enrollments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrollments.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/enrollments/enrollments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,WAAW,CACvC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,eAAe,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"enrollments.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/enrollments/enrollments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,WAAW,CACvC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,eAAe,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;CACrB,EACD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,mEAI7B"}
|
|
@@ -4,6 +4,6 @@ import { Context } from '../../../context.js';
|
|
|
4
4
|
export default function filters(root: never, params: FilterQuery & {
|
|
5
5
|
limit?: number;
|
|
6
6
|
offset?: number;
|
|
7
|
-
sort?:
|
|
7
|
+
sort?: SortOption[];
|
|
8
8
|
}, { modules, userId }: Context): Promise<import("@unchainedshop/core-filters").Filter[]>;
|
|
9
9
|
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/filters/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,OAAO,CACnC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,WAAW,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/queries/filters/filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,wBAA8B,OAAO,CACnC,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,WAAW,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;CACrB,EACD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,2DAU7B"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
2
|
import { QueryStringRequiredError } from '../../../errors.js';
|
|
3
3
|
export default async function searchAssortments(root, query, context) {
|
|
4
|
-
const { services, userId,
|
|
4
|
+
const { services, userId, locale } = context;
|
|
5
5
|
const forceLiveCollection = false;
|
|
6
6
|
log(`query search assortments ${JSON.stringify(query)}`, { userId });
|
|
7
7
|
if (!query.queryString && !query.assortmentIds?.length)
|
|
8
8
|
throw new QueryStringRequiredError({});
|
|
9
9
|
return services.filters.searchAssortments(query, {
|
|
10
10
|
forceLiveCollection,
|
|
11
|
-
locale
|
|
11
|
+
locale,
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=searchAssortments.js.map
|