From 19ae1dc565abc4554b91a80f9ac5ee96c8d537cc Mon Sep 17 00:00:00 2001 From: Pascal Kaufmann Date: Fri, 22 Nov 2024 14:20:14 +0100 Subject: [PATCH] Fix self-referencing package problems --- docs/docs/advanced/write-plugins/filter.md | 4 +- .../advanced/write-plugins/warehousing.md | 2 +- packages/api/src/api-index.ts | 5 +- packages/api/src/context.ts | 39 ++++++- .../src/express/createBulkImportMiddleware.ts | 2 +- .../express/createERCMetadataMiddleware.ts | 2 +- packages/api/src/loaders/index.ts | 53 +++++++++- packages/api/src/locale-context.ts | 10 +- .../resolvers/mutations/accounts/addEmail.ts | 2 +- .../mutations/accounts/addWeb3Address.ts | 2 +- .../accounts/addWebAuthnCredentials.ts | 2 +- .../mutations/accounts/changePassword.ts | 2 +- .../mutations/accounts/createUser.ts | 2 +- ...createWebAuthnCredentialCreationOptions.ts | 2 +- .../createWebAuthnCredentialRequestOptions.ts | 2 +- .../mutations/accounts/enrollUser.ts | 2 +- .../mutations/accounts/forgotPassword.ts | 2 +- .../mutations/accounts/loginAsGuest.ts | 2 +- .../mutations/accounts/loginWithPassword.ts | 2 +- .../mutations/accounts/loginWithWebAuthn.ts | 2 +- .../resolvers/mutations/accounts/logout.ts | 2 +- .../mutations/accounts/removeEmail.ts | 2 +- .../mutations/accounts/removeWeb3Address.ts | 2 +- .../accounts/removeWebAuthnCredentials.ts | 2 +- .../mutations/accounts/resetPassword.ts | 2 +- .../mutations/accounts/sendEnrollmentEmail.ts | 2 +- .../accounts/sendVerificationEmail.ts | 2 +- .../mutations/accounts/setPassword.ts | 2 +- .../mutations/accounts/setUsername.ts | 2 +- .../mutations/accounts/verifyEmail.ts | 2 +- .../mutations/accounts/verifyWeb3Address.ts | 2 +- .../assortments/addAssortmentFilter.ts | 2 +- .../assortments/addAssortmentLink.ts | 2 +- .../assortments/addAssortmentProduct.ts | 2 +- .../mutations/assortments/createAssortment.ts | 2 +- .../prepareAssortmentMediaUpload.ts | 2 +- .../mutations/assortments/removeAssortment.ts | 2 +- .../assortments/removeAssortmentFilter.ts | 2 +- .../assortments/removeAssortmentLink.ts | 2 +- .../assortments/removeAssortmentMedia.ts | 2 +- .../assortments/removeAssortmentProduct.ts | 2 +- .../assortments/reorderAssortmentFilters.ts | 2 +- .../assortments/reorderAssortmentLinks.ts | 2 +- .../assortments/reorderAssortmentMedia.ts | 2 +- .../assortments/reorderAssortmentProducts.ts | 2 +- .../assortments/setBaseAssortment.ts | 2 +- .../mutations/assortments/updateAssortment.ts | 2 +- .../assortments/updateAssortmentMediaTexts.ts | 2 +- .../assortments/updateAssortmentTexts.ts | 2 +- .../resolvers/mutations/bookmarks/bookmark.ts | 2 +- .../mutations/bookmarks/createBookmark.ts | 2 +- .../mutations/bookmarks/removeBookmark.ts | 2 +- .../mutations/countries/createCountry.ts | 2 +- .../mutations/countries/removeCountry.ts | 2 +- .../mutations/countries/updateCountry.ts | 2 +- .../mutations/currencies/createCurrency.ts | 2 +- .../mutations/currencies/removeCurrency.ts | 2 +- .../mutations/currencies/updateCurrency.ts | 2 +- .../delivery/createDeliveryProvider.ts | 2 +- .../delivery/removeDeliveryProvider.ts | 2 +- .../delivery/updateDeliveryProvider.ts | 2 +- .../enrollments/activateEnrollment.ts | 2 +- .../mutations/enrollments/createEnrollment.ts | 2 +- .../enrollments/terminateEnrollment.ts | 2 +- .../mutations/enrollments/updateEnrollment.ts | 2 +- .../mutations/files/confirmMediaUpload.ts | 2 +- .../mutations/filters/createFilter.ts | 2 +- .../mutations/filters/createFilterOption.ts | 2 +- .../mutations/filters/removeFilter.ts | 2 +- .../mutations/filters/removeFilterOption.ts | 2 +- .../mutations/filters/updateFilter.ts | 2 +- .../mutations/filters/updateFilterTexts.ts | 2 +- .../mutations/languages/createLanguage.ts | 2 +- .../mutations/languages/removeLanguage.ts | 2 +- .../mutations/languages/updateLanguage.ts | 2 +- .../mutations/orders/addCartDiscount.ts | 2 +- .../mutations/orders/addCartProduct.ts | 2 +- .../mutations/orders/addCartQuotation.ts | 2 +- .../orders/addMultipleCartProducts.ts | 2 +- .../mutations/orders/checkoutCart.ts | 2 +- .../mutations/orders/confirmOrder.ts | 2 +- .../resolvers/mutations/orders/createCart.ts | 2 +- .../mutations/orders/deliverOrder.ts | 2 +- .../resolvers/mutations/orders/emptyCart.ts | 2 +- .../resolvers/mutations/orders/payOrder.ts | 2 +- .../resolvers/mutations/orders/rejectOrder.ts | 2 +- .../mutations/orders/removeCartDiscount.ts | 2 +- .../mutations/orders/removeCartItem.ts | 2 +- .../resolvers/mutations/orders/removeOrder.ts | 2 +- .../orders/setOrderDeliveryProvider.ts | 2 +- .../orders/setOrderPaymentProvider.ts | 2 +- .../orders/signPaymentProviderForCheckout.ts | 2 +- .../resolvers/mutations/orders/updateCart.ts | 2 +- .../mutations/orders/updateCartItem.ts | 2 +- .../orders/updateOrderDeliveryPickUp.ts | 2 +- .../orders/updateOrderDeliveryShipping.ts | 2 +- .../orders/updateOrderPaymentCard.ts | 2 +- .../orders/updateOrderPaymentGeneric.ts | 2 +- .../orders/updateOrderPaymentInvoice.ts | 2 +- .../payment/createPaymentProvider.ts | 2 +- .../markPaymentCredentialsPreferred.ts | 2 +- .../payment/registerPaymentCredentials.ts | 2 +- .../payment/removePaymentCredentials.ts | 2 +- .../payment/removePaymentProvider.ts | 2 +- ...aymentProviderForCredentialRegistration.ts | 2 +- .../payment/updatePaymentProvider.ts | 2 +- .../products/addProductAssignment.ts | 2 +- .../products/addProductReviewVote.ts | 2 +- .../mutations/products/createProduct.ts | 2 +- .../products/createProductBundleItem.ts | 2 +- .../mutations/products/createProductReview.ts | 2 +- .../products/createProductVariation.ts | 4 +- .../products/createProductVariationOption.ts | 3 +- .../products/prepareProductMediaUpload.ts | 2 +- .../mutations/products/publishProduct.ts | 2 +- .../mutations/products/removeBundleItem.ts | 2 +- .../mutations/products/removeProduct.ts | 2 +- .../products/removeProductAssignment.ts | 2 +- .../mutations/products/removeProductMedia.ts | 2 +- .../mutations/products/removeProductReview.ts | 2 +- .../products/removeProductReviewVote.ts | 2 +- .../products/removeProductVariation.ts | 2 +- .../products/removeProductVariationOption.ts | 2 +- .../mutations/products/reorderProductMedia.ts | 2 +- .../mutations/products/unpublishProduct.ts | 2 +- .../mutations/products/updateProduct.ts | 2 +- .../products/updateProductCommerce.ts | 2 +- .../products/updateProductMediaTexts.ts | 2 +- .../mutations/products/updateProductPlan.ts | 2 +- .../mutations/products/updateProductReview.ts | 2 +- .../mutations/products/updateProductSupply.ts | 2 +- .../mutations/products/updateProductTexts.ts | 2 +- .../products/updateProductTokenization.ts | 2 +- .../products/updateProductVariationTexts.ts | 2 +- .../products/updateProductWarehousing.ts | 2 +- .../quotations/makeQuotationProposal.ts | 2 +- .../mutations/quotations/rejectQuotation.ts | 2 +- .../mutations/quotations/requestQuotation.ts | 2 +- .../mutations/quotations/verifyQuotation.ts | 2 +- .../mutations/users/addPushSubscription.ts | 2 +- .../resolvers/mutations/users/heartbeat.ts | 2 +- .../users/prepareUserAvatarUpload.ts | 2 +- .../mutations/users/removePushSubscription.ts | 2 +- .../resolvers/mutations/users/removeUser.ts | 2 +- .../src/resolvers/mutations/users/setRoles.ts | 2 +- .../resolvers/mutations/users/setUserTags.ts | 2 +- .../mutations/users/updateUserProfile.ts | 2 +- .../resolvers/mutations/utils/getOrderCart.ts | 2 +- .../warehousing/createWarehousingProvider.ts | 2 +- .../mutations/warehousing/exportToken.ts | 2 +- .../mutations/warehousing/invalidateToken.ts | 2 +- .../warehousing/removeWarehousingProvider.ts | 2 +- .../warehousing/updateWarehousingProvider.ts | 2 +- .../src/resolvers/mutations/worker/addWork.ts | 2 +- .../mutations/worker/allocateWork.ts | 2 +- .../resolvers/mutations/worker/finishWork.ts | 2 +- .../mutations/worker/processNextWork.ts | 2 +- .../resolvers/mutations/worker/removeWork.ts | 2 +- .../queries/assortments/assortment.ts | 2 +- .../queries/assortments/assortments.ts | 2 +- .../queries/assortments/assortmentsCount.ts | 2 +- .../translatedAssortmentMediaTexts.ts | 2 +- .../assortments/translatedAssortmentTexts.ts | 2 +- .../resolvers/queries/countries/countries.ts | 2 +- .../queries/countries/countriesCount.ts | 2 +- .../resolvers/queries/countries/country.ts | 2 +- .../queries/currencies/currencies.ts | 2 +- .../queries/currencies/currenciesCount.ts | 2 +- .../resolvers/queries/currencies/currency.ts | 2 +- .../queries/delivery/deliveryInterfaces.ts | 2 +- .../queries/delivery/deliveryProvider.ts | 2 +- .../queries/delivery/deliveryProviders.ts | 2 +- .../delivery/deliveryProvidersCount.ts | 2 +- .../queries/enrollments/enrollment.ts | 2 +- .../queries/enrollments/enrollments.ts | 2 +- .../queries/enrollments/enrollmentsCount.ts | 2 +- .../api/src/resolvers/queries/events/event.ts | 2 +- .../queries/events/eventStatistics.ts | 2 +- .../src/resolvers/queries/events/events.ts | 2 +- .../resolvers/queries/events/eventsCounts.ts | 2 +- .../src/resolvers/queries/filters/filter.ts | 2 +- .../src/resolvers/queries/filters/filters.ts | 2 +- .../resolvers/queries/filters/filtersCount.ts | 2 +- .../queries/filters/searchAssortments.ts | 2 +- .../queries/filters/searchProducts.ts | 2 +- .../queries/filters/translatedFilterTexts.ts | 2 +- .../resolvers/queries/languages/language.ts | 2 +- .../resolvers/queries/languages/languages.ts | 2 +- .../queries/languages/languagesCount.ts | 2 +- .../api/src/resolvers/queries/orders/order.ts | 2 +- .../queries/orders/orderStatistics.ts | 2 +- .../src/resolvers/queries/orders/orders.ts | 2 +- .../resolvers/queries/orders/ordersCount.ts | 2 +- .../queries/payment/paymentInterfaces.ts | 2 +- .../queries/payment/paymentProvider.ts | 2 +- .../queries/payment/paymentProviders.ts | 2 +- .../queries/payment/paymentProvidersCount.ts | 2 +- .../src/resolvers/queries/products/product.ts | 2 +- .../queries/products/productCatalogPrices.ts | 2 +- .../queries/products/productReview.ts | 2 +- .../queries/products/productReviews.ts | 2 +- .../queries/products/productReviewsCount.ts | 2 +- .../resolvers/queries/products/products.ts | 2 +- .../queries/products/productsCount.ts | 2 +- .../products/translatedProductMediaTexts.ts | 2 +- .../products/translatedProductTexts.ts | 2 +- .../translatedProductVariationTexts.ts | 2 +- .../resolvers/queries/quotations/quotation.ts | 2 +- .../queries/quotations/quotations.ts | 2 +- .../queries/quotations/quotationsCount.ts | 2 +- .../api/src/resolvers/queries/shopInfo.ts | 2 +- .../api/src/resolvers/queries/users/me.ts | 2 +- .../api/src/resolvers/queries/users/user.ts | 2 +- .../api/src/resolvers/queries/users/users.ts | 2 +- .../src/resolvers/queries/users/usersCount.ts | 2 +- .../users/validateResetPasswordToken.ts | 2 +- .../queries/users/validateVerifyEmailToken.ts | 2 +- .../resolvers/queries/warehousing/token.ts | 2 +- .../resolvers/queries/warehousing/tokens.ts | 2 +- .../warehousing/warehousingInterfaces.ts | 2 +- .../warehousing/warehousingProvider.ts | 2 +- .../warehousing/warehousingProviders.ts | 2 +- .../warehousing/warehousingProvidersCount.ts | 2 +- .../queries/worker/activeWorkTypes.ts | 2 +- .../api/src/resolvers/queries/worker/work.ts | 2 +- .../src/resolvers/queries/worker/workQueue.ts | 2 +- .../queries/worker/workQueueCount.ts | 2 +- .../queries/worker/workStatistics.ts | 2 +- .../assortment/assortment-filter-types.ts | 2 +- .../type/assortment/assortment-link-types.ts | 2 +- .../type/assortment/assortment-media-types.ts | 2 +- .../assortment/assortment-path-link-types.ts | 2 +- .../assortment/assortment-product-types.ts | 2 +- .../type/assortment/assortment-types.ts | 2 +- .../api/src/resolvers/type/bookmark-types.ts | 2 +- .../api/src/resolvers/type/country-types.ts | 2 +- .../resolvers/type/delivery-provider-types.ts | 2 +- .../enrollment/enrollment-delivery-types.ts | 2 +- .../enrollment/enrollment-payment-types.ts | 2 +- .../enrollment/enrollment-period-types.ts | 2 +- .../type/enrollment/enrollment-plan-tyes.ts | 2 +- .../type/enrollment/enrollment-types.ts | 2 +- .../api/src/resolvers/type/event-types.ts | 2 +- .../type/filter/filter-option-types.ts | 2 +- .../src/resolvers/type/filter/filter-types.ts | 2 +- .../api/src/resolvers/type/language-types.ts | 2 +- .../api/src/resolvers/type/media-types.ts | 2 +- .../order/order-delivery-discount-types.ts | 2 +- .../type/order/order-delivery-pickup-types.ts | 2 +- .../order/order-delivery-shipping-types.ts | 2 +- .../type/order/order-delivery-types.ts | 2 +- .../type/order/order-discount-types.ts | 2 +- .../type/order/order-global-discount-types.ts | 2 +- .../type/order/order-item-discount-types.ts | 2 +- .../resolvers/type/order/order-item-types.ts | 2 +- .../type/order/order-payment-card-types.ts | 2 +- .../order/order-payment-discount-types.ts | 2 +- .../type/order/order-payment-generic-types.ts | 2 +- .../type/order/order-payment-invoice-types.ts | 2 +- .../type/order/order-payment-types.ts | 2 +- .../src/resolvers/type/order/order-types.ts | 2 +- .../type/payment/payment-credentials-types.ts | 2 +- .../type/payment/payment-provider-types.ts | 2 +- .../product/product-assortment-path-types.ts | 2 +- .../type/product/product-bundle-item-types.ts | 2 +- .../product/product-catalog-price-types.ts | 2 +- .../product/product-configurable-types.ts | 2 +- .../type/product/product-discount.ts | 2 +- .../type/product/product-media-types.ts | 2 +- .../type/product/product-plan-types.ts | 2 +- .../type/product/product-review-types.ts | 2 +- .../type/product/product-simple-types.ts | 2 +- .../type/product/product-tokenized-types.ts | 2 +- .../resolvers/type/product/product-types.ts | 2 +- .../product-variation-assignment-types.ts | 2 +- .../product-variation-assignment-vector.ts | 2 +- .../product/product-variation-option-types.ts | 2 +- .../type/product/product-variation-types.ts | 2 +- .../api/src/resolvers/type/quotation-types.ts | 2 +- packages/api/src/resolvers/type/shop-types.ts | 2 +- .../api/src/resolvers/type/token-types.ts | 2 +- packages/api/src/resolvers/type/user-types.ts | 2 +- .../type/warehousing-provider-types.ts | 2 +- .../type/webauthn-credentials-types.ts | 2 +- packages/api/src/resolvers/type/work-types.ts | 2 +- packages/api/src/roles/all.ts | 2 +- packages/api/src/roles/loggedIn.ts | 2 +- packages/api/src/types.ts | 100 ------------------ .../src/files/gridfs/gridfs-webhook.ts | 2 +- .../src/payment/cryptopay/middleware.ts | 1 - .../src/payment/datatrans-v2/middleware.ts | 1 - 291 files changed, 388 insertions(+), 394 deletions(-) delete mode 100644 packages/api/src/types.ts diff --git a/docs/docs/advanced/write-plugins/filter.md b/docs/docs/advanced/write-plugins/filter.md index 0d1d704440..72c88c1c0a 100644 --- a/docs/docs/advanced/write-plugins/filter.md +++ b/docs/docs/advanced/write-plugins/filter.md @@ -21,7 +21,7 @@ Below is a simple filter plugin that will filter products based on there attribu ```typescript import { IFilterAdapter, FilterAdapterActions, FilterContext } from '@unchainedshop/core-filters'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; const ShopAttributeFilter: IFilterAdapter = { key: 'ch.shop.filter', @@ -157,7 +157,7 @@ Below is a simplified implementation of the `ShopAttributeFilter` above, this ti ```typescript import { IFilterAdapter, FilterAdapterActions, FilterContext } from '@unchainedshop/core-filters'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; const ShopAttributeFilter: IFilterAdapter = { ...FilterAdapter, diff --git a/docs/docs/advanced/write-plugins/warehousing.md b/docs/docs/advanced/write-plugins/warehousing.md index eef7f33a65..b720382b16 100644 --- a/docs/docs/advanced/write-plugins/warehousing.md +++ b/docs/docs/advanced/write-plugins/warehousing.md @@ -27,7 +27,7 @@ import { WarehousingContext, WarehousingProviderType, } from '@unchainedshop/core-warehousing'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; const Store: IWarehousingAdapter = { key: 'shop.unchained.warehousing.store', diff --git a/packages/api/src/api-index.ts b/packages/api/src/api-index.ts index c100cd5c31..6f6cfdeec5 100644 --- a/packages/api/src/api-index.ts +++ b/packages/api/src/api-index.ts @@ -3,12 +3,13 @@ import { createContextResolver, setCurrentContextResolver, getCurrentContextResolver, + AdminUiConfig, } from './context.js'; import { UnchainedCore } from '@unchainedshop/core'; -import { AdminUiConfig } from './types.js'; export * from './context.js'; -export * from './types.js'; +export * from './locale-context.js'; +export * from './loaders/index.js'; export * as acl from './acl.js'; export * as errors from './errors.js'; export * as roles from './roles/index.js'; diff --git a/packages/api/src/context.ts b/packages/api/src/context.ts index 460e3d7390..5e5b93b575 100644 --- a/packages/api/src/context.ts +++ b/packages/api/src/context.ts @@ -1,10 +1,43 @@ import fs from 'fs'; import path from 'path'; import { UnchainedCore } from '@unchainedshop/core'; -import instantiateLoaders from './loaders/index.js'; -import { getLocaleContext } from './locale-context.js'; +import instantiateLoaders, { UnchainedLoaders } from './loaders/index.js'; +import { getLocaleContext, UnchainedLocaleContext } from './locale-context.js'; import { UnchainedServerOptions } from './api-index.js'; -import { Context, UnchainedHTTPServerContext } from './types.js'; +import { User } from '@unchainedshop/core-users'; + +export interface UnchainedUserContext { + login: (user: User) => Promise<{ _id: string; tokenExpires: Date }>; + logout: () => Promise; + userId?: string; + user?: User; + remoteAddress?: string; + remotePort?: string; + userAgent?: string; +} + +export interface CustomAdminUiProperties { + entityName: string; + inlineFragment: string; +} + +export interface AdminUiConfig { + customProperties?: CustomAdminUiProperties[]; +} + +export type UnchainedHTTPServerContext = { + setHeader: (key: string, value: string) => void; + getHeader: (key: string) => string | string[]; +}; + +export type Context = UnchainedCore & { + version?: string; + roles?: any; + adminUiConfig?: AdminUiConfig; +} & UnchainedUserContext & + UnchainedLocaleContext & + UnchainedLoaders & + UnchainedHTTPServerContext; let context; diff --git a/packages/api/src/express/createBulkImportMiddleware.ts b/packages/api/src/express/createBulkImportMiddleware.ts index f17ffb5ad1..520655ae01 100644 --- a/packages/api/src/express/createBulkImportMiddleware.ts +++ b/packages/api/src/express/createBulkImportMiddleware.ts @@ -2,7 +2,7 @@ import { createLogger } from '@unchainedshop/logger'; import { checkAction } from '../acl.js'; import { actions } from '../roles/index.js'; import { IncomingMessage } from 'http'; -import { Context } from '../types.js'; +import { Context } from '../context.js'; const logger = createLogger('unchained:bulk-import'); diff --git a/packages/api/src/express/createERCMetadataMiddleware.ts b/packages/api/src/express/createERCMetadataMiddleware.ts index ff6825f8a4..22539452b7 100644 --- a/packages/api/src/express/createERCMetadataMiddleware.ts +++ b/packages/api/src/express/createERCMetadataMiddleware.ts @@ -2,7 +2,7 @@ import { IncomingMessage } from 'http'; import path from 'path'; import { createLogger } from '@unchainedshop/logger'; import { systemLocale } from '@unchainedshop/utils'; -import { Context } from '../types.js'; +import { Context } from '../context.js'; const logger = createLogger('unchained:erc-metadata'); diff --git a/packages/api/src/loaders/index.ts b/packages/api/src/loaders/index.ts index 8475200669..ec308b2077 100644 --- a/packages/api/src/loaders/index.ts +++ b/packages/api/src/loaders/index.ts @@ -1,7 +1,58 @@ import DataLoader from 'dataloader'; import { systemLocale } from '@unchainedshop/utils'; import { UnchainedCore } from '@unchainedshop/core'; -import { UnchainedLoaders } from '../types.js'; +import { Product, ProductText, ProductMediaText, ProductMedia } from '@unchainedshop/core-products'; +import { Filter, FilterText } from '@unchainedshop/core-filters'; +import { + Assortment, + AssortmentLink, + AssortmentProduct, + AssortmentText, + AssortmentMediaType, + AssortmentMediaText, +} from '@unchainedshop/core-assortments'; +import { File } from '@unchainedshop/core-files'; +export interface UnchainedLoaders { + loaders: { + productLoader: InstanceType>; + productLoaderBySKU: InstanceType>; + productTextLoader: InstanceType< + typeof DataLoader<{ productId: string; locale: string }, ProductText> + >; + productMediaTextLoader: InstanceType< + typeof DataLoader<{ productMediaId: string; locale: string }, ProductMediaText> + >; + + fileLoader: InstanceType>; + + filterLoader: InstanceType>; + filterTextLoader: InstanceType< + typeof DataLoader<{ filterId: string; filterOptionValue?: string; locale: string }, FilterText> + >; + + assortmentLoader: InstanceType>; + assortmentTextLoader: InstanceType< + typeof DataLoader<{ assortmentId: string; locale: string }, AssortmentText> + >; + assortmentLinkLoader: InstanceType< + typeof DataLoader<{ parentAssortmentId: string; childAssortmentId: string }, AssortmentLink> + >; + assortmentLinksLoader: InstanceType< + typeof DataLoader<{ parentAssortmentId?: string; assortmentId?: string }, AssortmentLink[]> + >; + assortmentProductLoader: InstanceType< + typeof DataLoader<{ assortmentId: string; productId: string }, AssortmentProduct> + >; + assortmentMediaTextLoader: InstanceType< + typeof DataLoader<{ assortmentMediaId: string; locale: string }, AssortmentMediaText> + >; + + productMediasLoader: InstanceType>; + assortmentMediasLoader: InstanceType< + typeof DataLoader<{ assortmentId?: string }, AssortmentMediaType[]> + >; + }; +} function getLocaleStrings(localeObj: Intl.Locale) { return [localeObj.baseName, localeObj.language, systemLocale.baseName, systemLocale.language]; diff --git a/packages/api/src/locale-context.ts b/packages/api/src/locale-context.ts index d17a8f0299..1a017942d5 100644 --- a/packages/api/src/locale-context.ts +++ b/packages/api/src/locale-context.ts @@ -7,8 +7,16 @@ import { } from '@unchainedshop/utils'; import { UnchainedCore } from '@unchainedshop/core'; import memoizee from 'memoizee'; -import { UnchainedHTTPServerContext, UnchainedLocaleContext } from './types.js'; +import { UnchainedHTTPServerContext } from './context.js'; +export interface UnchainedLocaleContext { + countryContext: string; + localeContext: Intl.Locale; + currencyContext: string; + remoteAddress?: string; + remotePort?: string; + userAgent?: string; +} const { NODE_ENV } = process.env; export type GetHeaderFn = (key: string) => string | string[]; diff --git a/packages/api/src/resolvers/mutations/accounts/addEmail.ts b/packages/api/src/resolvers/mutations/accounts/addEmail.ts index a90e998df5..d833f3086f 100644 --- a/packages/api/src/resolvers/mutations/accounts/addEmail.ts +++ b/packages/api/src/resolvers/mutations/accounts/addEmail.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { EmailAlreadyExistsError, UserNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function addEmail( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/addWeb3Address.ts b/packages/api/src/resolvers/mutations/accounts/addWeb3Address.ts index 20ddc71f1a..adf377e62b 100644 --- a/packages/api/src/resolvers/mutations/accounts/addWeb3Address.ts +++ b/packages/api/src/resolvers/mutations/accounts/addWeb3Address.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserWeb3InvalidAddressError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function addWeb3Address( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/addWebAuthnCredentials.ts b/packages/api/src/resolvers/mutations/accounts/addWebAuthnCredentials.ts index ff5a97ec93..a70c3dbdd5 100644 --- a/packages/api/src/resolvers/mutations/accounts/addWebAuthnCredentials.ts +++ b/packages/api/src/resolvers/mutations/accounts/addWebAuthnCredentials.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function addWebAuthnCredentials( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/changePassword.ts b/packages/api/src/resolvers/mutations/accounts/changePassword.ts index 32df91a6c7..2650c6da3f 100755 --- a/packages/api/src/resolvers/mutations/accounts/changePassword.ts +++ b/packages/api/src/resolvers/mutations/accounts/changePassword.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidCredentialsError, PasswordInvalidError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function changePassword( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/createUser.ts b/packages/api/src/resolvers/mutations/accounts/createUser.ts index 9dfaedc0c0..ecbe628451 100755 --- a/packages/api/src/resolvers/mutations/accounts/createUser.ts +++ b/packages/api/src/resolvers/mutations/accounts/createUser.ts @@ -1,5 +1,5 @@ import { UserData } from '@unchainedshop/core-users'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { AuthOperationFailedError, diff --git a/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.ts b/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.ts index 5ef52bd019..4212849de4 100644 --- a/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.ts +++ b/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialCreationOptions.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createWebAuthnCredentialCreationOptions( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.ts b/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.ts index 0a4d3e547b..5543897cac 100644 --- a/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.ts +++ b/packages/api/src/resolvers/mutations/accounts/createWebAuthnCredentialRequestOptions.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createWebAuthnCredentialRequestOptions( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/enrollUser.ts b/packages/api/src/resolvers/mutations/accounts/enrollUser.ts index 222aeb4f3a..0142ac3087 100644 --- a/packages/api/src/resolvers/mutations/accounts/enrollUser.ts +++ b/packages/api/src/resolvers/mutations/accounts/enrollUser.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { UserData } from '@unchainedshop/core-users'; import { diff --git a/packages/api/src/resolvers/mutations/accounts/forgotPassword.ts b/packages/api/src/resolvers/mutations/accounts/forgotPassword.ts index 3ec9d8da87..98b56f2adf 100755 --- a/packages/api/src/resolvers/mutations/accounts/forgotPassword.ts +++ b/packages/api/src/resolvers/mutations/accounts/forgotPassword.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function forgotPassword( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/loginAsGuest.ts b/packages/api/src/resolvers/mutations/accounts/loginAsGuest.ts index 75619493fd..d56cc158e2 100644 --- a/packages/api/src/resolvers/mutations/accounts/loginAsGuest.ts +++ b/packages/api/src/resolvers/mutations/accounts/loginAsGuest.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import moniker from 'moniker'; import { randomValueHex } from '@unchainedshop/utils'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function loginAsGuest(root: never, _: any, context: Context) { log('mutation loginAsGuest'); diff --git a/packages/api/src/resolvers/mutations/accounts/loginWithPassword.ts b/packages/api/src/resolvers/mutations/accounts/loginWithPassword.ts index e5464c886f..e0c16ea07c 100755 --- a/packages/api/src/resolvers/mutations/accounts/loginWithPassword.ts +++ b/packages/api/src/resolvers/mutations/accounts/loginWithPassword.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidCredentialsError, UsernameOrEmailRequiredError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function loginWithPassword( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/loginWithWebAuthn.ts b/packages/api/src/resolvers/mutations/accounts/loginWithWebAuthn.ts index 143bdf26eb..d44874a051 100755 --- a/packages/api/src/resolvers/mutations/accounts/loginWithWebAuthn.ts +++ b/packages/api/src/resolvers/mutations/accounts/loginWithWebAuthn.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function loginWithWebAuthn( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/logout.ts b/packages/api/src/resolvers/mutations/accounts/logout.ts index ae7af18374..937797860f 100755 --- a/packages/api/src/resolvers/mutations/accounts/logout.ts +++ b/packages/api/src/resolvers/mutations/accounts/logout.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function logout(root: never, _: never, context: Context) { const { userId } = context; diff --git a/packages/api/src/resolvers/mutations/accounts/removeEmail.ts b/packages/api/src/resolvers/mutations/accounts/removeEmail.ts index 508dc9688f..7fc6a522dc 100644 --- a/packages/api/src/resolvers/mutations/accounts/removeEmail.ts +++ b/packages/api/src/resolvers/mutations/accounts/removeEmail.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeEmail( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/removeWeb3Address.ts b/packages/api/src/resolvers/mutations/accounts/removeWeb3Address.ts index f663561c80..6685b758c9 100644 --- a/packages/api/src/resolvers/mutations/accounts/removeWeb3Address.ts +++ b/packages/api/src/resolvers/mutations/accounts/removeWeb3Address.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserWeb3AddressNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeWeb3Address( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/removeWebAuthnCredentials.ts b/packages/api/src/resolvers/mutations/accounts/removeWebAuthnCredentials.ts index 377d40d750..b1473614ad 100644 --- a/packages/api/src/resolvers/mutations/accounts/removeWebAuthnCredentials.ts +++ b/packages/api/src/resolvers/mutations/accounts/removeWebAuthnCredentials.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserWebAuthnCredentialsNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeWebAuthnCredentials( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/resetPassword.ts b/packages/api/src/resolvers/mutations/accounts/resetPassword.ts index 80b104c6e1..2388c39040 100755 --- a/packages/api/src/resolvers/mutations/accounts/resetPassword.ts +++ b/packages/api/src/resolvers/mutations/accounts/resetPassword.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidResetTokenError, PasswordInvalidError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function resetPassword( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/sendEnrollmentEmail.ts b/packages/api/src/resolvers/mutations/accounts/sendEnrollmentEmail.ts index 7686a495e7..71607443c5 100644 --- a/packages/api/src/resolvers/mutations/accounts/sendEnrollmentEmail.ts +++ b/packages/api/src/resolvers/mutations/accounts/sendEnrollmentEmail.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function sendEnrollmentEmail( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/sendVerificationEmail.ts b/packages/api/src/resolvers/mutations/accounts/sendVerificationEmail.ts index 6108bdb2dd..fc08cff7c2 100755 --- a/packages/api/src/resolvers/mutations/accounts/sendVerificationEmail.ts +++ b/packages/api/src/resolvers/mutations/accounts/sendVerificationEmail.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function sendVerificationEmail( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/setPassword.ts b/packages/api/src/resolvers/mutations/accounts/setPassword.ts index f84c6bf9a0..34333eb305 100644 --- a/packages/api/src/resolvers/mutations/accounts/setPassword.ts +++ b/packages/api/src/resolvers/mutations/accounts/setPassword.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserNotFoundError, InvalidIdError, PasswordInvalidError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function setPassword( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/setUsername.ts b/packages/api/src/resolvers/mutations/accounts/setUsername.ts index 6a9e2ab06d..3c076e380d 100644 --- a/packages/api/src/resolvers/mutations/accounts/setUsername.ts +++ b/packages/api/src/resolvers/mutations/accounts/setUsername.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserNotFoundError, InvalidIdError, UsernameAlreadyExistsError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function setUsername( root: never, diff --git a/packages/api/src/resolvers/mutations/accounts/verifyEmail.ts b/packages/api/src/resolvers/mutations/accounts/verifyEmail.ts index e95356c05a..a254025d3c 100755 --- a/packages/api/src/resolvers/mutations/accounts/verifyEmail.ts +++ b/packages/api/src/resolvers/mutations/accounts/verifyEmail.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidEmailVerificationTokenError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function verifyEmail(root: never, { token }: { token: any }, context: Context) { const { modules, userId } = context; diff --git a/packages/api/src/resolvers/mutations/accounts/verifyWeb3Address.ts b/packages/api/src/resolvers/mutations/accounts/verifyWeb3Address.ts index 9416f946cc..edba1d7f79 100644 --- a/packages/api/src/resolvers/mutations/accounts/verifyWeb3Address.ts +++ b/packages/api/src/resolvers/mutations/accounts/verifyWeb3Address.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { recoverPersonalSignature } from '@metamask/eth-sig-util'; import { UserWeb3AddressNotFoundError, UserWeb3AddressSignatureError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function verifyWeb3Address( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/addAssortmentFilter.ts b/packages/api/src/resolvers/mutations/assortments/addAssortmentFilter.ts index e9ec5ac177..88fbfd2ac2 100644 --- a/packages/api/src/resolvers/mutations/assortments/addAssortmentFilter.ts +++ b/packages/api/src/resolvers/mutations/assortments/addAssortmentFilter.ts @@ -1,7 +1,7 @@ import { AssortmentFilter } from '@unchainedshop/core-assortments'; import { log } from '@unchainedshop/logger'; import { AssortmentNotFoundError, FilterNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function addAssortmentFilter( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/addAssortmentLink.ts b/packages/api/src/resolvers/mutations/assortments/addAssortmentLink.ts index a674ddca7e..a3dd4c2d3e 100644 --- a/packages/api/src/resolvers/mutations/assortments/addAssortmentLink.ts +++ b/packages/api/src/resolvers/mutations/assortments/addAssortmentLink.ts @@ -5,7 +5,7 @@ import { CyclicAssortmentLinkNotSupportedError, InvalidIdError, } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function addAssortmentLink( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/addAssortmentProduct.ts b/packages/api/src/resolvers/mutations/assortments/addAssortmentProduct.ts index db523dbdc0..4400ab4048 100644 --- a/packages/api/src/resolvers/mutations/assortments/addAssortmentProduct.ts +++ b/packages/api/src/resolvers/mutations/assortments/addAssortmentProduct.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { AssortmentProduct } from '@unchainedshop/core-assortments'; import { AssortmentNotFoundError, ProductNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function addAssortmentProduct( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/createAssortment.ts b/packages/api/src/resolvers/mutations/assortments/createAssortment.ts index 3b67fa7521..5b5edc84e3 100644 --- a/packages/api/src/resolvers/mutations/assortments/createAssortment.ts +++ b/packages/api/src/resolvers/mutations/assortments/createAssortment.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { Assortment, AssortmentText } from '@unchainedshop/core-assortments'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createAssortment( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts b/packages/api/src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts index 838d0cc54d..2a6fc5c6e5 100644 --- a/packages/api/src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts +++ b/packages/api/src/resolvers/mutations/assortments/prepareAssortmentMediaUpload.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function prepareAssortmentMediaUpload( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/removeAssortment.ts b/packages/api/src/resolvers/mutations/assortments/removeAssortment.ts index ac41ff9037..b1452f19cc 100644 --- a/packages/api/src/resolvers/mutations/assortments/removeAssortment.ts +++ b/packages/api/src/resolvers/mutations/assortments/removeAssortment.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { AssortmentNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeAssortment( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/removeAssortmentFilter.ts b/packages/api/src/resolvers/mutations/assortments/removeAssortmentFilter.ts index 777f51df17..6c27935e36 100644 --- a/packages/api/src/resolvers/mutations/assortments/removeAssortmentFilter.ts +++ b/packages/api/src/resolvers/mutations/assortments/removeAssortmentFilter.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { AssortmentFilterNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeAssortmentFilter( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/removeAssortmentLink.ts b/packages/api/src/resolvers/mutations/assortments/removeAssortmentLink.ts index 1a75b8ea0b..15af372ffa 100644 --- a/packages/api/src/resolvers/mutations/assortments/removeAssortmentLink.ts +++ b/packages/api/src/resolvers/mutations/assortments/removeAssortmentLink.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { AssortmentLinkNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeAssortmentLink( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/removeAssortmentMedia.ts b/packages/api/src/resolvers/mutations/assortments/removeAssortmentMedia.ts index 118a172084..b254c29677 100644 --- a/packages/api/src/resolvers/mutations/assortments/removeAssortmentMedia.ts +++ b/packages/api/src/resolvers/mutations/assortments/removeAssortmentMedia.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { AssortmentMediaNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeAssortmentMedia( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/removeAssortmentProduct.ts b/packages/api/src/resolvers/mutations/assortments/removeAssortmentProduct.ts index 5ce4c2b863..bfb93d7ce9 100644 --- a/packages/api/src/resolvers/mutations/assortments/removeAssortmentProduct.ts +++ b/packages/api/src/resolvers/mutations/assortments/removeAssortmentProduct.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { AssortmentProductNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeAssortmentProduct( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts index f641dbb57e..a473f330a5 100644 --- a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts +++ b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentFilters.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function reorderAssortmentFilters( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts index 4c8772a798..83e53b157a 100644 --- a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts +++ b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentLinks.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function reorderAssortmentLinks( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts index 4b918d1b12..421c917c18 100644 --- a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts +++ b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentMedia.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function reorderAssortmentMedia( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts index 77c20112cb..ae0d33ef62 100644 --- a/packages/api/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts +++ b/packages/api/src/resolvers/mutations/assortments/reorderAssortmentProducts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function reorderAssortmentProducts( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/setBaseAssortment.ts b/packages/api/src/resolvers/mutations/assortments/setBaseAssortment.ts index 9ab4813298..f7d922e02a 100644 --- a/packages/api/src/resolvers/mutations/assortments/setBaseAssortment.ts +++ b/packages/api/src/resolvers/mutations/assortments/setBaseAssortment.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { AssortmentNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function setBaseAssortment( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/updateAssortment.ts b/packages/api/src/resolvers/mutations/assortments/updateAssortment.ts index ab64f3b803..dfef7d3683 100644 --- a/packages/api/src/resolvers/mutations/assortments/updateAssortment.ts +++ b/packages/api/src/resolvers/mutations/assortments/updateAssortment.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { Assortment } from '@unchainedshop/core-assortments'; import { AssortmentNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateAssortment( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts b/packages/api/src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts index 69f9c005a3..31f7c693b2 100644 --- a/packages/api/src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts +++ b/packages/api/src/resolvers/mutations/assortments/updateAssortmentMediaTexts.ts @@ -1,7 +1,7 @@ import { AssortmentMediaText } from '@unchainedshop/core-assortments'; import { log } from '@unchainedshop/logger'; import { AssortmentMediaNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateAssortmentMediaTexts( root: never, diff --git a/packages/api/src/resolvers/mutations/assortments/updateAssortmentTexts.ts b/packages/api/src/resolvers/mutations/assortments/updateAssortmentTexts.ts index 17df41dc8a..1eea5713cd 100644 --- a/packages/api/src/resolvers/mutations/assortments/updateAssortmentTexts.ts +++ b/packages/api/src/resolvers/mutations/assortments/updateAssortmentTexts.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { AssortmentText } from '@unchainedshop/core-assortments'; import { InvalidIdError, AssortmentNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateAssortmentTexts( root: never, diff --git a/packages/api/src/resolvers/mutations/bookmarks/bookmark.ts b/packages/api/src/resolvers/mutations/bookmarks/bookmark.ts index 0c81a41b9a..1aa2122af7 100644 --- a/packages/api/src/resolvers/mutations/bookmarks/bookmark.ts +++ b/packages/api/src/resolvers/mutations/bookmarks/bookmark.ts @@ -5,7 +5,7 @@ import { BookmarkNotFoundError, MultipleBookmarksFound, } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function bookmark( root: never, diff --git a/packages/api/src/resolvers/mutations/bookmarks/createBookmark.ts b/packages/api/src/resolvers/mutations/bookmarks/createBookmark.ts index 62d77100ae..1e7f62cf11 100644 --- a/packages/api/src/resolvers/mutations/bookmarks/createBookmark.ts +++ b/packages/api/src/resolvers/mutations/bookmarks/createBookmark.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { BookmarkAlreadyExistsError, InvalidIdError, ProductNotFoundError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createBookmark( root: never, diff --git a/packages/api/src/resolvers/mutations/bookmarks/removeBookmark.ts b/packages/api/src/resolvers/mutations/bookmarks/removeBookmark.ts index 0185c6f10c..421a0529ef 100644 --- a/packages/api/src/resolvers/mutations/bookmarks/removeBookmark.ts +++ b/packages/api/src/resolvers/mutations/bookmarks/removeBookmark.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { BookmarkNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeBookmark( root: never, diff --git a/packages/api/src/resolvers/mutations/countries/createCountry.ts b/packages/api/src/resolvers/mutations/countries/createCountry.ts index 43b6cc41e7..a7bff40e35 100644 --- a/packages/api/src/resolvers/mutations/countries/createCountry.ts +++ b/packages/api/src/resolvers/mutations/countries/createCountry.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { Country } from '@unchainedshop/core-countries'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createCountry( root: never, diff --git a/packages/api/src/resolvers/mutations/countries/removeCountry.ts b/packages/api/src/resolvers/mutations/countries/removeCountry.ts index d436fd9c71..9cfb13aad0 100644 --- a/packages/api/src/resolvers/mutations/countries/removeCountry.ts +++ b/packages/api/src/resolvers/mutations/countries/removeCountry.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { CountryNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeCountry( root: never, diff --git a/packages/api/src/resolvers/mutations/countries/updateCountry.ts b/packages/api/src/resolvers/mutations/countries/updateCountry.ts index 7ecfc21a00..d856d79218 100644 --- a/packages/api/src/resolvers/mutations/countries/updateCountry.ts +++ b/packages/api/src/resolvers/mutations/countries/updateCountry.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { Country } from '@unchainedshop/core-countries'; import { CountryNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateCountry( root: never, diff --git a/packages/api/src/resolvers/mutations/currencies/createCurrency.ts b/packages/api/src/resolvers/mutations/currencies/createCurrency.ts index 49467fed12..4303dd1f18 100644 --- a/packages/api/src/resolvers/mutations/currencies/createCurrency.ts +++ b/packages/api/src/resolvers/mutations/currencies/createCurrency.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { Currency } from '@unchainedshop/core-currencies'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createCurrency( root: never, diff --git a/packages/api/src/resolvers/mutations/currencies/removeCurrency.ts b/packages/api/src/resolvers/mutations/currencies/removeCurrency.ts index c3216aab95..fed8a92131 100644 --- a/packages/api/src/resolvers/mutations/currencies/removeCurrency.ts +++ b/packages/api/src/resolvers/mutations/currencies/removeCurrency.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { CurrencyNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/currencies/updateCurrency.ts b/packages/api/src/resolvers/mutations/currencies/updateCurrency.ts index 8c69c395dd..8ec7139ed5 100644 --- a/packages/api/src/resolvers/mutations/currencies/updateCurrency.ts +++ b/packages/api/src/resolvers/mutations/currencies/updateCurrency.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Currency } from '@unchainedshop/core-currencies'; import { log } from '@unchainedshop/logger'; import { CurrencyNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/delivery/createDeliveryProvider.ts b/packages/api/src/resolvers/mutations/delivery/createDeliveryProvider.ts index 21ee7581ac..9b357de62e 100644 --- a/packages/api/src/resolvers/mutations/delivery/createDeliveryProvider.ts +++ b/packages/api/src/resolvers/mutations/delivery/createDeliveryProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { log } from '@unchainedshop/logger'; import { ProviderConfigurationInvalid } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/delivery/removeDeliveryProvider.ts b/packages/api/src/resolvers/mutations/delivery/removeDeliveryProvider.ts index 2eacb74de1..8866e631fe 100644 --- a/packages/api/src/resolvers/mutations/delivery/removeDeliveryProvider.ts +++ b/packages/api/src/resolvers/mutations/delivery/removeDeliveryProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { DeliverProviderNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/delivery/updateDeliveryProvider.ts b/packages/api/src/resolvers/mutations/delivery/updateDeliveryProvider.ts index 1b832c2493..5232137067 100644 --- a/packages/api/src/resolvers/mutations/delivery/updateDeliveryProvider.ts +++ b/packages/api/src/resolvers/mutations/delivery/updateDeliveryProvider.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { DeliverProviderNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/enrollments/activateEnrollment.ts b/packages/api/src/resolvers/mutations/enrollments/activateEnrollment.ts index 892360b62f..3a4f491296 100644 --- a/packages/api/src/resolvers/mutations/enrollments/activateEnrollment.ts +++ b/packages/api/src/resolvers/mutations/enrollments/activateEnrollment.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { EnrollmentStatus } from '@unchainedshop/core-enrollments'; import { log } from '@unchainedshop/logger'; import { EnrollmentNotFoundError, EnrollmentWrongStatusError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/enrollments/createEnrollment.ts b/packages/api/src/resolvers/mutations/enrollments/createEnrollment.ts index f943573d18..52fb2f19da 100644 --- a/packages/api/src/resolvers/mutations/enrollments/createEnrollment.ts +++ b/packages/api/src/resolvers/mutations/enrollments/createEnrollment.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductStatus, ProductTypes } from '@unchainedshop/core-products'; import { ProductNotFoundError, diff --git a/packages/api/src/resolvers/mutations/enrollments/terminateEnrollment.ts b/packages/api/src/resolvers/mutations/enrollments/terminateEnrollment.ts index b762b1a1d6..31d1ea4840 100644 --- a/packages/api/src/resolvers/mutations/enrollments/terminateEnrollment.ts +++ b/packages/api/src/resolvers/mutations/enrollments/terminateEnrollment.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { EnrollmentStatus } from '@unchainedshop/core-enrollments'; import { log } from '@unchainedshop/logger'; import { EnrollmentNotFoundError, EnrollmentWrongStatusError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/enrollments/updateEnrollment.ts b/packages/api/src/resolvers/mutations/enrollments/updateEnrollment.ts index efef1cda3d..61edccbe7f 100644 --- a/packages/api/src/resolvers/mutations/enrollments/updateEnrollment.ts +++ b/packages/api/src/resolvers/mutations/enrollments/updateEnrollment.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { EnrollmentStatus } from '@unchainedshop/core-enrollments'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { EnrollmentPlan, Enrollment } from '@unchainedshop/core-enrollments'; import { EnrollmentNotFoundError, EnrollmentWrongStatusError, InvalidIdError } from '../../../errors.js'; import { Address, Contact } from '@unchainedshop/mongodb'; diff --git a/packages/api/src/resolvers/mutations/files/confirmMediaUpload.ts b/packages/api/src/resolvers/mutations/files/confirmMediaUpload.ts index 2cc5e4584b..19b6eedaa5 100644 --- a/packages/api/src/resolvers/mutations/files/confirmMediaUpload.ts +++ b/packages/api/src/resolvers/mutations/files/confirmMediaUpload.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { FileUploadExpiredError, FileNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/filters/createFilter.ts b/packages/api/src/resolvers/mutations/filters/createFilter.ts index 3f68ba48fa..83da3bc816 100644 --- a/packages/api/src/resolvers/mutations/filters/createFilter.ts +++ b/packages/api/src/resolvers/mutations/filters/createFilter.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { Filter, FilterInputText } from '@unchainedshop/core-filters'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createFilter( root: never, diff --git a/packages/api/src/resolvers/mutations/filters/createFilterOption.ts b/packages/api/src/resolvers/mutations/filters/createFilterOption.ts index ba7dcc9d54..3b74c8e6a3 100644 --- a/packages/api/src/resolvers/mutations/filters/createFilterOption.ts +++ b/packages/api/src/resolvers/mutations/filters/createFilterOption.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { FilterInputText } from '@unchainedshop/core-filters'; import { FilterNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/filters/removeFilter.ts b/packages/api/src/resolvers/mutations/filters/removeFilter.ts index 20ce867485..dcd145f9f8 100644 --- a/packages/api/src/resolvers/mutations/filters/removeFilter.ts +++ b/packages/api/src/resolvers/mutations/filters/removeFilter.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { FilterNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeFilter( root: never, diff --git a/packages/api/src/resolvers/mutations/filters/removeFilterOption.ts b/packages/api/src/resolvers/mutations/filters/removeFilterOption.ts index 13d68e3c10..3d7dfc36be 100644 --- a/packages/api/src/resolvers/mutations/filters/removeFilterOption.ts +++ b/packages/api/src/resolvers/mutations/filters/removeFilterOption.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { FilterNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeFilterOption( root: never, diff --git a/packages/api/src/resolvers/mutations/filters/updateFilter.ts b/packages/api/src/resolvers/mutations/filters/updateFilter.ts index cdb477fdef..f0b39b33a5 100644 --- a/packages/api/src/resolvers/mutations/filters/updateFilter.ts +++ b/packages/api/src/resolvers/mutations/filters/updateFilter.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { Filter } from '@unchainedshop/core-filters'; import { FilterNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateFilter( root: never, diff --git a/packages/api/src/resolvers/mutations/filters/updateFilterTexts.ts b/packages/api/src/resolvers/mutations/filters/updateFilterTexts.ts index 5e3ec8d15c..c7d62c28fc 100644 --- a/packages/api/src/resolvers/mutations/filters/updateFilterTexts.ts +++ b/packages/api/src/resolvers/mutations/filters/updateFilterTexts.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { FilterNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateFilterTexts( root: never, diff --git a/packages/api/src/resolvers/mutations/languages/createLanguage.ts b/packages/api/src/resolvers/mutations/languages/createLanguage.ts index 3d4425984f..6ca5decf80 100644 --- a/packages/api/src/resolvers/mutations/languages/createLanguage.ts +++ b/packages/api/src/resolvers/mutations/languages/createLanguage.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Language } from '@unchainedshop/core-languages'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/mutations/languages/removeLanguage.ts b/packages/api/src/resolvers/mutations/languages/removeLanguage.ts index c352bc0a39..482e318476 100644 --- a/packages/api/src/resolvers/mutations/languages/removeLanguage.ts +++ b/packages/api/src/resolvers/mutations/languages/removeLanguage.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, LanguageNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/languages/updateLanguage.ts b/packages/api/src/resolvers/mutations/languages/updateLanguage.ts index a757fedd01..d2954a7e0c 100644 --- a/packages/api/src/resolvers/mutations/languages/updateLanguage.ts +++ b/packages/api/src/resolvers/mutations/languages/updateLanguage.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Language } from '@unchainedshop/core-languages'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, LanguageNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/addCartDiscount.ts b/packages/api/src/resolvers/mutations/orders/addCartDiscount.ts index 0a55dbcfd6..2b58d219d3 100644 --- a/packages/api/src/resolvers/mutations/orders/addCartDiscount.ts +++ b/packages/api/src/resolvers/mutations/orders/addCartDiscount.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { getOrderCart } from '../utils/getOrderCart.js'; import { OrderWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/addCartProduct.ts b/packages/api/src/resolvers/mutations/orders/addCartProduct.ts index d558316ba9..4eda45a5eb 100644 --- a/packages/api/src/resolvers/mutations/orders/addCartProduct.ts +++ b/packages/api/src/resolvers/mutations/orders/addCartProduct.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductNotFoundError, OrderQuantityTooLowError, diff --git a/packages/api/src/resolvers/mutations/orders/addCartQuotation.ts b/packages/api/src/resolvers/mutations/orders/addCartQuotation.ts index a6b10f31ee..c654bd2d9a 100644 --- a/packages/api/src/resolvers/mutations/orders/addCartQuotation.ts +++ b/packages/api/src/resolvers/mutations/orders/addCartQuotation.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { QuotationStatus } from '@unchainedshop/core-quotations'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { QuotationNotFoundError, QuotationWrongStatusError, diff --git a/packages/api/src/resolvers/mutations/orders/addMultipleCartProducts.ts b/packages/api/src/resolvers/mutations/orders/addMultipleCartProducts.ts index b7f0178062..6e291936d6 100644 --- a/packages/api/src/resolvers/mutations/orders/addMultipleCartProducts.ts +++ b/packages/api/src/resolvers/mutations/orders/addMultipleCartProducts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductNotFoundError, OrderQuantityTooLowError, diff --git a/packages/api/src/resolvers/mutations/orders/checkoutCart.ts b/packages/api/src/resolvers/mutations/orders/checkoutCart.ts index 9e218db917..b0b048f82f 100644 --- a/packages/api/src/resolvers/mutations/orders/checkoutCart.ts +++ b/packages/api/src/resolvers/mutations/orders/checkoutCart.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log, LogLevel } from '@unchainedshop/logger'; import { OrderCheckoutError } from '../../../errors.js'; import { getOrderCart } from '../utils/getOrderCart.js'; diff --git a/packages/api/src/resolvers/mutations/orders/confirmOrder.ts b/packages/api/src/resolvers/mutations/orders/confirmOrder.ts index 41ea2e3de6..1a96fd049e 100644 --- a/packages/api/src/resolvers/mutations/orders/confirmOrder.ts +++ b/packages/api/src/resolvers/mutations/orders/confirmOrder.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderStatus } from '@unchainedshop/core-orders'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, OrderNotFoundError, OrderWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/createCart.ts b/packages/api/src/resolvers/mutations/orders/createCart.ts index e4619b840e..0efe25d67c 100644 --- a/packages/api/src/resolvers/mutations/orders/createCart.ts +++ b/packages/api/src/resolvers/mutations/orders/createCart.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { OrderNumberAlreadyExistsError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function createCart( root: never, diff --git a/packages/api/src/resolvers/mutations/orders/deliverOrder.ts b/packages/api/src/resolvers/mutations/orders/deliverOrder.ts index 98facda9fb..65c884994a 100644 --- a/packages/api/src/resolvers/mutations/orders/deliverOrder.ts +++ b/packages/api/src/resolvers/mutations/orders/deliverOrder.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderDeliveryStatus } from '@unchainedshop/core-orders'; import { OrderNotFoundError, diff --git a/packages/api/src/resolvers/mutations/orders/emptyCart.ts b/packages/api/src/resolvers/mutations/orders/emptyCart.ts index e8b6f824d4..1d91549078 100644 --- a/packages/api/src/resolvers/mutations/orders/emptyCart.ts +++ b/packages/api/src/resolvers/mutations/orders/emptyCart.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { getOrderCart } from '../utils/getOrderCart.js'; import { OrderWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/payOrder.ts b/packages/api/src/resolvers/mutations/orders/payOrder.ts index 576b40a085..83d78087f6 100644 --- a/packages/api/src/resolvers/mutations/orders/payOrder.ts +++ b/packages/api/src/resolvers/mutations/orders/payOrder.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderPaymentStatus } from '@unchainedshop/core-orders'; import { OrderNotFoundError, diff --git a/packages/api/src/resolvers/mutations/orders/rejectOrder.ts b/packages/api/src/resolvers/mutations/orders/rejectOrder.ts index 62d2ccc8d0..24043f2561 100644 --- a/packages/api/src/resolvers/mutations/orders/rejectOrder.ts +++ b/packages/api/src/resolvers/mutations/orders/rejectOrder.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderStatus } from '@unchainedshop/core-orders'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, OrderNotFoundError, OrderWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/removeCartDiscount.ts b/packages/api/src/resolvers/mutations/orders/removeCartDiscount.ts index b9fc47b70d..bc4c1c4728 100644 --- a/packages/api/src/resolvers/mutations/orders/removeCartDiscount.ts +++ b/packages/api/src/resolvers/mutations/orders/removeCartDiscount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderDiscountNotFoundError, OrderWrongStatusError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/removeCartItem.ts b/packages/api/src/resolvers/mutations/orders/removeCartItem.ts index 3a099dda73..3fb67f2e35 100644 --- a/packages/api/src/resolvers/mutations/orders/removeCartItem.ts +++ b/packages/api/src/resolvers/mutations/orders/removeCartItem.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderItemNotFoundError, OrderWrongStatusError, InvalidIdError } from '../../../errors.js'; export default async function removeCartItem( diff --git a/packages/api/src/resolvers/mutations/orders/removeOrder.ts b/packages/api/src/resolvers/mutations/orders/removeOrder.ts index 9d93f661a2..de452f4176 100644 --- a/packages/api/src/resolvers/mutations/orders/removeOrder.ts +++ b/packages/api/src/resolvers/mutations/orders/removeOrder.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { OrderNotFoundError, OrderWrongStatusError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function removeOrder( root: never, diff --git a/packages/api/src/resolvers/mutations/orders/setOrderDeliveryProvider.ts b/packages/api/src/resolvers/mutations/orders/setOrderDeliveryProvider.ts index da10e5cc88..7c30ff8aa7 100644 --- a/packages/api/src/resolvers/mutations/orders/setOrderDeliveryProvider.ts +++ b/packages/api/src/resolvers/mutations/orders/setOrderDeliveryProvider.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { OrderNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function setOrderDeliveryProvider( root: never, diff --git a/packages/api/src/resolvers/mutations/orders/setOrderPaymentProvider.ts b/packages/api/src/resolvers/mutations/orders/setOrderPaymentProvider.ts index 1bf9e1b08d..9d6b51eee1 100644 --- a/packages/api/src/resolvers/mutations/orders/setOrderPaymentProvider.ts +++ b/packages/api/src/resolvers/mutations/orders/setOrderPaymentProvider.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { OrderNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function setOrderPaymentProvider( root: never, diff --git a/packages/api/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts b/packages/api/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts index 8b3fae5756..91d6b66278 100644 --- a/packages/api/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts +++ b/packages/api/src/resolvers/mutations/orders/signPaymentProviderForCheckout.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProviderType } from '@unchainedshop/core-payment'; import { OrderPaymentStatus } from '@unchainedshop/core-orders'; import { diff --git a/packages/api/src/resolvers/mutations/orders/updateCart.ts b/packages/api/src/resolvers/mutations/orders/updateCart.ts index 9770dc32b6..d59376e441 100644 --- a/packages/api/src/resolvers/mutations/orders/updateCart.ts +++ b/packages/api/src/resolvers/mutations/orders/updateCart.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { getOrderCart } from '../utils/getOrderCart.js'; import { OrderWrongStatusError } from '../../../errors.js'; import { Address, Contact } from '@unchainedshop/mongodb'; diff --git a/packages/api/src/resolvers/mutations/orders/updateCartItem.ts b/packages/api/src/resolvers/mutations/orders/updateCartItem.ts index 0d018ebeef..f0ffe6555b 100644 --- a/packages/api/src/resolvers/mutations/orders/updateCartItem.ts +++ b/packages/api/src/resolvers/mutations/orders/updateCartItem.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { OrderQuantityTooLowError, OrderItemNotFoundError, diff --git a/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryPickUp.ts b/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryPickUp.ts index a88dcf42fb..2e1b5d814b 100644 --- a/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryPickUp.ts +++ b/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryPickUp.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProviderType } from '@unchainedshop/core-delivery'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, OrderDeliveryNotFoundError, OrderDeliveryTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryShipping.ts b/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryShipping.ts index 0d8cd5d4a9..bb2be12cab 100644 --- a/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryShipping.ts +++ b/packages/api/src/resolvers/mutations/orders/updateOrderDeliveryShipping.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProviderType } from '@unchainedshop/core-delivery'; import { OrderDeliveryNotFoundError, InvalidIdError, OrderDeliveryTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/updateOrderPaymentCard.ts b/packages/api/src/resolvers/mutations/orders/updateOrderPaymentCard.ts index ae6835ee50..3f6b78300b 100644 --- a/packages/api/src/resolvers/mutations/orders/updateOrderPaymentCard.ts +++ b/packages/api/src/resolvers/mutations/orders/updateOrderPaymentCard.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProviderType } from '@unchainedshop/core-payment'; import { OrderPaymentNotFoundError, InvalidIdError, OrderPaymentTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/updateOrderPaymentGeneric.ts b/packages/api/src/resolvers/mutations/orders/updateOrderPaymentGeneric.ts index a76e01367b..e93dd34eb7 100644 --- a/packages/api/src/resolvers/mutations/orders/updateOrderPaymentGeneric.ts +++ b/packages/api/src/resolvers/mutations/orders/updateOrderPaymentGeneric.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProviderType } from '@unchainedshop/core-payment'; import { OrderPaymentNotFoundError, InvalidIdError, OrderPaymentTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/orders/updateOrderPaymentInvoice.ts b/packages/api/src/resolvers/mutations/orders/updateOrderPaymentInvoice.ts index 79529bde02..e9d0fca1d0 100644 --- a/packages/api/src/resolvers/mutations/orders/updateOrderPaymentInvoice.ts +++ b/packages/api/src/resolvers/mutations/orders/updateOrderPaymentInvoice.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProviderType } from '@unchainedshop/core-payment'; import { OrderPaymentNotFoundError, InvalidIdError, OrderPaymentTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/payment/createPaymentProvider.ts b/packages/api/src/resolvers/mutations/payment/createPaymentProvider.ts index a0a741bd10..452b5729b2 100644 --- a/packages/api/src/resolvers/mutations/payment/createPaymentProvider.ts +++ b/packages/api/src/resolvers/mutations/payment/createPaymentProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProvider } from '@unchainedshop/core-payment'; import { log } from '@unchainedshop/logger'; import { ProviderConfigurationInvalid } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/payment/markPaymentCredentialsPreferred.ts b/packages/api/src/resolvers/mutations/payment/markPaymentCredentialsPreferred.ts index 2b2d2ca5b7..0b2b8d47ed 100644 --- a/packages/api/src/resolvers/mutations/payment/markPaymentCredentialsPreferred.ts +++ b/packages/api/src/resolvers/mutations/payment/markPaymentCredentialsPreferred.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentCredentialsNotFoundError, InvalidIdError } from '../../../errors.js'; export default async function makePaymentCredentialsPreferred( diff --git a/packages/api/src/resolvers/mutations/payment/registerPaymentCredentials.ts b/packages/api/src/resolvers/mutations/payment/registerPaymentCredentials.ts index 012b060499..12afd095b2 100644 --- a/packages/api/src/resolvers/mutations/payment/registerPaymentCredentials.ts +++ b/packages/api/src/resolvers/mutations/payment/registerPaymentCredentials.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, PaymentProviderNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/payment/removePaymentCredentials.ts b/packages/api/src/resolvers/mutations/payment/removePaymentCredentials.ts index 2855e85f22..9c7d03cf72 100644 --- a/packages/api/src/resolvers/mutations/payment/removePaymentCredentials.ts +++ b/packages/api/src/resolvers/mutations/payment/removePaymentCredentials.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, PaymentCredentialsNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/payment/removePaymentProvider.ts b/packages/api/src/resolvers/mutations/payment/removePaymentProvider.ts index daee6a54b3..ba684fa03b 100644 --- a/packages/api/src/resolvers/mutations/payment/removePaymentProvider.ts +++ b/packages/api/src/resolvers/mutations/payment/removePaymentProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { PaymentProviderNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.ts b/packages/api/src/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.ts index 8f43fdb2eb..8f4d7affb9 100644 --- a/packages/api/src/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.ts +++ b/packages/api/src/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProviderNotFoundError, InvalidIdError } from '../../../errors.js'; export default async function signPaymentProviderForCredentialRegistration( diff --git a/packages/api/src/resolvers/mutations/payment/updatePaymentProvider.ts b/packages/api/src/resolvers/mutations/payment/updatePaymentProvider.ts index 12fc67bb57..d69523f748 100644 --- a/packages/api/src/resolvers/mutations/payment/updatePaymentProvider.ts +++ b/packages/api/src/resolvers/mutations/payment/updatePaymentProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProvider } from '@unchainedshop/core-payment'; import { log } from '@unchainedshop/logger'; import { PaymentProviderNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/addProductAssignment.ts b/packages/api/src/resolvers/mutations/products/addProductAssignment.ts index ed4a4b708f..33cc06374e 100644 --- a/packages/api/src/resolvers/mutations/products/addProductAssignment.ts +++ b/packages/api/src/resolvers/mutations/products/addProductAssignment.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductConfiguration } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/addProductReviewVote.ts b/packages/api/src/resolvers/mutations/products/addProductReviewVote.ts index b38483551c..2a475ff2d6 100644 --- a/packages/api/src/resolvers/mutations/products/addProductReviewVote.ts +++ b/packages/api/src/resolvers/mutations/products/addProductReviewVote.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductReviewVoteType } from '@unchainedshop/core-products'; import { ProductReviewNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/createProduct.ts b/packages/api/src/resolvers/mutations/products/createProduct.ts index 7e9e916aa0..52743f013e 100644 --- a/packages/api/src/resolvers/mutations/products/createProduct.ts +++ b/packages/api/src/resolvers/mutations/products/createProduct.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Product, ProductText } from '@unchainedshop/core-products'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/mutations/products/createProductBundleItem.ts b/packages/api/src/resolvers/mutations/products/createProductBundleItem.ts index d12d559f13..cae344b23c 100644 --- a/packages/api/src/resolvers/mutations/products/createProductBundleItem.ts +++ b/packages/api/src/resolvers/mutations/products/createProductBundleItem.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductBundleItem } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/createProductReview.ts b/packages/api/src/resolvers/mutations/products/createProductReview.ts index d0f93b3c77..f2aeb7be37 100644 --- a/packages/api/src/resolvers/mutations/products/createProductReview.ts +++ b/packages/api/src/resolvers/mutations/products/createProductReview.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductReview } from '@unchainedshop/core-products'; import { InvalidIdError, ProductNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/createProductVariation.ts b/packages/api/src/resolvers/mutations/products/createProductVariation.ts index f545e32907..06d044029d 100644 --- a/packages/api/src/resolvers/mutations/products/createProductVariation.ts +++ b/packages/api/src/resolvers/mutations/products/createProductVariation.ts @@ -1,9 +1,11 @@ -import { Context, VariationInputText } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductTypes } from '@unchainedshop/core-products'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, ProductNotFoundError, ProductWrongTypeError } from '../../../errors.js'; import { ProductVariationType } from '@unchainedshop/core-products'; +export type VariationInputText = { locale: string; title: string; subtitle?: string }; + export default async function F( root: never, params: { diff --git a/packages/api/src/resolvers/mutations/products/createProductVariationOption.ts b/packages/api/src/resolvers/mutations/products/createProductVariationOption.ts index cc8d1f65c5..66ffbe6697 100644 --- a/packages/api/src/resolvers/mutations/products/createProductVariationOption.ts +++ b/packages/api/src/resolvers/mutations/products/createProductVariationOption.ts @@ -1,6 +1,7 @@ -import { Context, VariationInputText } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, ProductVariationNotFoundError } from '../../../errors.js'; +import { VariationInputText } from './createProductVariation.js'; export default async function createProductVariationOption( root: never, diff --git a/packages/api/src/resolvers/mutations/products/prepareProductMediaUpload.ts b/packages/api/src/resolvers/mutations/products/prepareProductMediaUpload.ts index 8a67fe7809..4efd1ca4da 100644 --- a/packages/api/src/resolvers/mutations/products/prepareProductMediaUpload.ts +++ b/packages/api/src/resolvers/mutations/products/prepareProductMediaUpload.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function prepareProductMediaUpload( diff --git a/packages/api/src/resolvers/mutations/products/publishProduct.ts b/packages/api/src/resolvers/mutations/products/publishProduct.ts index 7f493b6af4..eab743d66f 100644 --- a/packages/api/src/resolvers/mutations/products/publishProduct.ts +++ b/packages/api/src/resolvers/mutations/products/publishProduct.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, ProductNotFoundError, ProductWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/removeBundleItem.ts b/packages/api/src/resolvers/mutations/products/removeBundleItem.ts index b4dfd106ec..537ce85e5c 100644 --- a/packages/api/src/resolvers/mutations/products/removeBundleItem.ts +++ b/packages/api/src/resolvers/mutations/products/removeBundleItem.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js'; export default async function removeBundleItem( diff --git a/packages/api/src/resolvers/mutations/products/removeProduct.ts b/packages/api/src/resolvers/mutations/products/removeProduct.ts index 3f4d2f0c01..baee1cff3b 100644 --- a/packages/api/src/resolvers/mutations/products/removeProduct.ts +++ b/packages/api/src/resolvers/mutations/products/removeProduct.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductNotFoundError, InvalidIdError, diff --git a/packages/api/src/resolvers/mutations/products/removeProductAssignment.ts b/packages/api/src/resolvers/mutations/products/removeProductAssignment.ts index 4a8dbb3917..9684c766d1 100644 --- a/packages/api/src/resolvers/mutations/products/removeProductAssignment.ts +++ b/packages/api/src/resolvers/mutations/products/removeProductAssignment.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductConfiguration } from '@unchainedshop/core-products'; import { ProductTypes } from '@unchainedshop/core-products'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/mutations/products/removeProductMedia.ts b/packages/api/src/resolvers/mutations/products/removeProductMedia.ts index cb0f6e2cca..e33310c007 100644 --- a/packages/api/src/resolvers/mutations/products/removeProductMedia.ts +++ b/packages/api/src/resolvers/mutations/products/removeProductMedia.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductMediaNotFoundError, InvalidIdError } from '../../../errors.js'; export default async function removeProductMedia( diff --git a/packages/api/src/resolvers/mutations/products/removeProductReview.ts b/packages/api/src/resolvers/mutations/products/removeProductReview.ts index 76110903f9..e99df9aa13 100644 --- a/packages/api/src/resolvers/mutations/products/removeProductReview.ts +++ b/packages/api/src/resolvers/mutations/products/removeProductReview.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, ProductReviewNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/removeProductReviewVote.ts b/packages/api/src/resolvers/mutations/products/removeProductReviewVote.ts index f7686a340e..e2e9d8b79f 100644 --- a/packages/api/src/resolvers/mutations/products/removeProductReviewVote.ts +++ b/packages/api/src/resolvers/mutations/products/removeProductReviewVote.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductReviewVoteType } from '@unchainedshop/core-products'; import { ProductReviewNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/removeProductVariation.ts b/packages/api/src/resolvers/mutations/products/removeProductVariation.ts index 12c21cb78f..48421fbffb 100644 --- a/packages/api/src/resolvers/mutations/products/removeProductVariation.ts +++ b/packages/api/src/resolvers/mutations/products/removeProductVariation.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductVariationNotFoundError, InvalidIdError } from '../../../errors.js'; export default async function removeProductVariation( diff --git a/packages/api/src/resolvers/mutations/products/removeProductVariationOption.ts b/packages/api/src/resolvers/mutations/products/removeProductVariationOption.ts index 76f1188547..e427f9d3cf 100644 --- a/packages/api/src/resolvers/mutations/products/removeProductVariationOption.ts +++ b/packages/api/src/resolvers/mutations/products/removeProductVariationOption.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError, ProductVariationNotFoundError } from '../../../errors.js'; export default async function removeProductVariationOption( diff --git a/packages/api/src/resolvers/mutations/products/reorderProductMedia.ts b/packages/api/src/resolvers/mutations/products/reorderProductMedia.ts index 67b61c27c7..6d45f1560b 100644 --- a/packages/api/src/resolvers/mutations/products/reorderProductMedia.ts +++ b/packages/api/src/resolvers/mutations/products/reorderProductMedia.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function reorderProductMedia( root: never, diff --git a/packages/api/src/resolvers/mutations/products/unpublishProduct.ts b/packages/api/src/resolvers/mutations/products/unpublishProduct.ts index 399216839e..4ed849126f 100644 --- a/packages/api/src/resolvers/mutations/products/unpublishProduct.ts +++ b/packages/api/src/resolvers/mutations/products/unpublishProduct.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductNotFoundError, ProductWrongStatusError, InvalidIdError } from '../../../errors.js'; export default async function unpublishProduct( diff --git a/packages/api/src/resolvers/mutations/products/updateProduct.ts b/packages/api/src/resolvers/mutations/products/updateProduct.ts index ec102c7e6f..6714f40971 100644 --- a/packages/api/src/resolvers/mutations/products/updateProduct.ts +++ b/packages/api/src/resolvers/mutations/products/updateProduct.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { Product } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateProduct( root: never, diff --git a/packages/api/src/resolvers/mutations/products/updateProductCommerce.ts b/packages/api/src/resolvers/mutations/products/updateProductCommerce.ts index 1571f1a1c5..4e41a23460 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductCommerce.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductCommerce.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { ProductCommerce } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateProductCommerce( root: never, diff --git a/packages/api/src/resolvers/mutations/products/updateProductMediaTexts.ts b/packages/api/src/resolvers/mutations/products/updateProductMediaTexts.ts index c46c856dac..7845ce2742 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductMediaTexts.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductMediaTexts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductMediaText } from '@unchainedshop/core-products'; import { ProductMediaNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/updateProductPlan.ts b/packages/api/src/resolvers/mutations/products/updateProductPlan.ts index ec321af0a1..a03857bdb4 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductPlan.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductPlan.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductPlan } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError, ProductWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/updateProductReview.ts b/packages/api/src/resolvers/mutations/products/updateProductReview.ts index 3fc0743f47..3d327a2ef1 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductReview.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductReview.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductReview } from '@unchainedshop/core-products'; import { ProductReviewNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/updateProductSupply.ts b/packages/api/src/resolvers/mutations/products/updateProductSupply.ts index 4986d4535a..c9aef2e4ae 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductSupply.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductSupply.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductSupply } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/updateProductTexts.ts b/packages/api/src/resolvers/mutations/products/updateProductTexts.ts index d48a05fb0a..2c4fa8544a 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductTexts.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductTexts.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductNotFoundError, InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function updateProductTexts( root: never, diff --git a/packages/api/src/resolvers/mutations/products/updateProductTokenization.ts b/packages/api/src/resolvers/mutations/products/updateProductTokenization.ts index 5195c862ce..0012c121c2 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductTokenization.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductTokenization.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductTokenization } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError, ProductWrongStatusError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/updateProductVariationTexts.ts b/packages/api/src/resolvers/mutations/products/updateProductVariationTexts.ts index a01f8d14e8..4279013f44 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductVariationTexts.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductVariationTexts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductVariationText } from '@unchainedshop/core-products'; import { ProductVariationNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/products/updateProductWarehousing.ts b/packages/api/src/resolvers/mutations/products/updateProductWarehousing.ts index 0b829d70b3..5151fe0a3f 100644 --- a/packages/api/src/resolvers/mutations/products/updateProductWarehousing.ts +++ b/packages/api/src/resolvers/mutations/products/updateProductWarehousing.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductTypes } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductWarehousing } from '@unchainedshop/core-products'; import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/quotations/makeQuotationProposal.ts b/packages/api/src/resolvers/mutations/quotations/makeQuotationProposal.ts index 15f7ce7828..24f8034c0e 100644 --- a/packages/api/src/resolvers/mutations/quotations/makeQuotationProposal.ts +++ b/packages/api/src/resolvers/mutations/quotations/makeQuotationProposal.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { QuotationStatus } from '@unchainedshop/core-quotations'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { QuotationNotFoundError, QuotationWrongStatusError, InvalidIdError } from '../../../errors.js'; export default async function makeQuotationProposal( diff --git a/packages/api/src/resolvers/mutations/quotations/rejectQuotation.ts b/packages/api/src/resolvers/mutations/quotations/rejectQuotation.ts index 3ebefe85d1..3e7ed7e973 100644 --- a/packages/api/src/resolvers/mutations/quotations/rejectQuotation.ts +++ b/packages/api/src/resolvers/mutations/quotations/rejectQuotation.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { QuotationStatus } from '@unchainedshop/core-quotations'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { QuotationNotFoundError, QuotationWrongStatusError, InvalidIdError } from '../../../errors.js'; export default async function rejectQuotation( diff --git a/packages/api/src/resolvers/mutations/quotations/requestQuotation.ts b/packages/api/src/resolvers/mutations/quotations/requestQuotation.ts index 4183c19c35..03db56ec47 100644 --- a/packages/api/src/resolvers/mutations/quotations/requestQuotation.ts +++ b/packages/api/src/resolvers/mutations/quotations/requestQuotation.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductNotFoundError, InvalidIdError } from '../../../errors.js'; export default async function requestQuotation( diff --git a/packages/api/src/resolvers/mutations/quotations/verifyQuotation.ts b/packages/api/src/resolvers/mutations/quotations/verifyQuotation.ts index ee9a02a8ea..531163d3b9 100644 --- a/packages/api/src/resolvers/mutations/quotations/verifyQuotation.ts +++ b/packages/api/src/resolvers/mutations/quotations/verifyQuotation.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { QuotationStatus } from '@unchainedshop/core-quotations'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { QuotationNotFoundError, QuotationWrongStatusError, InvalidIdError } from '../../../errors.js'; export default async function verifyQuotation( diff --git a/packages/api/src/resolvers/mutations/users/addPushSubscription.ts b/packages/api/src/resolvers/mutations/users/addPushSubscription.ts index 77efc21c7b..914fa258ab 100644 --- a/packages/api/src/resolvers/mutations/users/addPushSubscription.ts +++ b/packages/api/src/resolvers/mutations/users/addPushSubscription.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; const addPushSubscription = async ( _, diff --git a/packages/api/src/resolvers/mutations/users/heartbeat.ts b/packages/api/src/resolvers/mutations/users/heartbeat.ts index 060ed4e55f..c30591239b 100644 --- a/packages/api/src/resolvers/mutations/users/heartbeat.ts +++ b/packages/api/src/resolvers/mutations/users/heartbeat.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { UserNotFoundError } from '../../../errors.js'; export default async function heartbeat( diff --git a/packages/api/src/resolvers/mutations/users/prepareUserAvatarUpload.ts b/packages/api/src/resolvers/mutations/users/prepareUserAvatarUpload.ts index f95bf73982..ed1127ffa6 100644 --- a/packages/api/src/resolvers/mutations/users/prepareUserAvatarUpload.ts +++ b/packages/api/src/resolvers/mutations/users/prepareUserAvatarUpload.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function prepareUserAvatarUpload( diff --git a/packages/api/src/resolvers/mutations/users/removePushSubscription.ts b/packages/api/src/resolvers/mutations/users/removePushSubscription.ts index 4217f58daf..1aac455733 100644 --- a/packages/api/src/resolvers/mutations/users/removePushSubscription.ts +++ b/packages/api/src/resolvers/mutations/users/removePushSubscription.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; const removePushSubscription = async (_, { p256dh }, context: Context) => { diff --git a/packages/api/src/resolvers/mutations/users/removeUser.ts b/packages/api/src/resolvers/mutations/users/removeUser.ts index 9b09801f40..83b538e70a 100755 --- a/packages/api/src/resolvers/mutations/users/removeUser.ts +++ b/packages/api/src/resolvers/mutations/users/removeUser.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { UserNotFoundError } from '../../../errors.js'; export default async function removeUser( diff --git a/packages/api/src/resolvers/mutations/users/setRoles.ts b/packages/api/src/resolvers/mutations/users/setRoles.ts index 044c6ba4f1..dfa6eeedd7 100644 --- a/packages/api/src/resolvers/mutations/users/setRoles.ts +++ b/packages/api/src/resolvers/mutations/users/setRoles.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, UserNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/users/setUserTags.ts b/packages/api/src/resolvers/mutations/users/setUserTags.ts index e53e635dc5..fbe1d6550e 100644 --- a/packages/api/src/resolvers/mutations/users/setUserTags.ts +++ b/packages/api/src/resolvers/mutations/users/setUserTags.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, UserNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/users/updateUserProfile.ts b/packages/api/src/resolvers/mutations/users/updateUserProfile.ts index 48cf627b4f..2ec77ca986 100755 --- a/packages/api/src/resolvers/mutations/users/updateUserProfile.ts +++ b/packages/api/src/resolvers/mutations/users/updateUserProfile.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { UserProfile } from '@unchainedshop/core-users'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { UserNotFoundError } from '../../../errors.js'; export default async function updateUserProfile( diff --git a/packages/api/src/resolvers/mutations/utils/getOrderCart.ts b/packages/api/src/resolvers/mutations/utils/getOrderCart.ts index 4ee28a9936..676f0f5b7f 100644 --- a/packages/api/src/resolvers/mutations/utils/getOrderCart.ts +++ b/packages/api/src/resolvers/mutations/utils/getOrderCart.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { User } from '@unchainedshop/core-users'; import { OrderNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/warehousing/createWarehousingProvider.ts b/packages/api/src/resolvers/mutations/warehousing/createWarehousingProvider.ts index 2e7a675ba3..caf956fcb7 100644 --- a/packages/api/src/resolvers/mutations/warehousing/createWarehousingProvider.ts +++ b/packages/api/src/resolvers/mutations/warehousing/createWarehousingProvider.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WarehousingProvider } from '@unchainedshop/core-warehousing'; import { ProviderConfigurationInvalid } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/warehousing/exportToken.ts b/packages/api/src/resolvers/mutations/warehousing/exportToken.ts index e9e02a958e..65e0c078ee 100644 --- a/packages/api/src/resolvers/mutations/warehousing/exportToken.ts +++ b/packages/api/src/resolvers/mutations/warehousing/exportToken.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { WorkStatus } from '@unchainedshop/core-worker'; diff --git a/packages/api/src/resolvers/mutations/warehousing/invalidateToken.ts b/packages/api/src/resolvers/mutations/warehousing/invalidateToken.ts index 378bd40ef3..495dcd12a0 100644 --- a/packages/api/src/resolvers/mutations/warehousing/invalidateToken.ts +++ b/packages/api/src/resolvers/mutations/warehousing/invalidateToken.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, diff --git a/packages/api/src/resolvers/mutations/warehousing/removeWarehousingProvider.ts b/packages/api/src/resolvers/mutations/warehousing/removeWarehousingProvider.ts index 0c547bb3a2..f651f5340d 100644 --- a/packages/api/src/resolvers/mutations/warehousing/removeWarehousingProvider.ts +++ b/packages/api/src/resolvers/mutations/warehousing/removeWarehousingProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, WarehousingProviderNotFoundError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/warehousing/updateWarehousingProvider.ts b/packages/api/src/resolvers/mutations/warehousing/updateWarehousingProvider.ts index 84b438e327..a84651c5cf 100644 --- a/packages/api/src/resolvers/mutations/warehousing/updateWarehousingProvider.ts +++ b/packages/api/src/resolvers/mutations/warehousing/updateWarehousingProvider.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WarehousingProvider } from '@unchainedshop/core-warehousing'; import { WarehousingProviderNotFoundError, InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/worker/addWork.ts b/packages/api/src/resolvers/mutations/worker/addWork.ts index d4767a9147..78613c9333 100644 --- a/packages/api/src/resolvers/mutations/worker/addWork.ts +++ b/packages/api/src/resolvers/mutations/worker/addWork.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WorkData } from '@unchainedshop/core-worker'; export default async function addWork(root: never, workData: WorkData, { modules, userId }: Context) { diff --git a/packages/api/src/resolvers/mutations/worker/allocateWork.ts b/packages/api/src/resolvers/mutations/worker/allocateWork.ts index 9055833fb2..d3d20999fa 100644 --- a/packages/api/src/resolvers/mutations/worker/allocateWork.ts +++ b/packages/api/src/resolvers/mutations/worker/allocateWork.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function allocateWork( diff --git a/packages/api/src/resolvers/mutations/worker/finishWork.ts b/packages/api/src/resolvers/mutations/worker/finishWork.ts index 5b4606aafb..aa052fb348 100644 --- a/packages/api/src/resolvers/mutations/worker/finishWork.ts +++ b/packages/api/src/resolvers/mutations/worker/finishWork.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, WorkNotFoundOrWrongStatus } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/mutations/worker/processNextWork.ts b/packages/api/src/resolvers/mutations/worker/processNextWork.ts index e723e096dd..278208e48f 100644 --- a/packages/api/src/resolvers/mutations/worker/processNextWork.ts +++ b/packages/api/src/resolvers/mutations/worker/processNextWork.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function processNextWork( diff --git a/packages/api/src/resolvers/mutations/worker/removeWork.ts b/packages/api/src/resolvers/mutations/worker/removeWork.ts index 43ff2614ab..267720cb8d 100644 --- a/packages/api/src/resolvers/mutations/worker/removeWork.ts +++ b/packages/api/src/resolvers/mutations/worker/removeWork.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError, WorkNotFoundOrWrongStatus } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/queries/assortments/assortment.ts b/packages/api/src/resolvers/queries/assortments/assortment.ts index 98519b9f44..a67962ec74 100644 --- a/packages/api/src/resolvers/queries/assortments/assortment.ts +++ b/packages/api/src/resolvers/queries/assortments/assortment.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError } from '../../../errors.js'; export default async function assortment( diff --git a/packages/api/src/resolvers/queries/assortments/assortments.ts b/packages/api/src/resolvers/queries/assortments/assortments.ts index 70635ee6bd..2c1cbd3d49 100644 --- a/packages/api/src/resolvers/queries/assortments/assortments.ts +++ b/packages/api/src/resolvers/queries/assortments/assortments.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { AssortmentQuery } from '@unchainedshop/core-assortments'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function assortments( root: never, diff --git a/packages/api/src/resolvers/queries/assortments/assortmentsCount.ts b/packages/api/src/resolvers/queries/assortments/assortmentsCount.ts index 9750a76bee..d1bcaa1aa6 100644 --- a/packages/api/src/resolvers/queries/assortments/assortmentsCount.ts +++ b/packages/api/src/resolvers/queries/assortments/assortmentsCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { AssortmentQuery } from '@unchainedshop/core-assortments'; export default async function assortmentsCount( diff --git a/packages/api/src/resolvers/queries/assortments/translatedAssortmentMediaTexts.ts b/packages/api/src/resolvers/queries/assortments/translatedAssortmentMediaTexts.ts index 2e9eb19253..86950ed40e 100644 --- a/packages/api/src/resolvers/queries/assortments/translatedAssortmentMediaTexts.ts +++ b/packages/api/src/resolvers/queries/assortments/translatedAssortmentMediaTexts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function translatedAssortmentMediaTexts( root: never, diff --git a/packages/api/src/resolvers/queries/assortments/translatedAssortmentTexts.ts b/packages/api/src/resolvers/queries/assortments/translatedAssortmentTexts.ts index d5caf81a37..c052633e56 100644 --- a/packages/api/src/resolvers/queries/assortments/translatedAssortmentTexts.ts +++ b/packages/api/src/resolvers/queries/assortments/translatedAssortmentTexts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function translatedAssortmentTexts( root: never, diff --git a/packages/api/src/resolvers/queries/countries/countries.ts b/packages/api/src/resolvers/queries/countries/countries.ts index 287e36093c..0d72297bee 100644 --- a/packages/api/src/resolvers/queries/countries/countries.ts +++ b/packages/api/src/resolvers/queries/countries/countries.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { CountryQuery } from '@unchainedshop/core-countries'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function countries( root: never, diff --git a/packages/api/src/resolvers/queries/countries/countriesCount.ts b/packages/api/src/resolvers/queries/countries/countriesCount.ts index 7cccb1f27d..b31b987ed9 100644 --- a/packages/api/src/resolvers/queries/countries/countriesCount.ts +++ b/packages/api/src/resolvers/queries/countries/countriesCount.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { CountryQuery } from '@unchainedshop/core-countries'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/queries/countries/country.ts b/packages/api/src/resolvers/queries/countries/country.ts index 03469a057a..d85da67459 100644 --- a/packages/api/src/resolvers/queries/countries/country.ts +++ b/packages/api/src/resolvers/queries/countries/country.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function country( root: never, diff --git a/packages/api/src/resolvers/queries/currencies/currencies.ts b/packages/api/src/resolvers/queries/currencies/currencies.ts index 7d8095dfc2..698680fb01 100644 --- a/packages/api/src/resolvers/queries/currencies/currencies.ts +++ b/packages/api/src/resolvers/queries/currencies/currencies.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { CurrencyQuery } from '@unchainedshop/core-currencies'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function currencies( root: never, diff --git a/packages/api/src/resolvers/queries/currencies/currenciesCount.ts b/packages/api/src/resolvers/queries/currencies/currenciesCount.ts index 5c96bd3944..ebdc10017f 100644 --- a/packages/api/src/resolvers/queries/currencies/currenciesCount.ts +++ b/packages/api/src/resolvers/queries/currencies/currenciesCount.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { CurrencyQuery } from '@unchainedshop/core-currencies'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function currenciesCount( root: never, diff --git a/packages/api/src/resolvers/queries/currencies/currency.ts b/packages/api/src/resolvers/queries/currencies/currency.ts index 5f700c22df..cb9243523b 100644 --- a/packages/api/src/resolvers/queries/currencies/currency.ts +++ b/packages/api/src/resolvers/queries/currencies/currency.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function currency( root: never, diff --git a/packages/api/src/resolvers/queries/delivery/deliveryInterfaces.ts b/packages/api/src/resolvers/queries/delivery/deliveryInterfaces.ts index d62ca6ae4c..71217c39e5 100644 --- a/packages/api/src/resolvers/queries/delivery/deliveryInterfaces.ts +++ b/packages/api/src/resolvers/queries/delivery/deliveryInterfaces.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProviderType } from '@unchainedshop/core-delivery'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/queries/delivery/deliveryProvider.ts b/packages/api/src/resolvers/queries/delivery/deliveryProvider.ts index f9898f923e..f16aee397e 100644 --- a/packages/api/src/resolvers/queries/delivery/deliveryProvider.ts +++ b/packages/api/src/resolvers/queries/delivery/deliveryProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/queries/delivery/deliveryProviders.ts b/packages/api/src/resolvers/queries/delivery/deliveryProviders.ts index ee4b7205f4..7598aae06e 100644 --- a/packages/api/src/resolvers/queries/delivery/deliveryProviders.ts +++ b/packages/api/src/resolvers/queries/delivery/deliveryProviders.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProviderQuery } from '@unchainedshop/core-delivery'; export default async function deliveryProviders( diff --git a/packages/api/src/resolvers/queries/delivery/deliveryProvidersCount.ts b/packages/api/src/resolvers/queries/delivery/deliveryProvidersCount.ts index f78e03fdd9..1df3eaf4b5 100644 --- a/packages/api/src/resolvers/queries/delivery/deliveryProvidersCount.ts +++ b/packages/api/src/resolvers/queries/delivery/deliveryProvidersCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { DeliveryProviderQuery } from '@unchainedshop/core-delivery'; export default async function deliveryProvidersCount( diff --git a/packages/api/src/resolvers/queries/enrollments/enrollment.ts b/packages/api/src/resolvers/queries/enrollments/enrollment.ts index a6d935fd08..f3478e9c7c 100644 --- a/packages/api/src/resolvers/queries/enrollments/enrollment.ts +++ b/packages/api/src/resolvers/queries/enrollments/enrollment.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function enrollment( root: never, diff --git a/packages/api/src/resolvers/queries/enrollments/enrollments.ts b/packages/api/src/resolvers/queries/enrollments/enrollments.ts index 095a637656..70aaf96137 100644 --- a/packages/api/src/resolvers/queries/enrollments/enrollments.ts +++ b/packages/api/src/resolvers/queries/enrollments/enrollments.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { EnrollmentQuery } from '@unchainedshop/core-enrollments'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function enrollments( root: never, diff --git a/packages/api/src/resolvers/queries/enrollments/enrollmentsCount.ts b/packages/api/src/resolvers/queries/enrollments/enrollmentsCount.ts index e4aa4fcc45..4e4fa4bff5 100644 --- a/packages/api/src/resolvers/queries/enrollments/enrollmentsCount.ts +++ b/packages/api/src/resolvers/queries/enrollments/enrollmentsCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { EnrollmentQuery } from '@unchainedshop/core-enrollments'; export default async function enrollmentsCount( diff --git a/packages/api/src/resolvers/queries/events/event.ts b/packages/api/src/resolvers/queries/events/event.ts index 235768cfb1..df2c9fef96 100644 --- a/packages/api/src/resolvers/queries/events/event.ts +++ b/packages/api/src/resolvers/queries/events/event.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function event( root: never, diff --git a/packages/api/src/resolvers/queries/events/eventStatistics.ts b/packages/api/src/resolvers/queries/events/eventStatistics.ts index 04b10e0dd9..e5c78a1f28 100644 --- a/packages/api/src/resolvers/queries/events/eventStatistics.ts +++ b/packages/api/src/resolvers/queries/events/eventStatistics.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function eventStatistics( root: never, diff --git a/packages/api/src/resolvers/queries/events/events.ts b/packages/api/src/resolvers/queries/events/events.ts index f9a6236f55..5bc099f77e 100644 --- a/packages/api/src/resolvers/queries/events/events.ts +++ b/packages/api/src/resolvers/queries/events/events.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; type FindEventsParams = Parameters['0']; diff --git a/packages/api/src/resolvers/queries/events/eventsCounts.ts b/packages/api/src/resolvers/queries/events/eventsCounts.ts index c36d57d0b6..97f61f3a66 100644 --- a/packages/api/src/resolvers/queries/events/eventsCounts.ts +++ b/packages/api/src/resolvers/queries/events/eventsCounts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; type CountEventsParams = Parameters['0']; diff --git a/packages/api/src/resolvers/queries/filters/filter.ts b/packages/api/src/resolvers/queries/filters/filter.ts index dc999a510c..8977930c68 100644 --- a/packages/api/src/resolvers/queries/filters/filter.ts +++ b/packages/api/src/resolvers/queries/filters/filter.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function filter( root: never, diff --git a/packages/api/src/resolvers/queries/filters/filters.ts b/packages/api/src/resolvers/queries/filters/filters.ts index 7215eb0b83..8e782bdae1 100644 --- a/packages/api/src/resolvers/queries/filters/filters.ts +++ b/packages/api/src/resolvers/queries/filters/filters.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { FilterQuery } from '@unchainedshop/core-filters'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function filters( root: never, diff --git a/packages/api/src/resolvers/queries/filters/filtersCount.ts b/packages/api/src/resolvers/queries/filters/filtersCount.ts index d5a1359ea2..4b8f97c6d8 100644 --- a/packages/api/src/resolvers/queries/filters/filtersCount.ts +++ b/packages/api/src/resolvers/queries/filters/filtersCount.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { FilterQuery } from '@unchainedshop/core-filters'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function filtersCount( root: never, diff --git a/packages/api/src/resolvers/queries/filters/searchAssortments.ts b/packages/api/src/resolvers/queries/filters/searchAssortments.ts index a693779ff1..5e608a91bf 100644 --- a/packages/api/src/resolvers/queries/filters/searchAssortments.ts +++ b/packages/api/src/resolvers/queries/filters/searchAssortments.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { SearchQuery } from '@unchainedshop/core-filters'; import { log } from '@unchainedshop/logger'; import { QueryStringRequiredError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/queries/filters/searchProducts.ts b/packages/api/src/resolvers/queries/filters/searchProducts.ts index 1dd7e8cc78..945181c82e 100644 --- a/packages/api/src/resolvers/queries/filters/searchProducts.ts +++ b/packages/api/src/resolvers/queries/filters/searchProducts.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SearchFilterQuery } from '@unchainedshop/core-filters'; import { QueryStringRequiredError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function searchProducts( root: never, diff --git a/packages/api/src/resolvers/queries/filters/translatedFilterTexts.ts b/packages/api/src/resolvers/queries/filters/translatedFilterTexts.ts index a391b93df1..3c26f9c001 100644 --- a/packages/api/src/resolvers/queries/filters/translatedFilterTexts.ts +++ b/packages/api/src/resolvers/queries/filters/translatedFilterTexts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function translatedFilterTexts( root: never, diff --git a/packages/api/src/resolvers/queries/languages/language.ts b/packages/api/src/resolvers/queries/languages/language.ts index d8c2f08488..224c025962 100644 --- a/packages/api/src/resolvers/queries/languages/language.ts +++ b/packages/api/src/resolvers/queries/languages/language.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/queries/languages/languages.ts b/packages/api/src/resolvers/queries/languages/languages.ts index feb9d4d5f3..f8e3ff197d 100644 --- a/packages/api/src/resolvers/queries/languages/languages.ts +++ b/packages/api/src/resolvers/queries/languages/languages.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { LanguageQuery } from '@unchainedshop/core-languages'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function languages( root: never, diff --git a/packages/api/src/resolvers/queries/languages/languagesCount.ts b/packages/api/src/resolvers/queries/languages/languagesCount.ts index 4e66c5a17a..fa8cad960f 100644 --- a/packages/api/src/resolvers/queries/languages/languagesCount.ts +++ b/packages/api/src/resolvers/queries/languages/languagesCount.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { LanguageQuery } from '@unchainedshop/core-languages'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/queries/orders/order.ts b/packages/api/src/resolvers/queries/orders/order.ts index c817e5b585..8899d95537 100644 --- a/packages/api/src/resolvers/queries/orders/order.ts +++ b/packages/api/src/resolvers/queries/orders/order.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function order( root: never, diff --git a/packages/api/src/resolvers/queries/orders/orderStatistics.ts b/packages/api/src/resolvers/queries/orders/orderStatistics.ts index 8064ec7606..49772120a4 100644 --- a/packages/api/src/resolvers/queries/orders/orderStatistics.ts +++ b/packages/api/src/resolvers/queries/orders/orderStatistics.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function orderStatistics( root: never, diff --git a/packages/api/src/resolvers/queries/orders/orders.ts b/packages/api/src/resolvers/queries/orders/orders.ts index 65cc873bbb..584d7f33c5 100644 --- a/packages/api/src/resolvers/queries/orders/orders.ts +++ b/packages/api/src/resolvers/queries/orders/orders.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { OrderQuery } from '@unchainedshop/core-orders'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function orders( root: never, diff --git a/packages/api/src/resolvers/queries/orders/ordersCount.ts b/packages/api/src/resolvers/queries/orders/ordersCount.ts index f93e814d47..5385d6466c 100644 --- a/packages/api/src/resolvers/queries/orders/ordersCount.ts +++ b/packages/api/src/resolvers/queries/orders/ordersCount.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { OrderQuery } from '@unchainedshop/core-orders'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function ordersCount( root: never, diff --git a/packages/api/src/resolvers/queries/payment/paymentInterfaces.ts b/packages/api/src/resolvers/queries/payment/paymentInterfaces.ts index f9ec845846..d3b1446d50 100644 --- a/packages/api/src/resolvers/queries/payment/paymentInterfaces.ts +++ b/packages/api/src/resolvers/queries/payment/paymentInterfaces.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { PaymentProviderType } from '@unchainedshop/core-payment'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function paymentInterfaces( root: never, diff --git a/packages/api/src/resolvers/queries/payment/paymentProvider.ts b/packages/api/src/resolvers/queries/payment/paymentProvider.ts index b6c018a575..c5de19dfd5 100644 --- a/packages/api/src/resolvers/queries/payment/paymentProvider.ts +++ b/packages/api/src/resolvers/queries/payment/paymentProvider.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/queries/payment/paymentProviders.ts b/packages/api/src/resolvers/queries/payment/paymentProviders.ts index ee6d6260b0..9cebb7e051 100644 --- a/packages/api/src/resolvers/queries/payment/paymentProviders.ts +++ b/packages/api/src/resolvers/queries/payment/paymentProviders.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { mongodb } from '@unchainedshop/mongodb'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProvider } from '@unchainedshop/core-payment'; export default async function paymentProviders( diff --git a/packages/api/src/resolvers/queries/payment/paymentProvidersCount.ts b/packages/api/src/resolvers/queries/payment/paymentProvidersCount.ts index d47d19ac4d..f7b16fd50f 100644 --- a/packages/api/src/resolvers/queries/payment/paymentProvidersCount.ts +++ b/packages/api/src/resolvers/queries/payment/paymentProvidersCount.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { mongodb } from '@unchainedshop/mongodb'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { PaymentProvider } from '@unchainedshop/core-payment'; export default async function paymentProvidersCount( diff --git a/packages/api/src/resolvers/queries/products/product.ts b/packages/api/src/resolvers/queries/products/product.ts index 71010b36f9..66f62715a4 100644 --- a/packages/api/src/resolvers/queries/products/product.ts +++ b/packages/api/src/resolvers/queries/products/product.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; diff --git a/packages/api/src/resolvers/queries/products/productCatalogPrices.ts b/packages/api/src/resolvers/queries/products/productCatalogPrices.ts index 233c75a905..f69fd5ab53 100644 --- a/packages/api/src/resolvers/queries/products/productCatalogPrices.ts +++ b/packages/api/src/resolvers/queries/products/productCatalogPrices.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError } from '../../../errors.js'; export default async function productCatalogPrices( diff --git a/packages/api/src/resolvers/queries/products/productReview.ts b/packages/api/src/resolvers/queries/products/productReview.ts index 5d986f5676..d7c827f4f6 100644 --- a/packages/api/src/resolvers/queries/products/productReview.ts +++ b/packages/api/src/resolvers/queries/products/productReview.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { InvalidIdError } from '../../../errors.js'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function productReview( root: never, diff --git a/packages/api/src/resolvers/queries/products/productReviews.ts b/packages/api/src/resolvers/queries/products/productReviews.ts index 33a8d78235..bb8cc1a60b 100644 --- a/packages/api/src/resolvers/queries/products/productReviews.ts +++ b/packages/api/src/resolvers/queries/products/productReviews.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function productReviews( root: never, diff --git a/packages/api/src/resolvers/queries/products/productReviewsCount.ts b/packages/api/src/resolvers/queries/products/productReviewsCount.ts index 8088d16d65..a651cec1b7 100644 --- a/packages/api/src/resolvers/queries/products/productReviewsCount.ts +++ b/packages/api/src/resolvers/queries/products/productReviewsCount.ts @@ -1,6 +1,6 @@ import { log } from '@unchainedshop/logger'; import { ProductReviewQuery } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function productReviewsCount( root: never, diff --git a/packages/api/src/resolvers/queries/products/products.ts b/packages/api/src/resolvers/queries/products/products.ts index b05a56cb45..6e15592ae8 100644 --- a/packages/api/src/resolvers/queries/products/products.ts +++ b/packages/api/src/resolvers/queries/products/products.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { ProductQuery } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function products( root: never, diff --git a/packages/api/src/resolvers/queries/products/productsCount.ts b/packages/api/src/resolvers/queries/products/productsCount.ts index 144bad8d2b..546368a1c5 100644 --- a/packages/api/src/resolvers/queries/products/productsCount.ts +++ b/packages/api/src/resolvers/queries/products/productsCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { ProductQuery } from '@unchainedshop/core-products'; export default async function productsCount( diff --git a/packages/api/src/resolvers/queries/products/translatedProductMediaTexts.ts b/packages/api/src/resolvers/queries/products/translatedProductMediaTexts.ts index db1747b424..11696d4453 100644 --- a/packages/api/src/resolvers/queries/products/translatedProductMediaTexts.ts +++ b/packages/api/src/resolvers/queries/products/translatedProductMediaTexts.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function translatedProductMediaTexts( root: never, diff --git a/packages/api/src/resolvers/queries/products/translatedProductTexts.ts b/packages/api/src/resolvers/queries/products/translatedProductTexts.ts index 487ac31a2c..5bbfdebfcb 100644 --- a/packages/api/src/resolvers/queries/products/translatedProductTexts.ts +++ b/packages/api/src/resolvers/queries/products/translatedProductTexts.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function translatedProductTexts( diff --git a/packages/api/src/resolvers/queries/products/translatedProductVariationTexts.ts b/packages/api/src/resolvers/queries/products/translatedProductVariationTexts.ts index 3c5929c023..3bb28afa8c 100644 --- a/packages/api/src/resolvers/queries/products/translatedProductVariationTexts.ts +++ b/packages/api/src/resolvers/queries/products/translatedProductVariationTexts.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function translatedProductVariationTexts( diff --git a/packages/api/src/resolvers/queries/quotations/quotation.ts b/packages/api/src/resolvers/queries/quotations/quotation.ts index 3e1fc6356d..ea32ea51d8 100644 --- a/packages/api/src/resolvers/queries/quotations/quotation.ts +++ b/packages/api/src/resolvers/queries/quotations/quotation.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError } from '../../../errors.js'; export default async function quotation( diff --git a/packages/api/src/resolvers/queries/quotations/quotations.ts b/packages/api/src/resolvers/queries/quotations/quotations.ts index 37b3ba19b5..8944552552 100644 --- a/packages/api/src/resolvers/queries/quotations/quotations.ts +++ b/packages/api/src/resolvers/queries/quotations/quotations.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { QuotationQuery } from '@unchainedshop/core-quotations'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function quotations( root: never, diff --git a/packages/api/src/resolvers/queries/quotations/quotationsCount.ts b/packages/api/src/resolvers/queries/quotations/quotationsCount.ts index 26c6c14a00..955136b630 100644 --- a/packages/api/src/resolvers/queries/quotations/quotationsCount.ts +++ b/packages/api/src/resolvers/queries/quotations/quotationsCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { QuotationQuery } from '@unchainedshop/core-quotations'; export default async function quotationsCount( diff --git a/packages/api/src/resolvers/queries/shopInfo.ts b/packages/api/src/resolvers/queries/shopInfo.ts index f9fb7485a6..0ca98b5a20 100644 --- a/packages/api/src/resolvers/queries/shopInfo.ts +++ b/packages/api/src/resolvers/queries/shopInfo.ts @@ -1,4 +1,4 @@ -import { Context } from '../../types.js'; +import { Context } from '../../context.js'; import { log } from '@unchainedshop/logger'; export default function shopInfo( diff --git a/packages/api/src/resolvers/queries/users/me.ts b/packages/api/src/resolvers/queries/users/me.ts index 2960d7bcc8..afd5abd848 100755 --- a/packages/api/src/resolvers/queries/users/me.ts +++ b/packages/api/src/resolvers/queries/users/me.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function me(root: never, params: any, { userId, user, remoteAddress }: Context) { log(`query me ${remoteAddress}`, { userId }); diff --git a/packages/api/src/resolvers/queries/users/user.ts b/packages/api/src/resolvers/queries/users/user.ts index 256a66f732..0e6c167f64 100755 --- a/packages/api/src/resolvers/queries/users/user.ts +++ b/packages/api/src/resolvers/queries/users/user.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function user( root: never, diff --git a/packages/api/src/resolvers/queries/users/users.ts b/packages/api/src/resolvers/queries/users/users.ts index 255eb1787f..f8bb5e9fd5 100644 --- a/packages/api/src/resolvers/queries/users/users.ts +++ b/packages/api/src/resolvers/queries/users/users.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { UserQuery } from '@unchainedshop/core-users'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function users( root: never, diff --git a/packages/api/src/resolvers/queries/users/usersCount.ts b/packages/api/src/resolvers/queries/users/usersCount.ts index 0bcbd315ca..f39ca869a3 100644 --- a/packages/api/src/resolvers/queries/users/usersCount.ts +++ b/packages/api/src/resolvers/queries/users/usersCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { UserQuery } from '@unchainedshop/core-users'; export default async function usersCount(root: never, params: UserQuery, { modules, userId }: Context) { diff --git a/packages/api/src/resolvers/queries/users/validateResetPasswordToken.ts b/packages/api/src/resolvers/queries/users/validateResetPasswordToken.ts index 4c83a81c21..a118166d15 100755 --- a/packages/api/src/resolvers/queries/users/validateResetPasswordToken.ts +++ b/packages/api/src/resolvers/queries/users/validateResetPasswordToken.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function validateResetPasswordToken( root: never, diff --git a/packages/api/src/resolvers/queries/users/validateVerifyEmailToken.ts b/packages/api/src/resolvers/queries/users/validateVerifyEmailToken.ts index bc834b063c..9f7d44ce4c 100755 --- a/packages/api/src/resolvers/queries/users/validateVerifyEmailToken.ts +++ b/packages/api/src/resolvers/queries/users/validateVerifyEmailToken.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function validateVerifyEmailToken( root: never, diff --git a/packages/api/src/resolvers/queries/warehousing/token.ts b/packages/api/src/resolvers/queries/warehousing/token.ts index c43d8ef8d2..6a198842f3 100644 --- a/packages/api/src/resolvers/queries/warehousing/token.ts +++ b/packages/api/src/resolvers/queries/warehousing/token.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError } from '../../../errors.js'; export default async function token( diff --git a/packages/api/src/resolvers/queries/warehousing/tokens.ts b/packages/api/src/resolvers/queries/warehousing/tokens.ts index 6fb09ae07a..93a04774f1 100644 --- a/packages/api/src/resolvers/queries/warehousing/tokens.ts +++ b/packages/api/src/resolvers/queries/warehousing/tokens.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function tokens( root: never, diff --git a/packages/api/src/resolvers/queries/warehousing/warehousingInterfaces.ts b/packages/api/src/resolvers/queries/warehousing/warehousingInterfaces.ts index c7cef3f363..51be37d43c 100644 --- a/packages/api/src/resolvers/queries/warehousing/warehousingInterfaces.ts +++ b/packages/api/src/resolvers/queries/warehousing/warehousingInterfaces.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WarehousingProviderType } from '@unchainedshop/core-warehousing'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/queries/warehousing/warehousingProvider.ts b/packages/api/src/resolvers/queries/warehousing/warehousingProvider.ts index 828255ba8d..13f9130e35 100644 --- a/packages/api/src/resolvers/queries/warehousing/warehousingProvider.ts +++ b/packages/api/src/resolvers/queries/warehousing/warehousingProvider.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError } from '../../../errors.js'; export default async function warehousingProvider( diff --git a/packages/api/src/resolvers/queries/warehousing/warehousingProviders.ts b/packages/api/src/resolvers/queries/warehousing/warehousingProviders.ts index c107b5b9c9..12c2af05bf 100644 --- a/packages/api/src/resolvers/queries/warehousing/warehousingProviders.ts +++ b/packages/api/src/resolvers/queries/warehousing/warehousingProviders.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WarehousingProviderQuery } from '@unchainedshop/core-warehousing'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/queries/warehousing/warehousingProvidersCount.ts b/packages/api/src/resolvers/queries/warehousing/warehousingProvidersCount.ts index 3ccbf42bce..2623d5592a 100644 --- a/packages/api/src/resolvers/queries/warehousing/warehousingProvidersCount.ts +++ b/packages/api/src/resolvers/queries/warehousing/warehousingProvidersCount.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WarehousingProviderQuery } from '@unchainedshop/core-warehousing'; import { log } from '@unchainedshop/logger'; diff --git a/packages/api/src/resolvers/queries/worker/activeWorkTypes.ts b/packages/api/src/resolvers/queries/worker/activeWorkTypes.ts index e9cb6d4623..48dc623efb 100644 --- a/packages/api/src/resolvers/queries/worker/activeWorkTypes.ts +++ b/packages/api/src/resolvers/queries/worker/activeWorkTypes.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { log } from '@unchainedshop/logger'; export default async function activeWorkTypes(root: never, _: any, { modules, userId }: Context) { diff --git a/packages/api/src/resolvers/queries/worker/work.ts b/packages/api/src/resolvers/queries/worker/work.ts index 54607e9faf..664117b4cf 100644 --- a/packages/api/src/resolvers/queries/worker/work.ts +++ b/packages/api/src/resolvers/queries/worker/work.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { InvalidIdError } from '../../../errors.js'; export default async function work( diff --git a/packages/api/src/resolvers/queries/worker/workQueue.ts b/packages/api/src/resolvers/queries/worker/workQueue.ts index eee8572a10..f9c4e27178 100644 --- a/packages/api/src/resolvers/queries/worker/workQueue.ts +++ b/packages/api/src/resolvers/queries/worker/workQueue.ts @@ -1,7 +1,7 @@ import { log } from '@unchainedshop/logger'; import { SortOption } from '@unchainedshop/utils'; import { WorkStatus } from '@unchainedshop/core-worker'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function workQueue( root: never, diff --git a/packages/api/src/resolvers/queries/worker/workQueueCount.ts b/packages/api/src/resolvers/queries/worker/workQueueCount.ts index a3ed6e6973..a13eeb821e 100644 --- a/packages/api/src/resolvers/queries/worker/workQueueCount.ts +++ b/packages/api/src/resolvers/queries/worker/workQueueCount.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { WorkQueueQuery } from '@unchainedshop/core-worker/lib/module/configureWorkerModule.js'; export default async function workQueueCount( diff --git a/packages/api/src/resolvers/queries/worker/workStatistics.ts b/packages/api/src/resolvers/queries/worker/workStatistics.ts index 55133e1270..5500e80385 100644 --- a/packages/api/src/resolvers/queries/worker/workStatistics.ts +++ b/packages/api/src/resolvers/queries/worker/workStatistics.ts @@ -1,5 +1,5 @@ import { log } from '@unchainedshop/logger'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export default async function workStatistics( root: never, diff --git a/packages/api/src/resolvers/type/assortment/assortment-filter-types.ts b/packages/api/src/resolvers/type/assortment/assortment-filter-types.ts index a627b5535e..da89d970a2 100644 --- a/packages/api/src/resolvers/type/assortment/assortment-filter-types.ts +++ b/packages/api/src/resolvers/type/assortment/assortment-filter-types.ts @@ -1,6 +1,6 @@ import { Assortment, AssortmentFilter as AssortmentFilterType } from '@unchainedshop/core-assortments'; import { Filter } from '@unchainedshop/core-filters'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; type HelperType = (assortmentFilter: AssortmentFilterType, _: never, context: Context) => T; diff --git a/packages/api/src/resolvers/type/assortment/assortment-link-types.ts b/packages/api/src/resolvers/type/assortment/assortment-link-types.ts index d9965d4106..298942ef43 100644 --- a/packages/api/src/resolvers/type/assortment/assortment-link-types.ts +++ b/packages/api/src/resolvers/type/assortment/assortment-link-types.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Assortment, AssortmentLink as AssortmentLinkType } from '@unchainedshop/core-assortments'; type HelperType = (assortmentLink: AssortmentLinkType, _: never, context: Context) => T; diff --git a/packages/api/src/resolvers/type/assortment/assortment-media-types.ts b/packages/api/src/resolvers/type/assortment/assortment-media-types.ts index b70b633696..6cc54d6aa2 100644 --- a/packages/api/src/resolvers/type/assortment/assortment-media-types.ts +++ b/packages/api/src/resolvers/type/assortment/assortment-media-types.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { AssortmentMediaType, AssortmentMediaText } from '@unchainedshop/core-assortments'; import { File } from '@unchainedshop/core-files'; diff --git a/packages/api/src/resolvers/type/assortment/assortment-path-link-types.ts b/packages/api/src/resolvers/type/assortment/assortment-path-link-types.ts index 783f42c8fe..1484e92c23 100644 --- a/packages/api/src/resolvers/type/assortment/assortment-path-link-types.ts +++ b/packages/api/src/resolvers/type/assortment/assortment-path-link-types.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { AssortmentPathLink as AssortmentPathLinkType, AssortmentLink as AssortmentLinkType, diff --git a/packages/api/src/resolvers/type/assortment/assortment-product-types.ts b/packages/api/src/resolvers/type/assortment/assortment-product-types.ts index 03e44f4471..6cdd8599c4 100644 --- a/packages/api/src/resolvers/type/assortment/assortment-product-types.ts +++ b/packages/api/src/resolvers/type/assortment/assortment-product-types.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Assortment, AssortmentProduct as AssortmentProductType } from '@unchainedshop/core-assortments'; import { Product } from '@unchainedshop/core-products'; diff --git a/packages/api/src/resolvers/type/assortment/assortment-types.ts b/packages/api/src/resolvers/type/assortment/assortment-types.ts index abcdf8c00a..d6cd18ea00 100644 --- a/packages/api/src/resolvers/type/assortment/assortment-types.ts +++ b/packages/api/src/resolvers/type/assortment/assortment-types.ts @@ -1,4 +1,4 @@ -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { Assortment as AssortmentType, AssortmentFilter, diff --git a/packages/api/src/resolvers/type/bookmark-types.ts b/packages/api/src/resolvers/type/bookmark-types.ts index 05fd8d1fd8..022a5db699 100644 --- a/packages/api/src/resolvers/type/bookmark-types.ts +++ b/packages/api/src/resolvers/type/bookmark-types.ts @@ -2,7 +2,7 @@ import { Bookmark as BookmarkType } from '@unchainedshop/core-bookmarks'; import { Product } from '@unchainedshop/core-products'; import { User } from '@unchainedshop/core-users'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; export type HelperType = (bookmark: BookmarkType, _: never, context: Context) => T; diff --git a/packages/api/src/resolvers/type/country-types.ts b/packages/api/src/resolvers/type/country-types.ts index 71ee1dce66..2a756f9e1c 100644 --- a/packages/api/src/resolvers/type/country-types.ts +++ b/packages/api/src/resolvers/type/country-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { Country as CountryType } from '@unchainedshop/core-countries'; import { Currency } from '@unchainedshop/core-currencies'; diff --git a/packages/api/src/resolvers/type/delivery-provider-types.ts b/packages/api/src/resolvers/type/delivery-provider-types.ts index 634bdad061..dbbc2b7ba2 100644 --- a/packages/api/src/resolvers/type/delivery-provider-types.ts +++ b/packages/api/src/resolvers/type/delivery-provider-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { DeliveryError, DeliveryProvider as DeliveryProviderType } from '@unchainedshop/core-delivery'; import { DeliveryPricingDirector } from '@unchainedshop/core-delivery'; diff --git a/packages/api/src/resolvers/type/enrollment/enrollment-delivery-types.ts b/packages/api/src/resolvers/type/enrollment/enrollment-delivery-types.ts index 1a2a70c241..46cda3bbce 100644 --- a/packages/api/src/resolvers/type/enrollment/enrollment-delivery-types.ts +++ b/packages/api/src/resolvers/type/enrollment/enrollment-delivery-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { Enrollment } from '@unchainedshop/core-enrollments'; diff --git a/packages/api/src/resolvers/type/enrollment/enrollment-payment-types.ts b/packages/api/src/resolvers/type/enrollment/enrollment-payment-types.ts index a664ef0b08..24795a2a8d 100644 --- a/packages/api/src/resolvers/type/enrollment/enrollment-payment-types.ts +++ b/packages/api/src/resolvers/type/enrollment/enrollment-payment-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { PaymentProvider } from '@unchainedshop/core-payment'; import { Enrollment } from '@unchainedshop/core-enrollments'; diff --git a/packages/api/src/resolvers/type/enrollment/enrollment-period-types.ts b/packages/api/src/resolvers/type/enrollment/enrollment-period-types.ts index f8229d0a0d..48a50b4027 100644 --- a/packages/api/src/resolvers/type/enrollment/enrollment-period-types.ts +++ b/packages/api/src/resolvers/type/enrollment/enrollment-period-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { EnrollmentPeriod as EnrollmentPeriodType } from '@unchainedshop/core-enrollments'; import { Order } from '@unchainedshop/core-orders'; diff --git a/packages/api/src/resolvers/type/enrollment/enrollment-plan-tyes.ts b/packages/api/src/resolvers/type/enrollment/enrollment-plan-tyes.ts index a927c2fee4..61cc12182f 100644 --- a/packages/api/src/resolvers/type/enrollment/enrollment-plan-tyes.ts +++ b/packages/api/src/resolvers/type/enrollment/enrollment-plan-tyes.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { EnrollmentPlan as EnrollmentPlanType } from '@unchainedshop/core-enrollments'; import { Product } from '@unchainedshop/core-products'; diff --git a/packages/api/src/resolvers/type/enrollment/enrollment-types.ts b/packages/api/src/resolvers/type/enrollment/enrollment-types.ts index 7add9a0f70..204107115a 100644 --- a/packages/api/src/resolvers/type/enrollment/enrollment-types.ts +++ b/packages/api/src/resolvers/type/enrollment/enrollment-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Country } from '@unchainedshop/core-countries'; import { Currency } from '@unchainedshop/core-currencies'; import { Enrollment as EnrollmentType, EnrollmentPlan } from '@unchainedshop/core-enrollments'; diff --git a/packages/api/src/resolvers/type/event-types.ts b/packages/api/src/resolvers/type/event-types.ts index 19ae2bada2..6965d5c045 100644 --- a/packages/api/src/resolvers/type/event-types.ts +++ b/packages/api/src/resolvers/type/event-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { Event as EventType } from '@unchainedshop/core-events'; export type HelperType = (work: EventType, params: P, context: Context) => T; diff --git a/packages/api/src/resolvers/type/filter/filter-option-types.ts b/packages/api/src/resolvers/type/filter/filter-option-types.ts index 73b65c0386..a74911381b 100644 --- a/packages/api/src/resolvers/type/filter/filter-option-types.ts +++ b/packages/api/src/resolvers/type/filter/filter-option-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { FilterOption as FilterOptionType, FilterText } from '@unchainedshop/core-filters'; type HelperType = (filterOption: FilterOptionType, params: P, context: Context) => T; diff --git a/packages/api/src/resolvers/type/filter/filter-types.ts b/packages/api/src/resolvers/type/filter/filter-types.ts index f1d19d12a9..0c6818ccc7 100644 --- a/packages/api/src/resolvers/type/filter/filter-types.ts +++ b/packages/api/src/resolvers/type/filter/filter-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Filter as FilterType, FilterOption, FilterText } from '@unchainedshop/core-filters'; type HelperType = (filter: FilterType, params: P, context: Context) => T; diff --git a/packages/api/src/resolvers/type/language-types.ts b/packages/api/src/resolvers/type/language-types.ts index 141a9e79f8..9fce92feb3 100644 --- a/packages/api/src/resolvers/type/language-types.ts +++ b/packages/api/src/resolvers/type/language-types.ts @@ -1,5 +1,5 @@ import { Language as LanguageType } from '@unchainedshop/core-languages'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; export interface LanguageHelperTypes { isBase: (language: LanguageType, params: never, context: Context) => boolean; diff --git a/packages/api/src/resolvers/type/media-types.ts b/packages/api/src/resolvers/type/media-types.ts index 4c5ae2ffc7..c2fdcfa24f 100644 --- a/packages/api/src/resolvers/type/media-types.ts +++ b/packages/api/src/resolvers/type/media-types.ts @@ -1,5 +1,5 @@ import { File as FileType } from '@unchainedshop/core-files'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; export interface MediaHelperTypes { url: (language: FileType, params: Record, context: Context) => string; diff --git a/packages/api/src/resolvers/type/order/order-delivery-discount-types.ts b/packages/api/src/resolvers/type/order/order-delivery-discount-types.ts index abed8eb041..3d38e8cb16 100644 --- a/packages/api/src/resolvers/type/order/order-delivery-discount-types.ts +++ b/packages/api/src/resolvers/type/order/order-delivery-discount-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderDiscount, OrderPrice, diff --git a/packages/api/src/resolvers/type/order/order-delivery-pickup-types.ts b/packages/api/src/resolvers/type/order/order-delivery-pickup-types.ts index 1ba4a350b4..93fab24aad 100644 --- a/packages/api/src/resolvers/type/order/order-delivery-pickup-types.ts +++ b/packages/api/src/resolvers/type/order/order-delivery-pickup-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { DeliveryLocation, DeliveryProvider } from '@unchainedshop/core-delivery'; import { OrderDelivery, OrderDeliveryDiscount } from '@unchainedshop/core-orders'; import { DeliveryDirector } from '@unchainedshop/core-delivery'; diff --git a/packages/api/src/resolvers/type/order/order-delivery-shipping-types.ts b/packages/api/src/resolvers/type/order/order-delivery-shipping-types.ts index 23a2703911..6c3bed876d 100644 --- a/packages/api/src/resolvers/type/order/order-delivery-shipping-types.ts +++ b/packages/api/src/resolvers/type/order/order-delivery-shipping-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { OrderDelivery, OrderDeliveryDiscount } from '@unchainedshop/core-orders'; import { Address } from '@unchainedshop/mongodb'; diff --git a/packages/api/src/resolvers/type/order/order-delivery-types.ts b/packages/api/src/resolvers/type/order/order-delivery-types.ts index 49813ef38b..d2da102961 100644 --- a/packages/api/src/resolvers/type/order/order-delivery-types.ts +++ b/packages/api/src/resolvers/type/order/order-delivery-types.ts @@ -1,7 +1,7 @@ import { OrderDelivery as OrderDeliveryType } from '@unchainedshop/core-orders'; import { DeliveryProviderType } from '@unchainedshop/core-delivery'; import { objectInvert } from '@unchainedshop/utils'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; const OrderDeliveryMap = { OrderDeliveryShipping: DeliveryProviderType.SHIPPING, diff --git a/packages/api/src/resolvers/type/order/order-discount-types.ts b/packages/api/src/resolvers/type/order/order-discount-types.ts index 9f0513235e..92d3cf2cc3 100644 --- a/packages/api/src/resolvers/type/order/order-discount-types.ts +++ b/packages/api/src/resolvers/type/order/order-discount-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Order, OrderPrice, diff --git a/packages/api/src/resolvers/type/order/order-global-discount-types.ts b/packages/api/src/resolvers/type/order/order-global-discount-types.ts index 7c3c00da47..c2ca26a72f 100644 --- a/packages/api/src/resolvers/type/order/order-global-discount-types.ts +++ b/packages/api/src/resolvers/type/order/order-global-discount-types.ts @@ -2,7 +2,7 @@ import crypto from 'crypto'; import { OrderPrice } from '@unchainedshop/core-orders'; import { Order } from '@unchainedshop/core-orders'; import { OrderDiscount } from '@unchainedshop/core-orders'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; type HelperType = ( orderGlobalDiscount: OrderPrice & { diff --git a/packages/api/src/resolvers/type/order/order-item-discount-types.ts b/packages/api/src/resolvers/type/order/order-item-discount-types.ts index 17b09a8c9f..6e86a0f3ec 100644 --- a/packages/api/src/resolvers/type/order/order-item-discount-types.ts +++ b/packages/api/src/resolvers/type/order/order-item-discount-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderDiscount } from '@unchainedshop/core-orders'; import { OrderPrice } from '@unchainedshop/core-orders'; import { OrderPositionDiscount } from '@unchainedshop/core-orders'; diff --git a/packages/api/src/resolvers/type/order/order-item-types.ts b/packages/api/src/resolvers/type/order/order-item-types.ts index 0ad394ab2d..c931869afb 100644 --- a/packages/api/src/resolvers/type/order/order-item-types.ts +++ b/packages/api/src/resolvers/type/order/order-item-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { Order } from '@unchainedshop/core-orders'; import { OrderPosition, OrderPositionDiscount } from '@unchainedshop/core-orders'; diff --git a/packages/api/src/resolvers/type/order/order-payment-card-types.ts b/packages/api/src/resolvers/type/order/order-payment-card-types.ts index af8a3e112b..2e23d3e2e0 100644 --- a/packages/api/src/resolvers/type/order/order-payment-card-types.ts +++ b/packages/api/src/resolvers/type/order/order-payment-card-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderPayment, OrderPaymentDiscount } from '@unchainedshop/core-orders'; import { PaymentProvider } from '@unchainedshop/core-payment'; diff --git a/packages/api/src/resolvers/type/order/order-payment-discount-types.ts b/packages/api/src/resolvers/type/order/order-payment-discount-types.ts index b0dada5a0e..596f14d150 100644 --- a/packages/api/src/resolvers/type/order/order-payment-discount-types.ts +++ b/packages/api/src/resolvers/type/order/order-payment-discount-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderDiscount } from '@unchainedshop/core-orders'; import { OrderPayment } from '@unchainedshop/core-orders'; import { OrderPrice } from '@unchainedshop/core-orders'; diff --git a/packages/api/src/resolvers/type/order/order-payment-generic-types.ts b/packages/api/src/resolvers/type/order/order-payment-generic-types.ts index 3b5da1de50..5fa0364772 100644 --- a/packages/api/src/resolvers/type/order/order-payment-generic-types.ts +++ b/packages/api/src/resolvers/type/order/order-payment-generic-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderPayment, OrderPaymentDiscount } from '@unchainedshop/core-orders'; import { PaymentProvider } from '@unchainedshop/core-payment'; diff --git a/packages/api/src/resolvers/type/order/order-payment-invoice-types.ts b/packages/api/src/resolvers/type/order/order-payment-invoice-types.ts index 41cc7ae602..a25fea27d0 100644 --- a/packages/api/src/resolvers/type/order/order-payment-invoice-types.ts +++ b/packages/api/src/resolvers/type/order/order-payment-invoice-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderPayment, OrderPaymentDiscount } from '@unchainedshop/core-orders'; import { PaymentProvider } from '@unchainedshop/core-payment'; diff --git a/packages/api/src/resolvers/type/order/order-payment-types.ts b/packages/api/src/resolvers/type/order/order-payment-types.ts index 53a50bb382..b77f9d2e05 100644 --- a/packages/api/src/resolvers/type/order/order-payment-types.ts +++ b/packages/api/src/resolvers/type/order/order-payment-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { OrderPayment as OrderPaymentType } from '@unchainedshop/core-orders'; import { PaymentProviderType } from '@unchainedshop/core-payment'; import { objectInvert } from '@unchainedshop/utils'; diff --git a/packages/api/src/resolvers/type/order/order-types.ts b/packages/api/src/resolvers/type/order/order-types.ts index 9260269c17..522bf77486 100644 --- a/packages/api/src/resolvers/type/order/order-types.ts +++ b/packages/api/src/resolvers/type/order/order-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Country } from '@unchainedshop/core-countries'; import { Currency } from '@unchainedshop/core-currencies'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; diff --git a/packages/api/src/resolvers/type/payment/payment-credentials-types.ts b/packages/api/src/resolvers/type/payment/payment-credentials-types.ts index 3a4f763933..a9177d5616 100644 --- a/packages/api/src/resolvers/type/payment/payment-credentials-types.ts +++ b/packages/api/src/resolvers/type/payment/payment-credentials-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { PaymentCredentials as PaymentCredentialsType, PaymentProvider, diff --git a/packages/api/src/resolvers/type/payment/payment-provider-types.ts b/packages/api/src/resolvers/type/payment/payment-provider-types.ts index d947d1d789..1a44caf85b 100644 --- a/packages/api/src/resolvers/type/payment/payment-provider-types.ts +++ b/packages/api/src/resolvers/type/payment/payment-provider-types.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { PaymentError, PaymentProvider as PaymentProviderType } from '@unchainedshop/core-payment'; import { PaymentPricingDirector } from '@unchainedshop/core-payment'; diff --git a/packages/api/src/resolvers/type/product/product-assortment-path-types.ts b/packages/api/src/resolvers/type/product/product-assortment-path-types.ts index 0f7022f9c5..00b7a8e130 100644 --- a/packages/api/src/resolvers/type/product/product-assortment-path-types.ts +++ b/packages/api/src/resolvers/type/product/product-assortment-path-types.ts @@ -1,5 +1,5 @@ import { Product } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; import { AssortmentPathLink, AssortmentProduct } from '@unchainedshop/core-assortments'; export type HelperType = (product: Product, params: P, context: Context) => T; diff --git a/packages/api/src/resolvers/type/product/product-bundle-item-types.ts b/packages/api/src/resolvers/type/product/product-bundle-item-types.ts index bf390aec06..82a5366311 100644 --- a/packages/api/src/resolvers/type/product/product-bundle-item-types.ts +++ b/packages/api/src/resolvers/type/product/product-bundle-item-types.ts @@ -1,5 +1,5 @@ import { Product, ProductBundleItem as ProductBundleItemType } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export interface ProductBundleItemHelperTypes { product: (bundleItem: ProductBundleItemType, _: never, context: Context) => Promise; diff --git a/packages/api/src/resolvers/type/product/product-catalog-price-types.ts b/packages/api/src/resolvers/type/product/product-catalog-price-types.ts index ffef60b801..067d29f818 100644 --- a/packages/api/src/resolvers/type/product/product-catalog-price-types.ts +++ b/packages/api/src/resolvers/type/product/product-catalog-price-types.ts @@ -1,7 +1,7 @@ import { Country } from '@unchainedshop/core-countries'; import { Currency } from '@unchainedshop/core-currencies'; import { ProductPrice } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export type ProductCatalogHelperType = ( productPrice: ProductPrice, diff --git a/packages/api/src/resolvers/type/product/product-configurable-types.ts b/packages/api/src/resolvers/type/product/product-configurable-types.ts index 5d4bb99b5d..5bed57d85c 100644 --- a/packages/api/src/resolvers/type/product/product-configurable-types.ts +++ b/packages/api/src/resolvers/type/product/product-configurable-types.ts @@ -4,7 +4,7 @@ import { ProductConfiguration, ProductPriceRange, } from '@unchainedshop/core-products'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { ProductVariation } from '@unchainedshop/core-products'; import { Product } from './product-types.js'; diff --git a/packages/api/src/resolvers/type/product/product-discount.ts b/packages/api/src/resolvers/type/product/product-discount.ts index 42eb11a24c..be5b7935a0 100644 --- a/packages/api/src/resolvers/type/product/product-discount.ts +++ b/packages/api/src/resolvers/type/product/product-discount.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { ProductDiscount as ProductDiscountType } from '@unchainedshop/core-products'; type HelperType = (product: ProductDiscountType, _: never, context: Context) => T; diff --git a/packages/api/src/resolvers/type/product/product-media-types.ts b/packages/api/src/resolvers/type/product/product-media-types.ts index e2f144cb95..49584d0d74 100644 --- a/packages/api/src/resolvers/type/product/product-media-types.ts +++ b/packages/api/src/resolvers/type/product/product-media-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { File } from '@unchainedshop/core-files'; import { ProductMedia as ProductMediaType, ProductMediaText } from '@unchainedshop/core-products'; diff --git a/packages/api/src/resolvers/type/product/product-plan-types.ts b/packages/api/src/resolvers/type/product/product-plan-types.ts index 9423381f17..2fc39c87f0 100644 --- a/packages/api/src/resolvers/type/product/product-plan-types.ts +++ b/packages/api/src/resolvers/type/product/product-plan-types.ts @@ -3,7 +3,7 @@ import { ProductPrice, Product as ProductType, } from '@unchainedshop/core-products'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Product } from './product-types.js'; export const PlanProduct = { diff --git a/packages/api/src/resolvers/type/product/product-review-types.ts b/packages/api/src/resolvers/type/product/product-review-types.ts index 4419c81177..1ffefdc102 100644 --- a/packages/api/src/resolvers/type/product/product-review-types.ts +++ b/packages/api/src/resolvers/type/product/product-review-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Product } from '@unchainedshop/core-products'; import { ProductReview as ProductReviewType, diff --git a/packages/api/src/resolvers/type/product/product-simple-types.ts b/packages/api/src/resolvers/type/product/product-simple-types.ts index 2e2ed8179b..7fb501cf79 100644 --- a/packages/api/src/resolvers/type/product/product-simple-types.ts +++ b/packages/api/src/resolvers/type/product/product-simple-types.ts @@ -1,6 +1,6 @@ import { Product, ProductSupply } from '@unchainedshop/core-products'; import { WarehousingContext, WarehousingProvider } from '@unchainedshop/core-warehousing'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { DeliveryProviderType } from '@unchainedshop/core-delivery'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { PlanProduct } from './product-plan-types.js'; diff --git a/packages/api/src/resolvers/type/product/product-tokenized-types.ts b/packages/api/src/resolvers/type/product/product-tokenized-types.ts index 379af6c6db..e4aec4bb91 100644 --- a/packages/api/src/resolvers/type/product/product-tokenized-types.ts +++ b/packages/api/src/resolvers/type/product/product-tokenized-types.ts @@ -4,7 +4,7 @@ import { ProductContractStandard, } from '@unchainedshop/core-products'; import { WarehousingContext, WarehousingProvider } from '@unchainedshop/core-warehousing'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { DeliveryProvider } from '@unchainedshop/core-delivery'; import { PlanProduct } from './product-plan-types.js'; import { checkAction } from '../../../acl.js'; diff --git a/packages/api/src/resolvers/type/product/product-types.ts b/packages/api/src/resolvers/type/product/product-types.ts index 0039d1adfc..8e0e8fe94d 100644 --- a/packages/api/src/resolvers/type/product/product-types.ts +++ b/packages/api/src/resolvers/type/product/product-types.ts @@ -5,7 +5,7 @@ import { SortOption } from '@unchainedshop/utils'; import { AssortmentPathLink } from '@unchainedshop/core-assortments'; import { ProductMedia } from '@unchainedshop/core-products'; import { ProductReview } from '@unchainedshop/core-products'; -import { Context } from '../../../types.js'; +import { Context } from '../../../context.js'; export const Product = { __resolveType: (product: ProductType): string => { diff --git a/packages/api/src/resolvers/type/product/product-variation-assignment-types.ts b/packages/api/src/resolvers/type/product/product-variation-assignment-types.ts index d588a2bc56..08d58c6a4c 100644 --- a/packages/api/src/resolvers/type/product/product-variation-assignment-types.ts +++ b/packages/api/src/resolvers/type/product/product-variation-assignment-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Product, ProductAssignment, ProductConfiguration } from '@unchainedshop/core-products'; export type AssignmentHelperType = ( diff --git a/packages/api/src/resolvers/type/product/product-variation-assignment-vector.ts b/packages/api/src/resolvers/type/product/product-variation-assignment-vector.ts index d87c74f01b..198c9aad7d 100644 --- a/packages/api/src/resolvers/type/product/product-variation-assignment-vector.ts +++ b/packages/api/src/resolvers/type/product/product-variation-assignment-vector.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { Product, ProductConfiguration } from '@unchainedshop/core-products'; import { ProductVariation } from '@unchainedshop/core-products'; diff --git a/packages/api/src/resolvers/type/product/product-variation-option-types.ts b/packages/api/src/resolvers/type/product/product-variation-option-types.ts index f8885c46a0..d8fda2c7e8 100644 --- a/packages/api/src/resolvers/type/product/product-variation-option-types.ts +++ b/packages/api/src/resolvers/type/product/product-variation-option-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { ProductVariationText } from '@unchainedshop/core-products'; export type OptionHelperType = ( diff --git a/packages/api/src/resolvers/type/product/product-variation-types.ts b/packages/api/src/resolvers/type/product/product-variation-types.ts index dc16470cd1..957617834c 100644 --- a/packages/api/src/resolvers/type/product/product-variation-types.ts +++ b/packages/api/src/resolvers/type/product/product-variation-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../../context.js'; import { ProductVariation as ProductVariationType, ProductVariationText, diff --git a/packages/api/src/resolvers/type/quotation-types.ts b/packages/api/src/resolvers/type/quotation-types.ts index 0003c42470..e15502a38d 100644 --- a/packages/api/src/resolvers/type/quotation-types.ts +++ b/packages/api/src/resolvers/type/quotation-types.ts @@ -1,5 +1,5 @@ import { Quotation as QuotationType } from '@unchainedshop/core-quotations'; -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { User } from '@unchainedshop/core-users'; import { Product } from '@unchainedshop/core-products'; import { Country } from '@unchainedshop/core-countries'; diff --git a/packages/api/src/resolvers/type/shop-types.ts b/packages/api/src/resolvers/type/shop-types.ts index 28a469d4d7..8a6196d623 100644 --- a/packages/api/src/resolvers/type/shop-types.ts +++ b/packages/api/src/resolvers/type/shop-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { Country } from '@unchainedshop/core-countries'; import { Language } from '@unchainedshop/core-languages'; import { checkAction } from '../../acl.js'; diff --git a/packages/api/src/resolvers/type/token-types.ts b/packages/api/src/resolvers/type/token-types.ts index 32326dbeb7..6dcce4f14e 100644 --- a/packages/api/src/resolvers/type/token-types.ts +++ b/packages/api/src/resolvers/type/token-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { TokenStatus, TokenSurrogate } from '@unchainedshop/core-warehousing'; import { WorkStatus } from '@unchainedshop/core-worker'; import { checkAction } from '../../acl.js'; diff --git a/packages/api/src/resolvers/type/user-types.ts b/packages/api/src/resolvers/type/user-types.ts index 7d1d19cfd4..8061e3ace2 100755 --- a/packages/api/src/resolvers/type/user-types.ts +++ b/packages/api/src/resolvers/type/user-types.ts @@ -19,7 +19,7 @@ import { Roles, permissions } from '@unchainedshop/roles'; import { ProductReview } from '@unchainedshop/core-products'; import { checkAction, checkTypeResolver } from '../../acl.js'; import { actions } from '../../roles/index.js'; -import { Context } from '../../types.js'; +import { Context } from '../../context.js'; import { Contact } from '@unchainedshop/mongodb'; import { Country } from '@unchainedshop/core-countries'; diff --git a/packages/api/src/resolvers/type/warehousing-provider-types.ts b/packages/api/src/resolvers/type/warehousing-provider-types.ts index 581c3aa84e..77a24ca4a7 100644 --- a/packages/api/src/resolvers/type/warehousing-provider-types.ts +++ b/packages/api/src/resolvers/type/warehousing-provider-types.ts @@ -3,7 +3,7 @@ import { WarehousingInterface, WarehousingProvider as WarehousingProviderType, } from '@unchainedshop/core-warehousing'; -import { Context } from '../../types.js'; +import { Context } from '../../context.js'; export type HelperType = (provider: WarehousingProviderType, params: P, context: Context) => T; diff --git a/packages/api/src/resolvers/type/webauthn-credentials-types.ts b/packages/api/src/resolvers/type/webauthn-credentials-types.ts index fd197008b5..b0a86951d8 100644 --- a/packages/api/src/resolvers/type/webauthn-credentials-types.ts +++ b/packages/api/src/resolvers/type/webauthn-credentials-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { WebAuthnCredentials as WebAuthnCredentialsTypes } from '@unchainedshop/core-users'; type HelperType = ( diff --git a/packages/api/src/resolvers/type/work-types.ts b/packages/api/src/resolvers/type/work-types.ts index eed5ebf29a..9e1cbaa8ff 100644 --- a/packages/api/src/resolvers/type/work-types.ts +++ b/packages/api/src/resolvers/type/work-types.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../../context.js'; import { Work as WorkType } from '@unchainedshop/core-worker'; import { buildObfuscatedFieldsFilter } from '@unchainedshop/utils'; diff --git a/packages/api/src/roles/all.ts b/packages/api/src/roles/all.ts index 4615f6d347..dd0fbea214 100644 --- a/packages/api/src/roles/all.ts +++ b/packages/api/src/roles/all.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../context.js'; export const all = (role, actions) => { const isInLoginMutationResponse = (root) => { diff --git a/packages/api/src/roles/loggedIn.ts b/packages/api/src/roles/loggedIn.ts index 9c83efe7cc..abc5a7bb24 100644 --- a/packages/api/src/roles/loggedIn.ts +++ b/packages/api/src/roles/loggedIn.ts @@ -1,4 +1,4 @@ -import { Context } from '@unchainedshop/api'; +import { Context } from '../context.js'; import { User } from '@unchainedshop/core-users'; export const loggedIn = (role: any, actions: Record) => { diff --git a/packages/api/src/types.ts b/packages/api/src/types.ts deleted file mode 100644 index 8808caac7d..0000000000 --- a/packages/api/src/types.ts +++ /dev/null @@ -1,100 +0,0 @@ -import DataLoader from 'dataloader'; -import { UnchainedCore } from '@unchainedshop/core'; -import { User } from '@unchainedshop/core-users'; -import { Product, ProductText, ProductMediaText, ProductMedia } from '@unchainedshop/core-products'; -import { Filter, FilterText } from '@unchainedshop/core-filters'; -import { - Assortment, - AssortmentLink, - AssortmentProduct, - AssortmentText, - AssortmentMediaType, -} from '@unchainedshop/core-assortments'; -import { AssortmentMediaText } from '@unchainedshop/core-assortments'; -import { File } from '@unchainedshop/core-files'; - -export type VariationInputText = { locale: string; title: string; subtitle?: string }; - -export interface UnchainedUserContext { - login: (user: User) => Promise<{ _id: string; tokenExpires: Date }>; - logout: () => Promise; - userId?: string; - user?: User; - remoteAddress?: string; - remotePort?: string; - userAgent?: string; -} - -export interface CustomAdminUiProperties { - entityName: string; - inlineFragment: string; -} - -export interface AdminUiConfig { - customProperties?: CustomAdminUiProperties[]; -} - -export interface UnchainedLocaleContext { - countryContext: string; - localeContext: Intl.Locale; - currencyContext: string; - remoteAddress?: string; - remotePort?: string; - userAgent?: string; -} - -export interface UnchainedLoaders { - loaders: { - productLoader: InstanceType>; - productLoaderBySKU: InstanceType>; - productTextLoader: InstanceType< - typeof DataLoader<{ productId: string; locale: string }, ProductText> - >; - productMediaTextLoader: InstanceType< - typeof DataLoader<{ productMediaId: string; locale: string }, ProductMediaText> - >; - - fileLoader: InstanceType>; - - filterLoader: InstanceType>; - filterTextLoader: InstanceType< - typeof DataLoader<{ filterId: string; filterOptionValue?: string; locale: string }, FilterText> - >; - - assortmentLoader: InstanceType>; - assortmentTextLoader: InstanceType< - typeof DataLoader<{ assortmentId: string; locale: string }, AssortmentText> - >; - assortmentLinkLoader: InstanceType< - typeof DataLoader<{ parentAssortmentId: string; childAssortmentId: string }, AssortmentLink> - >; - assortmentLinksLoader: InstanceType< - typeof DataLoader<{ parentAssortmentId?: string; assortmentId?: string }, AssortmentLink[]> - >; - assortmentProductLoader: InstanceType< - typeof DataLoader<{ assortmentId: string; productId: string }, AssortmentProduct> - >; - assortmentMediaTextLoader: InstanceType< - typeof DataLoader<{ assortmentMediaId: string; locale: string }, AssortmentMediaText> - >; - - productMediasLoader: InstanceType>; - assortmentMediasLoader: InstanceType< - typeof DataLoader<{ assortmentId?: string }, AssortmentMediaType[]> - >; - }; -} - -export type UnchainedHTTPServerContext = { - setHeader: (key: string, value: string) => void; - getHeader: (key: string) => string | string[]; -}; - -export type Context = UnchainedCore & { - version?: string; - roles?: any; - adminUiConfig?: AdminUiConfig; -} & UnchainedUserContext & - UnchainedLocaleContext & - UnchainedLoaders & - UnchainedHTTPServerContext; diff --git a/packages/plugins/src/files/gridfs/gridfs-webhook.ts b/packages/plugins/src/files/gridfs/gridfs-webhook.ts index d182e64789..d75cb8a4bf 100644 --- a/packages/plugins/src/files/gridfs/gridfs-webhook.ts +++ b/packages/plugins/src/files/gridfs/gridfs-webhook.ts @@ -2,10 +2,10 @@ import { pipeline, finished } from 'stream/promises'; import { PassThrough } from 'stream'; import { log, LogLevel } from '@unchainedshop/logger'; import { buildHashedFilename } from '@unchainedshop/file-upload'; -import { Context } from '@unchainedshop/api'; import express from 'express'; import sign from './sign.js'; import { configureGridFSFileUploadModule } from './index.js'; +import { Context } from '@unchainedshop/api'; const { ROOT_URL } = process.env; diff --git a/packages/plugins/src/payment/cryptopay/middleware.ts b/packages/plugins/src/payment/cryptopay/middleware.ts index fa8b4ab2c5..9b23a5c265 100644 --- a/packages/plugins/src/payment/cryptopay/middleware.ts +++ b/packages/plugins/src/payment/cryptopay/middleware.ts @@ -1,6 +1,5 @@ import { createLogger } from '@unchainedshop/logger'; import { Context } from '@unchainedshop/api'; - import { UnchainedCore } from '@unchainedshop/core'; import { OrderStatus } from '@unchainedshop/core-orders'; import { CryptopayModule } from './module/configureCryptopayModule.js'; diff --git a/packages/plugins/src/payment/datatrans-v2/middleware.ts b/packages/plugins/src/payment/datatrans-v2/middleware.ts index 01089fee2a..7cc0250dbb 100644 --- a/packages/plugins/src/payment/datatrans-v2/middleware.ts +++ b/packages/plugins/src/payment/datatrans-v2/middleware.ts @@ -1,7 +1,6 @@ import { createLogger } from '@unchainedshop/logger'; import { Context } from '@unchainedshop/api'; import generateSignature, { Security } from './generateSignature.js'; - import { StatusResponseSuccess } from './api/types.js'; const {