@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.
Files changed (229) hide show
  1. package/jest.config.js +5 -0
  2. package/lib/acl.d.ts +1 -0
  3. package/lib/api-index.d.ts +1 -0
  4. package/lib/api-index.js +1 -1
  5. package/lib/context.d.ts +1 -0
  6. package/lib/context.js +8 -3
  7. package/lib/context.js.map +1 -1
  8. package/lib/createGraphQLServer.js +3 -0
  9. package/lib/createGraphQLServer.js.map +1 -1
  10. package/lib/loaders/index.d.ts +1 -1
  11. package/lib/locale-context.d.ts +1 -1
  12. package/lib/resolvers/mutations/accounts/addEmail.d.ts +1 -1
  13. package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts +1 -1
  14. package/lib/resolvers/mutations/accounts/changePassword.d.ts +1 -1
  15. package/lib/resolvers/mutations/accounts/createUser.d.ts +5 -1
  16. package/lib/resolvers/mutations/accounts/disableTOTP.d.ts +1 -1
  17. package/lib/resolvers/mutations/accounts/enableTOTP.d.ts +1 -1
  18. package/lib/resolvers/mutations/accounts/enrollUser.d.ts +1 -1
  19. package/lib/resolvers/mutations/accounts/forgotPassword.d.ts +1 -1
  20. package/lib/resolvers/mutations/accounts/impersonate.d.ts +6 -1
  21. package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts +5 -1
  22. package/lib/resolvers/mutations/accounts/loginWithPassword.d.ts +5 -1
  23. package/lib/resolvers/mutations/accounts/logout.d.ts +1 -1
  24. package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts +1 -1
  25. package/lib/resolvers/mutations/accounts/removeEmail.d.ts +1 -1
  26. package/lib/resolvers/mutations/accounts/resetPassword.d.ts +5 -1
  27. package/lib/resolvers/mutations/accounts/setPassword.d.ts +1 -1
  28. package/lib/resolvers/mutations/accounts/setUsername.d.ts +1 -1
  29. package/lib/resolvers/mutations/accounts/verifyEmail.d.ts +5 -1
  30. package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts +1 -1
  31. package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts +1 -1
  32. package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts +1 -1
  33. package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts +1 -1
  34. package/lib/resolvers/mutations/assortments/createAssortment.d.ts +1 -1
  35. package/lib/resolvers/mutations/assortments/prepareAssortmentMediaUpload.d.ts +1 -1
  36. package/lib/resolvers/mutations/assortments/removeAssortment.d.ts +1 -1
  37. package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts +1 -1
  38. package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts +1 -1
  39. package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts +1 -1
  40. package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts +1 -1
  41. package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts +1 -1
  42. package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts +1 -1
  43. package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts +1 -1
  44. package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts +1 -1
  45. package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts +1 -1
  46. package/lib/resolvers/mutations/assortments/updateAssortment.d.ts +1 -1
  47. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +1 -1
  48. package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts +1 -1
  49. package/lib/resolvers/mutations/bookmarks/bookmark.d.ts +1 -1
  50. package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts +1 -1
  51. package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts +1 -1
  52. package/lib/resolvers/mutations/countries/createCountry.d.ts +1 -1
  53. package/lib/resolvers/mutations/countries/removeCountry.d.ts +1 -1
  54. package/lib/resolvers/mutations/countries/updateCountry.d.ts +1 -1
  55. package/lib/resolvers/mutations/currencies/createCurrency.d.ts +1 -1
  56. package/lib/resolvers/mutations/currencies/removeCurrency.d.ts +1 -1
  57. package/lib/resolvers/mutations/currencies/updateCurrency.d.ts +1 -1
  58. package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts +1 -1
  59. package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts +1 -1
  60. package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts +1 -1
  61. package/lib/resolvers/mutations/enrollments/activateEnrollment.d.ts +1 -1
  62. package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts +1 -1
  63. package/lib/resolvers/mutations/enrollments/terminateEnrollment.d.ts +1 -1
  64. package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts +1 -1
  65. package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts +1 -1
  66. package/lib/resolvers/mutations/filters/createFilter.d.ts +1 -1
  67. package/lib/resolvers/mutations/filters/createFilterOption.d.ts +1 -1
  68. package/lib/resolvers/mutations/filters/removeFilter.d.ts +1 -1
  69. package/lib/resolvers/mutations/filters/removeFilterOption.d.ts +1 -1
  70. package/lib/resolvers/mutations/filters/updateFilter.d.ts +1 -1
  71. package/lib/resolvers/mutations/filters/updateFilterTexts.d.ts +1 -1
  72. package/lib/resolvers/mutations/languages/createLanguage.d.ts +1 -1
  73. package/lib/resolvers/mutations/languages/removeLanguage.d.ts +1 -1
  74. package/lib/resolvers/mutations/languages/updateLanguage.d.ts +1 -1
  75. package/lib/resolvers/mutations/orders/addCartDiscount.d.ts +1 -1
  76. package/lib/resolvers/mutations/orders/addCartProduct.d.ts +1 -1
  77. package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +1 -1
  78. package/lib/resolvers/mutations/orders/checkoutCart.d.ts +1 -1
  79. package/lib/resolvers/mutations/orders/confirmOrder.d.ts +1 -1
  80. package/lib/resolvers/mutations/orders/createCart.d.ts +1 -1
  81. package/lib/resolvers/mutations/orders/deliverOrder.d.ts +1 -1
  82. package/lib/resolvers/mutations/orders/emptyCart.d.ts +1 -1
  83. package/lib/resolvers/mutations/orders/payOrder.d.ts +1 -1
  84. package/lib/resolvers/mutations/orders/rejectOrder.d.ts +1 -1
  85. package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts +1 -1
  86. package/lib/resolvers/mutations/orders/removeCartItem.d.ts +1 -1
  87. package/lib/resolvers/mutations/orders/removeOrder.d.ts +1 -1
  88. package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts +1 -1
  89. package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts +1 -1
  90. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts +1 -1
  91. package/lib/resolvers/mutations/orders/updateCart.d.ts +1 -1
  92. package/lib/resolvers/mutations/orders/updateCartItem.d.ts +1 -1
  93. package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts +1 -1
  94. package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts +1 -1
  95. package/lib/resolvers/mutations/orders/updateOrderPaymentCard.d.ts +1 -1
  96. package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts +1 -1
  97. package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts +1 -1
  98. package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts +2 -1
  99. package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts +1 -1
  100. package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts +1 -1
  101. package/lib/resolvers/mutations/payment/removePaymentCredentials.d.ts +2 -1
  102. package/lib/resolvers/mutations/payment/removePaymentProvider.d.ts +2 -1
  103. package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts +1 -1
  104. package/lib/resolvers/mutations/payment/updatePaymentProvider.d.ts +2 -1
  105. package/lib/resolvers/mutations/products/addProductAssignment.d.ts +1 -1
  106. package/lib/resolvers/mutations/products/addProductMedia.d.ts +1 -1
  107. package/lib/resolvers/mutations/products/addProductReviewVote.d.ts +1 -1
  108. package/lib/resolvers/mutations/products/createProduct.d.ts +1 -1
  109. package/lib/resolvers/mutations/products/createProductBundleItem.d.ts +1 -1
  110. package/lib/resolvers/mutations/products/createProductReview.d.ts +1 -1
  111. package/lib/resolvers/mutations/products/createProductVariation.d.ts +1 -1
  112. package/lib/resolvers/mutations/products/createProductVariationOption.d.ts +1 -1
  113. package/lib/resolvers/mutations/products/prepareProductMediaUpload.d.ts +1 -1
  114. package/lib/resolvers/mutations/products/publishProduct.d.ts +1 -1
  115. package/lib/resolvers/mutations/products/removeBundleItem.d.ts +1 -1
  116. package/lib/resolvers/mutations/products/removeProduct.d.ts +1 -1
  117. package/lib/resolvers/mutations/products/removeProductAssignment.d.ts +1 -1
  118. package/lib/resolvers/mutations/products/removeProductMedia.d.ts +1 -1
  119. package/lib/resolvers/mutations/products/removeProductReview.d.ts +1 -1
  120. package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts +1 -1
  121. package/lib/resolvers/mutations/products/removeProductVariation.d.ts +1 -1
  122. package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts +1 -1
  123. package/lib/resolvers/mutations/products/reorderProductMedia.d.ts +1 -1
  124. package/lib/resolvers/mutations/products/unpublishProduct.d.ts +1 -1
  125. package/lib/resolvers/mutations/products/updateProduct.d.ts +1 -1
  126. package/lib/resolvers/mutations/products/updateProductCommerce.d.ts +1 -1
  127. package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts +1 -1
  128. package/lib/resolvers/mutations/products/updateProductPlan.d.ts +1 -1
  129. package/lib/resolvers/mutations/products/updateProductReview.d.ts +1 -1
  130. package/lib/resolvers/mutations/products/updateProductSupply.d.ts +1 -1
  131. package/lib/resolvers/mutations/products/updateProductTexts.d.ts +1 -1
  132. package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts +1 -1
  133. package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts +1 -1
  134. package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts +1 -1
  135. package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts +1 -1
  136. package/lib/resolvers/mutations/quotations/requestQuotation.d.ts +1 -1
  137. package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts +1 -1
  138. package/lib/resolvers/mutations/users/heartbeat.d.ts +1 -1
  139. package/lib/resolvers/mutations/users/prepareUserAvatarUpload.d.ts +1 -1
  140. package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
  141. package/lib/resolvers/mutations/users/setUserTags.d.ts +1 -1
  142. package/lib/resolvers/mutations/users/updateUserAvatar.d.ts +1 -1
  143. package/lib/resolvers/mutations/users/updateUserProfile.d.ts +1 -1
  144. package/lib/resolvers/mutations/utils/getOrderCart.d.ts +2 -1
  145. package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts +1 -1
  146. package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts +1 -1
  147. package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts +1 -1
  148. package/lib/resolvers/mutations/worker/addWork.d.ts +1 -1
  149. package/lib/resolvers/mutations/worker/allocateWork.d.ts +1 -1
  150. package/lib/resolvers/mutations/worker/doWork.d.ts +1 -1
  151. package/lib/resolvers/mutations/worker/finishWork.d.ts +1 -1
  152. package/lib/resolvers/mutations/worker/removeWork.d.ts +1 -1
  153. package/lib/resolvers/queries/assortments/assortment.d.ts +1 -1
  154. package/lib/resolvers/queries/assortments/assortments.d.ts +1 -1
  155. package/lib/resolvers/queries/assortments/assortmentsCount.d.ts +1 -1
  156. package/lib/resolvers/queries/assortments/translatedAssortmentMediaTexts.d.ts +1 -1
  157. package/lib/resolvers/queries/assortments/translatedAssortmentTexts.d.ts +1 -1
  158. package/lib/resolvers/queries/countries/countries.d.ts +1 -1
  159. package/lib/resolvers/queries/countries/countriesCount.d.ts +1 -1
  160. package/lib/resolvers/queries/countries/country.d.ts +1 -1
  161. package/lib/resolvers/queries/currencies/currencies.d.ts +1 -1
  162. package/lib/resolvers/queries/currencies/currenciesCount.d.ts +1 -1
  163. package/lib/resolvers/queries/currencies/currency.d.ts +1 -1
  164. package/lib/resolvers/queries/delivery/deliveryInterfaces.d.ts +5 -0
  165. package/lib/resolvers/queries/delivery/deliveryProvider.d.ts +1 -1
  166. package/lib/resolvers/queries/delivery/deliveryProviders.d.ts +1 -1
  167. package/lib/resolvers/queries/delivery/deliveryProvidersCount.d.ts +1 -1
  168. package/lib/resolvers/queries/enrollments/enrollment.d.ts +1 -1
  169. package/lib/resolvers/queries/enrollments/enrollments.d.ts +1 -1
  170. package/lib/resolvers/queries/enrollments/enrollmentsCount.d.ts +1 -1
  171. package/lib/resolvers/queries/events/event.d.ts +1 -1
  172. package/lib/resolvers/queries/events/events.d.ts +1 -1
  173. package/lib/resolvers/queries/events/eventsCounts.d.ts +1 -1
  174. package/lib/resolvers/queries/filters/filter.d.ts +1 -1
  175. package/lib/resolvers/queries/filters/filters.d.ts +1 -1
  176. package/lib/resolvers/queries/filters/filtersCount.d.ts +1 -1
  177. package/lib/resolvers/queries/filters/searchAssortments.d.ts +1 -1
  178. package/lib/resolvers/queries/filters/searchProducts.d.ts +1 -1
  179. package/lib/resolvers/queries/filters/translatedFilterTexts.d.ts +1 -1
  180. package/lib/resolvers/queries/languages/language.d.ts +1 -1
  181. package/lib/resolvers/queries/languages/languages.d.ts +1 -1
  182. package/lib/resolvers/queries/languages/languagesCount.d.ts +1 -1
  183. package/lib/resolvers/queries/orders/order.d.ts +1 -1
  184. package/lib/resolvers/queries/orders/orders.d.ts +1 -1
  185. package/lib/resolvers/queries/orders/ordersCount.d.ts +1 -1
  186. package/lib/resolvers/queries/payment/paymentInterfaces.d.ts +5 -0
  187. package/lib/resolvers/queries/payment/paymentProvider.d.ts +1 -1
  188. package/lib/resolvers/queries/payment/paymentProviders.d.ts +1 -1
  189. package/lib/resolvers/queries/payment/paymentProvidersCount.d.ts +1 -1
  190. package/lib/resolvers/queries/products/product.d.ts +1 -1
  191. package/lib/resolvers/queries/products/productCatalogPrices.d.ts +1 -1
  192. package/lib/resolvers/queries/products/productReview.d.ts +1 -1
  193. package/lib/resolvers/queries/products/productReviews.d.ts +1 -1
  194. package/lib/resolvers/queries/products/productReviewsCount.d.ts +1 -1
  195. package/lib/resolvers/queries/products/products.d.ts +1 -1
  196. package/lib/resolvers/queries/products/productsCount.d.ts +1 -1
  197. package/lib/resolvers/queries/products/translatedProductMediaTexts.d.ts +1 -1
  198. package/lib/resolvers/queries/products/translatedProductTexts.d.ts +1 -1
  199. package/lib/resolvers/queries/products/translatedProductVariationTexts.d.ts +1 -1
  200. package/lib/resolvers/queries/quotations/quotation.d.ts +1 -1
  201. package/lib/resolvers/queries/quotations/quotations.d.ts +1 -1
  202. package/lib/resolvers/queries/quotations/quotationsCount.d.ts +1 -1
  203. package/lib/resolvers/queries/users/me.d.ts +1 -1
  204. package/lib/resolvers/queries/users/user.d.ts +1 -1
  205. package/lib/resolvers/queries/users/users.d.ts +1 -1
  206. package/lib/resolvers/queries/users/usersCount.d.ts +1 -1
  207. package/lib/resolvers/queries/warehousing/warehousingInterfaces.d.ts +5 -0
  208. package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts +1 -1
  209. package/lib/resolvers/queries/warehousing/warehousingProviders.d.ts +1 -1
  210. package/lib/resolvers/queries/warehousing/warehousingProvidersCount.d.ts +1 -1
  211. package/lib/resolvers/queries/worker/activeWorkTypes.d.ts +1 -1
  212. package/lib/resolvers/queries/worker/work.d.ts +1 -1
  213. package/lib/resolvers/queries/worker/workQueue.d.ts +14 -0
  214. package/lib/resolvers/queries/worker/workQueueCount.d.ts +1 -1
  215. package/lib/resolvers/type/delivery-provider-types.d.ts +27 -0
  216. package/lib/resolvers/type/login-method-response-types.d.ts +19 -1
  217. package/lib/resolvers/type/order/order-delivery-types.d.ts +3 -1
  218. package/lib/resolvers/type/order/order-payment-types.d.ts +3 -1
  219. package/lib/resolvers/type/payment/payment-provider-types.d.ts +12 -0
  220. package/lib/schema/types/worker.js +1 -1
  221. package/lib/user-context.d.ts +1 -1
  222. package/package.json +18 -16
  223. package/src/api-index.ts +1 -1
  224. package/src/context.ts +12 -4
  225. package/src/createGraphQLServer.ts +5 -0
  226. package/src/schema/types/worker.js +1 -1
  227. package/tsconfig.json +26 -5
  228. package/license +0 -274
  229. package/tsconfig.build.json +0 -34
package/jest.config.js ADDED
@@ -0,0 +1,5 @@
1
+ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2
+ export default {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ };
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>;
@@ -1,3 +1,4 @@
1
+ import { UnchainedServerOptions } from '@unchainedshop/types/api';
1
2
  import { createContextResolver, getCurrentContextResolver, setCurrentContextResolver } from './context';
2
3
  export * from './context';
3
4
  export * as acl from './acl';
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.1.3'; // eslint-disable-line
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, ...rest) => {
27
- req.unchainedContext = await context({ req, res });
28
- return middleware(req, res, ...rest);
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
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,IAAI,OAAO,CAAC;AAEZ,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAA6B,EAAE,CAAC,OAAO,CAAC;AAEjF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,UAAoC,EAAE,EAAE;IAChF,OAAO,GAAG,UAAU,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAChC,CAAC,YAA0B,EAAE,KAAU,EAAE,OAAe,EAA4B,EAAE,CACtF,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,aAAa,EAAE,EAAE,EAAE;IACvC,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC5D,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;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AM,OAAO,GAAG,MAAM,kBAAkB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC5D,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC5D,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAEhE,OAAO;QACL,GAAG;QACH,GAAG;QACH,GAAG,aAAa;QAChB,GAAG,YAAY;QACf,GAAG,WAAW;QACd,GAAG,aAAa;QAChB,OAAO;QACP,KAAK;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;IAC9E,UAAU,CAAC,GAAG,CACZ,IAAI,EACJ,KAAK,UAAU,qBAAqB,CAClC,GAA0D,EAC1D,GAAoB,EACpB,IAAI;QAEJ,IAAI;YACF,GAAG,CAAC,gBAAgB,GAAG,MAAM,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;YACnD,MAAM,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;SAClC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,KAAK,CAAC,CAAC;SACb;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -68,6 +68,9 @@ export default (expressApp, options) => {
68
68
  }
69
69
  }
70
70
  : corsOrigins;
71
+ // server.start().then(() => {
72
+ //
73
+ // });
71
74
  const middleware = server.getMiddleware({
72
75
  path: '/graphql',
73
76
  cors: !originFn
@@ -1 +1 @@
1
- {"version":3,"file":"createGraphQLServer.js","sourceRoot":"","sources":["../src/createGraphQLServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,E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C,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"}
@@ -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;
@@ -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<any>;
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<any>;
2
+ export default function buildTOTPSecret(root: Root, _: any, { modules, userId }: Context): Promise<string>;
@@ -5,5 +5,5 @@ export default function changePassword(root: Root, params: {
5
5
  newPassword?: string;
6
6
  newPlainPassword?: string;
7
7
  }, { modules, userId }: Context): Promise<{
8
- success: any;
8
+ success: void;
9
9
  }>;
@@ -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<any>;
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<any>;
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<any>;
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<any>;
3
+ export default function enrollUser(root: Root, params: UserData, context: Context): Promise<import("@unchainedshop/types/user").User>;
@@ -2,5 +2,5 @@ import { Context, Root } from '@unchainedshop/types/api';
2
2
  export default function forgotPassword(root: Root, { email }: {
3
3
  email: string;
4
4
  }, { modules, userId }: Context): Promise<{
5
- success: any;
5
+ success: boolean;
6
6
  }>;
@@ -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<any>;
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<any>;
2
+ export default function loginAsGuest(root: Root, _: any, context: Context): Promise<{
3
+ id: string;
4
+ token: string;
5
+ tokenExpires: Date;
6
+ }>;
@@ -5,4 +5,8 @@ export default function loginWithPassword(root: Root, params: {
5
5
  password?: string;
6
6
  plainPassword?: string;
7
7
  totpCode?: string;
8
- }, context: Context): Promise<any>;
8
+ }, context: Context): Promise<{
9
+ id: string;
10
+ token: string;
11
+ tokenExpires: Date;
12
+ }>;
@@ -2,5 +2,5 @@ import { Context, Root } from '@unchainedshop/types/api';
2
2
  export default function logout(root: Root, params: {
3
3
  token: string;
4
4
  }, context: Context): Promise<{
5
- success: any;
5
+ success: boolean;
6
6
  }>;
@@ -1,4 +1,4 @@
1
1
  import { Context, Root } from '@unchainedshop/types/api';
2
2
  export default function logoutAllSessions(root: Root, _: any, context: Context): Promise<{
3
- success: any;
3
+ success: boolean;
4
4
  }>;
@@ -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<any>;
5
+ }, { modules, userId }: Context): Promise<import("@unchainedshop/types/user").User>;
@@ -3,4 +3,8 @@ export default function resetPassword(root: Root, params: {
3
3
  newPassword?: string;
4
4
  newPlainPassword?: string;
5
5
  token: string;
6
- }, context: Context): Promise<any>;
6
+ }, context: Context): Promise<{
7
+ id: string;
8
+ token: string;
9
+ tokenExpires: Date;
10
+ }>;
@@ -3,4 +3,4 @@ export default function setPassword(root: Root, params: {
3
3
  newPassword: string;
4
4
  newPlainPassword: string;
5
5
  userId: string;
6
- }, { modules, userId }: Context): Promise<any>;
6
+ }, { 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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
3
+ export default function addAssortmentProduct(root: Root, { assortmentId, productId, ...assortmentProduct }: AssortmentProduct, { modules, userId }: Context): Promise<AssortmentProduct>;
@@ -5,4 +5,4 @@ export default function createAssortment(root: Root, { assortment }: {
5
5
  title: string;
6
6
  locale?: string;
7
7
  };
8
- }, { modules, userId, localeContext }: Context): Promise<any>;
8
+ }, { modules, userId, localeContext }: Context): Promise<Assortment>;
@@ -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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
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<any>;
4
+ }, context: Context): Promise<import("@unchainedshop/types/enrollments").Enrollment>;
@@ -6,4 +6,4 @@ export default function createEnrollment(root: Root, { contact, plan, billingAdd
6
6
  payment: any;
7
7
  delivery: any;
8
8
  meta: any;
9
- }, context: Context): Promise<any>;
9
+ }, 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<any>;
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<any>;
13
+ export default function updateEnrollment(root: Root, params: UpdateEnrollmentParams, context: Context): Promise<Enrollment>;
14
14
  export {};
@@ -3,4 +3,4 @@ export default function confirmMediaUpload(root: Root, { mediaUploadTicketId, si
3
3
  mediaUploadTicketId: any;
4
4
  size: any;
5
5
  type: any;
6
- }, context: Context): Promise<any>;
6
+ }, context: Context): Promise<import("@unchainedshop/types/files").File>;
@@ -4,4 +4,4 @@ export default function createFilter(root: Root, { filter }: {
4
4
  filter: Filter & {
5
5
  title: string;
6
6
  };
7
- }, context: Context): Promise<any>;
7
+ }, context: Context): Promise<Filter>;
@@ -5,4 +5,4 @@ export default function createFilterOption(root: Root, params: {
5
5
  value: string;
6
6
  title: string;
7
7
  };
8
- }, context: Context): Promise<any>;
8
+ }, context: Context): Promise<import("@unchainedshop/types/filters").Filter>;
@@ -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<any>;
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<any>;
5
+ }, context: Context): Promise<import("@unchainedshop/types/filters").Filter>;
@@ -3,4 +3,4 @@ import { Filter } from '@unchainedshop/types/filters';
3
3
  export default function updateFilter(root: Root, { filter, filterId }: {
4
4
  filter: Filter;
5
5
  filterId: string;
6
- }, context: Context): Promise<any>;
6
+ }, context: Context): Promise<Filter>;
@@ -7,4 +7,4 @@ export default function updateFilterTexts(root: Root, params: {
7
7
  }>;
8
8
  filterId: string;
9
9
  filterOptionValue?: string;
10
- }, { modules, userId }: Context): Promise<any>;
10
+ }, { modules, userId }: Context): Promise<import("@unchainedshop/types/filters").FilterText[]>;
@@ -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<any>;
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<any>;
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<any>;
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<any>;
5
+ }, context: Context): Promise<import("@unchainedshop/types/orders.discounts").OrderDiscount>;