@unchainedshop/api 2.0.0-beta8 → 2.0.0-rc.1
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/jest.config.js +9 -0
- package/lib/acl.d.ts +2 -0
- package/lib/acl.js +2 -2
- package/lib/acl.js.map +1 -1
- package/lib/api-index.d.ts +1 -0
- package/lib/api-index.js +1 -1
- package/lib/api-index.js.map +1 -1
- package/lib/createGraphQLServer.js +22 -20
- package/lib/createGraphQLServer.js.map +1 -1
- package/lib/errors.d.ts +20 -0
- package/lib/errors.js +20 -0
- package/lib/errors.js.map +1 -1
- package/lib/express/createBulkImportMiddleware.js +1 -1
- package/lib/express/createBulkImportMiddleware.js.map +1 -1
- package/lib/express/createERCMetadataMiddleware.js +2 -1
- package/lib/express/createERCMetadataMiddleware.js.map +1 -1
- package/lib/express/createSingleSignOnMiddleware.js.map +1 -1
- package/lib/loaders/index.js +5 -9
- package/lib/loaders/index.js.map +1 -1
- package/lib/resolvers/mutations/accounts/changePassword.js +12 -1
- package/lib/resolvers/mutations/accounts/changePassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.js +17 -3
- package/lib/resolvers/mutations/accounts/createUser.js.map +1 -1
- package/lib/resolvers/mutations/accounts/disableTOTP.js +15 -2
- package/lib/resolvers/mutations/accounts/disableTOTP.js.map +1 -1
- package/lib/resolvers/mutations/accounts/enableTOTP.js +12 -1
- package/lib/resolvers/mutations/accounts/enableTOTP.js.map +1 -1
- package/lib/resolvers/mutations/accounts/enrollUser.js +17 -4
- package/lib/resolvers/mutations/accounts/enrollUser.js.map +1 -1
- package/lib/resolvers/mutations/accounts/forgotPassword.js +11 -1
- package/lib/resolvers/mutations/accounts/forgotPassword.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/loginWithPassword.js +19 -1
- package/lib/resolvers/mutations/accounts/loginWithPassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js +13 -1
- package/lib/resolvers/mutations/accounts/loginWithWebAuthn.js.map +1 -1
- package/lib/resolvers/mutations/accounts/logout.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/logout.js +6 -2
- package/lib/resolvers/mutations/accounts/logout.js.map +1 -1
- package/lib/resolvers/mutations/accounts/logoutAllSessions.js +4 -1
- package/lib/resolvers/mutations/accounts/logoutAllSessions.js.map +1 -1
- package/lib/resolvers/mutations/accounts/resetPassword.js +17 -2
- package/lib/resolvers/mutations/accounts/resetPassword.js.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentFilter.js +1 -2
- package/lib/resolvers/mutations/assortments/addAssortmentFilter.js.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentLink.js +16 -9
- package/lib/resolvers/mutations/assortments/addAssortmentLink.js.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.js +2 -3
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.js.map +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentProduct.js +1 -2
- package/lib/resolvers/mutations/assortments/addAssortmentProduct.js.map +1 -1
- package/lib/resolvers/mutations/assortments/createAssortment.js +1 -2
- package/lib/resolvers/mutations/assortments/createAssortment.js.map +1 -1
- package/lib/resolvers/mutations/assortments/prepareAssortmentMediaUpload.js +0 -1
- package/lib/resolvers/mutations/assortments/prepareAssortmentMediaUpload.js.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentMedia.js +2 -2
- package/lib/resolvers/mutations/assortments/removeAssortmentMedia.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.js +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.js +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.js +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.js.map +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.js +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.js.map +1 -1
- package/lib/resolvers/mutations/assortments/setBaseAssortment.js +1 -1
- package/lib/resolvers/mutations/assortments/setBaseAssortment.js.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortment.js +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortment.js.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.js +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.js.map +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentTexts.js +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentTexts.js.map +1 -1
- package/lib/resolvers/mutations/bookmarks/bookmark.js +2 -2
- package/lib/resolvers/mutations/bookmarks/bookmark.js.map +1 -1
- package/lib/resolvers/mutations/bookmarks/createBookmark.js +1 -1
- package/lib/resolvers/mutations/bookmarks/createBookmark.js.map +1 -1
- package/lib/resolvers/mutations/countries/createCountry.js +1 -2
- package/lib/resolvers/mutations/countries/createCountry.js.map +1 -1
- package/lib/resolvers/mutations/countries/removeCountry.js +1 -1
- package/lib/resolvers/mutations/countries/removeCountry.js.map +1 -1
- package/lib/resolvers/mutations/countries/updateCountry.js +1 -1
- package/lib/resolvers/mutations/countries/updateCountry.js.map +1 -1
- package/lib/resolvers/mutations/currencies/createCurrency.js +1 -2
- package/lib/resolvers/mutations/currencies/createCurrency.js.map +1 -1
- package/lib/resolvers/mutations/currencies/removeCurrency.js +1 -1
- package/lib/resolvers/mutations/currencies/removeCurrency.js.map +1 -1
- package/lib/resolvers/mutations/currencies/updateCurrency.js +1 -1
- package/lib/resolvers/mutations/currencies/updateCurrency.js.map +1 -1
- package/lib/resolvers/mutations/delivery/createDeliveryProvider.js +1 -2
- package/lib/resolvers/mutations/delivery/createDeliveryProvider.js.map +1 -1
- package/lib/resolvers/mutations/delivery/removeDeliveryProvider.js +1 -1
- package/lib/resolvers/mutations/delivery/removeDeliveryProvider.js.map +1 -1
- package/lib/resolvers/mutations/delivery/updateDeliveryProvider.js +1 -1
- package/lib/resolvers/mutations/delivery/updateDeliveryProvider.js.map +1 -1
- package/lib/resolvers/mutations/enrollments/activateEnrollment.js +1 -1
- package/lib/resolvers/mutations/enrollments/activateEnrollment.js.map +1 -1
- package/lib/resolvers/mutations/enrollments/terminateEnrollment.js +1 -1
- package/lib/resolvers/mutations/enrollments/terminateEnrollment.js.map +1 -1
- package/lib/resolvers/mutations/enrollments/updateEnrollment.js +5 -5
- package/lib/resolvers/mutations/enrollments/updateEnrollment.js.map +1 -1
- package/lib/resolvers/mutations/filters/createFilter.js +1 -2
- package/lib/resolvers/mutations/filters/createFilter.js.map +1 -1
- package/lib/resolvers/mutations/filters/createFilterOption.js +1 -1
- package/lib/resolvers/mutations/filters/createFilterOption.js.map +1 -1
- package/lib/resolvers/mutations/filters/removeFilter.d.ts +1 -1
- package/lib/resolvers/mutations/filters/removeFilter.js +3 -3
- package/lib/resolvers/mutations/filters/removeFilter.js.map +1 -1
- package/lib/resolvers/mutations/filters/updateFilter.js +1 -1
- package/lib/resolvers/mutations/filters/updateFilter.js.map +1 -1
- package/lib/resolvers/mutations/filters/updateFilterTexts.js +1 -1
- package/lib/resolvers/mutations/filters/updateFilterTexts.js.map +1 -1
- package/lib/resolvers/mutations/index.d.ts +1 -0
- package/lib/resolvers/mutations/index.js +2 -0
- package/lib/resolvers/mutations/index.js.map +1 -1
- package/lib/resolvers/mutations/languages/createLanguage.js +1 -2
- package/lib/resolvers/mutations/languages/createLanguage.js.map +1 -1
- package/lib/resolvers/mutations/languages/removeLanguage.js +1 -1
- package/lib/resolvers/mutations/languages/removeLanguage.js.map +1 -1
- package/lib/resolvers/mutations/languages/updateLanguage.js +1 -1
- package/lib/resolvers/mutations/languages/updateLanguage.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/payOrder.js +1 -1
- package/lib/resolvers/mutations/orders/payOrder.js.map +1 -1
- package/lib/resolvers/mutations/orders/removeOrder.js +1 -1
- package/lib/resolvers/mutations/orders/removeOrder.js.map +1 -1
- package/lib/resolvers/mutations/payment/createPaymentProvider.js +1 -2
- package/lib/resolvers/mutations/payment/createPaymentProvider.js.map +1 -1
- package/lib/resolvers/mutations/payment/registerPaymentCredentials.js +2 -2
- package/lib/resolvers/mutations/payment/registerPaymentCredentials.js.map +1 -1
- package/lib/resolvers/mutations/payment/removePaymentProvider.js +1 -1
- package/lib/resolvers/mutations/payment/removePaymentProvider.js.map +1 -1
- package/lib/resolvers/mutations/payment/updatePaymentProvider.js +1 -1
- package/lib/resolvers/mutations/payment/updatePaymentProvider.js.map +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.js +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.js.map +1 -1
- package/lib/resolvers/mutations/products/addProductMedia.js +1 -2
- package/lib/resolvers/mutations/products/addProductMedia.js.map +1 -1
- package/lib/resolvers/mutations/products/addProductReviewVote.js +1 -1
- package/lib/resolvers/mutations/products/addProductReviewVote.js.map +1 -1
- package/lib/resolvers/mutations/products/createProduct.js +1 -2
- package/lib/resolvers/mutations/products/createProduct.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductBundleItem.js +1 -1
- package/lib/resolvers/mutations/products/createProductBundleItem.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductReview.js +1 -1
- package/lib/resolvers/mutations/products/createProductReview.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductVariation.js +1 -2
- package/lib/resolvers/mutations/products/createProductVariation.js.map +1 -1
- package/lib/resolvers/mutations/products/createProductVariationOption.js +4 -1
- package/lib/resolvers/mutations/products/createProductVariationOption.js.map +1 -1
- package/lib/resolvers/mutations/products/prepareProductMediaUpload.js +0 -1
- package/lib/resolvers/mutations/products/prepareProductMediaUpload.js.map +1 -1
- package/lib/resolvers/mutations/products/publishProduct.js +1 -1
- package/lib/resolvers/mutations/products/publishProduct.js.map +1 -1
- package/lib/resolvers/mutations/products/removeBundleItem.js +2 -2
- package/lib/resolvers/mutations/products/removeBundleItem.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProduct.js +14 -2
- package/lib/resolvers/mutations/products/removeProduct.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProductAssignment.js +1 -1
- package/lib/resolvers/mutations/products/removeProductAssignment.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProductMedia.js +2 -2
- package/lib/resolvers/mutations/products/removeProductMedia.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProductReview.js +1 -1
- package/lib/resolvers/mutations/products/removeProductReview.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProductReviewVote.js +1 -1
- package/lib/resolvers/mutations/products/removeProductReviewVote.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProductVariation.js +1 -1
- package/lib/resolvers/mutations/products/removeProductVariation.js.map +1 -1
- package/lib/resolvers/mutations/products/removeProductVariationOption.js +1 -1
- package/lib/resolvers/mutations/products/removeProductVariationOption.js.map +1 -1
- package/lib/resolvers/mutations/products/reorderProductMedia.js +1 -1
- package/lib/resolvers/mutations/products/reorderProductMedia.js.map +1 -1
- package/lib/resolvers/mutations/products/unpublishProduct.js +1 -1
- package/lib/resolvers/mutations/products/unpublishProduct.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProduct.js +1 -1
- package/lib/resolvers/mutations/products/updateProduct.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductCommerce.js +1 -1
- package/lib/resolvers/mutations/products/updateProductCommerce.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductMediaTexts.js +1 -1
- package/lib/resolvers/mutations/products/updateProductMediaTexts.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductPlan.js +1 -1
- package/lib/resolvers/mutations/products/updateProductPlan.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductReview.js +1 -1
- package/lib/resolvers/mutations/products/updateProductReview.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductSupply.js +1 -1
- package/lib/resolvers/mutations/products/updateProductSupply.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductTexts.js +1 -1
- package/lib/resolvers/mutations/products/updateProductTexts.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductTokenization.js +1 -1
- package/lib/resolvers/mutations/products/updateProductTokenization.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductVariationTexts.js +1 -1
- package/lib/resolvers/mutations/products/updateProductVariationTexts.js.map +1 -1
- package/lib/resolvers/mutations/products/updateProductWarehousing.js +1 -1
- package/lib/resolvers/mutations/products/updateProductWarehousing.js.map +1 -1
- package/lib/resolvers/mutations/users/prepareUserAvatarUpload.js +0 -1
- package/lib/resolvers/mutations/users/prepareUserAvatarUpload.js.map +1 -1
- package/lib/resolvers/mutations/users/removeUser.d.ts +4 -0
- package/lib/resolvers/mutations/users/removeUser.js +11 -0
- package/lib/resolvers/mutations/users/removeUser.js.map +1 -0
- package/lib/resolvers/mutations/users/setRoles.js +1 -1
- package/lib/resolvers/mutations/users/setRoles.js.map +1 -1
- package/lib/resolvers/mutations/users/setUserTags.js +1 -1
- package/lib/resolvers/mutations/users/setUserTags.js.map +1 -1
- package/lib/resolvers/mutations/users/updateUserAvatar.js +1 -2
- package/lib/resolvers/mutations/users/updateUserAvatar.js.map +1 -1
- package/lib/resolvers/mutations/users/updateUserProfile.js +1 -1
- package/lib/resolvers/mutations/users/updateUserProfile.js.map +1 -1
- package/lib/resolvers/mutations/utils/getOrderCart.js +1 -1
- package/lib/resolvers/mutations/utils/getOrderCart.js.map +1 -1
- package/lib/resolvers/mutations/warehousing/createWarehousingProvider.js +1 -2
- package/lib/resolvers/mutations/warehousing/createWarehousingProvider.js.map +1 -1
- package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.js +1 -1
- package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.js.map +1 -1
- package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.js +1 -1
- package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.js.map +1 -1
- package/lib/resolvers/mutations/worker/addWork.js +1 -1
- package/lib/resolvers/mutations/worker/addWork.js.map +1 -1
- package/lib/resolvers/mutations/worker/finishWork.js +1 -1
- package/lib/resolvers/mutations/worker/finishWork.js.map +1 -1
- package/lib/resolvers/mutations/worker/removeWork.js +1 -1
- package/lib/resolvers/mutations/worker/removeWork.js.map +1 -1
- package/lib/resolvers/queries/products/productCatalogPrices.js +0 -1
- package/lib/resolvers/queries/products/productCatalogPrices.js.map +1 -1
- package/lib/resolvers/queries/users/users.d.ts +2 -1
- package/lib/resolvers/queries/users/users.js.map +1 -1
- package/lib/resolvers/queries/worker/workQueue.d.ts +1 -1
- package/lib/resolvers/queries/worker/workQueue.js +1 -1
- package/lib/resolvers/queries/worker/workQueue.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-filter-types.js +0 -1
- package/lib/resolvers/type/assortment/assortment-filter-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-link-types.js +0 -2
- package/lib/resolvers/type/assortment/assortment-link-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-media-types.js +2 -0
- package/lib/resolvers/type/assortment/assortment-media-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-path-link-types.js +1 -0
- package/lib/resolvers/type/assortment/assortment-path-link-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-product-types.js +0 -2
- package/lib/resolvers/type/assortment/assortment-product-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-types.js +8 -4
- package/lib/resolvers/type/assortment/assortment-types.js.map +1 -1
- package/lib/resolvers/type/bookmark-types.js +0 -1
- package/lib/resolvers/type/bookmark-types.js.map +1 -1
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.js +0 -1
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.js.map +1 -1
- package/lib/resolvers/type/index.d.ts +1 -0
- package/lib/resolvers/type/login-method-response-types.d.ts +1 -0
- package/lib/resolvers/type/order/order-item-types.js +0 -3
- package/lib/resolvers/type/order/order-item-types.js.map +1 -1
- package/lib/resolvers/type/product/product-assortment-path-types.js +1 -0
- package/lib/resolvers/type/product/product-assortment-path-types.js.map +1 -1
- package/lib/resolvers/type/product/product-bundle-item-types.js +0 -1
- package/lib/resolvers/type/product/product-bundle-item-types.js.map +1 -1
- package/lib/resolvers/type/product/product-configurable-types.js +1 -0
- package/lib/resolvers/type/product/product-configurable-types.js.map +1 -1
- package/lib/resolvers/type/product/product-media-types.js +2 -0
- package/lib/resolvers/type/product/product-media-types.js.map +1 -1
- package/lib/resolvers/type/product/product-plan-types.js +1 -12
- package/lib/resolvers/type/product/product-plan-types.js.map +1 -1
- package/lib/resolvers/type/product/product-review-types.js +0 -1
- package/lib/resolvers/type/product/product-review-types.js.map +1 -1
- package/lib/resolvers/type/product/product-variation-assignment-types.js +0 -1
- package/lib/resolvers/type/product/product-variation-assignment-types.js.map +1 -1
- package/lib/resolvers/type/quotation-types.js +0 -1
- package/lib/resolvers/type/quotation-types.js.map +1 -1
- package/lib/resolvers/type/token-types.js +2 -1
- package/lib/resolvers/type/token-types.js.map +1 -1
- package/lib/resolvers/type/user-types.d.ts +3 -0
- package/lib/resolvers/type/user-types.js +10 -9
- package/lib/resolvers/type/user-types.js.map +1 -1
- package/lib/roles/admin.js +3 -72
- package/lib/roles/admin.js.map +1 -1
- package/lib/schema/index.d.ts +5 -2
- package/lib/schema/index.js +14 -1
- package/lib/schema/index.js.map +1 -1
- package/lib/schema/mutation.js +20 -15
- package/lib/schema/mutation.js.map +1 -1
- package/lib/schema/query.js +14 -12
- package/lib/schema/query.js.map +1 -1
- package/lib/schema/types/assortment.js +1 -0
- package/lib/schema/types/assortment.js.map +1 -1
- package/lib/schema/types/dispatch.js +0 -1
- package/lib/schema/types/dispatch.js.map +1 -1
- package/lib/schema/types/product/plan-product.js +0 -1
- package/lib/schema/types/product/plan-product.js.map +1 -1
- package/lib/schema/types/product/simple-product.js +0 -1
- package/lib/schema/types/product/simple-product.js.map +1 -1
- package/lib/schema/types/product/tokenized-product.js +0 -1
- package/lib/schema/types/product/tokenized-product.js.map +1 -1
- package/lib/schema/types/stock.js +0 -1
- package/lib/schema/types/stock.js.map +1 -1
- package/lib/schema/types/user.js +3 -0
- package/lib/schema/types/user.js.map +1 -1
- package/package.json +12 -11
- package/src/acl.ts +2 -2
- package/src/api-index.ts +1 -1
- package/src/createGraphQLServer.ts +25 -26
- package/src/errors.ts +85 -0
- package/src/express/createBulkImportMiddleware.ts +6 -9
- package/src/express/createERCMetadataMiddleware.ts +2 -1
- package/src/express/createSingleSignOnMiddleware.ts +3 -2
- package/src/loaders/index.ts +27 -35
- package/src/resolvers/mutations/accounts/changePassword.ts +9 -2
- package/src/resolvers/mutations/accounts/createUser.ts +19 -4
- package/src/resolvers/mutations/accounts/disableTOTP.ts +13 -3
- package/src/resolvers/mutations/accounts/enableTOTP.ts +9 -2
- package/src/resolvers/mutations/accounts/enrollUser.ts +19 -4
- package/src/resolvers/mutations/accounts/forgotPassword.ts +8 -1
- package/src/resolvers/mutations/accounts/impersonate.ts +1 -1
- package/src/resolvers/mutations/accounts/loginWithPassword.ts +24 -1
- package/src/resolvers/mutations/accounts/loginWithWebAuthn.ts +13 -2
- package/src/resolvers/mutations/accounts/logout.ts +9 -2
- package/src/resolvers/mutations/accounts/logoutAllSessions.ts +7 -1
- package/src/resolvers/mutations/accounts/resetPassword.ts +19 -3
- package/src/resolvers/mutations/assortments/addAssortmentFilter.ts +5 -9
- package/src/resolvers/mutations/assortments/addAssortmentLink.ts +22 -14
- package/src/resolvers/mutations/assortments/addAssortmentMedia.ts +2 -6
- package/src/resolvers/mutations/assortments/addAssortmentProduct.ts +0 -2
- package/src/resolvers/mutations/assortments/createAssortment.ts +4 -8
- package/src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts +0 -1
- package/src/resolvers/mutations/assortments/removeAssortmentMedia.ts +2 -2
- package/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts +3 -6
- package/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts +0 -1
- package/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts +3 -6
- package/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts +0 -1
- package/src/resolvers/mutations/assortments/setBaseAssortment.ts +1 -1
- package/src/resolvers/mutations/assortments/updateAssortment.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/bookmarks/bookmark.ts +4 -7
- package/src/resolvers/mutations/bookmarks/createBookmark.ts +4 -7
- package/src/resolvers/mutations/countries/createCountry.ts +3 -7
- package/src/resolvers/mutations/countries/removeCountry.ts +1 -1
- package/src/resolvers/mutations/countries/updateCountry.ts +1 -1
- package/src/resolvers/mutations/currencies/createCurrency.ts +3 -7
- package/src/resolvers/mutations/currencies/removeCurrency.ts +1 -1
- package/src/resolvers/mutations/currencies/updateCurrency.ts +1 -1
- package/src/resolvers/mutations/delivery/createDeliveryProvider.ts +3 -7
- package/src/resolvers/mutations/delivery/removeDeliveryProvider.ts +1 -1
- package/src/resolvers/mutations/delivery/updateDeliveryProvider.ts +1 -1
- package/src/resolvers/mutations/enrollments/activateEnrollment.ts +1 -1
- package/src/resolvers/mutations/enrollments/terminateEnrollment.ts +1 -1
- package/src/resolvers/mutations/enrollments/updateEnrollment.ts +5 -5
- package/src/resolvers/mutations/filters/createFilter.ts +0 -2
- package/src/resolvers/mutations/filters/createFilterOption.ts +5 -1
- package/src/resolvers/mutations/filters/removeFilter.ts +3 -3
- package/src/resolvers/mutations/filters/updateFilter.ts +1 -1
- package/src/resolvers/mutations/filters/updateFilterTexts.ts +1 -1
- package/src/resolvers/mutations/index.ts +2 -0
- package/src/resolvers/mutations/languages/createLanguage.ts +3 -7
- package/src/resolvers/mutations/languages/removeLanguage.ts +1 -1
- package/src/resolvers/mutations/languages/updateLanguage.ts +1 -1
- package/src/resolvers/mutations/orders/createCart.ts +4 -1
- package/src/resolvers/mutations/orders/payOrder.ts +1 -1
- package/src/resolvers/mutations/orders/removeOrder.ts +1 -1
- package/src/resolvers/mutations/payment/createPaymentProvider.ts +3 -7
- package/src/resolvers/mutations/payment/registerPaymentCredentials.ts +6 -2
- package/src/resolvers/mutations/payment/removePaymentProvider.ts +1 -1
- package/src/resolvers/mutations/payment/updatePaymentProvider.ts +1 -1
- package/src/resolvers/mutations/products/addProductAssignment.ts +4 -8
- package/src/resolvers/mutations/products/addProductMedia.ts +1 -2
- package/src/resolvers/mutations/products/addProductReviewVote.ts +1 -1
- package/src/resolvers/mutations/products/createProduct.ts +4 -8
- package/src/resolvers/mutations/products/createProductBundleItem.ts +1 -1
- package/src/resolvers/mutations/products/createProductReview.ts +5 -8
- package/src/resolvers/mutations/products/createProductVariation.ts +6 -10
- package/src/resolvers/mutations/products/createProductVariationOption.ts +4 -5
- package/src/resolvers/mutations/products/prepareProductMediaUpload.ts +0 -1
- package/src/resolvers/mutations/products/publishProduct.ts +1 -1
- package/src/resolvers/mutations/products/removeBundleItem.ts +2 -2
- package/src/resolvers/mutations/products/removeProduct.ts +23 -2
- package/src/resolvers/mutations/products/removeProductAssignment.ts +1 -1
- package/src/resolvers/mutations/products/removeProductMedia.ts +2 -2
- package/src/resolvers/mutations/products/removeProductReview.ts +1 -1
- package/src/resolvers/mutations/products/removeProductReviewVote.ts +1 -1
- package/src/resolvers/mutations/products/removeProductVariation.ts +1 -1
- package/src/resolvers/mutations/products/removeProductVariationOption.ts +0 -1
- package/src/resolvers/mutations/products/reorderProductMedia.ts +1 -1
- package/src/resolvers/mutations/products/unpublishProduct.ts +1 -1
- package/src/resolvers/mutations/products/updateProduct.ts +1 -1
- package/src/resolvers/mutations/products/updateProductCommerce.ts +1 -1
- package/src/resolvers/mutations/products/updateProductMediaTexts.ts +1 -1
- package/src/resolvers/mutations/products/updateProductPlan.ts +1 -1
- package/src/resolvers/mutations/products/updateProductReview.ts +1 -1
- package/src/resolvers/mutations/products/updateProductSupply.ts +1 -1
- package/src/resolvers/mutations/products/updateProductTexts.ts +1 -1
- package/src/resolvers/mutations/products/updateProductTokenization.ts +1 -1
- package/src/resolvers/mutations/products/updateProductVariationTexts.ts +0 -1
- package/src/resolvers/mutations/products/updateProductWarehousing.ts +1 -1
- package/src/resolvers/mutations/users/prepareUserAvatarUpload.ts +0 -1
- package/src/resolvers/mutations/users/removeUser.ts +19 -0
- package/src/resolvers/mutations/users/setRoles.ts +1 -1
- package/src/resolvers/mutations/users/setUserTags.ts +1 -1
- package/src/resolvers/mutations/users/updateUserAvatar.ts +1 -2
- package/src/resolvers/mutations/users/updateUserProfile.ts +1 -1
- package/src/resolvers/mutations/utils/getOrderCart.ts +1 -1
- package/src/resolvers/mutations/warehousing/createWarehousingProvider.ts +3 -7
- package/src/resolvers/mutations/warehousing/removeWarehousingProvider.ts +1 -1
- package/src/resolvers/mutations/warehousing/updateWarehousingProvider.ts +1 -1
- package/src/resolvers/mutations/worker/addWork.ts +1 -1
- package/src/resolvers/mutations/worker/finishWork.ts +8 -12
- package/src/resolvers/mutations/worker/removeWork.ts +1 -1
- package/src/resolvers/queries/products/productCatalogPrices.ts +0 -1
- package/src/resolvers/queries/users/users.ts +2 -1
- package/src/resolvers/queries/worker/workQueue.ts +1 -1
- package/src/resolvers/type/assortment/assortment-filter-types.ts +0 -1
- package/src/resolvers/type/assortment/assortment-link-types.ts +0 -2
- package/src/resolvers/type/assortment/assortment-media-types.ts +2 -0
- package/src/resolvers/type/assortment/assortment-path-link-types.ts +1 -0
- package/src/resolvers/type/assortment/assortment-product-types.ts +0 -2
- package/src/resolvers/type/assortment/assortment-types.ts +9 -4
- package/src/resolvers/type/bookmark-types.ts +0 -1
- package/src/resolvers/type/enrollment/enrollment-plan-tyes.ts +0 -1
- package/src/resolvers/type/order/order-item-types.ts +0 -3
- package/src/resolvers/type/product/product-assortment-path-types.ts +1 -0
- package/src/resolvers/type/product/product-bundle-item-types.ts +0 -1
- package/src/resolvers/type/product/product-configurable-types.ts +1 -0
- package/src/resolvers/type/product/product-media-types.ts +2 -0
- package/src/resolvers/type/product/product-plan-types.ts +2 -18
- package/src/resolvers/type/product/product-review-types.ts +0 -1
- package/src/resolvers/type/product/product-variation-assignment-types.ts +0 -1
- package/src/resolvers/type/quotation-types.ts +0 -1
- package/src/resolvers/type/token-types.ts +2 -1
- package/src/resolvers/type/user-types.ts +14 -10
- package/src/roles/admin.ts +3 -72
- package/src/schema/index.js +15 -1
- package/src/schema/mutation.js +20 -15
- package/src/schema/query.js +14 -12
- package/src/schema/types/assortment.js +1 -0
- package/src/schema/types/dispatch.js +0 -1
- package/src/schema/types/product/plan-product.js +0 -1
- package/src/schema/types/product/simple-product.js +0 -1
- package/src/schema/types/product/tokenized-product.js +0 -1
- package/src/schema/types/stock.js +0 -1
- package/src/schema/types/user.js +3 -0
- package/tests/api-index.test.ts +78 -0
|
@@ -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;AAE5C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,WAAW,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,OAAgB,EAAE,EAAE;IAC/D,GAAG,CAAC,wBAAwB,MAAM,EAAE,CAAC,CAAC;IAEtC,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAE3E,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,iBAAiB,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;AAE5C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,WAAW,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,OAAgB,EAAE,EAAE;IAC/D,GAAG,CAAC,wBAAwB,MAAM,EAAE,CAAC,CAAC;IAEtC,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAE3E,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;KACzC;IAED,IAAI,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACrD,MAAM,IAAI,iBAAiB,CAAC,4CAA4C,CAAC,CAAC;KAC3E;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC3F,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
+
import { AuthenticationFailedError, AuthOperationFailedError, InvalidCredentialsError, TwoFactorCodeDidNotMatchError, TwoFactorCodeRequiredError, UserDeactivatedError, } from '../../../errors';
|
|
2
3
|
import { hashPassword } from '../../../hashPassword';
|
|
3
4
|
export default async function loginWithPassword(root, params, context) {
|
|
4
5
|
const { modules } = context;
|
|
@@ -12,6 +13,23 @@ export default async function loginWithPassword(root, params, context) {
|
|
|
12
13
|
password: hashPassword(plainPassword),
|
|
13
14
|
code: totpCode,
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
try {
|
|
17
|
+
const result = await modules.accounts.loginWithService({ service: 'password', ...mappedUserLoginParams }, context);
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
if (e.code === 'AuthenticationFailed')
|
|
22
|
+
throw new AuthenticationFailedError({ username, email });
|
|
23
|
+
else if (e.code === 'UserDeactivated')
|
|
24
|
+
throw new UserDeactivatedError({ username, email });
|
|
25
|
+
else if (e.code === 'InvalidCredentials')
|
|
26
|
+
throw new InvalidCredentialsError({ username, email });
|
|
27
|
+
else if (e?.message?.includes('2FA code required'))
|
|
28
|
+
throw new TwoFactorCodeRequiredError({ username, email });
|
|
29
|
+
else if (e?.message?.includes("2FA code didn't match"))
|
|
30
|
+
throw new TwoFactorCodeDidNotMatchError({ submittedCode: params.totpCode, username, email });
|
|
31
|
+
else
|
|
32
|
+
throw new AuthOperationFailedError({ submittedCode: params.totpCode, username, email });
|
|
33
|
+
}
|
|
16
34
|
}
|
|
17
35
|
//# 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,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAC7C,IAAU,EACV,MAKC,EACD,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAE5D,GAAG,CAAC,4BAA4B,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAEvD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAI,KAA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C,gBAAgB,CACpD,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,qBAAqB,EAAE,EACjD,OAAO,CACR,CAAC;QACF,OAAO,MAAM,CAAC;KACf;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,CAAC,IAAI,KAAK,sBAAsB;YAAE,MAAM,IAAI,yBAAyB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;aAC3F,IAAI,CAAC,CAAC,IAAI,KAAK,iBAAiB;YAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;aACtF,IAAI,CAAC,CAAC,IAAI,KAAK,oBAAoB;YAAE,MAAM,IAAI,uBAAuB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;aAC5F,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC;YAChD,MAAM,IAAI,0BAA0B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;aACvD,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC;YACpD,MAAM,IAAI,6BAA6B,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;;YAC1F,MAAM,IAAI,wBAAwB,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;KAC9F;AACH,CAAC"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
+
import { AuthenticationFailedError, AuthOperationFailedError, UserDeactivatedError, } from '../../../errors';
|
|
2
3
|
export default async function loginWithWebAuthn(root, params, context) {
|
|
3
4
|
const { modules } = context;
|
|
4
5
|
log('mutation loginWithWebAuthn');
|
|
5
|
-
|
|
6
|
+
try {
|
|
7
|
+
const result = await modules.accounts.loginWithService({ service: 'webAuthn', ...params }, context);
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
if (e.code === 'AuthenticationFailed')
|
|
12
|
+
throw new AuthenticationFailedError({});
|
|
13
|
+
else if (e.code === 'UserDeactivated')
|
|
14
|
+
throw new UserDeactivatedError({});
|
|
15
|
+
else
|
|
16
|
+
throw new AuthOperationFailedError({});
|
|
17
|
+
}
|
|
6
18
|
}
|
|
7
19
|
//# 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;
|
|
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,EACL,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAC7C,IAAU,EACV,MAEC,EACD,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAClC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;QACpG,OAAO,MAAM,CAAC;KACf;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,CAAC,IAAI,KAAK,sBAAsB;YAAE,MAAM,IAAI,yBAAyB,CAAC,EAAE,CAAC,CAAC;aAC1E,IAAI,CAAC,CAAC,IAAI,KAAK,iBAAiB;YAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAC;;YACrE,MAAM,IAAI,wBAAwB,CAAC,EAAE,CAAC,CAAC;KAC7C;AACH,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { log, LogLevel } from '@unchainedshop/logger';
|
|
2
|
-
export default async function logout(root,
|
|
2
|
+
export default async function logout(root, { token }, context) {
|
|
3
3
|
const { modules, userId, setLoginToken } = context;
|
|
4
4
|
log('mutation logout', { userId });
|
|
5
|
-
const loggedOut = await modules.accounts.logout(
|
|
5
|
+
const loggedOut = await modules.accounts.logout({
|
|
6
|
+
token,
|
|
7
|
+
loginToken: context.loginToken,
|
|
8
|
+
userId: context.userId,
|
|
9
|
+
}, context);
|
|
6
10
|
if (loggedOut.error) {
|
|
7
11
|
log('Error while logging out', {
|
|
8
12
|
logLevel: LogLevel.Error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/logout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,MAAM,CAAC,IAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/logout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,MAAM,CAAC,IAAU,EAAE,EAAE,KAAK,EAAqB,EAAE,OAAgB;IAC7F,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAEnD,GAAG,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEnC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAC7C;QACE,KAAK;QACL,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,EACD,OAAO,CACR,CAAC;IAEF,IAAI,SAAS,CAAC,KAAK,EAAE;QACnB,GAAG,CAAC,yBAAyB,EAAE;YAC7B,QAAQ,EAAE,QAAQ,CAAC,KAAK;YACxB,GAAG,SAAS,CAAC,KAAK;SACnB,CAAC,CAAC;KACJ;SAAM;QACL,aAAa,CAAC,IAAI,CAAC,CAAC;KACrB;IAED,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -2,7 +2,10 @@ import { log, LogLevel } from '@unchainedshop/logger';
|
|
|
2
2
|
export default async function logoutAllSessions(root, _, context) {
|
|
3
3
|
const { modules, userId, setLoginToken } = context;
|
|
4
4
|
log('mutation logoutAllSessions', { userId });
|
|
5
|
-
const loggedOut = await modules.accounts.logout({
|
|
5
|
+
const loggedOut = await modules.accounts.logout({
|
|
6
|
+
loginToken: context.loginToken,
|
|
7
|
+
userId: context.userId,
|
|
8
|
+
}, context);
|
|
6
9
|
if (loggedOut.error) {
|
|
7
10
|
log('Error while logging out', {
|
|
8
11
|
logLevel: LogLevel.Error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logoutAllSessions.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/logoutAllSessions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAU,EAAE,CAAM,EAAE,OAAgB;IAClF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAEnD,GAAG,CAAC,4BAA4B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE9C,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"logoutAllSessions.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/logoutAllSessions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAU,EAAE,CAAM,EAAE,OAAgB;IAClF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAEnD,GAAG,CAAC,4BAA4B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE9C,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAC7C;QACE,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,EACD,OAAO,CACR,CAAC;IAEF,IAAI,SAAS,CAAC,KAAK,EAAE;QACnB,GAAG,CAAC,yBAAyB,EAAE;YAC7B,QAAQ,EAAE,QAAQ,CAAC,KAAK;YACxB,GAAG,SAAS,CAAC,KAAK;SACnB,CAAC,CAAC;KACJ;SAAM;QACL,aAAa,CAAC,IAAI,CAAC,CAAC;KACrB;IAED,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
+
import { AuthOperationFailedError, InvalidResetTokenError, NoEmailSetError, ResetPasswordLinkExpiredError, ResetPasswordLinkUnknownAddressError, } from '../../../errors';
|
|
2
3
|
export default async function resetPassword(root, params, context) {
|
|
3
4
|
const { modules, userId } = context;
|
|
4
5
|
log('mutation resetPassword', { userId });
|
|
5
6
|
if (!params.newPlainPassword) {
|
|
6
7
|
throw new Error('Password is required');
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
try {
|
|
10
|
+
const userWithNewPassword = await modules.accounts.resetPassword(params, context);
|
|
11
|
+
const result = await modules.accounts.createLoginToken(userWithNewPassword.id, context);
|
|
12
|
+
return result;
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
if (e.code === 'InvalidToken')
|
|
16
|
+
throw new InvalidResetTokenError({});
|
|
17
|
+
if (e.code === 'ResetPasswordLinkExpired')
|
|
18
|
+
throw new ResetPasswordLinkExpiredError({});
|
|
19
|
+
if (e.code === 'ResetPasswordLinkUnknownAddress')
|
|
20
|
+
throw new ResetPasswordLinkUnknownAddressError({});
|
|
21
|
+
if (e.code === 'NoEmailSet')
|
|
22
|
+
throw new NoEmailSetError({});
|
|
23
|
+
throw new AuthOperationFailedError({});
|
|
24
|
+
}
|
|
10
25
|
}
|
|
11
26
|
//# sourceMappingURL=resetPassword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetPassword.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/resetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"resetPassword.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/accounts/resetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,6BAA6B,EAC7B,oCAAoC,GACrC,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,MAAoD,EACpD,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEpC,GAAG,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1C,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACzC;IACD,IAAI;QACF,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAElF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACxF,OAAO,MAAM,CAAC;KACf;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc;YAAE,MAAM,IAAI,sBAAsB,CAAC,EAAE,CAAC,CAAC;QACpE,IAAI,CAAC,CAAC,IAAI,KAAK,0BAA0B;YAAE,MAAM,IAAI,6BAA6B,CAAC,EAAE,CAAC,CAAC;QACvF,IAAI,CAAC,CAAC,IAAI,KAAK,kCAAkC;YAC/C,MAAM,IAAI,oCAAoC,CAAC,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY;YAAE,MAAM,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QAC3D,MAAM,IAAI,wBAAwB,CAAC,EAAE,CAAC,CAAC;KACxC;AACH,CAAC"}
|
|
@@ -15,8 +15,7 @@ export default async function addAssortmentFilter(root, { assortmentId, filterId
|
|
|
15
15
|
return modules.assortments.filters.create({
|
|
16
16
|
assortmentId,
|
|
17
17
|
filterId,
|
|
18
|
-
authorId: userId,
|
|
19
18
|
...assortmentFilter,
|
|
20
|
-
}
|
|
19
|
+
});
|
|
21
20
|
}
|
|
22
21
|
//# sourceMappingURL=addAssortmentFilter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAssortmentFilter.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentFilter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAA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E,QAAQ,EAAE,GAAG,gBAAgB,EAAoB,EACjE,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,gCAAgC,YAAY,OAAO,QAAQ,EAAE,EAAE;QACjE,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEtD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAAE,MAAM,IAAI,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAErG,OAAO,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC;QACxC,YAAY;QACZ,QAAQ;QACR,GAAG,gBAAgB;KACpB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
-
import { AssortmentNotFoundError, InvalidIdError } from '../../../errors';
|
|
2
|
+
import { AssortmentNotFoundError, CyclicAssortmentLinkNotSupportedError, InvalidIdError, } from '../../../errors';
|
|
3
3
|
export default async function addAssortmentLink(root, { parentAssortmentId, childAssortmentId, ...assortmentLink }, { modules, userId }) {
|
|
4
4
|
log(`mutation addAssortmentLink ${parentAssortmentId} -> ${childAssortmentId}`, { userId });
|
|
5
5
|
if (!parentAssortmentId)
|
|
@@ -18,13 +18,20 @@ export default async function addAssortmentLink(root, { parentAssortmentId, chil
|
|
|
18
18
|
throw new AssortmentNotFoundError({
|
|
19
19
|
assortmentId: childAssortmentId,
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
try {
|
|
22
|
+
const result = await modules.assortments.links.create({
|
|
23
|
+
parentAssortmentId,
|
|
24
|
+
childAssortmentId,
|
|
25
|
+
...assortmentLink,
|
|
26
|
+
}, {
|
|
27
|
+
skipInvalidation: false,
|
|
28
|
+
});
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
if (e?.message === 'CyclicGraphNotSupported')
|
|
33
|
+
throw new CyclicAssortmentLinkNotSupportedError({ parentAssortmentId, childAssortmentId });
|
|
34
|
+
throw e;
|
|
35
|
+
}
|
|
29
36
|
}
|
|
30
37
|
//# sourceMappingURL=addAssortmentLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAssortmentLink.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"addAssortmentLink.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,qCAAqC,EACrC,cAAc,GACf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAC7C,IAAU,EACV,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,cAAc,EAAkB,EAC5E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,8BAA8B,kBAAkB,OAAO,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5F,IAAI,CAAC,kBAAkB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC1E,IAAI,CAAC,iBAAiB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAExE,IACE,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC;QAC3C,YAAY,EAAE,kBAAkB;KACjC,CAAC,CAAC;QAEH,MAAM,IAAI,uBAAuB,CAAC;YAChC,YAAY,EAAE,kBAAkB;SACjC,CAAC,CAAC;IAEL,IACE,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC;QAC3C,YAAY,EAAE,iBAAiB;KAChC,CAAC,CAAC;QAEH,MAAM,IAAI,uBAAuB,CAAC;YAChC,YAAY,EAAE,iBAAiB;SAChC,CAAC,CAAC;IACL,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CACnD;YACE,kBAAkB;YAClB,iBAAiB;YACjB,GAAG,cAAc;SAClB,EACD;YACE,gBAAgB,EAAE,KAAK;SACxB,CACF,CAAC;QACF,OAAO,MAAM,CAAC;KACf;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,OAAO,KAAK,yBAAyB;YAC1C,MAAM,IAAI,qCAAqC,CAAC,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC7F,MAAM,CAAC,CAAC;KACT;AACH,CAAC"}
|
|
@@ -10,10 +10,9 @@ export default async function addAssortmentMedia(root, { media, assortmentId },
|
|
|
10
10
|
const file = await services.files.uploadFileFromStream({
|
|
11
11
|
directoryName: 'assortment-media',
|
|
12
12
|
rawFile: media,
|
|
13
|
-
meta: {
|
|
14
|
-
userId,
|
|
13
|
+
meta: {},
|
|
15
14
|
}, context);
|
|
16
|
-
const assortmentMedia = await modules.assortments.media.create({ assortmentId, mediaId: file._id }
|
|
15
|
+
const assortmentMedia = await modules.assortments.media.create({ assortmentId, mediaId: file._id });
|
|
17
16
|
return assortmentMedia;
|
|
18
17
|
}
|
|
19
18
|
//# sourceMappingURL=addAssortmentMedia.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAssortmentMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAU,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,OAAgB;IACpG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC9C,GAAG,CAAC,+BAA+B,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE/D,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAE9D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CACpD;QACE,aAAa,EAAE,kBAAkB;QACjC,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"addAssortmentMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAU,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,OAAgB;IACpG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC9C,GAAG,CAAC,+BAA+B,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE/D,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAE9D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CACpD;QACE,aAAa,EAAE,kBAAkB;QACjC,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,EAAE;KACT,EACD,OAAO,CACR,CAAC;IAEF,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAEpG,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -17,8 +17,7 @@ export default async function addAssortmentProduct(root, { assortmentId, product
|
|
|
17
17
|
return modules.assortments.products.create({
|
|
18
18
|
assortmentId,
|
|
19
19
|
productId,
|
|
20
|
-
authorId: userId,
|
|
21
20
|
...assortmentProduct,
|
|
22
|
-
}, { skipInvalidation: false }
|
|
21
|
+
}, { skipInvalidation: false });
|
|
23
22
|
}
|
|
24
23
|
//# sourceMappingURL=addAssortmentProduct.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAssortmentProduct.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,oBAAoB,CAChD,IAAU,EACV,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,iBAAiB,EAAqB,EACpE,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,iCAAiC,YAAY,OAAO,SAAS,EAAE,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC;YAChC,YAAY;SACb,CAAC,CAAC;IAEL,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,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CACxC;QACE,YAAY;QACZ,SAAS;QACT,
|
|
1
|
+
{"version":3,"file":"addAssortmentProduct.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/addAssortmentProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,oBAAoB,CAChD,IAAU,EACV,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,iBAAiB,EAAqB,EACpE,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,iCAAiC,YAAY,OAAO,SAAS,EAAE,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC;YAChC,YAAY;SACb,CAAC,CAAC;IAEL,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,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CACxC;QACE,YAAY;QACZ,SAAS;QACT,GAAG,iBAAiB;KACrB,EACD,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -4,8 +4,7 @@ export default async function createAssortment(root, { assortment }, { modules,
|
|
|
4
4
|
const assortmentId = await modules.assortments.create({
|
|
5
5
|
...assortment,
|
|
6
6
|
locale: localeContext.language,
|
|
7
|
-
|
|
8
|
-
}, userId);
|
|
7
|
+
});
|
|
9
8
|
return modules.assortments.findAssortment({ assortmentId });
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=createAssortment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAssortment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/createAssortment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAI5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAU,EACV,EAAE,UAAU,EAAmE,EAC/E,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAW;IAE3C,GAAG,CAAC,2BAA2B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE7C,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"createAssortment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/createAssortment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAI5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAU,EACV,EAAE,UAAU,EAAmE,EAC/E,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAW;IAE3C,GAAG,CAAC,2BAA2B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE7C,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC;QACpD,GAAG,UAAU;QACb,MAAM,EAAE,aAAa,CAAC,QAAQ;KAC/B,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareAssortmentMediaUpload.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,4BAA4B,CACxD,IAAU,EACV,EAAE,SAAS,EAAE,YAAY,EAA+C,EACxE,OAAgB;IAEhB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACrC,GAAG,CAAC,uCAAuC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpE,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CACvD;QACE,aAAa,EAAE,kBAAkB;QACjC,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"prepareAssortmentMediaUpload.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,4BAA4B,CACxD,IAAU,EACV,EAAE,SAAS,EAAE,YAAY,EAA+C,EACxE,OAAgB;IAEhB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACrC,GAAG,CAAC,uCAAuC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpE,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CACvD;QACE,aAAa,EAAE,kBAAkB;QACjC,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,YAAY,EAAE;KACvB,EACD,OAAO,CACR,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -11,8 +11,8 @@ export default async function removeAssortmentMedia(root, { assortmentMediaId },
|
|
|
11
11
|
});
|
|
12
12
|
if (!assortmentMedia)
|
|
13
13
|
throw new AssortmentMediaNotFoundError({ assortmentMediaId });
|
|
14
|
-
await modules.files.delete(assortmentMedia.mediaId
|
|
15
|
-
await modules.assortments.media.delete(assortmentMediaId
|
|
14
|
+
await modules.files.delete(assortmentMedia.mediaId);
|
|
15
|
+
await modules.assortments.media.delete(assortmentMediaId);
|
|
16
16
|
return assortmentMedia;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=removeAssortmentMedia.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeAssortmentMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortmentMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB,CACjD,IAAU,EACV,EAAE,iBAAiB,EAAiC,EACpD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,kCAAkC,iBAAiB,EAAE,EAAE;QACzD,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAExE,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC;QAC1E,iBAAiB;KAClB,CAAC,CAAC;IACH,IAAI,CAAC,eAAe;QAAE,MAAM,IAAI,4BAA4B,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAEpF,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"removeAssortmentMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortmentMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB,CACjD,IAAU,EACV,EAAE,iBAAiB,EAAiC,EACpD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,kCAAkC,iBAAiB,EAAE,EAAE;QACzD,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAExE,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC;QAC1E,iBAAiB;KAClB,CAAC,CAAC;IACH,IAAI,CAAC,eAAe;QAAE,MAAM,IAAI,4BAA4B,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAEpF,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAE1D,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -3,6 +3,6 @@ export default async function reorderAssortmentFilters(root, params, { modules,
|
|
|
3
3
|
log('mutation reorderAssortmentFilters', { userId });
|
|
4
4
|
return modules.assortments.filters.updateManualOrder({
|
|
5
5
|
sortKeys: params.sortKeys,
|
|
6
|
-
}
|
|
6
|
+
});
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=reorderAssortmentFilters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorderAssortmentFilters.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentFilters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,wBAAwB,CACpD,IAAU,EACV,MAA4E,EAC5E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,mCAAmC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAErD,OAAO,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"reorderAssortmentFilters.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentFilters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,wBAAwB,CACpD,IAAU,EACV,MAA4E,EAC5E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,mCAAmC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAErD,OAAO,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACnD,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -3,6 +3,6 @@ export default async function reorderAssortmentLinks(root, params, { modules, us
|
|
|
3
3
|
log('mutation reorderAssortmentLinks', { userId });
|
|
4
4
|
return modules.assortments.links.updateManualOrder({
|
|
5
5
|
sortKeys: params.sortKeys,
|
|
6
|
-
}, { skipInvalidation: false }
|
|
6
|
+
}, { skipInvalidation: false });
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=reorderAssortmentLinks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorderAssortmentLinks.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentLinks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB,CAClD,IAAU,EACV,MAA0E,EAC1E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,iCAAiC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAChD;QACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,EACD,EAAE,gBAAgB,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"reorderAssortmentLinks.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentLinks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB,CAClD,IAAU,EACV,MAA0E,EAC1E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,iCAAiC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAChD;QACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,EACD,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,6 @@ export default async function reorderAssortmentMedia(root, params, { modules, us
|
|
|
3
3
|
log('mutation reorderAssortmentMedia', { userId });
|
|
4
4
|
return modules.assortments.media.updateManualOrder({
|
|
5
5
|
sortKeys: params.sortKeys,
|
|
6
|
-
}
|
|
6
|
+
});
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=reorderAssortmentMedia.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorderAssortmentMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB,CAClD,IAAU,EACV,MAA2E,EAC3E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,iCAAiC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"reorderAssortmentMedia.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB,CAClD,IAAU,EACV,MAA2E,EAC3E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,iCAAiC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACjD,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -3,6 +3,6 @@ export default async function reorderAssortmentProducts(root, params, { modules,
|
|
|
3
3
|
log('mutation reorderAssortmentProducts', { userId });
|
|
4
4
|
return modules.assortments.products.updateManualOrder({
|
|
5
5
|
sortKeys: params.sortKeys,
|
|
6
|
-
}, { skipInvalidation: false }
|
|
6
|
+
}, { skipInvalidation: false });
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=reorderAssortmentProducts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorderAssortmentProducts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentProducts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,yBAAyB,CACrD,IAAU,EACV,MAA6E,EAC7E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,oCAAoC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CACnD;QACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,EACD,EAAE,gBAAgB,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"reorderAssortmentProducts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/reorderAssortmentProducts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,yBAAyB,CACrD,IAAU,EACV,MAA6E,EAC7E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,oCAAoC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CACnD;QACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,EACD,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@ export default async function setBaseAssortment(root, { assortmentId }, { module
|
|
|
6
6
|
throw new InvalidIdError({ assortmentId });
|
|
7
7
|
if (!(await modules.assortments.assortmentExists({ assortmentId })))
|
|
8
8
|
throw new AssortmentNotFoundError({ assortmentId });
|
|
9
|
-
await modules.assortments.setBase(assortmentId
|
|
9
|
+
await modules.assortments.setBase(assortmentId);
|
|
10
10
|
return modules.assortments.findAssortment({ assortmentId });
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=setBaseAssortment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setBaseAssortment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/setBaseAssortment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,K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CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -7,7 +7,7 @@ export default async function updateAssortment(root, params, { modules, userId }
|
|
|
7
7
|
throw new InvalidIdError({ assortmentId });
|
|
8
8
|
if (!(await modules.assortments.assortmentExists({ assortmentId })))
|
|
9
9
|
throw new AssortmentNotFoundError({ assortmentId });
|
|
10
|
-
await modules.assortments.update(assortmentId, assortment
|
|
10
|
+
await modules.assortments.update(assortmentId, assortment);
|
|
11
11
|
return modules.assortments.findAssortment({ assortmentId });
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=updateAssortment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAssortment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/updateAssortment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAU,EACV,MAAwD,EACxD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAE5C,GAAG,CAAC,6BAA6B,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE7D,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAE9D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"updateAssortment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/updateAssortment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAU,EACV,MAAwD,EACxD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAE5C,GAAG,CAAC,6BAA6B,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE7D,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAE9D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAE3D,OAAO,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -11,6 +11,6 @@ export default async function updateAssortmentMediaTexts(root, { texts, assortme
|
|
|
11
11
|
});
|
|
12
12
|
if (!assortmentMedia)
|
|
13
13
|
throw new AssortmentMediaNotFoundError({ assortmentMediaId });
|
|
14
|
-
return modules.assortments.media.texts.updateMediaTexts(assortmentMediaId, texts
|
|
14
|
+
return modules.assortments.media.texts.updateMediaTexts(assortmentMediaId, texts);
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=updateAssortmentMediaTexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAssortmentMediaTexts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,0BAA0B,CACtD,IAAU,EACV,EAAE,KAAK,EAAE,iBAAiB,EAAoE,EAC9F,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,uCAAuC,iBAAiB,EAAE,EAAE;QAC9D,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAExE,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC;QAC1E,iBAAiB;KAClB,CAAC,CAAC;IAEH,IAAI,CAAC,eAAe;QAAE,MAAM,IAAI,4BAA4B,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAEpF,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"updateAssortmentMediaTexts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,0BAA0B,CACtD,IAAU,EACV,EAAE,KAAK,EAAE,iBAAiB,EAAoE,EAC9F,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,uCAAuC,iBAAiB,EAAE,EAAE;QAC9D,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAExE,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC;QAC1E,iBAAiB;KAClB,CAAC,CAAC;IAEH,IAAI,CAAC,eAAe;QAAE,MAAM,IAAI,4BAA4B,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAEpF,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -6,6 +6,6 @@ export default async function updateAssortmentTexts(root, { texts, assortmentId
|
|
|
6
6
|
throw new InvalidIdError({ assortmentId });
|
|
7
7
|
if (!(await modules.assortments.assortmentExists({ assortmentId })))
|
|
8
8
|
throw new AssortmentNotFoundError({ assortmentId });
|
|
9
|
-
return modules.assortments.texts.updateTexts(assortmentId, texts
|
|
9
|
+
return modules.assortments.texts.updateTexts(assortmentId, texts);
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=updateAssortmentTexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateAssortmentTexts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/updateAssortmentTexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB,CACjD,IAAU,EACV,EAAE,KAAK,EAAE,YAAY,EAA0D,EAC/E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,kCAAkC,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAElE,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAE9D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"updateAssortmentTexts.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/updateAssortmentTexts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB,CACjD,IAAU,EACV,EAAE,KAAK,EAAE,YAAY,EAA0D,EAC/E,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,kCAAkC,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAElE,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAE9D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,uBAAuB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtD,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -16,13 +16,13 @@ export default async function bookmark(root, { productId, bookmarked }, { userId
|
|
|
16
16
|
const bookmarkId = await modules.bookmarks.create({
|
|
17
17
|
productId,
|
|
18
18
|
userId,
|
|
19
|
-
}
|
|
19
|
+
});
|
|
20
20
|
return modules.bookmarks.findById(bookmarkId);
|
|
21
21
|
}
|
|
22
22
|
if (!foundBookmark) {
|
|
23
23
|
throw new BookmarkNotFoundError({ productId, userId });
|
|
24
24
|
}
|
|
25
|
-
await modules.bookmarks.delete(foundBookmark._id
|
|
25
|
+
await modules.bookmarks.delete(foundBookmark._id);
|
|
26
26
|
return foundBookmark;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=bookmark.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookmark.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/bookmarks/bookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE9F,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,QAAQ,CACpC,IAAU,EACV,EAAE,SAAS,EAAE,UAAU,EAA6C,EACpE,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,mBAAmB,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAEhD,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,aAAa,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,wBAAwB,CAAC;QACrE,SAAS;QACT,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,UAAU,EAAE;QACd,IAAI,aAAa;YAAE,OAAO,aAAa,CAAC;QAExC,MAAM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C,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAElD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -18,7 +18,7 @@ export default async function createBookmark(root, { productId, userId }, { modu
|
|
|
18
18
|
const bookmarkId = await modules.bookmarks.create({
|
|
19
19
|
userId,
|
|
20
20
|
productId,
|
|
21
|
-
}
|
|
21
|
+
});
|
|
22
22
|
return modules.bookmarks.findById(bookmarkId);
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=createBookmark.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBookmark.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/bookmarks/createBookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEnG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,cAAc,CAC1C,IAAU,EACV,EAAE,SAAS,EAAE,MAAM,EAAyC,EAC5D,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAW;IAE5C,GAAG,CAAC,+BAA+B,MAAM,EAAE,EAAE;QAC3C,SAAS;QACT,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;IACH,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACxD,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,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,wBAAwB,CAAC;QAChE,SAAS;QACT,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,QAAQ;QAAE,MAAM,IAAI,0BAA0B,CAAC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;AAChD,CAAC"}
|
|
@@ -3,8 +3,7 @@ export default async function createCountry(root, { country }, { userId, modules
|
|
|
3
3
|
log('mutation createCountry', { userId });
|
|
4
4
|
const countryId = await modules.countries.create({
|
|
5
5
|
...country,
|
|
6
|
-
|
|
7
|
-
}, userId);
|
|
6
|
+
});
|
|
8
7
|
return modules.countries.findCountry({ countryId });
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=createCountry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCountry.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/countries/createCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAI5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,EAAE,OAAO,EAAwB,EACjC,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"createCountry.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/countries/createCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAI5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,EAAE,OAAO,EAAwB,EACjC,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;QAC/C,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -6,7 +6,7 @@ export default async function removeCountry(root, { countryId }, { userId, modul
|
|
|
6
6
|
throw new InvalidIdError({ countryId });
|
|
7
7
|
if (!(await modules.countries.countryExists({ countryId })))
|
|
8
8
|
throw new CountryNotFoundError({ countryId });
|
|
9
|
-
await modules.countries.delete(countryId
|
|
9
|
+
await modules.countries.delete(countryId);
|
|
10
10
|
return modules.countries.findCountry({ countryId });
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=removeCountry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeCountry.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/countries/removeCountry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,EAAE,SAAS,EAAyB,EACpC,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,0BAA0B,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvD,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACzD,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAEhD,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"removeCountry.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/countries/removeCountry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,EAAE,SAAS,EAAyB,EACpC,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,0BAA0B,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvD,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACzD,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAEhD,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -6,7 +6,7 @@ export default async function updateCountry(root, { country, countryId }, { user
|
|
|
6
6
|
throw new InvalidIdError({ countryId });
|
|
7
7
|
if (!(await modules.countries.countryExists({ countryId })))
|
|
8
8
|
throw new CountryNotFoundError({ countryId });
|
|
9
|
-
await modules.countries.update(countryId, country
|
|
9
|
+
await modules.countries.update(countryId, country);
|
|
10
10
|
return modules.countries.findCountry({ countryId });
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=updateCountry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCountry.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/countries/updateCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,EAAE,OAAO,EAAE,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AC,EAAE,SAAS,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -3,8 +3,7 @@ export default async function createCurrency(root, { currency }, { userId, modul
|
|
|
3
3
|
log('mutation createCurrency', { userId });
|
|
4
4
|
const currencyId = await modules.currencies.create({
|
|
5
5
|
...currency,
|
|
6
|
-
|
|
7
|
-
}, userId);
|
|
6
|
+
});
|
|
8
7
|
return modules.currencies.findCurrency({ currencyId });
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=createCurrency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCurrency.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/currencies/createCurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAI5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,cAAc,CAC1C,IAAU,EACV,EAAE,QAAQ,EAA0B,EACpC,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"createCurrency.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/currencies/createCurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAI5C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,cAAc,CAC1C,IAAU,EACV,EAAE,QAAQ,EAA0B,EACpC,EAAE,MAAM,EAAE,OAAO,EAAW;IAE5B,GAAG,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QACjD,GAAG,QAAQ;KACZ,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AACzD,CAAC"}
|