@unchainedshop/api 1.1.9 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jest.config.js +5 -0
- package/lib/acl.d.ts +1 -0
- package/lib/api-index.d.ts +1 -0
- package/lib/api-index.js +1 -1
- package/lib/context.d.ts +1 -0
- package/lib/context.js +8 -3
- package/lib/context.js.map +1 -1
- package/lib/createGraphQLServer.js +3 -0
- package/lib/createGraphQLServer.js.map +1 -1
- package/lib/loaders/index.d.ts +1 -1
- package/lib/locale-context.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/addEmail.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/changePassword.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/createUser.d.ts +5 -1
- package/lib/resolvers/mutations/accounts/disableTOTP.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/enableTOTP.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/enrollUser.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/forgotPassword.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/impersonate.d.ts +6 -1
- package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts +5 -1
- package/lib/resolvers/mutations/accounts/loginWithPassword.d.ts +5 -1
- package/lib/resolvers/mutations/accounts/logout.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/removeEmail.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/resetPassword.d.ts +5 -1
- package/lib/resolvers/mutations/accounts/setPassword.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/setUsername.d.ts +1 -1
- package/lib/resolvers/mutations/accounts/verifyEmail.d.ts +5 -1
- package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/createAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/prepareAssortmentMediaUpload.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortment.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +1 -1
- package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts +1 -1
- package/lib/resolvers/mutations/bookmarks/bookmark.d.ts +1 -1
- package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts +1 -1
- package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts +1 -1
- package/lib/resolvers/mutations/countries/createCountry.d.ts +1 -1
- package/lib/resolvers/mutations/countries/removeCountry.d.ts +1 -1
- package/lib/resolvers/mutations/countries/updateCountry.d.ts +1 -1
- package/lib/resolvers/mutations/currencies/createCurrency.d.ts +1 -1
- package/lib/resolvers/mutations/currencies/removeCurrency.d.ts +1 -1
- package/lib/resolvers/mutations/currencies/updateCurrency.d.ts +1 -1
- package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/enrollments/activateEnrollment.d.ts +1 -1
- package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts +1 -1
- package/lib/resolvers/mutations/enrollments/terminateEnrollment.d.ts +1 -1
- package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts +1 -1
- package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts +1 -1
- package/lib/resolvers/mutations/filters/createFilter.d.ts +1 -1
- package/lib/resolvers/mutations/filters/createFilterOption.d.ts +1 -1
- package/lib/resolvers/mutations/filters/removeFilter.d.ts +1 -1
- package/lib/resolvers/mutations/filters/removeFilterOption.d.ts +1 -1
- package/lib/resolvers/mutations/filters/updateFilter.d.ts +1 -1
- package/lib/resolvers/mutations/filters/updateFilterTexts.d.ts +1 -1
- package/lib/resolvers/mutations/languages/createLanguage.d.ts +1 -1
- package/lib/resolvers/mutations/languages/removeLanguage.d.ts +1 -1
- package/lib/resolvers/mutations/languages/updateLanguage.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addCartDiscount.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addCartProduct.d.ts +1 -1
- package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/confirmOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/createCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/deliverOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/emptyCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/payOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/rejectOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts +1 -1
- package/lib/resolvers/mutations/orders/removeCartItem.d.ts +1 -1
- package/lib/resolvers/mutations/orders/removeOrder.d.ts +1 -1
- package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts +1 -1
- package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts +1 -1
- package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCart.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateCartItem.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentCard.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts +1 -1
- package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts +1 -1
- package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts +2 -1
- package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts +1 -1
- package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts +1 -1
- package/lib/resolvers/mutations/payment/removePaymentCredentials.d.ts +2 -1
- package/lib/resolvers/mutations/payment/removePaymentProvider.d.ts +2 -1
- package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts +1 -1
- package/lib/resolvers/mutations/payment/updatePaymentProvider.d.ts +2 -1
- package/lib/resolvers/mutations/products/addProductAssignment.d.ts +1 -1
- package/lib/resolvers/mutations/products/addProductMedia.d.ts +1 -1
- package/lib/resolvers/mutations/products/addProductReviewVote.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProductBundleItem.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProductReview.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProductVariation.d.ts +1 -1
- package/lib/resolvers/mutations/products/createProductVariationOption.d.ts +1 -1
- package/lib/resolvers/mutations/products/prepareProductMediaUpload.d.ts +1 -1
- package/lib/resolvers/mutations/products/publishProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeBundleItem.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductAssignment.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductMedia.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductReview.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductVariation.d.ts +1 -1
- package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts +1 -1
- package/lib/resolvers/mutations/products/reorderProductMedia.d.ts +1 -1
- package/lib/resolvers/mutations/products/unpublishProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProduct.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductCommerce.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductPlan.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductReview.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductSupply.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductTexts.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts +1 -1
- package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/requestQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts +1 -1
- package/lib/resolvers/mutations/users/heartbeat.d.ts +1 -1
- package/lib/resolvers/mutations/users/prepareUserAvatarUpload.d.ts +1 -1
- package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
- package/lib/resolvers/mutations/users/setUserTags.d.ts +1 -1
- package/lib/resolvers/mutations/users/updateUserAvatar.d.ts +1 -1
- package/lib/resolvers/mutations/users/updateUserProfile.d.ts +1 -1
- package/lib/resolvers/mutations/utils/getOrderCart.d.ts +2 -1
- package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts +1 -1
- package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts +1 -1
- package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts +1 -1
- package/lib/resolvers/mutations/worker/addWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/allocateWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/doWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/finishWork.d.ts +1 -1
- package/lib/resolvers/mutations/worker/removeWork.d.ts +1 -1
- package/lib/resolvers/queries/assortments/assortment.d.ts +1 -1
- package/lib/resolvers/queries/assortments/assortments.d.ts +1 -1
- package/lib/resolvers/queries/assortments/assortmentsCount.d.ts +1 -1
- package/lib/resolvers/queries/assortments/translatedAssortmentMediaTexts.d.ts +1 -1
- package/lib/resolvers/queries/assortments/translatedAssortmentTexts.d.ts +1 -1
- package/lib/resolvers/queries/countries/countries.d.ts +1 -1
- package/lib/resolvers/queries/countries/countriesCount.d.ts +1 -1
- package/lib/resolvers/queries/countries/country.d.ts +1 -1
- package/lib/resolvers/queries/currencies/currencies.d.ts +1 -1
- package/lib/resolvers/queries/currencies/currenciesCount.d.ts +1 -1
- package/lib/resolvers/queries/currencies/currency.d.ts +1 -1
- package/lib/resolvers/queries/delivery/deliveryInterfaces.d.ts +5 -0
- package/lib/resolvers/queries/delivery/deliveryProvider.d.ts +1 -1
- package/lib/resolvers/queries/delivery/deliveryProviders.d.ts +1 -1
- package/lib/resolvers/queries/delivery/deliveryProvidersCount.d.ts +1 -1
- package/lib/resolvers/queries/enrollments/enrollment.d.ts +1 -1
- package/lib/resolvers/queries/enrollments/enrollments.d.ts +1 -1
- package/lib/resolvers/queries/enrollments/enrollmentsCount.d.ts +1 -1
- package/lib/resolvers/queries/events/event.d.ts +1 -1
- package/lib/resolvers/queries/events/events.d.ts +1 -1
- package/lib/resolvers/queries/events/eventsCounts.d.ts +1 -1
- package/lib/resolvers/queries/filters/filter.d.ts +1 -1
- package/lib/resolvers/queries/filters/filters.d.ts +1 -1
- package/lib/resolvers/queries/filters/filtersCount.d.ts +1 -1
- package/lib/resolvers/queries/filters/searchAssortments.d.ts +1 -1
- package/lib/resolvers/queries/filters/searchProducts.d.ts +1 -1
- package/lib/resolvers/queries/filters/translatedFilterTexts.d.ts +1 -1
- package/lib/resolvers/queries/languages/language.d.ts +1 -1
- package/lib/resolvers/queries/languages/languages.d.ts +1 -1
- package/lib/resolvers/queries/languages/languagesCount.d.ts +1 -1
- package/lib/resolvers/queries/orders/order.d.ts +1 -1
- package/lib/resolvers/queries/orders/orders.d.ts +1 -1
- package/lib/resolvers/queries/orders/ordersCount.d.ts +1 -1
- package/lib/resolvers/queries/payment/paymentInterfaces.d.ts +5 -0
- package/lib/resolvers/queries/payment/paymentProvider.d.ts +1 -1
- package/lib/resolvers/queries/payment/paymentProviders.d.ts +1 -1
- package/lib/resolvers/queries/payment/paymentProvidersCount.d.ts +1 -1
- package/lib/resolvers/queries/products/product.d.ts +1 -1
- package/lib/resolvers/queries/products/productCatalogPrices.d.ts +1 -1
- package/lib/resolvers/queries/products/productReview.d.ts +1 -1
- package/lib/resolvers/queries/products/productReviews.d.ts +1 -1
- package/lib/resolvers/queries/products/productReviewsCount.d.ts +1 -1
- package/lib/resolvers/queries/products/products.d.ts +1 -1
- package/lib/resolvers/queries/products/productsCount.d.ts +1 -1
- package/lib/resolvers/queries/products/translatedProductMediaTexts.d.ts +1 -1
- package/lib/resolvers/queries/products/translatedProductTexts.d.ts +1 -1
- package/lib/resolvers/queries/products/translatedProductVariationTexts.d.ts +1 -1
- package/lib/resolvers/queries/quotations/quotation.d.ts +1 -1
- package/lib/resolvers/queries/quotations/quotations.d.ts +1 -1
- package/lib/resolvers/queries/quotations/quotationsCount.d.ts +1 -1
- package/lib/resolvers/queries/users/me.d.ts +1 -1
- package/lib/resolvers/queries/users/user.d.ts +1 -1
- package/lib/resolvers/queries/users/users.d.ts +1 -1
- package/lib/resolvers/queries/users/usersCount.d.ts +1 -1
- package/lib/resolvers/queries/warehousing/warehousingInterfaces.d.ts +5 -0
- package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts +1 -1
- package/lib/resolvers/queries/warehousing/warehousingProviders.d.ts +1 -1
- package/lib/resolvers/queries/warehousing/warehousingProvidersCount.d.ts +1 -1
- package/lib/resolvers/queries/worker/activeWorkTypes.d.ts +1 -1
- package/lib/resolvers/queries/worker/work.d.ts +1 -1
- package/lib/resolvers/queries/worker/workQueue.d.ts +14 -0
- package/lib/resolvers/queries/worker/workQueueCount.d.ts +1 -1
- package/lib/resolvers/type/delivery-provider-types.d.ts +27 -0
- package/lib/resolvers/type/login-method-response-types.d.ts +19 -1
- package/lib/resolvers/type/order/order-delivery-types.d.ts +3 -1
- package/lib/resolvers/type/order/order-payment-types.d.ts +3 -1
- package/lib/resolvers/type/payment/payment-provider-types.d.ts +12 -0
- package/lib/schema/types/worker.js +1 -1
- package/lib/user-context.d.ts +1 -1
- package/package.json +18 -16
- package/src/api-index.ts +1 -1
- package/src/context.ts +12 -4
- package/src/createGraphQLServer.ts +5 -0
- package/src/schema/types/worker.js +1 -1
- package/tsconfig.json +26 -5
- package/license +0 -274
- package/tsconfig.build.json +0 -34
package/jest.config.js
ADDED
package/lib/acl.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CheckPermissionArgs } from '@unchainedshop/types/roles';
|
|
1
2
|
declare const checkAction: (context: any, action: any, args?: CheckPermissionArgs, options?: any) => Promise<void>;
|
|
2
3
|
declare const checkResolver: (action: any, userOptions: any) => (fn: any, name: any) => (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
3
4
|
declare const checkTypeResolver: (action: any, key: any) => (obj: any, params: any, context: any) => Promise<any>;
|
package/lib/api-index.d.ts
CHANGED
package/lib/api-index.js
CHANGED
|
@@ -7,7 +7,7 @@ export * as errors from './errors';
|
|
|
7
7
|
export { hashPassword } from './hashPassword';
|
|
8
8
|
export * as roles from './roles';
|
|
9
9
|
export { createContextResolver, getCurrentContextResolver, setCurrentContextResolver };
|
|
10
|
-
const UNCHAINED_API_VERSION = '1.
|
|
10
|
+
const UNCHAINED_API_VERSION = '1.2.0'; // eslint-disable-line
|
|
11
11
|
export const startAPIServer = (options) => {
|
|
12
12
|
const { unchainedAPI, roles, expressApp, context: customContext, ...apolloServerOptions } = options || {};
|
|
13
13
|
const contextResolver = createContextResolver(unchainedAPI, roles, UNCHAINED_API_VERSION);
|
package/lib/context.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UnchainedAPI, UnchainedContextResolver } from '@unchainedshop/types/api';
|
|
1
2
|
export declare const getCurrentContextResolver: () => UnchainedContextResolver;
|
|
2
3
|
export declare const setCurrentContextResolver: (newContext: UnchainedContextResolver) => void;
|
|
3
4
|
export declare const createContextResolver: (unchainedAPI: UnchainedAPI, roles: any, version: string) => UnchainedContextResolver;
|
package/lib/context.js
CHANGED
|
@@ -23,9 +23,14 @@ export const createContextResolver = (unchainedAPI, roles, version) => async ({
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
export const useMiddlewareWithCurrentContext = (expressApp, path, middleware) => {
|
|
26
|
-
expressApp.use(path, async (req, res,
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
expressApp.use(path, async function middlewareWithContext(req, res, next) {
|
|
27
|
+
try {
|
|
28
|
+
req.unchainedContext = await context({ req, res });
|
|
29
|
+
await middleware(req, res, next);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
next(error);
|
|
33
|
+
}
|
|
29
34
|
});
|
|
30
35
|
};
|
|
31
36
|
//# sourceMappingURL=context.js.map
|
package/lib/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAA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QACvC,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;YACnB,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;gBACvC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACrB,OAAO;aACR;YACD,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACtC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aACtB;iBAAM;gBACL,QAAQ,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC;aAC5C;QACH,CAAC;QACH,CAAC,CAAC,WAAW,CAAC;IAElB,8BAA8B;IAC9B,EAAE;IACF,MAAM;IAEN,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC;QACtC,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,CAAC,QAAQ;YACb,CAAC,CAAC,SAAS;YACX,CAAC,CAAC;gBACE,MAAM,EAAE,QAAQ;gBAChB,WAAW,EAAE,IAAI;aAClB;QACL,gBAAgB,EAAE;YAChB,KAAK,EAAE,KAAK;SACb;KACF,CAAC,CAAC;IAEH,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACvE,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAE3B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
package/lib/loaders/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnchainedLoaders } from '@unchainedshop/types/api';
|
|
1
|
+
import { UnchainedAPI, UnchainedLoaders } from '@unchainedshop/types/api';
|
|
2
2
|
import { IncomingMessage } from 'http';
|
|
3
3
|
declare const _default: (req: IncomingMessage, unchainedAPI: UnchainedAPI) => Promise<UnchainedLoaders['loaders']>;
|
|
4
4
|
export default _default;
|
package/lib/locale-context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnchainedLocaleContext } from '@unchainedshop/types/api';
|
|
1
|
+
import { UnchainedAPI, UnchainedLocaleContext } from '@unchainedshop/types/api';
|
|
2
2
|
import { IncomingMessage } from 'http';
|
|
3
3
|
import 'abort-controller/polyfill';
|
|
4
4
|
export declare const getLocaleContext: (req: IncomingMessage, unchainedAPI: UnchainedAPI) => Promise<UnchainedLocaleContext>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function addEmail(root: Root, params: {
|
|
3
3
|
email: string;
|
|
4
4
|
userId?: string;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/user").User>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
|
-
export default function buildTOTPSecret(root: Root, _: any, { modules, userId }: Context): Promise<
|
|
2
|
+
export default function buildTOTPSecret(root: Root, _: any, { modules, userId }: Context): Promise<string>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { UserData } from '@unchainedshop/types/accounts';
|
|
2
2
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
3
|
-
export default function createUser(root: Root, params: UserData, context: Context): Promise<
|
|
3
|
+
export default function createUser(root: Root, params: UserData, context: Context): Promise<{
|
|
4
|
+
id: string;
|
|
5
|
+
token: string;
|
|
6
|
+
tokenExpires: Date;
|
|
7
|
+
}>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function disableTOTP(root: Root, params: {
|
|
3
3
|
code: string;
|
|
4
4
|
userId: string;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/user").User>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function enableTOTP(root: Root, params: {
|
|
3
3
|
code: string;
|
|
4
4
|
secretBase32: string;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/user").User>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
import { UserData } from '@unchainedshop/types/accounts';
|
|
3
|
-
export default function enrollUser(root: Root, params: UserData, context: Context): Promise<
|
|
3
|
+
export default function enrollUser(root: Root, params: UserData, context: Context): Promise<import("@unchainedshop/types/user").User>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { Context } from '@unchainedshop/types/api';
|
|
1
2
|
declare const impersonate: (root: any, { userId }: {
|
|
2
3
|
userId: any;
|
|
3
|
-
}, context: Context) => Promise<
|
|
4
|
+
}, context: Context) => Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
token: string;
|
|
7
|
+
tokenExpires: Date;
|
|
8
|
+
}>;
|
|
4
9
|
export default impersonate;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
|
-
export default function loginAsGuest(root: Root, _: any, context: Context): Promise<
|
|
2
|
+
export default function loginAsGuest(root: Root, _: any, context: Context): Promise<{
|
|
3
|
+
id: string;
|
|
4
|
+
token: string;
|
|
5
|
+
tokenExpires: Date;
|
|
6
|
+
}>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function removeEmail(root: Root, params: {
|
|
3
3
|
email: string;
|
|
4
4
|
userId?: string;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/user").User>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function setUsername(root: Root, params: {
|
|
3
3
|
username: string;
|
|
4
4
|
userId: string;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/user").User>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function verifyEmail(root: Root, { token }: {
|
|
3
3
|
token: any;
|
|
4
|
-
}, context: Context): Promise<
|
|
4
|
+
}, context: Context): Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
token: string;
|
|
7
|
+
tokenExpires: Date;
|
|
8
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
import { AssortmentFilter } from '@unchainedshop/types/assortments';
|
|
3
|
-
export default function addAssortmentFilter(root: Root, { assortmentId, filterId, ...assortmentFilter }: AssortmentFilter, { modules, userId }: Context): Promise<
|
|
3
|
+
export default function addAssortmentFilter(root: Root, { assortmentId, filterId, ...assortmentFilter }: AssortmentFilter, { modules, userId }: Context): Promise<AssortmentFilter>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
import { AssortmentLink } from '@unchainedshop/types/assortments';
|
|
3
|
-
export default function addAssortmentLink(root: Root, { parentAssortmentId, childAssortmentId, ...assortmentLink }: AssortmentLink, { modules, userId }: Context): Promise<
|
|
3
|
+
export default function addAssortmentLink(root: Root, { parentAssortmentId, childAssortmentId, ...assortmentLink }: AssortmentLink, { modules, userId }: Context): Promise<AssortmentLink>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function addAssortmentMedia(root: Root, { media, assortmentId }: {
|
|
3
3
|
media: any;
|
|
4
4
|
assortmentId: any;
|
|
5
|
-
}, context: Context): Promise<
|
|
5
|
+
}, context: Context): Promise<import("@unchainedshop/types/assortments.media").AssortmentMedia>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
import { AssortmentProduct } from '@unchainedshop/types/assortments';
|
|
3
|
-
export default function addAssortmentProduct(root: Root, { assortmentId, productId, ...assortmentProduct }: AssortmentProduct, { modules, userId }: Context): Promise<
|
|
3
|
+
export default function addAssortmentProduct(root: Root, { assortmentId, productId, ...assortmentProduct }: AssortmentProduct, { modules, userId }: Context): Promise<AssortmentProduct>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function prepareAssortmentMediaUpload(root: Root, { mediaName, assortmentId }: {
|
|
3
3
|
mediaName: string;
|
|
4
4
|
assortmentId: string;
|
|
5
|
-
}, context: Context): Promise<
|
|
5
|
+
}, context: Context): Promise<import("@unchainedshop/types/files").SignedFileUpload>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeAssortment(root: Root, { assortmentId }: {
|
|
3
3
|
assortmentId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").Assortment>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeAssortmentFilter(root: Root, { assortmentFilterId }: {
|
|
3
3
|
assortmentFilterId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").AssortmentFilter>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeAssortmentLink(root: Root, { assortmentLinkId }: {
|
|
3
3
|
assortmentLinkId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").AssortmentLink>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeAssortmentMedia(root: Root, { assortmentMediaId }: {
|
|
3
3
|
assortmentMediaId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments.media").AssortmentMedia>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeAssortmentProduct(root: Root, { assortmentProductId }: {
|
|
3
3
|
assortmentProductId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").AssortmentProduct>;
|
|
@@ -4,4 +4,4 @@ export default function reorderAssortmentFilters(root: Root, params: {
|
|
|
4
4
|
assortmentFilterId: string;
|
|
5
5
|
sortKey: number;
|
|
6
6
|
}>;
|
|
7
|
-
}, { modules, userId }: Context): Promise<
|
|
7
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").AssortmentFilter[]>;
|
|
@@ -4,4 +4,4 @@ export default function reorderAssortmentLinks(root: Root, params: {
|
|
|
4
4
|
assortmentLinkId: string;
|
|
5
5
|
sortKey: number;
|
|
6
6
|
}>;
|
|
7
|
-
}, { modules, userId }: Context): Promise<
|
|
7
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").AssortmentLink[]>;
|
|
@@ -4,4 +4,4 @@ export default function reorderAssortmentMedia(root: Root, params: {
|
|
|
4
4
|
assortmentMediaId: string;
|
|
5
5
|
sortKey: number;
|
|
6
6
|
}>;
|
|
7
|
-
}, { modules, userId }: Context): Promise<
|
|
7
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments.media").AssortmentMedia[]>;
|
|
@@ -4,4 +4,4 @@ export default function reorderAssortmentProducts(root: Root, params: {
|
|
|
4
4
|
assortmentProductId: string;
|
|
5
5
|
sortKey: number;
|
|
6
6
|
}>;
|
|
7
|
-
}, { modules, userId }: Context): Promise<
|
|
7
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").AssortmentProduct[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function setBaseAssortment(root: Root, { assortmentId }: {
|
|
3
3
|
assortmentId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/assortments").Assortment>;
|
|
@@ -3,4 +3,4 @@ import { Assortment } from '@unchainedshop/types/assortments';
|
|
|
3
3
|
export default function updateAssortment(root: Root, params: {
|
|
4
4
|
assortment: Assortment;
|
|
5
5
|
assortmentId: string;
|
|
6
|
-
}, { modules, userId }: Context): Promise<
|
|
6
|
+
}, { modules, userId }: Context): Promise<Assortment>;
|
|
@@ -3,4 +3,4 @@ import { AssortmentMediaText } from '@unchainedshop/types/assortments.media';
|
|
|
3
3
|
export default function updateAssortmentMediaTexts(root: Root, { texts, assortmentMediaId }: {
|
|
4
4
|
texts: Array<AssortmentMediaText>;
|
|
5
5
|
assortmentMediaId: string;
|
|
6
|
-
}, { modules, userId }: Context): Promise<
|
|
6
|
+
}, { modules, userId }: Context): Promise<AssortmentMediaText[]>;
|
|
@@ -3,4 +3,4 @@ import { AssortmentText } from '@unchainedshop/types/assortments';
|
|
|
3
3
|
export default function updateAssortmentTexts(root: Root, { texts, assortmentId }: {
|
|
4
4
|
texts: Array<AssortmentText>;
|
|
5
5
|
assortmentId: string;
|
|
6
|
-
}, { modules, userId }: Context): Promise<
|
|
6
|
+
}, { modules, userId }: Context): Promise<AssortmentText[]>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function bookmark(root: Root, { productId, bookmarked }: {
|
|
3
3
|
productId: string;
|
|
4
4
|
bookmarked: string;
|
|
5
|
-
}, { userId, modules }: Context): Promise<
|
|
5
|
+
}, { userId, modules }: Context): Promise<import("@unchainedshop/types/bookmarks").Bookmark>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function createBookmark(root: Root, { productId, userId }: {
|
|
3
3
|
productId: string;
|
|
4
4
|
userId: string;
|
|
5
|
-
}, { modules, userId: currenctUserId }: Context): Promise<
|
|
5
|
+
}, { modules, userId: currenctUserId }: Context): Promise<import("@unchainedshop/types/bookmarks").Bookmark>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeBookmark(root: Root, { bookmarkId }: {
|
|
3
3
|
bookmarkId: string;
|
|
4
|
-
}, { userId, modules }: Context): Promise<
|
|
4
|
+
}, { userId, modules }: Context): Promise<import("@unchainedshop/types/bookmarks").Bookmark>;
|
|
@@ -2,4 +2,4 @@ import { Country } from '@unchainedshop/types/countries';
|
|
|
2
2
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
3
3
|
export default function createCountry(root: Root, { country }: {
|
|
4
4
|
country: Country;
|
|
5
|
-
}, { userId, modules }: Context): Promise<
|
|
5
|
+
}, { userId, modules }: Context): Promise<Country>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeCountry(root: Root, { countryId }: {
|
|
3
3
|
countryId: string;
|
|
4
|
-
}, { userId, modules }: Context): Promise<
|
|
4
|
+
}, { userId, modules }: Context): Promise<import("@unchainedshop/types/countries").Country>;
|
|
@@ -3,4 +3,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
3
3
|
export default function updateCountry(root: Root, { country, countryId }: {
|
|
4
4
|
country: Country;
|
|
5
5
|
countryId: string;
|
|
6
|
-
}, { userId, modules }: Context): Promise<
|
|
6
|
+
}, { userId, modules }: Context): Promise<Country>;
|
|
@@ -2,4 +2,4 @@ import { Root, Context } from '@unchainedshop/types/api';
|
|
|
2
2
|
import { Currency } from '@unchainedshop/types/currencies';
|
|
3
3
|
export default function createCurrency(root: Root, { currency }: {
|
|
4
4
|
currency: Currency;
|
|
5
|
-
}, { userId, modules }: Context): Promise<
|
|
5
|
+
}, { userId, modules }: Context): Promise<Currency>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeCurrency(root: Root, { currencyId }: {
|
|
3
3
|
currencyId: string;
|
|
4
|
-
}, { userId, modules }: Context): Promise<
|
|
4
|
+
}, { userId, modules }: Context): Promise<import("@unchainedshop/types/currencies").Currency>;
|
|
@@ -3,4 +3,4 @@ import { Currency } from '@unchainedshop/types/currencies';
|
|
|
3
3
|
export default function updateCurrency(root: Root, { currency, currencyId }: {
|
|
4
4
|
currency: Currency;
|
|
5
5
|
currencyId: string;
|
|
6
|
-
}, { userId, modules }: Context): Promise<
|
|
6
|
+
}, { userId, modules }: Context): Promise<Currency>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
import { DeliveryProvider } from '@unchainedshop/types/delivery';
|
|
3
3
|
export default function createDeliveryProvider(root: Root, { deliveryProvider }: {
|
|
4
4
|
deliveryProvider: DeliveryProvider;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<DeliveryProvider>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeDeliveryProvider(root: Root, { deliveryProviderId }: {
|
|
3
3
|
deliveryProviderId: string;
|
|
4
|
-
}, { modules, userId }: Context): Promise<
|
|
4
|
+
}, { modules, userId }: Context): Promise<import("@unchainedshop/types/delivery").DeliveryProvider>;
|
|
@@ -3,4 +3,4 @@ import { DeliveryProvider } from '@unchainedshop/types/delivery';
|
|
|
3
3
|
export default function updateDeliveryProvider(root: Root, params: {
|
|
4
4
|
deliveryProvider: DeliveryProvider;
|
|
5
5
|
deliveryProviderId: string;
|
|
6
|
-
}, { modules, userId }: Context): Promise<
|
|
6
|
+
}, { modules, userId }: Context): Promise<DeliveryProvider>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function activateEnrollment(root: Root, { enrollmentId }: {
|
|
3
3
|
enrollmentId: string;
|
|
4
|
-
}, context: Context): Promise<
|
|
4
|
+
}, context: Context): Promise<import("@unchainedshop/types/enrollments").Enrollment>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function terminateEnrollment(root: Root, { enrollmentId }: {
|
|
3
3
|
enrollmentId: string;
|
|
4
|
-
}, context: Context): Promise<
|
|
4
|
+
}, context: Context): Promise<import("@unchainedshop/types/enrollments").Enrollment>;
|
|
@@ -10,5 +10,5 @@ declare type UpdateEnrollmentParams = {
|
|
|
10
10
|
delivery?: Enrollment['delivery'];
|
|
11
11
|
meta?: any;
|
|
12
12
|
};
|
|
13
|
-
export default function updateEnrollment(root: Root, params: UpdateEnrollmentParams, context: Context): Promise<
|
|
13
|
+
export default function updateEnrollment(root: Root, params: UpdateEnrollmentParams, context: Context): Promise<Enrollment>;
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Root, Context } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeFilter(root: Root, { filterId }: {
|
|
3
3
|
filterId: string;
|
|
4
|
-
}, requestContext: Context): Promise<
|
|
4
|
+
}, requestContext: Context): Promise<import("@unchainedshop/types/filters").Filter>;
|
|
@@ -2,4 +2,4 @@ import { Root, Context } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function removeFilterOption(root: Root, { filterId, filterOptionValue }: {
|
|
3
3
|
filterId: string;
|
|
4
4
|
filterOptionValue: string;
|
|
5
|
-
}, context: Context): Promise<
|
|
5
|
+
}, context: Context): Promise<import("@unchainedshop/types/filters").Filter>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
import { Language } from '@unchainedshop/types/languages';
|
|
3
3
|
export default function createLanguage(root: Root, { language }: {
|
|
4
4
|
language: Language;
|
|
5
|
-
}, { modules, userId }: Context): Promise<
|
|
5
|
+
}, { modules, userId }: Context): Promise<Language>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Context, Root } from '@unchainedshop/types/api';
|
|
2
2
|
export default function removeLanguage(root: Root, { languageId }: {
|
|
3
3
|
languageId: string;
|
|
4
|
-
}, { userId, modules }: Context): Promise<
|
|
4
|
+
}, { userId, modules }: Context): Promise<import("@unchainedshop/types/languages").Language>;
|
|
@@ -3,4 +3,4 @@ import { Language } from '@unchainedshop/types/languages';
|
|
|
3
3
|
export default function updateLanguage(root: Root, { language, languageId }: {
|
|
4
4
|
language: Language;
|
|
5
5
|
languageId: string;
|
|
6
|
-
}, { userId, modules }: Context): Promise<
|
|
6
|
+
}, { userId, modules }: Context): Promise<Language>;
|
|
@@ -2,4 +2,4 @@ import { Context, Root } from '@unchainedshop/types/api';
|
|
|
2
2
|
export default function addCartDiscount(root: Root, { orderId, code }: {
|
|
3
3
|
orderId?: string;
|
|
4
4
|
code: string;
|
|
5
|
-
}, context: Context): Promise<
|
|
5
|
+
}, context: Context): Promise<import("@unchainedshop/types/orders.discounts").OrderDiscount>;
|