@unchainedshop/api 1.1.3 → 1.1.9

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 (246) hide show
  1. package/lib/acl.d.ts +0 -1
  2. package/lib/api-index.d.ts +0 -1
  3. package/lib/api-index.js +3 -3
  4. package/lib/api-index.js.map +1 -1
  5. package/lib/context.d.ts +1 -2
  6. package/lib/context.js +2 -3
  7. package/lib/context.js.map +1 -1
  8. package/lib/createBulkImportServer.d.ts +1 -1
  9. package/lib/createBulkImportServer.js +2 -2
  10. package/lib/createBulkImportServer.js.map +1 -1
  11. package/lib/createGraphQLServer.d.ts +1 -1
  12. package/lib/createGraphQLServer.js +3 -4
  13. package/lib/createGraphQLServer.js.map +1 -1
  14. package/lib/loaders/index.d.ts +1 -1
  15. package/lib/loaders/index.js +2 -1
  16. package/lib/loaders/index.js.map +1 -1
  17. package/lib/locale-context.d.ts +1 -1
  18. package/lib/locale-context.js +2 -1
  19. package/lib/locale-context.js.map +1 -1
  20. package/lib/resolvers/mutations/accounts/addEmail.d.ts +1 -1
  21. package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts +1 -1
  22. package/lib/resolvers/mutations/accounts/changePassword.d.ts +1 -1
  23. package/lib/resolvers/mutations/accounts/createUser.d.ts +1 -5
  24. package/lib/resolvers/mutations/accounts/disableTOTP.d.ts +1 -1
  25. package/lib/resolvers/mutations/accounts/enableTOTP.d.ts +1 -1
  26. package/lib/resolvers/mutations/accounts/enrollUser.d.ts +1 -1
  27. package/lib/resolvers/mutations/accounts/forgotPassword.d.ts +1 -1
  28. package/lib/resolvers/mutations/accounts/impersonate.d.ts +1 -6
  29. package/lib/resolvers/mutations/accounts/loginAsGuest.d.ts +1 -5
  30. package/lib/resolvers/mutations/accounts/loginWithPassword.d.ts +1 -5
  31. package/lib/resolvers/mutations/accounts/logout.d.ts +1 -1
  32. package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts +1 -1
  33. package/lib/resolvers/mutations/accounts/removeEmail.d.ts +1 -1
  34. package/lib/resolvers/mutations/accounts/resetPassword.d.ts +1 -5
  35. package/lib/resolvers/mutations/accounts/setPassword.d.ts +1 -1
  36. package/lib/resolvers/mutations/accounts/setUsername.d.ts +1 -1
  37. package/lib/resolvers/mutations/accounts/verifyEmail.d.ts +1 -5
  38. package/lib/resolvers/mutations/assortments/addAssortmentFilter.d.ts +1 -1
  39. package/lib/resolvers/mutations/assortments/addAssortmentLink.d.ts +1 -1
  40. package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts +1 -1
  41. package/lib/resolvers/mutations/assortments/addAssortmentProduct.d.ts +1 -1
  42. package/lib/resolvers/mutations/assortments/createAssortment.d.ts +1 -1
  43. package/lib/resolvers/mutations/assortments/prepareAssortmentMediaUpload.d.ts +1 -1
  44. package/lib/resolvers/mutations/assortments/removeAssortment.d.ts +1 -1
  45. package/lib/resolvers/mutations/assortments/removeAssortmentFilter.d.ts +1 -1
  46. package/lib/resolvers/mutations/assortments/removeAssortmentLink.d.ts +1 -1
  47. package/lib/resolvers/mutations/assortments/removeAssortmentMedia.d.ts +1 -1
  48. package/lib/resolvers/mutations/assortments/removeAssortmentProduct.d.ts +1 -1
  49. package/lib/resolvers/mutations/assortments/reorderAssortmentFilters.d.ts +1 -1
  50. package/lib/resolvers/mutations/assortments/reorderAssortmentLinks.d.ts +1 -1
  51. package/lib/resolvers/mutations/assortments/reorderAssortmentMedia.d.ts +1 -1
  52. package/lib/resolvers/mutations/assortments/reorderAssortmentProducts.d.ts +1 -1
  53. package/lib/resolvers/mutations/assortments/setBaseAssortment.d.ts +1 -1
  54. package/lib/resolvers/mutations/assortments/updateAssortment.d.ts +1 -1
  55. package/lib/resolvers/mutations/assortments/updateAssortmentMediaTexts.d.ts +1 -1
  56. package/lib/resolvers/mutations/assortments/updateAssortmentTexts.d.ts +1 -1
  57. package/lib/resolvers/mutations/bookmarks/bookmark.d.ts +1 -1
  58. package/lib/resolvers/mutations/bookmarks/createBookmark.d.ts +1 -1
  59. package/lib/resolvers/mutations/bookmarks/removeBookmark.d.ts +1 -1
  60. package/lib/resolvers/mutations/countries/createCountry.d.ts +1 -1
  61. package/lib/resolvers/mutations/countries/removeCountry.d.ts +1 -1
  62. package/lib/resolvers/mutations/countries/updateCountry.d.ts +1 -1
  63. package/lib/resolvers/mutations/currencies/createCurrency.d.ts +1 -1
  64. package/lib/resolvers/mutations/currencies/removeCurrency.d.ts +1 -1
  65. package/lib/resolvers/mutations/currencies/updateCurrency.d.ts +1 -1
  66. package/lib/resolvers/mutations/delivery/createDeliveryProvider.d.ts +1 -1
  67. package/lib/resolvers/mutations/delivery/removeDeliveryProvider.d.ts +1 -1
  68. package/lib/resolvers/mutations/delivery/updateDeliveryProvider.d.ts +1 -1
  69. package/lib/resolvers/mutations/enrollments/activateEnrollment.d.ts +1 -1
  70. package/lib/resolvers/mutations/enrollments/createEnrollment.d.ts +1 -1
  71. package/lib/resolvers/mutations/enrollments/terminateEnrollment.d.ts +1 -1
  72. package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts +1 -1
  73. package/lib/resolvers/mutations/files/confirmMediaUpload.d.ts +1 -1
  74. package/lib/resolvers/mutations/filters/createFilter.d.ts +1 -1
  75. package/lib/resolvers/mutations/filters/createFilterOption.d.ts +1 -1
  76. package/lib/resolvers/mutations/filters/removeFilter.d.ts +1 -1
  77. package/lib/resolvers/mutations/filters/removeFilterOption.d.ts +1 -1
  78. package/lib/resolvers/mutations/filters/updateFilter.d.ts +1 -1
  79. package/lib/resolvers/mutations/filters/updateFilterTexts.d.ts +1 -1
  80. package/lib/resolvers/mutations/languages/createLanguage.d.ts +1 -1
  81. package/lib/resolvers/mutations/languages/removeLanguage.d.ts +1 -1
  82. package/lib/resolvers/mutations/languages/updateLanguage.d.ts +1 -1
  83. package/lib/resolvers/mutations/orders/addCartDiscount.d.ts +1 -1
  84. package/lib/resolvers/mutations/orders/addCartProduct.d.ts +1 -1
  85. package/lib/resolvers/mutations/orders/addCartQuotation.d.ts +1 -1
  86. package/lib/resolvers/mutations/orders/checkoutCart.d.ts +1 -1
  87. package/lib/resolvers/mutations/orders/confirmOrder.d.ts +1 -1
  88. package/lib/resolvers/mutations/orders/createCart.d.ts +1 -1
  89. package/lib/resolvers/mutations/orders/deliverOrder.d.ts +1 -1
  90. package/lib/resolvers/mutations/orders/emptyCart.d.ts +1 -1
  91. package/lib/resolvers/mutations/orders/payOrder.d.ts +1 -1
  92. package/lib/resolvers/mutations/orders/rejectOrder.d.ts +1 -1
  93. package/lib/resolvers/mutations/orders/removeCartDiscount.d.ts +1 -1
  94. package/lib/resolvers/mutations/orders/removeCartItem.d.ts +1 -1
  95. package/lib/resolvers/mutations/orders/removeOrder.d.ts +1 -1
  96. package/lib/resolvers/mutations/orders/setOrderDeliveryProvider.d.ts +1 -1
  97. package/lib/resolvers/mutations/orders/setOrderPaymentProvider.d.ts +1 -1
  98. package/lib/resolvers/mutations/orders/signPaymentProviderForCheckout.d.ts +1 -1
  99. package/lib/resolvers/mutations/orders/updateCart.d.ts +1 -1
  100. package/lib/resolvers/mutations/orders/updateCartItem.d.ts +1 -1
  101. package/lib/resolvers/mutations/orders/updateOrderDeliveryPickUp.d.ts +1 -1
  102. package/lib/resolvers/mutations/orders/updateOrderDeliveryShipping.d.ts +1 -1
  103. package/lib/resolvers/mutations/orders/updateOrderPaymentCard.d.ts +1 -1
  104. package/lib/resolvers/mutations/orders/updateOrderPaymentGeneric.d.ts +1 -1
  105. package/lib/resolvers/mutations/orders/updateOrderPaymentInvoice.d.ts +1 -1
  106. package/lib/resolvers/mutations/payment/createPaymentProvider.d.ts +1 -2
  107. package/lib/resolvers/mutations/payment/markPaymentCredentialsPreferred.d.ts +1 -1
  108. package/lib/resolvers/mutations/payment/registerPaymentCredentials.d.ts +1 -1
  109. package/lib/resolvers/mutations/payment/removePaymentCredentials.d.ts +1 -2
  110. package/lib/resolvers/mutations/payment/removePaymentProvider.d.ts +1 -2
  111. package/lib/resolvers/mutations/payment/signPaymentProviderForCredentialRegistration.d.ts +1 -1
  112. package/lib/resolvers/mutations/payment/updatePaymentProvider.d.ts +1 -2
  113. package/lib/resolvers/mutations/products/addProductAssignment.d.ts +1 -1
  114. package/lib/resolvers/mutations/products/addProductMedia.d.ts +1 -1
  115. package/lib/resolvers/mutations/products/addProductReviewVote.d.ts +1 -1
  116. package/lib/resolvers/mutations/products/createProduct.d.ts +1 -1
  117. package/lib/resolvers/mutations/products/createProductBundleItem.d.ts +1 -1
  118. package/lib/resolvers/mutations/products/createProductReview.d.ts +1 -1
  119. package/lib/resolvers/mutations/products/createProductVariation.d.ts +1 -1
  120. package/lib/resolvers/mutations/products/createProductVariationOption.d.ts +1 -1
  121. package/lib/resolvers/mutations/products/prepareProductMediaUpload.d.ts +1 -1
  122. package/lib/resolvers/mutations/products/publishProduct.d.ts +1 -1
  123. package/lib/resolvers/mutations/products/removeBundleItem.d.ts +1 -1
  124. package/lib/resolvers/mutations/products/removeProduct.d.ts +1 -1
  125. package/lib/resolvers/mutations/products/removeProductAssignment.d.ts +1 -1
  126. package/lib/resolvers/mutations/products/removeProductMedia.d.ts +1 -1
  127. package/lib/resolvers/mutations/products/removeProductReview.d.ts +1 -1
  128. package/lib/resolvers/mutations/products/removeProductReviewVote.d.ts +1 -1
  129. package/lib/resolvers/mutations/products/removeProductVariation.d.ts +1 -1
  130. package/lib/resolvers/mutations/products/removeProductVariationOption.d.ts +1 -1
  131. package/lib/resolvers/mutations/products/reorderProductMedia.d.ts +1 -1
  132. package/lib/resolvers/mutations/products/unpublishProduct.d.ts +1 -1
  133. package/lib/resolvers/mutations/products/updateProduct.d.ts +1 -1
  134. package/lib/resolvers/mutations/products/updateProductCommerce.d.ts +1 -1
  135. package/lib/resolvers/mutations/products/updateProductMediaTexts.d.ts +1 -1
  136. package/lib/resolvers/mutations/products/updateProductPlan.d.ts +1 -1
  137. package/lib/resolvers/mutations/products/updateProductReview.d.ts +1 -1
  138. package/lib/resolvers/mutations/products/updateProductSupply.d.ts +1 -1
  139. package/lib/resolvers/mutations/products/updateProductTexts.d.ts +1 -1
  140. package/lib/resolvers/mutations/products/updateProductVariationTexts.d.ts +1 -1
  141. package/lib/resolvers/mutations/products/updateProductWarehousing.d.ts +1 -1
  142. package/lib/resolvers/mutations/quotations/makeQuotationProposal.d.ts +1 -1
  143. package/lib/resolvers/mutations/quotations/rejectQuotation.d.ts +1 -1
  144. package/lib/resolvers/mutations/quotations/requestQuotation.d.ts +1 -1
  145. package/lib/resolvers/mutations/quotations/verifyQuotation.d.ts +1 -1
  146. package/lib/resolvers/mutations/users/heartbeat.d.ts +1 -1
  147. package/lib/resolvers/mutations/users/prepareUserAvatarUpload.d.ts +1 -1
  148. package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
  149. package/lib/resolvers/mutations/users/setUserTags.d.ts +1 -1
  150. package/lib/resolvers/mutations/users/updateUserAvatar.d.ts +1 -1
  151. package/lib/resolvers/mutations/users/updateUserProfile.d.ts +1 -1
  152. package/lib/resolvers/mutations/utils/getOrderCart.d.ts +1 -2
  153. package/lib/resolvers/mutations/warehousing/createWarehousingProvider.d.ts +1 -1
  154. package/lib/resolvers/mutations/warehousing/removeWarehousingProvider.d.ts +1 -1
  155. package/lib/resolvers/mutations/warehousing/updateWarehousingProvider.d.ts +1 -1
  156. package/lib/resolvers/mutations/worker/addWork.d.ts +1 -1
  157. package/lib/resolvers/mutations/worker/allocateWork.d.ts +1 -1
  158. package/lib/resolvers/mutations/worker/doWork.d.ts +1 -1
  159. package/lib/resolvers/mutations/worker/finishWork.d.ts +1 -1
  160. package/lib/resolvers/mutations/worker/removeWork.d.ts +1 -1
  161. package/lib/resolvers/queries/assortments/assortment.d.ts +1 -1
  162. package/lib/resolvers/queries/assortments/assortments.d.ts +1 -1
  163. package/lib/resolvers/queries/assortments/assortmentsCount.d.ts +1 -1
  164. package/lib/resolvers/queries/assortments/translatedAssortmentMediaTexts.d.ts +1 -1
  165. package/lib/resolvers/queries/assortments/translatedAssortmentTexts.d.ts +1 -1
  166. package/lib/resolvers/queries/countries/countries.d.ts +1 -1
  167. package/lib/resolvers/queries/countries/countriesCount.d.ts +1 -1
  168. package/lib/resolvers/queries/countries/country.d.ts +1 -1
  169. package/lib/resolvers/queries/currencies/currencies.d.ts +1 -1
  170. package/lib/resolvers/queries/currencies/currenciesCount.d.ts +1 -1
  171. package/lib/resolvers/queries/currencies/currency.d.ts +1 -1
  172. package/lib/resolvers/queries/delivery/deliveryProvider.d.ts +1 -1
  173. package/lib/resolvers/queries/delivery/deliveryProviders.d.ts +1 -1
  174. package/lib/resolvers/queries/delivery/deliveryProvidersCount.d.ts +1 -1
  175. package/lib/resolvers/queries/enrollments/enrollment.d.ts +1 -1
  176. package/lib/resolvers/queries/enrollments/enrollments.d.ts +1 -1
  177. package/lib/resolvers/queries/enrollments/enrollmentsCount.d.ts +1 -1
  178. package/lib/resolvers/queries/events/event.d.ts +1 -1
  179. package/lib/resolvers/queries/events/events.d.ts +1 -1
  180. package/lib/resolvers/queries/events/eventsCounts.d.ts +1 -1
  181. package/lib/resolvers/queries/filters/filter.d.ts +1 -1
  182. package/lib/resolvers/queries/filters/filters.d.ts +1 -1
  183. package/lib/resolvers/queries/filters/filtersCount.d.ts +1 -1
  184. package/lib/resolvers/queries/filters/searchAssortments.d.ts +1 -1
  185. package/lib/resolvers/queries/filters/searchProducts.d.ts +1 -1
  186. package/lib/resolvers/queries/filters/translatedFilterTexts.d.ts +1 -1
  187. package/lib/resolvers/queries/index.js +1 -1
  188. package/lib/resolvers/queries/index.js.map +1 -1
  189. package/lib/resolvers/queries/languages/language.d.ts +1 -1
  190. package/lib/resolvers/queries/languages/languages.d.ts +1 -1
  191. package/lib/resolvers/queries/languages/languagesCount.d.ts +1 -1
  192. package/lib/resolvers/queries/orders/order.d.ts +1 -1
  193. package/lib/resolvers/queries/orders/orders.d.ts +1 -1
  194. package/lib/resolvers/queries/orders/ordersCount.d.ts +1 -1
  195. package/lib/resolvers/queries/payment/paymentProvider.d.ts +1 -1
  196. package/lib/resolvers/queries/payment/paymentProviders.d.ts +1 -1
  197. package/lib/resolvers/queries/payment/paymentProvidersCount.d.ts +1 -1
  198. package/lib/resolvers/queries/products/product.d.ts +1 -1
  199. package/lib/resolvers/queries/products/productCatalogPrices.d.ts +1 -1
  200. package/lib/resolvers/queries/products/productReview.d.ts +1 -1
  201. package/lib/resolvers/queries/products/productReviews.d.ts +1 -1
  202. package/lib/resolvers/queries/products/productReviewsCount.d.ts +1 -1
  203. package/lib/resolvers/queries/products/products.d.ts +1 -1
  204. package/lib/resolvers/queries/products/productsCount.d.ts +1 -1
  205. package/lib/resolvers/queries/products/translatedProductMediaTexts.d.ts +1 -1
  206. package/lib/resolvers/queries/products/translatedProductTexts.d.ts +1 -1
  207. package/lib/resolvers/queries/products/translatedProductVariationTexts.d.ts +1 -1
  208. package/lib/resolvers/queries/quotations/quotation.d.ts +1 -1
  209. package/lib/resolvers/queries/quotations/quotations.d.ts +1 -1
  210. package/lib/resolvers/queries/quotations/quotationsCount.d.ts +1 -1
  211. package/lib/resolvers/queries/users/me.d.ts +1 -1
  212. package/lib/resolvers/queries/users/user.d.ts +1 -1
  213. package/lib/resolvers/queries/users/users.d.ts +1 -1
  214. package/lib/resolvers/queries/users/usersCount.d.ts +1 -1
  215. package/lib/resolvers/queries/warehousing/warehousingProvider.d.ts +1 -1
  216. package/lib/resolvers/queries/warehousing/warehousingProviders.d.ts +1 -1
  217. package/lib/resolvers/queries/warehousing/warehousingProvidersCount.d.ts +1 -1
  218. package/lib/resolvers/queries/worker/activeWorkTypes.d.ts +1 -1
  219. package/lib/resolvers/queries/worker/work.d.ts +1 -1
  220. package/lib/resolvers/queries/worker/workQueueCount.d.ts +1 -1
  221. package/lib/resolvers/type/login-method-response-types.d.ts +1 -19
  222. package/lib/resolvers/type/order/order-delivery-types.d.ts +1 -3
  223. package/lib/resolvers/type/order/order-payment-types.d.ts +1 -3
  224. package/lib/resolvers/type/user-types.d.ts +1 -1
  225. package/lib/user-context.d.ts +1 -1
  226. package/license +274 -0
  227. package/package.json +15 -15
  228. package/src/api-index.ts +9 -3
  229. package/src/context.ts +2 -3
  230. package/src/createBulkImportServer.ts +2 -2
  231. package/src/createGraphQLServer.ts +3 -4
  232. package/src/loaders/index.ts +3 -1
  233. package/src/locale-context.ts +3 -1
  234. package/src/resolvers/queries/index.js +1 -1
  235. package/src/resolvers/type/user-types.ts +1 -1
  236. package/tsconfig.build.json +13 -5
  237. package/.npm/package/README +0 -7
  238. package/.npm/package/npm-shrinkwrap.json +0 -262
  239. package/.versions +0 -27
  240. package/lib/resolvers/queries/delivery/deliveryInterfaces.d.ts +0 -5
  241. package/lib/resolvers/queries/payment/paymentInterfaces.d.ts +0 -5
  242. package/lib/resolvers/queries/warehousing/warehousingInterfaces.d.ts +0 -5
  243. package/lib/resolvers/queries/worker/workQueue.d.ts +0 -14
  244. package/lib/resolvers/type/delivery-provider-types.d.ts +0 -27
  245. package/lib/resolvers/type/payment/payment-provider-types.d.ts +0 -12
  246. package/package.js +0 -33
package/lib/acl.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { CheckPermissionArgs } from '@unchainedshop/types/roles';
2
1
  declare const checkAction: (context: any, action: any, args?: CheckPermissionArgs, options?: any) => Promise<void>;
3
2
  declare const checkResolver: (action: any, userOptions: any) => (fn: any, name: any) => (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
4
3
  declare const checkTypeResolver: (action: any, key: any) => (obj: any, params: any, context: any) => Promise<any>;
@@ -1,4 +1,3 @@
1
- import { UnchainedServerOptions } from '@unchainedshop/types/api';
2
1
  import { createContextResolver, getCurrentContextResolver, setCurrentContextResolver } from './context';
3
2
  export * from './context';
4
3
  export * as acl from './acl';
package/lib/api-index.js CHANGED
@@ -9,15 +9,15 @@ export * as roles from './roles';
9
9
  export { createContextResolver, getCurrentContextResolver, setCurrentContextResolver };
10
10
  const UNCHAINED_API_VERSION = '1.1.3'; // eslint-disable-line
11
11
  export const startAPIServer = (options) => {
12
- const { unchainedAPI, roles, context: customContext, ...apolloServerOptions } = options || {};
12
+ const { unchainedAPI, roles, expressApp, context: customContext, ...apolloServerOptions } = options || {};
13
13
  const contextResolver = createContextResolver(unchainedAPI, roles, UNCHAINED_API_VERSION);
14
14
  setCurrentContextResolver(customContext
15
15
  ? ({ req, res }) => {
16
16
  return customContext({ req, res }, contextResolver);
17
17
  }
18
18
  : contextResolver);
19
- const apolloGraphQLServer = createGraphQLServer(apolloServerOptions);
20
- const bulkImportServer = createBulkImportServer();
19
+ const apolloGraphQLServer = createGraphQLServer(expressApp, apolloServerOptions);
20
+ const bulkImportServer = createBulkImportServer(expressApp);
21
21
  return {
22
22
  apolloGraphQLServer,
23
23
  bulkImportServer,
@@ -1 +1 @@
1
- {"version":3,"file":"api-index.js","sourceRoot":"","sources":["../src/api-index.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAExG,cAAc,WAAW,CAAC;AAC1B,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,CAAC;AAEvF,MAAM,qBAAqB,GAAG,OAAO,CAAC,CAAC,sBAAsB;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAA+B,EAAE,EAAE;IAChE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,mBAAmB,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAE9F,MAAM,eAAe,GAAG,qB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AC,YAAY,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC;IAE1F,yBAAyB,CACvB,aAAa;QACX,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE;YACf,OAAO,aAAa,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;QACtD,CAAC;QACH,CAAC,CAAC,eAAe,CACpB,CAAC;IAEF,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;IACjF,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAE5D,OAAO;QACL,mBAAmB;QACnB,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC"}
package/lib/context.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { UnchainedAPI, UnchainedContextResolver } from '@unchainedshop/types/api';
2
1
  export declare const getCurrentContextResolver: () => UnchainedContextResolver;
3
2
  export declare const setCurrentContextResolver: (newContext: UnchainedContextResolver) => void;
4
3
  export declare const createContextResolver: (unchainedAPI: UnchainedAPI, roles: any, version: string) => UnchainedContextResolver;
5
- export declare const useMiddlewareWithCurrentContext: (path: any, middleware: any) => void;
4
+ export declare const useMiddlewareWithCurrentContext: (expressApp: any, path: any, middleware: any) => void;
package/lib/context.js CHANGED
@@ -1,4 +1,3 @@
1
- import { WebApp } from 'meteor/webapp';
2
1
  import instantiateLoaders from './loaders';
3
2
  import { getLocaleContext } from './locale-context';
4
3
  import { getUserContext } from './user-context';
@@ -23,8 +22,8 @@ export const createContextResolver = (unchainedAPI, roles, version) => async ({
23
22
  version,
24
23
  };
25
24
  };
26
- export const useMiddlewareWithCurrentContext = (path, middleware) => {
27
- WebApp.connectHandlers.use(path, async (req, res, ...rest) => {
25
+ export const useMiddlewareWithCurrentContext = (expressApp, path, middleware) => {
26
+ expressApp.use(path, async (req, res, ...rest) => {
28
27
  req.unchainedContext = await context({ req, res });
29
28
  return middleware(req, res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,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;IAC9E,UAAU,CAAC,GAAG,CACZ,IAAI,EACJ,KAAK,EAAE,GAA0D,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE;QACjF,GAAG,CAAC,gBAAgB,GAAG,MAAM,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QACnD,OAAO,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IACvC,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- declare const _default: () => void;
1
+ declare const _default: (expressApp: any) => void;
2
2
  export default _default;
@@ -75,7 +75,7 @@ const bulkImportMiddleware = async (req, res) => {
75
75
  errorHandler(res)(e);
76
76
  }
77
77
  };
78
- export default () => {
79
- useMiddlewareWithCurrentContext(BULK_IMPORT_API_PATH, bulkImportMiddleware);
78
+ export default (expressApp) => {
79
+ useMiddlewareWithCurrentContext(expressApp, BULK_IMPORT_API_PATH, bulkImportMiddleware);
80
80
  };
81
81
  //# sourceMappingURL=createBulkImportServer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createBulkImportServer.js","sourceRoot":"","sources":["../src/createBulkImportServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,MAAM,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAE7C,MAAM,EAAE,oBAAoB,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAE9D,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,E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,GAAG,CAAC,CAAC;gBACnB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;aAC/B;YAAC,OAAO,CAAC,EAAE;gBACV,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACtB;QACH,CAAC,CAAC,CAAC;KACN;IAAC,OAAO,CAAC,EAAE;QACV,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;KACtB;AACH,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,EAAE,EAAE;IAC5B,+BAA+B,CAAC,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;AAC1F,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { ApolloServer } from 'apollo-server-express';
2
- declare const _default: (options: any) => ApolloServer;
2
+ declare const _default: (expressApp: any, options: any) => ApolloServer;
3
3
  export default _default;
@@ -1,6 +1,5 @@
1
1
  import { ApolloServer, ApolloError } from 'apollo-server-express';
2
2
  import { processRequest } from 'graphql-upload';
3
- import { WebApp } from 'meteor/webapp';
4
3
  import { log, LogLevel } from '@unchainedshop/logger';
5
4
  import typeDefs from './schema';
6
5
  import resolvers from './resolvers';
@@ -26,7 +25,7 @@ const logGraphQLServerError = (error) => {
26
25
  }
27
26
  catch (e) { } // eslint-disable-line
28
27
  };
29
- export default (options) => {
28
+ export default (expressApp, options) => {
30
29
  const { corsOrigins = null, // no cookie handling
31
30
  typeDefs: additionalTypeDefs = [], resolvers: additionalResolvers = [], engine = {}, ...apolloServerOptions } = options || {};
32
31
  const context = getCurrentContextResolver();
@@ -81,8 +80,8 @@ export default (options) => {
81
80
  limit: '5mb',
82
81
  },
83
82
  });
84
- WebApp.connectHandlers.use(handleUploads({ maxFileSize: 10000000, maxFiles: 10 }));
85
- WebApp.connectHandlers.use(middleware);
83
+ expressApp.use(handleUploads({ maxFileSize: 10000000, maxFiles: 10 }));
84
+ expressApp.use(middleware);
86
85
  return server;
87
86
  };
88
87
  //# sourceMappingURL=createGraphQLServer.js.map
@@ -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,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAE1C,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;IAC1D,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,WAAW,IAAI,WAAW,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAC9E,IAAI,QAAQ,EAAE;QACZ,GAAG,CAAC,IAAI,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;KACpD;IACD,IAAI,EAAE,CAAC;AACT,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,EAAE;IACtC,IAAI;QACF,MAAM,EACJ,OAAO,EACP,UAAU,EAAE,EACV,SAAS,EAAE,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,EACxC,GAAG,UAAU,EACd,EACD,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;QACV,GAAG,CAAC,GAAG,OAAO,IAAI,UAAU,IAAI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AAmB;KACvB,CAAC,CAAC;IAEH,MAAM,QAAQ,GACZ,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;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,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;IAC3B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { UnchainedAPI, UnchainedLoaders } from '@unchainedshop/types/api';
1
+ import { 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,6 +1,7 @@
1
1
  import DataLoader from 'dataloader';
2
2
  import { systemLocale } from '@unchainedshop/utils';
3
- import { Locale } from 'locale';
3
+ import localePkg from 'locale';
4
+ const { Locale } = localePkg;
4
5
  export default async (req, unchainedAPI) => {
5
6
  return {
6
7
  assortmentTextLoader: new DataLoader(async (queries) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/loaders/index.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAe,KAAK,EAClB,GAAoB,EACpB,YAA0B,EACY,EAAE;IACxC,OAAO;QACL,oBAAoB,EAAE,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YACrD,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAEvF,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAClE,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,EACxC;gBACE,IAAI,EAAE;oBACJ,YAAY,EAAE,CAAC;iBAChB;aACF,CACF,CAAC;YAEF,MAAM,mBAAmB,GAAG,CAAC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;YAE7E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE;gBAC9C,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;gBACrC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAA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C1E,IAAI,CAAC,YAAY,CAAC,MAAM;oBAAE,OAAO,IAAI,CAAC;gBACtC,MAAM,aAAa,GAAG,CAAC,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC,CAAC;gBAEzF,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE;oBAC7D,IAAI,GAAG;wBAAE,OAAO,GAAG,CAAC;oBACpB,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC;gBAC7D,CAAC,EAAE,IAAI,CAAC,CAAC;gBACT,OAAO,WAAW,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { UnchainedAPI, UnchainedLocaleContext } from '@unchainedshop/types/api';
1
+ import { 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>;
@@ -1,8 +1,9 @@
1
- import { Locales } from 'locale';
1
+ import localePkg from 'locale';
2
2
  import 'abort-controller/polyfill';
3
3
  import LRU from 'lru-cache';
4
4
  import { log, LogLevel } from '@unchainedshop/logger';
5
5
  import { resolveBestCountry, resolveBestSupported, resolveUserRemoteAddress, systemLocale, } from '@unchainedshop/utils';
6
+ const { Locales } = localePkg;
6
7
  const { NODE_ENV } = process.env;
7
8
  const ttl = NODE_ENV === 'production' ? 1000 * 60 : 0; // minute or second
8
9
  const localeContextCache = new LRU({
@@ -1 +1 @@
1
- {"version":3,"file":"locale-context.js","sourceRoot":"","sources":["../src/locale-context.ts"],"names":[],"mappings":"AAEA,OAAO,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,KAAK,EAAE,QAAQ,CAAC,KAAK;KACtB,CAAC,CAAC;IACH,MAAM,UAAU,GAA2B;QACzC,aAAa;QACb,cAAc;KACf,CAAC;IACF,kBAAkB,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,CAAC;AACjE,CAAC,CAAC"}
@@ -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<import("@unchainedshop/types/user").User>;
5
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<string>;
2
+ export default function buildTOTPSecret(root: Root, _: any, { modules, userId }: Context): Promise<any>;
@@ -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: void;
8
+ success: any;
9
9
  }>;
@@ -1,7 +1,3 @@
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<{
4
- id: string;
5
- token: string;
6
- tokenExpires: Date;
7
- }>;
3
+ export default function createUser(root: Root, params: UserData, context: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/user").User>;
5
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/user").User>;
5
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/user").User>;
3
+ export default function enrollUser(root: Root, params: UserData, context: Context): Promise<any>;
@@ -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: boolean;
5
+ success: any;
6
6
  }>;
@@ -1,9 +1,4 @@
1
- import { Context } from '@unchainedshop/types/api';
2
1
  declare const impersonate: (root: any, { userId }: {
3
2
  userId: any;
4
- }, context: Context) => Promise<{
5
- id: string;
6
- token: string;
7
- tokenExpires: Date;
8
- }>;
3
+ }, context: Context) => Promise<any>;
9
4
  export default impersonate;
@@ -1,6 +1,2 @@
1
1
  import { Context, Root } from '@unchainedshop/types/api';
2
- export default function loginAsGuest(root: Root, _: any, context: Context): Promise<{
3
- id: string;
4
- token: string;
5
- tokenExpires: Date;
6
- }>;
2
+ export default function loginAsGuest(root: Root, _: any, context: Context): Promise<any>;
@@ -5,8 +5,4 @@ export default function loginWithPassword(root: Root, params: {
5
5
  password?: string;
6
6
  plainPassword?: string;
7
7
  totpCode?: string;
8
- }, context: Context): Promise<{
9
- id: string;
10
- token: string;
11
- tokenExpires: Date;
12
- }>;
8
+ }, context: Context): Promise<any>;
@@ -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: boolean;
5
+ success: any;
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: boolean;
3
+ success: any;
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<import("@unchainedshop/types/user").User>;
5
+ }, { modules, userId }: Context): Promise<any>;
@@ -3,8 +3,4 @@ export default function resetPassword(root: Root, params: {
3
3
  newPassword?: string;
4
4
  newPlainPassword?: string;
5
5
  token: string;
6
- }, context: Context): Promise<{
7
- id: string;
8
- token: string;
9
- tokenExpires: Date;
10
- }>;
6
+ }, context: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/user").User>;
6
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/user").User>;
5
+ }, { modules, userId }: Context): Promise<any>;
@@ -1,8 +1,4 @@
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<{
5
- id: string;
6
- token: string;
7
- tokenExpires: Date;
8
- }>;
4
+ }, context: Context): Promise<any>;
@@ -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<AssortmentFilter>;
3
+ export default function addAssortmentFilter(root: Root, { assortmentId, filterId, ...assortmentFilter }: AssortmentFilter, { modules, userId }: Context): Promise<any>;
@@ -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<AssortmentLink>;
3
+ export default function addAssortmentLink(root: Root, { parentAssortmentId, childAssortmentId, ...assortmentLink }: AssortmentLink, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments.media").AssortmentMedia>;
5
+ }, context: Context): Promise<any>;
@@ -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<AssortmentProduct>;
3
+ export default function addAssortmentProduct(root: Root, { assortmentId, productId, ...assortmentProduct }: AssortmentProduct, { modules, userId }: Context): Promise<any>;
@@ -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<Assortment>;
8
+ }, { modules, userId, localeContext }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/files").SignedFileUpload>;
5
+ }, context: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").Assortment>;
4
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").AssortmentFilter>;
4
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").AssortmentLink>;
4
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments.media").AssortmentMedia>;
4
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").AssortmentProduct>;
4
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").AssortmentFilter[]>;
7
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").AssortmentLink[]>;
7
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments.media").AssortmentMedia[]>;
7
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").AssortmentProduct[]>;
7
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/assortments").Assortment>;
4
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<Assortment>;
6
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<AssortmentMediaText[]>;
6
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<AssortmentText[]>;
6
+ }, { modules, userId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/bookmarks").Bookmark>;
5
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/bookmarks").Bookmark>;
5
+ }, { modules, userId: currenctUserId }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/bookmarks").Bookmark>;
4
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<Country>;
5
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/countries").Country>;
4
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<Country>;
6
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<Currency>;
5
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<import("@unchainedshop/types/currencies").Currency>;
4
+ }, { userId, modules }: Context): Promise<any>;
@@ -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<Currency>;
6
+ }, { userId, modules }: Context): Promise<any>;