@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Roles, permissions } from '@unchainedshop/roles';
|
|
2
2
|
import { checkAction, checkTypeResolver } from '../../acl';
|
|
3
3
|
import { actions } from '../../roles';
|
|
4
4
|
const { viewUserPrivateInfos, viewUserPublicInfos, viewUserOrders, viewUserEnrollments, viewUserQuotations, } = actions;
|
|
@@ -7,6 +7,9 @@ const getPrimaryEmail = (user) => {
|
|
|
7
7
|
};
|
|
8
8
|
export const User = {
|
|
9
9
|
_id: checkTypeResolver(viewUserPublicInfos, '_id'),
|
|
10
|
+
created: checkTypeResolver(viewUserPrivateInfos, 'created'),
|
|
11
|
+
updated: checkTypeResolver(viewUserPrivateInfos, 'updated'),
|
|
12
|
+
deleted: checkTypeResolver(viewUserPrivateInfos, 'deleted'),
|
|
10
13
|
emails: checkTypeResolver(viewUserPrivateInfos, 'emails'),
|
|
11
14
|
lastBillingAddress: checkTypeResolver(viewUserPrivateInfos, 'lastBillingAddress'),
|
|
12
15
|
lastContact: checkTypeResolver(viewUserPrivateInfos, 'lastContact'),
|
|
@@ -27,17 +30,6 @@ export const User = {
|
|
|
27
30
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
28
31
|
return getPrimaryEmail(user);
|
|
29
32
|
},
|
|
30
|
-
email: async (user, params, context) => {
|
|
31
|
-
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
32
|
-
return getPrimaryEmail(user)?.address;
|
|
33
|
-
},
|
|
34
|
-
isEmailVerified: async (user, params, context) => {
|
|
35
|
-
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
36
|
-
log('user.isEmailVerified is deprecated, please use user.primaryEmail.verified', {
|
|
37
|
-
level: LogLevel.Warning,
|
|
38
|
-
});
|
|
39
|
-
return !!getPrimaryEmail(user)?.verified;
|
|
40
|
-
},
|
|
41
33
|
isInitialPassword: async (user, params, context) => {
|
|
42
34
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
43
35
|
const { password: { initial } = { initial: undefined } } = user.services || {};
|
|
@@ -73,7 +65,7 @@ export const User = {
|
|
|
73
65
|
},
|
|
74
66
|
country: async (user, params, context) => {
|
|
75
67
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
76
|
-
return context.services.users.getUserCountry(user,
|
|
68
|
+
return context.services.users.getUserCountry(user, context);
|
|
77
69
|
},
|
|
78
70
|
enrollments: async (user, params, context) => {
|
|
79
71
|
await checkAction(context, viewUserEnrollments, [user, params]);
|
|
@@ -83,16 +75,13 @@ export const User = {
|
|
|
83
75
|
},
|
|
84
76
|
language: async (user, params, context) => {
|
|
85
77
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
86
|
-
return context.services.users.getUserLanguage(user,
|
|
78
|
+
return context.services.users.getUserLanguage(user, context);
|
|
87
79
|
},
|
|
88
80
|
allowedActions: async (user, params, context) => {
|
|
89
81
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
90
|
-
|
|
82
|
+
const userRoles = Roles.getUserRoles(user?._id, user.roles, true);
|
|
83
|
+
return permissions(userRoles, context.roles);
|
|
91
84
|
},
|
|
92
|
-
// locale: async (user, params, context) => {
|
|
93
|
-
// await checkAction(context, viewUserPrivateInfos, [user, params, context]);
|
|
94
|
-
// return context.modules.users.userLocale(user, params);
|
|
95
|
-
// },
|
|
96
85
|
orders: async (user, params, context) => {
|
|
97
86
|
await checkAction(context, viewUserOrders, [user, params]);
|
|
98
87
|
return context.modules.orders.findOrders({
|
|
@@ -112,11 +101,11 @@ export const User = {
|
|
|
112
101
|
},
|
|
113
102
|
webAuthnCredentials: async (user, params, context) => {
|
|
114
103
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
115
|
-
return user.services
|
|
104
|
+
return user.services?.webAuthn || [];
|
|
116
105
|
},
|
|
117
106
|
web3Addresses: async (user, params, context) => {
|
|
118
107
|
await checkAction(context, viewUserPrivateInfos, [user, params]);
|
|
119
|
-
return user.services
|
|
108
|
+
return user.services?.web3 || [];
|
|
120
109
|
},
|
|
121
110
|
quotations: async (user, params, context) => {
|
|
122
111
|
await checkAction(context, viewUserQuotations, [user, params]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/user-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/user-types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAyCtC,MAAM,EACJ,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,GAAG,OAAiC,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,IAAc,EAAE,EAAE;IACzC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,GAAG,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,KAAK,CAAC;IAClD,OAAO,EAAE,iBAAiB,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAC3D,OAAO,EAAE,iBAAiB,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAC3D,OAAO,EAAE,iBAAiB,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAC3D,MAAM,EAAE,iBAAiB,CAAC,oBAAoB,EAAE,QAAQ,CAAC;IACzD,kBAAkB,EAAE,iBAAiB,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IACjF,WAAW,EAAE,i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AC,sBAAsB,CACtE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,EACxC;YACE,IAAI,EAAE;gBACJ,OAAO,EAAE,CAAC,CAAC;aACZ;SACF,CACF,CAAC;IACJ,CAAC;IAED,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QACnD,MAAM,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC;IACvC,CAAC;IAED,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QAC7C,MAAM,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC;IACnC,CAAC;IAED,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QAC1C,MAAM,WAAW,CAAC,OAAO,EAAE,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAC/D,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;YAC/C,MAAM,EAAE,IAAI,CAAC,GAAG;YAChB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from '@unchainedshop/types/api';
|
|
2
2
|
import { WebAuthnCredentials as WebAuthnCredentialsTypes } from '@unchainedshop/types/user';
|
|
3
|
-
|
|
3
|
+
type HelperType<P, T> = (credentials: WebAuthnCredentialsTypes, params: P, context: Context) => Promise<T>;
|
|
4
4
|
export interface WebAuthnCredentialsHelperTypes {
|
|
5
5
|
_id: HelperType<any, string>;
|
|
6
6
|
created: HelperType<any, Date>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from '@unchainedshop/types/api';
|
|
2
2
|
import { Work as WorkType } from '@unchainedshop/types/worker';
|
|
3
|
-
|
|
3
|
+
type HelperType<P, T> = (work: WorkType, params: P, context: Context) => T;
|
|
4
4
|
export interface WorkHelperTypes {
|
|
5
5
|
status: HelperType<never, string>;
|
|
6
6
|
type: HelperType<never, string>;
|
package/lib/roles/admin.js
CHANGED
|
@@ -1,75 +1,6 @@
|
|
|
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
|
};
|
|
75
6
|
//# sourceMappingURL=admin.js.map
|
package/lib/roles/admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/roles/admin.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IACrC,
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/roles/admin.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IACrC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACxC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
/* GraphQL */ `
|
|
3
|
+
enum CacheControlScope {
|
|
4
|
+
PUBLIC
|
|
5
|
+
PRIVATE
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
directive @cacheControl(
|
|
9
|
+
maxAge: Int
|
|
10
|
+
scope: CacheControlScope
|
|
11
|
+
inheritMaxAge: Boolean
|
|
12
|
+
) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=directives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directives.js","sourceRoot":"","sources":["../../src/schema/directives.js"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;GAWb;CACF,CAAC"}
|
package/lib/schema/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import scalars from './scalars';
|
|
2
|
+
import directives from './directives';
|
|
2
3
|
import types from './types';
|
|
3
4
|
import inputTypes from './inputTypes';
|
|
4
5
|
import query from './query';
|
|
5
6
|
import mutation from './mutation';
|
|
6
|
-
export default [...scalars, ...types, ...inputTypes, ...query, ...mutation];
|
|
7
|
+
export default [...scalars, ...directives, ...types, ...inputTypes, ...query, ...mutation];
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/lib/schema/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.js"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe,CAAC,GAAG,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.js"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe,CAAC,GAAG,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC"}
|
package/lib/schema/inputTypes.js
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
export default [
|
|
2
2
|
/* GraphQL */ `
|
|
3
|
-
"""
|
|
4
|
-
A hashed password
|
|
5
|
-
"""
|
|
6
|
-
input HashedPasswordInput {
|
|
7
|
-
"""
|
|
8
|
-
The hashed password
|
|
9
|
-
"""
|
|
10
|
-
digest: String!
|
|
11
|
-
|
|
12
|
-
"""
|
|
13
|
-
Algorithm used to hash the password
|
|
14
|
-
"""
|
|
15
|
-
algorithm: String!
|
|
16
|
-
}
|
|
17
|
-
|
|
18
3
|
input SortOptionInput {
|
|
19
4
|
key: String!
|
|
20
5
|
value: SortDirection!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputTypes.js","sourceRoot":"","sources":["../../src/schema/inputTypes.js"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"inputTypes.js","sourceRoot":"","sources":["../../src/schema/inputTypes.js"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqRb;CACF,CAAC"}
|
package/lib/schema/mutation.js
CHANGED
|
@@ -8,7 +8,6 @@ export default [
|
|
|
8
8
|
loginWithPassword(
|
|
9
9
|
username: String
|
|
10
10
|
email: String
|
|
11
|
-
password: HashedPasswordInput
|
|
12
11
|
plainPassword: String
|
|
13
12
|
totpCode: String
|
|
14
13
|
): LoginMethodResponse
|
|
@@ -21,9 +20,9 @@ export default [
|
|
|
21
20
|
"""
|
|
22
21
|
Web3
|
|
23
22
|
"""
|
|
24
|
-
addWeb3Address(address: String!): User
|
|
25
|
-
verifyWeb3Address(address: String!, hash: String!): User
|
|
26
|
-
removeWeb3Address(address: String!): User
|
|
23
|
+
addWeb3Address(address: String!): User!
|
|
24
|
+
verifyWeb3Address(address: String!, hash: String!): User!
|
|
25
|
+
removeWeb3Address(address: String!): User!
|
|
27
26
|
|
|
28
27
|
"""
|
|
29
28
|
Create a new user.
|
|
@@ -31,10 +30,6 @@ export default [
|
|
|
31
30
|
createUser(
|
|
32
31
|
username: String
|
|
33
32
|
email: String
|
|
34
|
-
password: HashedPasswordInput
|
|
35
|
-
@deprecated(
|
|
36
|
-
reason: "Use plainPassword, there is not a lot of added security by hashing on the client"
|
|
37
|
-
)
|
|
38
33
|
webAuthnPublicKeyCredentials: JSON
|
|
39
34
|
plainPassword: String
|
|
40
35
|
profile: UserProfileInput
|
|
@@ -45,17 +40,12 @@ export default [
|
|
|
45
40
|
login and logged in user IP address, locale and country where they
|
|
46
41
|
accessed the system)
|
|
47
42
|
"""
|
|
48
|
-
heartbeat: User
|
|
43
|
+
heartbeat: User!
|
|
49
44
|
|
|
50
45
|
"""
|
|
51
46
|
Change the current user's password. Must be logged in.
|
|
52
47
|
"""
|
|
53
|
-
changePassword(
|
|
54
|
-
oldPassword: HashedPasswordInput
|
|
55
|
-
oldPlainPassword: String
|
|
56
|
-
newPassword: HashedPasswordInput
|
|
57
|
-
newPlainPassword: String
|
|
58
|
-
): SuccessResponse
|
|
48
|
+
changePassword(oldPlainPassword: String, newPlainPassword: String): SuccessResponse
|
|
59
49
|
|
|
60
50
|
"""
|
|
61
51
|
Request a forgot password email.
|
|
@@ -65,11 +55,7 @@ export default [
|
|
|
65
55
|
"""
|
|
66
56
|
Reset the password for a user using a token received in email. Logs the user in afterwards.
|
|
67
57
|
"""
|
|
68
|
-
resetPassword(
|
|
69
|
-
newPlainPassword: String
|
|
70
|
-
newPassword: HashedPasswordInput
|
|
71
|
-
token: String!
|
|
72
|
-
): LoginMethodResponse
|
|
58
|
+
resetPassword(newPlainPassword: String, token: String!): LoginMethodResponse
|
|
73
59
|
|
|
74
60
|
"""
|
|
75
61
|
Log the user out.
|
|
@@ -104,12 +90,12 @@ export default [
|
|
|
104
90
|
"""
|
|
105
91
|
In order to activate 2nd factor (TOTP), generate a secret and return
|
|
106
92
|
"""
|
|
107
|
-
enableTOTP(secretBase32: String!, code: String!): User
|
|
93
|
+
enableTOTP(secretBase32: String!, code: String!): User!
|
|
108
94
|
|
|
109
95
|
"""
|
|
110
96
|
Disable the 2nd factor (TOTP)
|
|
111
97
|
"""
|
|
112
|
-
disableTOTP(code: String!, userId: ID): User
|
|
98
|
+
disableTOTP(code: String!, userId: ID): User!
|
|
113
99
|
|
|
114
100
|
"""
|
|
115
101
|
Create WebAuthn PublicKeyCredentialCreationOptions to use for Registering a new WebAuthn Device
|
|
@@ -323,37 +309,37 @@ export default [
|
|
|
323
309
|
"""
|
|
324
310
|
Update E-Mail address of any user or logged in user if userId is not provided
|
|
325
311
|
"""
|
|
326
|
-
addEmail(email: String!, userId: ID): User
|
|
312
|
+
addEmail(email: String!, userId: ID): User!
|
|
327
313
|
|
|
328
314
|
"""
|
|
329
315
|
Update E-Mail address of any user or logged in user if userId is not provided
|
|
330
316
|
"""
|
|
331
|
-
removeEmail(email: String!, userId: ID): User
|
|
317
|
+
removeEmail(email: String!, userId: ID): User!
|
|
332
318
|
|
|
333
319
|
"""
|
|
334
320
|
Update Avatar of any user or logged in user if userId is not provided
|
|
335
321
|
"""
|
|
336
|
-
updateUserAvatar(avatar: Upload!, userId: ID): User
|
|
322
|
+
updateUserAvatar(avatar: Upload!, userId: ID): User!
|
|
337
323
|
|
|
338
324
|
"""
|
|
339
325
|
Set tags of user
|
|
340
326
|
"""
|
|
341
|
-
setUserTags(tags: [LowerCaseString]!, userId: ID!): User
|
|
327
|
+
setUserTags(tags: [LowerCaseString]!, userId: ID!): User!
|
|
342
328
|
|
|
343
329
|
"""
|
|
344
330
|
Update Profile of any user or logged in user if userId is not provided
|
|
345
331
|
"""
|
|
346
|
-
updateUserProfile(profile: UserProfileInput, meta: JSON, userId: ID): User
|
|
332
|
+
updateUserProfile(profile: UserProfileInput, meta: JSON, userId: ID): User!
|
|
333
|
+
|
|
334
|
+
"""
|
|
335
|
+
Remove any user or logged in user if userId is not provided
|
|
336
|
+
"""
|
|
337
|
+
removeUser(userId: ID): User!
|
|
347
338
|
|
|
348
339
|
"""
|
|
349
340
|
Enroll a new user, setting enroll to true will let the user choose his password (e-mail gets sent)
|
|
350
341
|
"""
|
|
351
|
-
enrollUser(
|
|
352
|
-
profile: UserProfileInput!
|
|
353
|
-
email: String!
|
|
354
|
-
password: HashedPasswordInput
|
|
355
|
-
plainPassword: String
|
|
356
|
-
): User
|
|
342
|
+
enrollUser(profile: UserProfileInput!, email: String!, plainPassword: String): User!
|
|
357
343
|
|
|
358
344
|
"""
|
|
359
345
|
Forcefully trigger an enrollment email for already added users by e-mail
|
|
@@ -363,17 +349,17 @@ export default [
|
|
|
363
349
|
"""
|
|
364
350
|
Set username for a specific user
|
|
365
351
|
"""
|
|
366
|
-
setUsername(username: String!, userId: ID!): User
|
|
352
|
+
setUsername(username: String!, userId: ID!): User!
|
|
367
353
|
|
|
368
354
|
"""
|
|
369
355
|
Set a new password for a specific user
|
|
370
356
|
"""
|
|
371
|
-
setPassword(
|
|
357
|
+
setPassword(newPlainPassword: String, userId: ID!): User!
|
|
372
358
|
|
|
373
359
|
"""
|
|
374
360
|
Set roles of a user
|
|
375
361
|
"""
|
|
376
|
-
setRoles(roles: [String!]!, userId: ID!): User
|
|
362
|
+
setRoles(roles: [String!]!, userId: ID!): User!
|
|
377
363
|
|
|
378
364
|
"""
|
|
379
365
|
Create a new product
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation.js","sourceRoot":"","sources":["../../src/schema/mutation.js"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"mutation.js","sourceRoot":"","sources":["../../src/schema/mutation.js"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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