@unchainedshop/api 2.0.0-beta7 → 2.0.0-beta9
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 +4 -6
- package/lib/api-index.js +5 -13
- package/lib/api-index.js.map +1 -1
- package/lib/context.d.ts +0 -1
- package/lib/context.js +0 -12
- package/lib/context.js.map +1 -1
- package/lib/createGraphQLServer.d.ts +1 -1
- package/lib/createGraphQLServer.js +13 -50
- 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/createApolloMiddleware.d.ts +4 -0
- package/lib/express/createApolloMiddleware.js +34 -0
- package/lib/express/createApolloMiddleware.js.map +1 -0
- package/lib/express/createBulkImportMiddleware.d.ts +2 -0
- package/lib/express/createBulkImportMiddleware.js +79 -0
- package/lib/express/createBulkImportMiddleware.js.map +1 -0
- package/lib/express/createERCMetadataMiddleware.d.ts +3 -0
- package/lib/express/createERCMetadataMiddleware.js +57 -0
- package/lib/express/createERCMetadataMiddleware.js.map +1 -0
- package/lib/express/createSingleSignOnMiddleware.d.ts +6 -0
- package/lib/express/createSingleSignOnMiddleware.js +71 -0
- package/lib/express/createSingleSignOnMiddleware.js.map +1 -0
- package/lib/express/index.d.ts +6 -0
- package/lib/express/index.js +27 -0
- package/lib/express/index.js.map +1 -0
- package/lib/loaders/index.js +5 -9
- package/lib/loaders/index.js.map +1 -1
- package/lib/resolvers/mutations/accounts/changePassword.d.ts +0 -2
- package/lib/resolvers/mutations/accounts/changePassword.js +14 -3
- package/lib/resolvers/mutations/accounts/changePassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/createUser.js +19 -5
- 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 +18 -5
- 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.d.ts +0 -1
- package/lib/resolvers/mutations/accounts/loginWithPassword.js +22 -4
- 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.d.ts +0 -1
- package/lib/resolvers/mutations/accounts/resetPassword.js +18 -3
- package/lib/resolvers/mutations/accounts/resetPassword.js.map +1 -1
- package/lib/resolvers/mutations/accounts/setPassword.d.ts +0 -1
- package/lib/resolvers/mutations/accounts/setPassword.js +1 -1
- package/lib/resolvers/mutations/accounts/setPassword.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/removeAssortment.js +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortment.js.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentFilter.js +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentFilter.js.map +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentLink.js +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentLink.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/removeAssortmentProduct.js +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentProduct.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.d.ts +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 +4 -4
- 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 +2 -1
- 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/pageView.d.ts +1 -1
- package/lib/resolvers/mutations/pageView.js +2 -2
- package/lib/resolvers/mutations/pageView.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.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProduct.js +17 -8
- 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.d.ts +2 -2
- 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.d.ts +2 -2
- 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.d.ts +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.d.ts +1 -4
- package/lib/resolvers/type/assortment/assortment-path-link-types.js +1 -7
- 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.js +0 -2
- package/lib/resolvers/type/assortment/assortment-product-types.js.map +1 -1
- package/lib/resolvers/type/assortment/assortment-types.d.ts +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.d.ts +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/country-types.d.ts +1 -1
- package/lib/resolvers/type/delivery-provider-types.d.ts +1 -1
- package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts +2 -2
- package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts +2 -2
- package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts +2 -2
- package/lib/resolvers/type/enrollment/enrollment-plan-tyes.d.ts +2 -2
- 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/enrollment/enrollment-types.d.ts +2 -2
- package/lib/resolvers/type/event-types.d.ts +1 -1
- package/lib/resolvers/type/filter/filter-option-types.d.ts +2 -2
- package/lib/resolvers/type/filter/filter-types.d.ts +2 -2
- 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-delivery-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-delivery-shipping-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-global-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-item-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-item-types.d.ts +1 -1
- 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/order/order-payment-card-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-payment-discount-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-payment-generic-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-payment-invoice-types.d.ts +1 -1
- package/lib/resolvers/type/order/order-types.d.ts +1 -1
- package/lib/resolvers/type/price-types.d.ts +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-discount.d.ts +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.d.ts +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.d.ts +2 -2
- package/lib/resolvers/type/quotation-types.js +0 -1
- package/lib/resolvers/type/quotation-types.js.map +1 -1
- package/lib/resolvers/type/shop-types.d.ts +1 -1
- package/lib/resolvers/type/token-types.d.ts +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 +4 -3
- package/lib/resolvers/type/user-types.js +10 -21
- package/lib/resolvers/type/user-types.js.map +1 -1
- package/lib/resolvers/type/webauthn-credentials-types.d.ts +1 -1
- package/lib/resolvers/type/work-types.d.ts +1 -1
- package/lib/roles/admin.js +3 -72
- package/lib/roles/admin.js.map +1 -1
- package/lib/schema/{types/log.d.ts → directives.d.ts} +0 -0
- package/lib/schema/directives.js +15 -0
- package/lib/schema/directives.js.map +1 -0
- package/lib/schema/index.js +2 -1
- package/lib/schema/index.js.map +1 -1
- package/lib/schema/inputTypes.js +0 -15
- package/lib/schema/inputTypes.js.map +1 -1
- package/lib/schema/mutation.js +22 -36
- package/lib/schema/mutation.js.map +1 -1
- package/lib/schema/query.js +42 -22
- package/lib/schema/query.js.map +1 -1
- package/lib/schema/types/assortment.js +10 -10
- package/lib/schema/types/color.js +1 -1
- package/lib/schema/types/country.js +1 -1
- package/lib/schema/types/currency.js +1 -1
- package/lib/schema/types/delivery.js +3 -2
- package/lib/schema/types/delivery.js.map +1 -1
- package/lib/schema/types/dimensions.js +1 -1
- package/lib/schema/types/discount.js +1 -1
- package/lib/schema/types/filter.js +5 -8
- package/lib/schema/types/filter.js.map +1 -1
- package/lib/schema/types/geo-position.js +1 -1
- package/lib/schema/types/language.js +1 -1
- package/lib/schema/types/media.js +1 -1
- package/lib/schema/types/payment.js +3 -3
- package/lib/schema/types/price.js +2 -2
- package/lib/schema/types/product/bundle-product.js +2 -3
- package/lib/schema/types/product/bundle-product.js.map +1 -1
- package/lib/schema/types/product/configurable-product.js +7 -7
- package/lib/schema/types/product/plan-product.js +3 -3
- package/lib/schema/types/product/product.js +11 -11
- package/lib/schema/types/product/simple-product.js +4 -4
- package/lib/schema/types/product/tokenized-product.js +3 -3
- package/lib/schema/types/search.js +3 -8
- package/lib/schema/types/search.js.map +1 -1
- package/lib/schema/types/shop.js +2 -2
- package/lib/schema/types/types.js +1 -1
- package/lib/schema/types/user.js +4 -3
- package/lib/schema/types/user.js.map +1 -1
- package/lib/schema/types/warehousing.js +3 -3
- package/package.json +26 -12
- package/src/acl.ts +2 -2
- package/src/api-index.ts +6 -27
- package/src/context.ts +0 -18
- package/src/createGraphQLServer.ts +14 -68
- package/src/errors.ts +85 -0
- package/src/express/createApolloMiddleware.ts +40 -0
- package/src/express/createBulkImportMiddleware.ts +87 -0
- package/src/express/createERCMetadataMiddleware.ts +73 -0
- package/src/express/createSingleSignOnMiddleware.ts +84 -0
- package/src/express/index.ts +48 -0
- package/src/loaders/index.ts +27 -35
- package/src/resolvers/mutations/accounts/changePassword.ts +11 -6
- package/src/resolvers/mutations/accounts/createUser.ts +21 -6
- 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 +20 -5
- 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 +27 -5
- 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 +21 -5
- package/src/resolvers/mutations/accounts/setPassword.ts +2 -2
- 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/removeAssortment.ts +1 -1
- package/src/resolvers/mutations/assortments/removeAssortmentFilter.ts +1 -1
- package/src/resolvers/mutations/assortments/removeAssortmentLink.ts +1 -1
- package/src/resolvers/mutations/assortments/removeAssortmentMedia.ts +2 -2
- package/src/resolvers/mutations/assortments/removeAssortmentProduct.ts +1 -1
- 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 +4 -4
- 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/pageView.ts +2 -2
- 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 +26 -7
- 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 -11
- 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 -25
- package/src/roles/admin.ts +3 -72
- package/src/schema/directives.js +14 -0
- package/src/schema/index.js +2 -1
- package/src/schema/inputTypes.js +0 -15
- package/src/schema/mutation.js +22 -36
- package/src/schema/query.js +42 -22
- package/src/schema/types/assortment.js +10 -10
- package/src/schema/types/color.js +1 -1
- package/src/schema/types/country.js +1 -1
- package/src/schema/types/currency.js +1 -1
- package/src/schema/types/delivery.js +3 -2
- package/src/schema/types/dimensions.js +1 -1
- package/src/schema/types/discount.js +1 -1
- package/src/schema/types/filter.js +5 -8
- package/src/schema/types/geo-position.js +1 -1
- package/src/schema/types/language.js +1 -1
- package/src/schema/types/media.js +1 -1
- package/src/schema/types/payment.js +3 -3
- package/src/schema/types/price.js +2 -2
- package/src/schema/types/product/bundle-product.js +2 -3
- package/src/schema/types/product/configurable-product.js +7 -7
- package/src/schema/types/product/plan-product.js +3 -3
- package/src/schema/types/product/product.js +11 -11
- package/src/schema/types/product/simple-product.js +4 -4
- package/src/schema/types/product/tokenized-product.js +3 -3
- package/src/schema/types/search.js +3 -8
- package/src/schema/types/shop.js +2 -2
- package/src/schema/types/types.js +1 -1
- package/src/schema/types/user.js +4 -3
- package/src/schema/types/warehousing.js +3 -3
- package/tests/api-index.test.ts +78 -0
- package/lib/createBulkImportServer.d.ts +0 -2
- package/lib/createBulkImportServer.js +0 -81
- package/lib/createBulkImportServer.js.map +0 -1
- package/lib/createERCMetadataServer.d.ts +0 -2
- package/lib/createERCMetadataServer.js +0 -59
- package/lib/createERCMetadataServer.js.map +0 -1
- package/lib/schema/types/log.js +0 -16
- package/lib/schema/types/log.js.map +0 -1
- package/src/createBulkImportServer.ts +0 -95
- package/src/createERCMetadataServer.ts +0 -78
- package/src/schema/types/log.js +0 -15
|
@@ -15,5 +15,5 @@ export default async function updateUserProfile(
|
|
|
15
15
|
if (!(await modules.users.userExists({ userId: foreignUserId })))
|
|
16
16
|
throw new UserNotFoundError({ userId: foreignUserId });
|
|
17
17
|
|
|
18
|
-
return modules.users.updateRoles(foreignUserId, params.roles
|
|
18
|
+
return modules.users.updateRoles(foreignUserId, params.roles);
|
|
19
19
|
}
|
|
@@ -15,5 +15,5 @@ export default async function updateUserProfile(
|
|
|
15
15
|
if (!(await modules.users.userExists({ userId: normalizedUserId })))
|
|
16
16
|
throw new UserNotFoundError({ userId: normalizedUserId });
|
|
17
17
|
|
|
18
|
-
return modules.users.updateTags(normalizedUserId, params.tags
|
|
18
|
+
return modules.users.updateTags(normalizedUserId, params.tags);
|
|
19
19
|
}
|
|
@@ -22,7 +22,6 @@ export default async function updateUserAvatar(
|
|
|
22
22
|
directoryName: 'user-avatars',
|
|
23
23
|
rawFile: params.avatar,
|
|
24
24
|
meta: { userId: normalizedUserId },
|
|
25
|
-
userId,
|
|
26
25
|
},
|
|
27
26
|
context,
|
|
28
27
|
);
|
|
@@ -36,5 +35,5 @@ export default async function updateUserAvatar(
|
|
|
36
35
|
);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
return modules.users.updateAvatar(normalizedUserId, file._id
|
|
38
|
+
return modules.users.updateAvatar(normalizedUserId, file._id);
|
|
40
39
|
}
|
|
@@ -16,5 +16,5 @@ export default async function updateUserProfile(
|
|
|
16
16
|
if (!(await modules.users.userExists({ userId: normalizedUserId })))
|
|
17
17
|
throw UserNotFoundError({ id: normalizedUserId });
|
|
18
18
|
|
|
19
|
-
return modules.users.updateProfile(normalizedUserId, profile
|
|
19
|
+
return modules.users.updateProfile(normalizedUserId, profile);
|
|
20
20
|
}
|
|
@@ -17,5 +17,5 @@ export const getOrderCart = async (params: { orderId?: string; user: User }, con
|
|
|
17
17
|
const cart = await modules.orders.cart({ countryContext }, user);
|
|
18
18
|
if (cart) return cart;
|
|
19
19
|
|
|
20
|
-
return services.orders.createUserCart({ user }, context);
|
|
20
|
+
return services.orders.createUserCart({ user, countryCode: context.countryContext }, context);
|
|
21
21
|
};
|
|
@@ -10,13 +10,9 @@ export default async function createWarehousingProvider(
|
|
|
10
10
|
) {
|
|
11
11
|
log('mutation createWarehousingProvider', { userId });
|
|
12
12
|
|
|
13
|
-
const warehousingProviderId = await modules.warehousing.create(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
authorId: userId,
|
|
17
|
-
},
|
|
18
|
-
userId,
|
|
19
|
-
);
|
|
13
|
+
const warehousingProviderId = await modules.warehousing.create({
|
|
14
|
+
...params.warehousingProvider,
|
|
15
|
+
});
|
|
20
16
|
|
|
21
17
|
if (!warehousingProviderId) throw new ProviderConfigurationInvalid(params.warehousingProvider);
|
|
22
18
|
|
|
@@ -18,5 +18,5 @@ export default async function removeWarehousingProvider(
|
|
|
18
18
|
});
|
|
19
19
|
if (!provider) throw new WarehousingProviderNotFoundError({ warehousingProviderId });
|
|
20
20
|
|
|
21
|
-
return modules.warehousing.delete(warehousingProviderId
|
|
21
|
+
return modules.warehousing.delete(warehousingProviderId);
|
|
22
22
|
}
|
|
@@ -22,7 +22,7 @@ export default async function updateWarehousingProvider(
|
|
|
22
22
|
if (!(await modules.warehousing.providerExists({ warehousingProviderId })))
|
|
23
23
|
throw new WarehousingProviderNotFoundError({ warehousingProviderId });
|
|
24
24
|
|
|
25
|
-
await modules.warehousing.update(warehousingProviderId, warehousingProvider
|
|
25
|
+
await modules.warehousing.update(warehousingProviderId, warehousingProvider);
|
|
26
26
|
|
|
27
27
|
return modules.warehousing.findProvider({ warehousingProviderId });
|
|
28
28
|
}
|
|
@@ -23,18 +23,14 @@ export default async function finishWork(
|
|
|
23
23
|
|
|
24
24
|
if (!workId) throw new InvalidIdError({ workId });
|
|
25
25
|
|
|
26
|
-
const work = await modules.worker.finishWork(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
finished,
|
|
35
|
-
},
|
|
36
|
-
userId,
|
|
37
|
-
);
|
|
26
|
+
const work = await modules.worker.finishWork(workId, {
|
|
27
|
+
result,
|
|
28
|
+
error,
|
|
29
|
+
success,
|
|
30
|
+
worker,
|
|
31
|
+
started,
|
|
32
|
+
finished,
|
|
33
|
+
});
|
|
38
34
|
|
|
39
35
|
if (!work) throw new WorkNotFoundOrWrongStatus({ workId });
|
|
40
36
|
|
|
@@ -13,7 +13,7 @@ export default async function removeWork(
|
|
|
13
13
|
|
|
14
14
|
if (!workId) throw new InvalidIdError({ workId });
|
|
15
15
|
|
|
16
|
-
const work = await modules.worker.deleteWork(workId
|
|
16
|
+
const work = await modules.worker.deleteWork(workId);
|
|
17
17
|
|
|
18
18
|
if (!work) throw new WorkNotFoundOrWrongStatus({ workId });
|
|
19
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
-
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
|
+
import { Context, Root, SortOption } from '@unchainedshop/types/api';
|
|
3
3
|
import { UserQuery } from '@unchainedshop/types/user';
|
|
4
4
|
|
|
5
5
|
export default async function users(
|
|
@@ -7,6 +7,7 @@ export default async function users(
|
|
|
7
7
|
params: UserQuery & {
|
|
8
8
|
limit?: number;
|
|
9
9
|
offset?: number;
|
|
10
|
+
sort?: Array<SortOption>;
|
|
10
11
|
},
|
|
11
12
|
{ modules, userId }: Context,
|
|
12
13
|
) {
|
|
@@ -2,7 +2,7 @@ import { log } from '@unchainedshop/logger';
|
|
|
2
2
|
import { Root, Context, SortOption } from '@unchainedshop/types/api';
|
|
3
3
|
import { WorkStatus } from '@unchainedshop/types/worker';
|
|
4
4
|
|
|
5
|
-
export default async function
|
|
5
|
+
export default async function workQueue(
|
|
6
6
|
root: Root,
|
|
7
7
|
{
|
|
8
8
|
limit,
|
|
@@ -13,7 +13,6 @@ export const AssortmentFilter: AssortmentFilterHelperTypes = {
|
|
|
13
13
|
assortment: async (obj, _, { loaders }) => {
|
|
14
14
|
const assortment = await loaders.assortmentLoader.load({
|
|
15
15
|
assortmentId: obj.assortmentId,
|
|
16
|
-
includeInactive: true,
|
|
17
16
|
});
|
|
18
17
|
return assortment;
|
|
19
18
|
},
|
|
@@ -12,7 +12,6 @@ export const AssortmentLink: AssortmentLinkHelperTypes = {
|
|
|
12
12
|
child: async (obj, _, { loaders }) => {
|
|
13
13
|
const assortment = await loaders.assortmentLoader.load({
|
|
14
14
|
assortmentId: obj.childAssortmentId,
|
|
15
|
-
includeInactive: true,
|
|
16
15
|
});
|
|
17
16
|
return assortment;
|
|
18
17
|
},
|
|
@@ -20,7 +19,6 @@ export const AssortmentLink: AssortmentLinkHelperTypes = {
|
|
|
20
19
|
parent: async (obj, _, { loaders }) => {
|
|
21
20
|
const assortment = await loaders.assortmentLoader.load({
|
|
22
21
|
assortmentId: obj.parentAssortmentId,
|
|
23
|
-
includeInactive: true,
|
|
24
22
|
});
|
|
25
23
|
return assortment;
|
|
26
24
|
},
|
|
@@ -13,11 +13,13 @@ export interface AssortmentMediaHelperTypes {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const AssortmentMedia: AssortmentMediaHelperTypes = {
|
|
16
|
+
// TODO: Loader for assortment media texts!
|
|
16
17
|
texts: (obj, { forceLocale }, { modules, localeContext }) =>
|
|
17
18
|
modules.assortments.media.texts.findLocalizedMediaText({
|
|
18
19
|
assortmentMediaId: obj._id,
|
|
19
20
|
locale: forceLocale || localeContext.normalized,
|
|
20
21
|
}),
|
|
21
22
|
|
|
23
|
+
// TODO: Loader for files!
|
|
22
24
|
file: (obj, _, { modules }) => modules.files.findFile({ fileId: obj.mediaId }),
|
|
23
25
|
};
|
|
@@ -9,28 +9,18 @@ type HelperType<P, T> = (assortmentPathLink: AssortmentPathLinkType, params: P,
|
|
|
9
9
|
|
|
10
10
|
export interface AssortmentPathLinkHelperTypes {
|
|
11
11
|
link: HelperType<never, Promise<AssortmentLinkType>>;
|
|
12
|
-
|
|
13
|
-
assortmentSlug: HelperType<{ forceLocale?: string }, Promise<string>>;
|
|
14
|
-
|
|
15
12
|
assortmentTexts: HelperType<{ forceLocale?: string }, Promise<AssortmentText>>;
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
export const AssortmentPathLink: AssortmentPathLinkHelperTypes = {
|
|
19
16
|
link: async ({ assortmentId, childAssortmentId }, _, { modules }) => {
|
|
17
|
+
// TODO: Loader
|
|
20
18
|
return modules.assortments.links.findLink({
|
|
21
19
|
parentAssortmentId: assortmentId,
|
|
22
20
|
childAssortmentId,
|
|
23
21
|
});
|
|
24
22
|
},
|
|
25
23
|
|
|
26
|
-
assortmentSlug: async ({ assortmentId }, params, { loaders, localeContext }) => {
|
|
27
|
-
const text = await loaders.assortmentTextLoader.load({
|
|
28
|
-
assortmentId,
|
|
29
|
-
locale: params.forceLocale || localeContext.normalized,
|
|
30
|
-
});
|
|
31
|
-
return text.slug;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
24
|
assortmentTexts: async ({ assortmentId }, params, { loaders, localeContext }) => {
|
|
35
25
|
const text = await loaders.assortmentTextLoader.load({
|
|
36
26
|
assortmentId,
|
|
@@ -16,7 +16,6 @@ export const AssortmentProduct: AssortmentProductHelperTypes = {
|
|
|
16
16
|
assortment: async (obj, _, { loaders }) => {
|
|
17
17
|
const assortment = await loaders.assortmentLoader.load({
|
|
18
18
|
assortmentId: obj.assortmentId,
|
|
19
|
-
includeInactive: true,
|
|
20
19
|
});
|
|
21
20
|
return assortment;
|
|
22
21
|
},
|
|
@@ -24,7 +23,6 @@ export const AssortmentProduct: AssortmentProductHelperTypes = {
|
|
|
24
23
|
product: async (obj, _, { loaders }) => {
|
|
25
24
|
const product = await loaders.productLoader.load({
|
|
26
25
|
productId: obj.productId,
|
|
27
|
-
includeDrafts: true,
|
|
28
26
|
});
|
|
29
27
|
return product;
|
|
30
28
|
},
|
|
@@ -62,10 +62,11 @@ export const Assortment: AssortmentHelperTypes = {
|
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
childrenCount: async (assortment, { includeInactive = false }, { modules }) => {
|
|
65
|
-
|
|
65
|
+
// TODO: Loader
|
|
66
|
+
const assortmentChildLinks = await modules.assortments.links.findLinks({
|
|
66
67
|
parentAssortmentId: assortment._id,
|
|
67
68
|
});
|
|
68
|
-
const assortmentIds =
|
|
69
|
+
const assortmentIds = assortmentChildLinks.map(({ childAssortmentId }) => childAssortmentId);
|
|
69
70
|
|
|
70
71
|
const selector: Query = {
|
|
71
72
|
assortmentIds,
|
|
@@ -77,6 +78,7 @@ export const Assortment: AssortmentHelperTypes = {
|
|
|
77
78
|
},
|
|
78
79
|
|
|
79
80
|
filterAssignments: async (obj, _, { modules }) => {
|
|
81
|
+
// TODO: Loader & move default sort to module
|
|
80
82
|
return modules.assortments.filters.findFilters(
|
|
81
83
|
{
|
|
82
84
|
assortmentId: obj._id,
|
|
@@ -87,7 +89,8 @@ export const Assortment: AssortmentHelperTypes = {
|
|
|
87
89
|
);
|
|
88
90
|
},
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
async linkedAssortments(obj, _, { modules }) {
|
|
93
|
+
// TODO: Loader
|
|
91
94
|
return modules.assortments.links.findLinks({
|
|
92
95
|
assortmentId: obj._id,
|
|
93
96
|
});
|
|
@@ -100,7 +103,8 @@ export const Assortment: AssortmentHelperTypes = {
|
|
|
100
103
|
});
|
|
101
104
|
},
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
async productAssignments(obj, _, { modules }) {
|
|
107
|
+
// TODO: Loader & move default sort to core module
|
|
104
108
|
return modules.assortments.products.findProducts(
|
|
105
109
|
{
|
|
106
110
|
assortmentId: obj._id,
|
|
@@ -124,6 +128,7 @@ export const Assortment: AssortmentHelperTypes = {
|
|
|
124
128
|
assortmentId: obj._id,
|
|
125
129
|
ignoreChildAssortments: query.ignoreChildAssortments,
|
|
126
130
|
});
|
|
131
|
+
|
|
127
132
|
const filterIds = await context.modules.assortments.filters.findFilterIds({
|
|
128
133
|
assortmentId: obj._id,
|
|
129
134
|
});
|
|
@@ -70,7 +70,6 @@ export const OrderItem: OrderItemHelperTypes = {
|
|
|
70
70
|
});
|
|
71
71
|
const product = await loaders.productLoader.load({
|
|
72
72
|
productId: obj.productId,
|
|
73
|
-
includeDrafts: true,
|
|
74
73
|
});
|
|
75
74
|
|
|
76
75
|
return Promise.all(
|
|
@@ -103,7 +102,6 @@ export const OrderItem: OrderItemHelperTypes = {
|
|
|
103
102
|
originalProduct: async (obj, _, { loaders }) => {
|
|
104
103
|
const product = await loaders.productLoader.load({
|
|
105
104
|
productId: obj.originalProductId,
|
|
106
|
-
includeDrafts: true,
|
|
107
105
|
});
|
|
108
106
|
return product;
|
|
109
107
|
},
|
|
@@ -111,7 +109,6 @@ export const OrderItem: OrderItemHelperTypes = {
|
|
|
111
109
|
product: async (obj, _, { loaders }) => {
|
|
112
110
|
const product = await loaders.productLoader.load({
|
|
113
111
|
productId: obj.productId,
|
|
114
|
-
includeDrafts: true,
|
|
115
112
|
});
|
|
116
113
|
return product;
|
|
117
114
|
},
|
|
@@ -2,6 +2,7 @@ import { ProductAssortmentPathHelperTypes } from '@unchainedshop/types/products'
|
|
|
2
2
|
|
|
3
3
|
export const ProductAssortmentPath: ProductAssortmentPathHelperTypes = {
|
|
4
4
|
assortmentProduct: async ({ _id }, _, { modules }) => {
|
|
5
|
+
// TODO: Loader
|
|
5
6
|
return modules.assortments.products.findProduct({
|
|
6
7
|
assortmentProductId: _id,
|
|
7
8
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ProductMediaHelperTypes } from '@unchainedshop/types/products.media';
|
|
2
2
|
|
|
3
3
|
export const ProductMedia: ProductMediaHelperTypes = {
|
|
4
|
+
// TODO: Loader for product media texts!
|
|
4
5
|
texts: async (obj, { forceLocale }, { modules, localeContext }) => {
|
|
5
6
|
return modules.products.media.texts.findLocalizedMediaText({
|
|
6
7
|
productMediaId: obj._id,
|
|
@@ -9,6 +10,7 @@ export const ProductMedia: ProductMediaHelperTypes = {
|
|
|
9
10
|
},
|
|
10
11
|
|
|
11
12
|
file: async (obj, _, { modules }) => {
|
|
13
|
+
// TODO: Loader
|
|
12
14
|
return modules.files.findFile({ fileId: obj.mediaId });
|
|
13
15
|
},
|
|
14
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlanProductHelperTypes
|
|
1
|
+
import { PlanProductHelperTypes } from '@unchainedshop/types/products';
|
|
2
2
|
import { Product } from './product-types';
|
|
3
3
|
|
|
4
4
|
export const PlanProduct: PlanProductHelperTypes = {
|
|
@@ -37,7 +37,7 @@ export const PlanProduct: PlanProductHelperTypes = {
|
|
|
37
37
|
));
|
|
38
38
|
return modules.products.prices.userPrice(
|
|
39
39
|
obj,
|
|
40
|
-
{ quantity, currency, country: countryContext, useNetPrice },
|
|
40
|
+
{ quantity, userId: requestContext.userId, currency, country: countryContext, useNetPrice },
|
|
41
41
|
requestContext,
|
|
42
42
|
);
|
|
43
43
|
},
|
|
@@ -55,22 +55,6 @@ export const PlanProduct: PlanProductHelperTypes = {
|
|
|
55
55
|
return modules.products.prices.catalogPricesLeveled(obj, { currency, country: countryContext });
|
|
56
56
|
},
|
|
57
57
|
|
|
58
|
-
simulatedDiscounts: async () => {
|
|
59
|
-
// const { modules, countryContext } = requestContext;
|
|
60
|
-
// return modules.products.prices.userDiscounts(
|
|
61
|
-
// {
|
|
62
|
-
// quantity,
|
|
63
|
-
// country: countryContext,
|
|
64
|
-
// },
|
|
65
|
-
// requestContext
|
|
66
|
-
// );
|
|
67
|
-
return [] as Array<{
|
|
68
|
-
_id: string;
|
|
69
|
-
interface: any;
|
|
70
|
-
total: ProductPrice;
|
|
71
|
-
}>;
|
|
72
|
-
},
|
|
73
|
-
|
|
74
58
|
salesUnit(obj) {
|
|
75
59
|
return obj.commerce && obj.commerce.salesUnit;
|
|
76
60
|
},
|
|
@@ -14,7 +14,6 @@ export const ProductVariationAssignment: ProductVariationAssignmentHelperTypes =
|
|
|
14
14
|
product: async ({ assignment }, _, { loaders }) => {
|
|
15
15
|
const product = await loaders.productLoader.load({
|
|
16
16
|
productId: assignment.productId,
|
|
17
|
-
includeDrafts: true,
|
|
18
17
|
});
|
|
19
18
|
return product;
|
|
20
19
|
},
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
WebAuthnCredentials,
|
|
17
17
|
} from '@unchainedshop/types/user';
|
|
18
18
|
import type { Locale } from 'locale';
|
|
19
|
-
import { log, LogLevel } from '@unchainedshop/logger';
|
|
20
19
|
import { TokenSurrogate } from '@unchainedshop/types/warehousing';
|
|
20
|
+
import { Roles, permissions } from '@unchainedshop/roles';
|
|
21
21
|
import { checkAction, checkTypeResolver } from '../../acl';
|
|
22
22
|
import { actions } from '../../roles';
|
|
23
23
|
|
|
@@ -25,14 +25,15 @@ type HelperType<P, T> = (user: UserType, params: P, context: Context) => Promise
|
|
|
25
25
|
|
|
26
26
|
export interface UserHelperTypes {
|
|
27
27
|
_id: HelperType<any, boolean>;
|
|
28
|
+
created: HelperType<any, Date>;
|
|
29
|
+
updated: HelperType<any, Date>;
|
|
30
|
+
deleted: HelperType<any, Date>;
|
|
28
31
|
avatar: HelperType<{ localeContext: Locale }, File>;
|
|
29
32
|
bookmarks: HelperType<any, Array<Bookmark>>;
|
|
30
33
|
cart: HelperType<{ orderNumber?: string }, Order>;
|
|
31
34
|
country: HelperType<{ localeContext: Locale }, Country>;
|
|
32
|
-
email: HelperType<any, string>;
|
|
33
35
|
emails: HelperType<any, Array<string>>;
|
|
34
36
|
enrollments: HelperType<{ sort?: Array<SortOption>; queryString?: string }, Array<Enrollment>>;
|
|
35
|
-
isEmailVerified: HelperType<any, boolean>;
|
|
36
37
|
isGuest: HelperType<any, boolean>;
|
|
37
38
|
isInitialPassword: HelperType<any, boolean>;
|
|
38
39
|
isTwoFactorEnabled: HelperType<any, boolean>;
|
|
@@ -73,6 +74,9 @@ const getPrimaryEmail = (user: UserType) => {
|
|
|
73
74
|
|
|
74
75
|
export const User: UserHelperTypes = {
|
|
75
76
|
_id: checkTypeResolver(viewUserPublicInfos, '_id'),
|
|
77
|
+
created: checkTypeResolver(viewUserPrivateInfos, 'created'),
|
|
78
|
+
updated: checkTypeResolver(viewUserPrivateInfos, 'updated'),
|
|
79
|
+
deleted: checkTypeResolver(viewUserPrivateInfos, 'deleted'),
|
|
76
80
|
emails: checkTypeResolver(viewUserPrivateInfos, 'emails'),
|
|
77
81
|
lastBillingAddress: checkTypeResolver(viewUserPrivateInfos, 'lastBillingAddress'),
|
|
78
82
|
lastContact: checkTypeResolver(viewUserPrivateInfos, 'lastContact'),
|
|
@@ -97,18 +101,6 @@ export const User: UserHelperTypes = {
|
|
|
97
101
|
return getPrimaryEmail(user);
|
|
98
102
|
},
|
|
99
103
|
|
|
100
|
-
email: async (user, params, context) => {
|
|
101
|
-
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
102
|
-
return getPrimaryEmail(user)?.address;
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
isEmailVerified: async (user, params, context) => {
|
|
106
|
-
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
107
|
-
log('user.isEmailVerified is deprecated, please use user.primaryEmail.verified', {
|
|
108
|
-
level: LogLevel.Warning,
|
|
109
|
-
});
|
|
110
|
-
return !!getPrimaryEmail(user)?.verified;
|
|
111
|
-
},
|
|
112
104
|
isInitialPassword: async (user, params, context) => {
|
|
113
105
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
114
106
|
const { password: { initial } = { initial: undefined } } = user.services || {};
|
|
@@ -149,7 +141,7 @@ export const User: UserHelperTypes = {
|
|
|
149
141
|
|
|
150
142
|
country: async (user, params, context) => {
|
|
151
143
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
152
|
-
return context.services.users.getUserCountry(user,
|
|
144
|
+
return context.services.users.getUserCountry(user, context);
|
|
153
145
|
},
|
|
154
146
|
|
|
155
147
|
enrollments: async (user, params, context) => {
|
|
@@ -161,18 +153,15 @@ export const User: UserHelperTypes = {
|
|
|
161
153
|
|
|
162
154
|
language: async (user, params, context) => {
|
|
163
155
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
164
|
-
return context.services.users.getUserLanguage(user,
|
|
156
|
+
return context.services.users.getUserLanguage(user, context);
|
|
165
157
|
},
|
|
166
158
|
|
|
167
159
|
allowedActions: async (user, params, context) => {
|
|
168
160
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
169
|
-
return context.services.users.getUserRoleActions(user, context);
|
|
170
|
-
},
|
|
171
161
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
// },
|
|
162
|
+
const userRoles = Roles.getUserRoles(user?._id, user.roles, true);
|
|
163
|
+
return permissions(userRoles, context.roles) as Promise<string[]>;
|
|
164
|
+
},
|
|
176
165
|
|
|
177
166
|
orders: async (user, params, context) => {
|
|
178
167
|
await checkAction(context, viewUserOrders, [user, params]);
|
|
@@ -198,12 +187,12 @@ export const User: UserHelperTypes = {
|
|
|
198
187
|
|
|
199
188
|
webAuthnCredentials: async (user, params, context) => {
|
|
200
189
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
201
|
-
return user.services
|
|
190
|
+
return user.services?.webAuthn || [];
|
|
202
191
|
},
|
|
203
192
|
|
|
204
193
|
web3Addresses: async (user, params, context) => {
|
|
205
194
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
206
|
-
return user.services
|
|
195
|
+
return user.services?.web3 || [];
|
|
207
196
|
},
|
|
208
197
|
|
|
209
198
|
quotations: async (user, params, context) => {
|
package/src/roles/admin.ts
CHANGED
|
@@ -1,74 +1,5 @@
|
|
|
1
1
|
export const admin = (role, actions) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
role.allow(actions.viewUsers, () => true);
|
|
6
|
-
role.allow(actions.viewPaymentProviders, () => true);
|
|
7
|
-
role.allow(actions.viewPaymentProvider, () => true);
|
|
8
|
-
role.allow(actions.viewPaymentInterfaces, () => true);
|
|
9
|
-
role.allow(actions.viewDeliveryProviders, () => true);
|
|
10
|
-
role.allow(actions.viewDeliveryProvider, () => true);
|
|
11
|
-
role.allow(actions.viewDeliveryInterfaces, () => true);
|
|
12
|
-
role.allow(actions.viewWarehousingProviders, () => true);
|
|
13
|
-
role.allow(actions.viewWarehousingProvider, () => true);
|
|
14
|
-
role.allow(actions.viewWarehousingInterfaces, () => true);
|
|
15
|
-
role.allow(actions.viewTranslations, () => true);
|
|
16
|
-
role.allow(actions.viewOrders, () => true);
|
|
17
|
-
role.allow(actions.viewOrder, () => true);
|
|
18
|
-
role.allow(actions.viewProducts, () => true);
|
|
19
|
-
role.allow(actions.manageLanguages, () => true);
|
|
20
|
-
role.allow(actions.manageCountries, () => true);
|
|
21
|
-
role.allow(actions.manageProducts, () => true);
|
|
22
|
-
role.allow(actions.manageCurrencies, () => true);
|
|
23
|
-
role.allow(actions.managePaymentProviders, () => true);
|
|
24
|
-
role.allow(actions.manageDeliveryProviders, () => true);
|
|
25
|
-
role.allow(actions.manageWarehousingProviders, () => true);
|
|
26
|
-
role.allow(actions.updateToken, () => true);
|
|
27
|
-
role.allow(actions.viewToken, () => true);
|
|
28
|
-
role.allow(actions.manageUsers, () => true);
|
|
29
|
-
role.allow(actions.updateUser, () => true);
|
|
30
|
-
role.allow(actions.updateUsername, () => true);
|
|
31
|
-
role.allow(actions.manageAssortments, () => true);
|
|
32
|
-
role.allow(actions.manageFilters, () => true);
|
|
33
|
-
role.allow(actions.updateCart, () => true);
|
|
34
|
-
role.allow(actions.createCart, () => true);
|
|
35
|
-
role.allow(actions.sendEmail, () => true);
|
|
36
|
-
role.allow(actions.updateOrder, () => true);
|
|
37
|
-
role.allow(actions.updateOrderDiscount, () => true);
|
|
38
|
-
role.allow(actions.updateOrderItem, () => true);
|
|
39
|
-
role.allow(actions.updateOrderDelivery, () => true);
|
|
40
|
-
role.allow(actions.updateOrderPayment, () => true);
|
|
41
|
-
role.allow(actions.markOrderConfirmed, () => true);
|
|
42
|
-
role.allow(actions.markOrderRejected, () => true);
|
|
43
|
-
role.allow(actions.markOrderPaid, () => true);
|
|
44
|
-
role.allow(actions.markOrderDelivered, () => true);
|
|
45
|
-
role.allow(actions.viewLogs, () => true);
|
|
46
|
-
role.allow(actions.viewUserRoles, () => true);
|
|
47
|
-
role.allow(actions.viewUserOrders, () => true);
|
|
48
|
-
role.allow(actions.viewUserQuotations, () => true);
|
|
49
|
-
role.allow(actions.viewUserPublicInfos, () => true);
|
|
50
|
-
role.allow(actions.viewUserPrivateInfos, () => true);
|
|
51
|
-
role.allow(actions.viewUserEnrollments, () => true);
|
|
52
|
-
role.allow(actions.viewUserTokens, () => true);
|
|
53
|
-
role.allow(actions.reviewProduct, () => true);
|
|
54
|
-
role.allow(actions.updateProductReview, () => true);
|
|
55
|
-
role.allow(actions.manageProductReviews, () => true);
|
|
56
|
-
role.allow(actions.requestQuotation, () => true);
|
|
57
|
-
role.allow(actions.viewQuotations, () => true);
|
|
58
|
-
role.allow(actions.viewQuotation, () => true);
|
|
59
|
-
role.allow(actions.manageQuotations, () => true);
|
|
60
|
-
role.allow(actions.answerQuotation, () => true);
|
|
61
|
-
role.allow(actions.bookmarkProduct, () => true);
|
|
62
|
-
role.allow(actions.manageBookmarks, () => true);
|
|
63
|
-
role.allow(actions.voteProductReview, () => true);
|
|
64
|
-
role.allow(actions.manageWorker, () => true);
|
|
65
|
-
role.allow(actions.viewEnrollments, () => true);
|
|
66
|
-
role.allow(actions.viewEnrollment, () => true);
|
|
67
|
-
role.allow(actions.updateEnrollment, () => true);
|
|
68
|
-
role.allow(actions.registerPaymentCredentials, () => true);
|
|
69
|
-
role.allow(actions.managePaymentCredentials, () => true);
|
|
70
|
-
role.allow(actions.bulkImport, () => true);
|
|
71
|
-
role.allow(actions.authTwoFactor, () => true);
|
|
72
|
-
role.allow(actions.manageTwoFactor, () => true);
|
|
73
|
-
role.allow(actions.impersonate, () => true);
|
|
2
|
+
Object.values(actions).forEach((action) => {
|
|
3
|
+
role.allow(action, () => true);
|
|
4
|
+
});
|
|
74
5
|
};
|