@unchainedshop/api 1.2.48 → 1.2.50

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 (67) hide show
  1. package/lib/createGraphQLServer.js +0 -3
  2. package/lib/createGraphQLServer.js.map +1 -1
  3. package/lib/loaders/index.js +1 -0
  4. package/lib/loaders/index.js.map +1 -1
  5. package/lib/resolvers/mutations/assortments/removeAssortment.js +1 -1
  6. package/lib/resolvers/mutations/assortments/removeAssortment.js.map +1 -1
  7. package/lib/resolvers/mutations/assortments/removeAssortmentFilter.js +1 -1
  8. package/lib/resolvers/mutations/assortments/removeAssortmentFilter.js.map +1 -1
  9. package/lib/resolvers/mutations/assortments/removeAssortmentLink.js +1 -1
  10. package/lib/resolvers/mutations/assortments/removeAssortmentLink.js.map +1 -1
  11. package/lib/resolvers/mutations/assortments/removeAssortmentProduct.js +1 -1
  12. package/lib/resolvers/mutations/assortments/removeAssortmentProduct.js.map +1 -1
  13. package/lib/resolvers/mutations/enrollments/updateEnrollment.d.ts +1 -1
  14. package/lib/resolvers/mutations/filters/removeFilter.js +1 -1
  15. package/lib/resolvers/mutations/filters/removeFilter.js.map +1 -1
  16. package/lib/resolvers/mutations/pageView.d.ts +1 -1
  17. package/lib/resolvers/mutations/pageView.js +2 -2
  18. package/lib/resolvers/mutations/pageView.js.map +1 -1
  19. package/lib/resolvers/mutations/products/removeProduct.d.ts +1 -1
  20. package/lib/resolvers/mutations/products/removeProduct.js +5 -8
  21. package/lib/resolvers/mutations/products/removeProduct.js.map +1 -1
  22. package/lib/resolvers/type/assortment/assortment-filter-types.d.ts +2 -2
  23. package/lib/resolvers/type/assortment/assortment-link-types.d.ts +2 -2
  24. package/lib/resolvers/type/assortment/assortment-media-types.d.ts +1 -1
  25. package/lib/resolvers/type/assortment/assortment-path-link-types.d.ts +1 -1
  26. package/lib/resolvers/type/assortment/assortment-product-types.d.ts +2 -2
  27. package/lib/resolvers/type/assortment/assortment-types.d.ts +1 -1
  28. package/lib/resolvers/type/bookmark-types.d.ts +1 -1
  29. package/lib/resolvers/type/country-types.d.ts +1 -1
  30. package/lib/resolvers/type/delivery-provider-types.d.ts +1 -1
  31. package/lib/resolvers/type/enrollment/enrollment-delivery-types.d.ts +2 -2
  32. package/lib/resolvers/type/enrollment/enrollment-payment-types.d.ts +2 -2
  33. package/lib/resolvers/type/enrollment/enrollment-period-types.d.ts +2 -2
  34. package/lib/resolvers/type/enrollment/enrollment-plan-tyes.d.ts +2 -2
  35. package/lib/resolvers/type/enrollment/enrollment-types.d.ts +2 -2
  36. package/lib/resolvers/type/event-types.d.ts +1 -1
  37. package/lib/resolvers/type/filter/filter-option-types.d.ts +2 -2
  38. package/lib/resolvers/type/filter/filter-types.d.ts +2 -2
  39. package/lib/resolvers/type/order/order-delivery-discount-types.d.ts +1 -1
  40. package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +1 -1
  41. package/lib/resolvers/type/order/order-delivery-shipping-types.d.ts +1 -1
  42. package/lib/resolvers/type/order/order-discount-types.d.ts +1 -1
  43. package/lib/resolvers/type/order/order-global-discount-types.d.ts +1 -1
  44. package/lib/resolvers/type/order/order-item-discount-types.d.ts +1 -1
  45. package/lib/resolvers/type/order/order-item-types.d.ts +1 -1
  46. package/lib/resolvers/type/order/order-payment-card-types.d.ts +1 -1
  47. package/lib/resolvers/type/order/order-payment-discount-types.d.ts +1 -1
  48. package/lib/resolvers/type/order/order-payment-generic-types.d.ts +1 -1
  49. package/lib/resolvers/type/order/order-payment-invoice-types.d.ts +1 -1
  50. package/lib/resolvers/type/order/order-types.d.ts +1 -1
  51. package/lib/resolvers/type/price-types.d.ts +1 -1
  52. package/lib/resolvers/type/product/product-discount.d.ts +1 -1
  53. package/lib/resolvers/type/product/product-review-types.d.ts +1 -1
  54. package/lib/resolvers/type/quotation-types.d.ts +2 -2
  55. package/lib/resolvers/type/shop-types.d.ts +1 -1
  56. package/lib/resolvers/type/user-types.d.ts +1 -1
  57. package/lib/resolvers/type/work-types.d.ts +1 -1
  58. package/package.json +9 -9
  59. package/src/createGraphQLServer.ts +0 -4
  60. package/src/loaders/index.ts +1 -0
  61. package/src/resolvers/mutations/assortments/removeAssortment.ts +1 -1
  62. package/src/resolvers/mutations/assortments/removeAssortmentFilter.ts +1 -1
  63. package/src/resolvers/mutations/assortments/removeAssortmentLink.ts +1 -1
  64. package/src/resolvers/mutations/assortments/removeAssortmentProduct.ts +1 -1
  65. package/src/resolvers/mutations/filters/removeFilter.ts +1 -1
  66. package/src/resolvers/mutations/pageView.js +2 -2
  67. package/src/resolvers/mutations/products/removeProduct.ts +6 -8
@@ -70,9 +70,6 @@ export default (expressApp, options) => {
70
70
  }
71
71
  }
72
72
  : corsOrigins;
73
- // server.start().then(() => {
74
- //
75
- // });
76
73
  const middleware = server.getMiddleware({
77
74
  path: '/graphql',
78
75
  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,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,CA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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"}
@@ -49,6 +49,7 @@ export default async (req, unchainedAPI) => {
49
49
  const filterIds = [...new Set(queries.map((q) => q.filterId).filter(Boolean))];
50
50
  const filters = await unchainedAPI.modules.filters.findFilters({
51
51
  filterIds,
52
+ includeInactive: true,
52
53
  });
53
54
  return queries.map(({ filterId }) => {
54
55
  return filters.find((product) => {
@@ -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,SAAS,MAAM,QAAQ,CAAC;AAK/B,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;AAE7B,eAAe,KAAK,EAClB,GAAoB,EACpB,YAA2B,EACW,EAAE;IACxC,OAAO;QACL,gBAAgB,EAAE,IAAI,UAAU,CAC9B,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,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,WAAW,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC;gBACzE,aAAa;gB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CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;gBAC1E,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;oBAC1E,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,CACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -7,7 +7,7 @@ export default async function removeAssortment(root, { assortmentId }, { modules
7
7
  const assortment = await modules.assortments.findAssortment({ assortmentId });
8
8
  if (!assortment)
9
9
  throw new AssortmentNotFoundError({ assortmentId });
10
- await modules.assortments.delete(assortmentId, { skipInvalidation: false }, userId);
10
+ await modules.assortments.delete(assortmentId, { skipInvalidation: false });
11
11
  return assortment;
12
12
  }
13
13
  //# sourceMappingURL=removeAssortment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeAssortment.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC5C,IAAU,EACV,EAAE,YAAY,EAA4B,EAC1C,EAAE,OAAO,EAAE,MAAM,EA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AAC,YAAY,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;IAE5E,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -11,7 +11,7 @@ export default async function removeAssortmentFilter(root, { assortmentFilterId
11
11
  });
12
12
  if (!assortmentFilter)
13
13
  throw new AssortmentFilterNotFoundError({ assortmentFilterId });
14
- await modules.assortments.filters.delete(assortmentFilterId, userId);
14
+ await modules.assortments.filters.delete(assortmentFilterId);
15
15
  return assortmentFilter;
16
16
  }
17
17
  //# sourceMappingURL=removeAssortmentFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeAssortmentFilter.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortmentFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhF,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB,CAClD,IAAU,EACV,EAAE,kBAAkB,EAAkC,EACtD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,mCAAmC,kBAAkB,EAAE,EAAE;QAC3D,MAAM;KACP,CAAC,CAAC;IACH,IAAI,CAAC,kBAAkB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAE1E,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;QACpE,kBAAkB;KACnB,CAAC,CAAC;IAEH,IAAI,CAAC,gBAAgB;QAAE,MAAM,IAAI,6BAA6B,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAEvF,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAErE,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
1
+ {"version":3,"file":"removeAssortmentFilter.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortmentFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhF,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB,CAClD,IAAU,EACV,EAAE,kBAAkB,EAAkC,EACtD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,mCAAmC,kBAAkB,EAAE,EAAE;QAC3D,MAAM;KACP,CAAC,CAAC;IACH,IAAI,CAAC,kBAAkB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAE1E,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;QACpE,kBAAkB;KACnB,CAAC,CAAC;IAEH,IAAI,CAAC,gBAAgB;QAAE,MAAM,IAAI,6BAA6B,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAEvF,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAE7D,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -9,7 +9,7 @@ export default async function removeAssortmentLink(root, { assortmentLinkId }, {
9
9
  });
10
10
  if (!assortmentLink)
11
11
  throw new AssortmentLinkNotFoundError({ assortmentLinkId });
12
- await modules.assortments.links.delete(assortmentLinkId, { skipInvalidation: false }, userId);
12
+ await modules.assortments.links.delete(assortmentLinkId, { skipInvalidation: false });
13
13
  return assortmentLink;
14
14
  }
15
15
  //# sourceMappingURL=removeAssortmentLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeAssortmentLink.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortmentLink.ts"],"names":[],"mappings":"AAAA,O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MAAM,IAAI,cAAc,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEtE,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9D,gBAAgB;KACjB,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc;QAAE,MAAM,IAAI,2BAA2B,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEjF,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;IAEtF,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -11,7 +11,7 @@ export default async function removeAssortmentProduct(root, { assortmentProductI
11
11
  });
12
12
  if (!assortmentProduct)
13
13
  throw new AssortmentProductNotFoundError({ assortmentProductId });
14
- await modules.assortments.products.delete(assortmentProductId, { skipInvalidation: false }, userId);
14
+ await modules.assortments.products.delete(assortmentProductId, { skipInvalidation: false });
15
15
  return assortmentProduct;
16
16
  }
17
17
  //# sourceMappingURL=removeAssortmentProduct.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeAssortmentProduct.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/assortments/removeAssortmentProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjF,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,uBAAuB,CACnD,IAAU,EACV,EAAE,mBAAmB,EAAmC,EACxD,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,oCAAoC,mBAAmB,EAAE,EAAE;QAC7D,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,CAAC,mBAAmB;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC;IAE5E,MAAM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CAAC;AAC3B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Context, Root } from '@unchainedshop/types/api';
2
2
  import { EnrollmentPlan, Enrollment } from '@unchainedshop/types/enrollments';
3
3
  import { Address, Contact } from '@unchainedshop/types/common';
4
- declare type UpdateEnrollmentParams = {
4
+ type UpdateEnrollmentParams = {
5
5
  enrollmentId: string;
6
6
  contact?: Contact;
7
7
  plan: EnrollmentPlan;
@@ -8,7 +8,7 @@ export default async function removeFilter(root, { filterId }, requestContext) {
8
8
  const filter = await modules.filters.findFilter({ filterId });
9
9
  if (!filter)
10
10
  throw new FilterNotFoundError({ filterId });
11
- await modules.assortments.filters.deleteMany({ filterId }, userId);
11
+ await modules.assortments.filters.deleteMany({ filterId });
12
12
  await modules.filters.delete(filterId, userId);
13
13
  return filter;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"removeFilter.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/filters/removeFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,YAAY,CACxC,IAAU,EACV,EAAE,QAAQ,EAAwB,EAClC,cAAuB;IAEvB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC;IAC3C,GAAG,CAAC,yBAAyB,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAErD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEzD,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IACnE,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE/C,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"removeFilter.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/filters/removeFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,YAAY,CACxC,IAAU,EACV,EAAE,QAAQ,EAAwB,EAClC,cAAuB;IAEvB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC;IAC3C,GAAG,CAAC,yBAAyB,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAErD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEzD,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3D,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE/C,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -3,5 +3,5 @@ declare function _default(root: any, { path, referrer }: {
3
3
  referrer: any;
4
4
  }, { userId }: {
5
5
  userId: any;
6
- }): any;
6
+ }): Promise<any>;
7
7
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import { log } from '@unchainedshop/logger';
2
2
  import { emit } from '@unchainedshop/events';
3
- export default (root, { path, referrer }, { userId }) => {
3
+ export default async (root, { path, referrer }, { userId }) => {
4
4
  log(`mutation pageView ${path} ${referrer}`, { userId });
5
- emit('PAGE_VIEW', {
5
+ await emit('PAGE_VIEW', {
6
6
  path,
7
7
  referrer,
8
8
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pageView.js","sourceRoot":"","sources":["../../../src/resolvers/mutations/pageView.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,eAAe,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,GAAG,CAAC,qBAAqB,IAAI,IAAI,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEzD,IAAI,CAAC,WAAW,EAAE;QAChB,IAAI;QACJ,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
1
+ {"version":3,"file":"pageView.js","sourceRoot":"","sources":["../../../src/resolvers/mutations/pageView.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,eAAe,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAC5D,GAAG,CAAC,qBAAqB,IAAI,IAAI,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEzD,MAAM,IAAI,CAAC,WAAW,EAAE;QACtB,IAAI;QACJ,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { Context, Root } from '@unchainedshop/types/api';
2
2
  export default function removeProduct(root: Root, { productId }: {
3
3
  productId: string;
4
- }, { modules, userId }: Context): Promise<import("@unchainedshop/types/products").Product>;
4
+ }, context: Context): Promise<import("@unchainedshop/types/products").Product>;
@@ -1,16 +1,13 @@
1
1
  import { log } from '@unchainedshop/logger';
2
- import { ProductNotFoundError, ProductWrongStatusError, InvalidIdError } from '../../../errors';
3
- export default async function removeProduct(root, { productId }, { modules, userId }) {
2
+ import { ProductNotFoundError, InvalidIdError } from '../../../errors';
3
+ export default async function removeProduct(root, { productId }, context) {
4
+ const { modules, services, userId } = context;
4
5
  log(`mutation removeProduct ${productId}`, { userId });
5
6
  if (!productId)
6
7
  throw new InvalidIdError({ productId });
7
- const product = await modules.products.findProduct({ productId });
8
- if (!product)
8
+ if (!(await modules.products.productExists({ productId })))
9
9
  throw new ProductNotFoundError({ productId });
10
- if (!modules.products.isDraft(product))
11
- throw new ProductWrongStatusError({ status: product.status });
12
- await modules.assortments.products.delete(productId, {}, userId);
13
- await modules.products.delete(productId, userId);
10
+ await services.products.removeProduct({ productId, userId: context.userId }, context);
14
11
  return modules.products.findProduct({ productId });
15
12
  }
16
13
  //# sourceMappingURL=removeProduct.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeProduct.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/removeProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,IAAU,EACV,EAAE,SAAS,EAAyB,EACpC,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,0BA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SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QACxD,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAEhD,MAAM,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAEtF,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AACrD,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Assortment, AssortmentFilter as AssortmentFilterType } from '@unchainedshop/types/assortments';
3
3
  import { Filter } from '@unchainedshop/types/filters';
4
- declare type HelperType<T> = (assortmentFilter: AssortmentFilterType, _: never, context: Context) => T;
5
- declare type AssortmentFilterHelperTypes = {
4
+ type HelperType<T> = (assortmentFilter: AssortmentFilterType, _: never, context: Context) => T;
5
+ type AssortmentFilterHelperTypes = {
6
6
  assortment: HelperType<Promise<Assortment>>;
7
7
  filter: HelperType<Promise<Filter>>;
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Assortment, AssortmentLink as AssortmentLinkType } from '@unchainedshop/types/assortments';
3
- declare type HelperType<T> = (assortmentLink: AssortmentLinkType, _: never, context: Context) => T;
4
- declare type AssortmentLinkHelperTypes = {
3
+ type HelperType<T> = (assortmentLink: AssortmentLinkType, _: never, context: Context) => T;
4
+ type AssortmentLinkHelperTypes = {
5
5
  child: HelperType<Promise<Assortment>>;
6
6
  parent: HelperType<Promise<Assortment>>;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { AssortmentMedia as AssortmentMediaType, AssortmentMediaText } from '@unchainedshop/types/assortments.media';
3
3
  import { File } from '@unchainedshop/types/files';
4
- declare type HelperType<P, T> = (assortmentMedia: AssortmentMediaType, params: P, context: Context) => T;
4
+ type HelperType<P, T> = (assortmentMedia: AssortmentMediaType, params: P, context: Context) => T;
5
5
  export interface AssortmentMediaHelperTypes {
6
6
  texts: HelperType<{
7
7
  forceLocale?: string;
@@ -1,6 +1,6 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { AssortmentPathLink as AssortmentPathLinkType, AssortmentLink as AssortmentLinkType, AssortmentText } from '@unchainedshop/types/assortments';
3
- declare type HelperType<P, T> = (assortmentPathLink: AssortmentPathLinkType, params: P, context: Context) => T;
3
+ type HelperType<P, T> = (assortmentPathLink: AssortmentPathLinkType, params: P, context: Context) => T;
4
4
  export interface AssortmentPathLinkHelperTypes {
5
5
  link: HelperType<never, Promise<AssortmentLinkType>>;
6
6
  assortmentSlug: HelperType<{
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Assortment, AssortmentProduct as AssortmentProductType } from '@unchainedshop/types/assortments';
3
3
  import { Product } from '@unchainedshop/types/products';
4
- declare type HelperType<T> = (assortmentProduct: AssortmentProductType, _: never, context: Context) => T;
5
- declare type AssortmentProductHelperTypes = {
4
+ type HelperType<T> = (assortmentProduct: AssortmentProductType, _: never, context: Context) => T;
5
+ type AssortmentProductHelperTypes = {
6
6
  assortment: HelperType<Promise<Assortment>>;
7
7
  product: HelperType<Promise<Product>>;
8
8
  };
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { Assortment as AssortmentType, AssortmentFilter, AssortmentLink, AssortmentPathLink, AssortmentProduct, AssortmentText } from '@unchainedshop/types/assortments';
3
3
  import { AssortmentMedia } from '@unchainedshop/types/assortments.media';
4
4
  import { SearchFilterQuery, SearchProducts } from '@unchainedshop/types/filters';
5
- declare type HelperType<P, T> = (assortment: AssortmentType, params: P, context: Context) => T;
5
+ type HelperType<P, T> = (assortment: AssortmentType, params: P, context: Context) => T;
6
6
  export interface AssortmentHelperTypes {
7
7
  assortmentPaths: HelperType<never, Promise<Array<{
8
8
  links: Array<AssortmentPathLink>;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { Bookmark as BookmarkType } from '@unchainedshop/types/bookmarks';
3
3
  import { Product } from '@unchainedshop/types/products';
4
4
  import { User } from '@unchainedshop/types/user';
5
- export declare type HelperType<T> = (bookmark: BookmarkType, _: never, context: Context) => T;
5
+ export type HelperType<T> = (bookmark: BookmarkType, _: never, context: Context) => T;
6
6
  export interface BookmarkHelperTypes {
7
7
  product: HelperType<Promise<Product>>;
8
8
  user: HelperType<Promise<User>>;
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Country as CountryType } from '@unchainedshop/types/countries';
3
3
  import { Currency } from '@unchainedshop/types/currencies';
4
- export declare type HelperType<P, T> = (country: CountryType, params: P, context: Context) => T;
4
+ export type HelperType<P, T> = (country: CountryType, params: P, context: Context) => T;
5
5
  export interface CountryHelperTypes {
6
6
  flagEmoji: HelperType<never, string>;
7
7
  isBase: HelperType<never, boolean>;
@@ -1,6 +1,6 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { DeliveryError, DeliveryProvider as DeliveryProviderType } from '@unchainedshop/types/delivery';
3
- export declare type HelperType<P, T> = (provider: DeliveryProviderType, params: P, context: Context) => T;
3
+ export type HelperType<P, T> = (provider: DeliveryProviderType, params: P, context: Context) => T;
4
4
  export interface DeliveryProviderHelperTypes {
5
5
  interface: HelperType<never, {
6
6
  _id: string;
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { DeliveryProvider } from '@unchainedshop/types/delivery';
3
3
  import { Enrollment } from '@unchainedshop/types/enrollments';
4
- declare type HelperType<T> = (enrollmentDelivery: Enrollment['delivery'], _: never, context: Context) => T;
5
- declare type EnrollmentDeliveryHelperTypes = {
4
+ type HelperType<T> = (enrollmentDelivery: Enrollment['delivery'], _: never, context: Context) => T;
5
+ type EnrollmentDeliveryHelperTypes = {
6
6
  provider: HelperType<Promise<DeliveryProvider>>;
7
7
  };
8
8
  export declare const EnrollmentDelivery: EnrollmentDeliveryHelperTypes;
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { PaymentProvider } from '@unchainedshop/types/payments';
3
3
  import { Enrollment } from '@unchainedshop/types/enrollments';
4
- declare type HelperType<T> = (enrollmentPayment: Enrollment['payment'], _: never, context: Context) => T;
5
- declare type EnrollmentPaymentHelperTypes = {
4
+ type HelperType<T> = (enrollmentPayment: Enrollment['payment'], _: never, context: Context) => T;
5
+ type EnrollmentPaymentHelperTypes = {
6
6
  provider: HelperType<Promise<PaymentProvider>>;
7
7
  };
8
8
  export declare const EnrollmentPayment: EnrollmentPaymentHelperTypes;
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { EnrollmentPeriod as EnrollmentPeriodType } from '@unchainedshop/types/enrollments';
3
3
  import { Order } from '@unchainedshop/types/orders';
4
- declare type HelperType<T> = (enrollmentPeriod: EnrollmentPeriodType, _: never, context: Context) => T;
5
- declare type EnrollmentPeriodHelperTypes = {
4
+ type HelperType<T> = (enrollmentPeriod: EnrollmentPeriodType, _: never, context: Context) => T;
5
+ type EnrollmentPeriodHelperTypes = {
6
6
  order: HelperType<Promise<Order>>;
7
7
  };
8
8
  export declare const EnrollmentPeriod: EnrollmentPeriodHelperTypes;
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { EnrollmentPlan as EnrollmentPlanType } from '@unchainedshop/types/enrollments';
3
3
  import { Product } from '@unchainedshop/types/products';
4
- declare type HelperType<T> = (enrollmentPlan: EnrollmentPlanType, _: never, context: Context) => T;
5
- declare type EnrollmentPlanHelperTypes = {
4
+ type HelperType<T> = (enrollmentPlan: EnrollmentPlanType, _: never, context: Context) => T;
5
+ type EnrollmentPlanHelperTypes = {
6
6
  product: HelperType<Promise<Product>>;
7
7
  };
8
8
  export declare const EnrollmentPlan: EnrollmentPlanHelperTypes;
@@ -3,8 +3,8 @@ import { Country } from '@unchainedshop/types/countries';
3
3
  import { Currency } from '@unchainedshop/types/currencies';
4
4
  import { Enrollment as EnrollmentType, EnrollmentPlan } from '@unchainedshop/types/enrollments';
5
5
  import { User } from '@unchainedshop/types/user';
6
- declare type HelperType<P, T> = (enrollment: EnrollmentType, params: P, context: Context) => T;
7
- declare type EnrollmentHelperTypes = {
6
+ type HelperType<P, T> = (enrollment: EnrollmentType, params: P, context: Context) => T;
7
+ type EnrollmentHelperTypes = {
8
8
  isExpired: HelperType<{
9
9
  referenceDate?: Date;
10
10
  }, boolean>;
@@ -1,6 +1,6 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Event as EventType } from '@unchainedshop/types/events';
3
- export declare type HelperType<P, T> = (work: EventType, params: P, context: Context) => T;
3
+ export type HelperType<P, T> = (work: EventType, params: P, context: Context) => T;
4
4
  export interface EventHelperTypes {
5
5
  type: HelperType<never, string>;
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { FilterOption as FilterOptionType, FilterText } from '@unchainedshop/types/filters';
3
- declare type HelperType<P, T> = (filterOption: FilterOptionType, params: P, context: Context) => T;
4
- declare type FilterOptionHelperTypes = {
3
+ type HelperType<P, T> = (filterOption: FilterOptionType, params: P, context: Context) => T;
4
+ type FilterOptionHelperTypes = {
5
5
  _id: HelperType<never, string>;
6
6
  texts: HelperType<{
7
7
  forceLocale?: string;
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Filter as FilterType, FilterOption, FilterText } from '@unchainedshop/types/filters';
3
- declare type HelperType<P, T> = (filter: FilterType, params: P, context: Context) => T;
4
- declare type FilterHelperTypes = {
3
+ type HelperType<P, T> = (filter: FilterType, params: P, context: Context) => T;
4
+ type FilterHelperTypes = {
5
5
  options: HelperType<never, Array<FilterOption>>;
6
6
  texts: HelperType<{
7
7
  forceLocale?: string;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { OrderDeliveryDiscount as OrderDeliveryDiscountType } from '@unchainedshop/types/orders.deliveries';
3
3
  import { OrderDiscount } from '@unchainedshop/types/orders.discounts';
4
4
  import { OrderPrice } from '@unchainedshop/types/orders.pricing';
5
- declare type HelperType<P, T> = (orderDelivery: OrderDeliveryDiscountType, params: P, context: Context) => T;
5
+ type HelperType<P, T> = (orderDelivery: OrderDeliveryDiscountType, params: P, context: Context) => T;
6
6
  interface OrderDeliveryDiscountHelperTypes {
7
7
  _id: HelperType<never, string>;
8
8
  orderDiscount: HelperType<never, Promise<OrderDiscount>>;
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { DeliveryLocation, DeliveryProvider } from '@unchainedshop/types/delivery';
3
3
  import { OrderDelivery, OrderDeliveryDiscount } from '@unchainedshop/types/orders.deliveries';
4
- declare type HelperType<T> = (orderDelivery: OrderDelivery, _: never, context: Context) => T;
4
+ type HelperType<T> = (orderDelivery: OrderDelivery, _: never, context: Context) => T;
5
5
  export interface OrderDeliveryPickupHelperTypes {
6
6
  activePickUpLocation: HelperType<Promise<DeliveryLocation>>;
7
7
  discounts: HelperType<Promise<Array<OrderDeliveryDiscount>>>;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { Address } from '@unchainedshop/types/common';
3
3
  import { DeliveryProvider } from '@unchainedshop/types/delivery';
4
4
  import { OrderDelivery, OrderDeliveryDiscount } from '@unchainedshop/types/orders.deliveries';
5
- declare type HelperType<T> = (orderDelivery: OrderDelivery, _: never, context: Context) => T;
5
+ type HelperType<T> = (orderDelivery: OrderDelivery, _: never, context: Context) => T;
6
6
  interface OrderDeliveryShippingHelperTypes {
7
7
  address: HelperType<Address>;
8
8
  discounts: HelperType<Promise<Array<OrderDeliveryDiscount>>>;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { Order } from '@unchainedshop/types/orders';
3
3
  import { OrderDiscount as OrderDiscountType } from '@unchainedshop/types/orders.discounts';
4
4
  import { OrderPrice, OrderPricingDiscount } from '@unchainedshop/types/orders.pricing';
5
- declare type HelperType<P, T> = (orderDiscount: OrderDiscountType, params: P, context: Context) => T;
5
+ type HelperType<P, T> = (orderDiscount: OrderDiscountType, params: P, context: Context) => T;
6
6
  interface OrderDiscountHelperTypes {
7
7
  interface: HelperType<never, Promise<{
8
8
  _id: string;
@@ -2,7 +2,7 @@ import { OrderPrice } from '@unchainedshop/types/orders.pricing';
2
2
  import { Order } from '@unchainedshop/types/orders';
3
3
  import { OrderDiscount } from '@unchainedshop/types/orders.discounts';
4
4
  import { Context } from '@unchainedshop/types/api';
5
- declare type HelperType<P, T> = (orderGlobalDiscount: OrderPrice & {
5
+ type HelperType<P, T> = (orderGlobalDiscount: OrderPrice & {
6
6
  order: Order;
7
7
  discountId: string;
8
8
  }, params: P, context: Context) => T;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { OrderDiscount } from '@unchainedshop/types/orders.discounts';
3
3
  import { OrderPositionDiscount } from '@unchainedshop/types/orders.positions';
4
4
  import { OrderPrice } from '@unchainedshop/types/orders.pricing';
5
- declare type HelperType<P, T> = (orderPositionDiscount: OrderPositionDiscount, params: P, context: Context) => T;
5
+ type HelperType<P, T> = (orderPositionDiscount: OrderPositionDiscount, params: P, context: Context) => T;
6
6
  interface OrderItemDiscountHelperTypes {
7
7
  _id: HelperType<never, string>;
8
8
  orderDiscount: HelperType<never, Promise<OrderDiscount>>;
@@ -6,7 +6,7 @@ import { OrderPrice } from '@unchainedshop/types/orders.pricing';
6
6
  import { Product } from '@unchainedshop/types/products';
7
7
  import { Quotation } from '@unchainedshop/types/quotations';
8
8
  import { WarehousingProvider } from '@unchainedshop/types/warehousing';
9
- declare type HelperType<P, T> = (orderPosition: OrderPosition, params: P, context: Context) => T;
9
+ type HelperType<P, T> = (orderPosition: OrderPosition, params: P, context: Context) => T;
10
10
  interface OrderItemHelperTypes {
11
11
  discounts: HelperType<never, Promise<Array<OrderPositionDiscount>>>;
12
12
  dispatches: HelperType<never, Promise<Array<{
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { OrderPayment, OrderPaymentDiscount } from '@unchainedshop/types/orders.payments';
3
3
  import { PaymentProvider } from '@unchainedshop/types/payments';
4
- declare type HelperType<T> = (orderPayment: OrderPayment, _: never, context: Context) => T;
4
+ type HelperType<T> = (orderPayment: OrderPayment, _: never, context: Context) => T;
5
5
  interface OrderPaymentCardHelperTypes {
6
6
  discounts: HelperType<Promise<Array<OrderPaymentDiscount>>>;
7
7
  provider: HelperType<Promise<PaymentProvider>>;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { OrderDiscount } from '@unchainedshop/types/orders.discounts';
3
3
  import { OrderPayment } from '@unchainedshop/types/orders.payments';
4
4
  import { OrderPrice } from '@unchainedshop/types/orders.pricing';
5
- declare type HelperType<P, T> = (orderDelivery: OrderPrice & {
5
+ type HelperType<P, T> = (orderDelivery: OrderPrice & {
6
6
  discountId: string;
7
7
  item: OrderPayment;
8
8
  }, params: P, context: Context) => T;
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { OrderPayment, OrderPaymentDiscount } from '@unchainedshop/types/orders.payments';
3
3
  import { PaymentProvider } from '@unchainedshop/types/payments';
4
- declare type HelperType<P, T> = (orderPayment: OrderPayment, params: P, context: Context) => T;
4
+ type HelperType<P, T> = (orderPayment: OrderPayment, params: P, context: Context) => T;
5
5
  interface OrderPaymentGenericHelperTypes {
6
6
  discounts: HelperType<never, Promise<Array<OrderPaymentDiscount>>>;
7
7
  provider: HelperType<never, Promise<PaymentProvider>>;
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { OrderPayment, OrderPaymentDiscount } from '@unchainedshop/types/orders.payments';
3
3
  import { PaymentProvider } from '@unchainedshop/types/payments';
4
- declare type HelperType<T> = (orderPayment: OrderPayment, _: never, context: Context) => T;
4
+ type HelperType<T> = (orderPayment: OrderPayment, _: never, context: Context) => T;
5
5
  interface OrderPaymentInvoiceHelperTypes {
6
6
  discounts: HelperType<Promise<Array<OrderPaymentDiscount>>>;
7
7
  provider: HelperType<Promise<PaymentProvider>>;
@@ -12,7 +12,7 @@ import { OrderPosition } from '@unchainedshop/types/orders.positions';
12
12
  import { OrderPrice } from '@unchainedshop/types/orders.pricing';
13
13
  import { PaymentProvider } from '@unchainedshop/types/payments';
14
14
  import { User } from '@unchainedshop/types/user';
15
- declare type HelperType<P, T> = (order: OrderType, params: P, context: Context) => T;
15
+ type HelperType<P, T> = (order: OrderType, params: P, context: Context) => T;
16
16
  interface OrderHelperTypes {
17
17
  supportedDeliveryProviders: HelperType<never, Promise<Array<DeliveryProvider>>>;
18
18
  supportedPaymentProviders: HelperType<never, Promise<Array<PaymentProvider>>>;
@@ -1,4 +1,4 @@
1
- declare type PriceType = {
1
+ type PriceType = {
2
2
  _id?: string;
3
3
  isTaxable?: boolean;
4
4
  isNetPrice?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { ProductDiscount as ProductDiscountType } from '@unchainedshop/types/products';
3
- declare type HelperType<T> = (product: ProductDiscountType, _: never, context: Context) => T;
3
+ type HelperType<T> = (product: ProductDiscountType, _: never, context: Context) => T;
4
4
  export interface ProductDiscountHelperTypes {
5
5
  interface: HelperType<Promise<{
6
6
  _id: string;
@@ -2,7 +2,7 @@ import { Context } from '@unchainedshop/types/api';
2
2
  import { Product } from '@unchainedshop/types/products';
3
3
  import { ProductReview as ProductReviewType, ProductReviewVoteType, ProductVote } from '@unchainedshop/types/products.reviews';
4
4
  import { User } from '@unchainedshop/types/user';
5
- declare type HelperType<P, T> = (product: ProductReviewType, params: P, context: Context) => T;
5
+ type HelperType<P, T> = (product: ProductReviewType, params: P, context: Context) => T;
6
6
  export interface ProductReviewHelperTypes {
7
7
  author: HelperType<never, Promise<User>>;
8
8
  product: HelperType<never, Promise<Product>>;
@@ -5,8 +5,8 @@ import { Product } from '@unchainedshop/types/products';
5
5
  import { Country } from '@unchainedshop/types/countries';
6
6
  import { Currency } from '@unchainedshop/types/currencies';
7
7
  import { File } from '@unchainedshop/types/files';
8
- declare type HelperType<P, T> = (quotation: QuotationType, params: P, context: Context) => T;
9
- declare type QuotationHelperTypes = {
8
+ type HelperType<P, T> = (quotation: QuotationType, params: P, context: Context) => T;
9
+ type QuotationHelperTypes = {
10
10
  country: HelperType<never, Promise<Country>>;
11
11
  currency: HelperType<never, Promise<Currency>>;
12
12
  documents: HelperType<{
@@ -1,7 +1,7 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Country } from '@unchainedshop/types/countries';
3
3
  import { Language } from '@unchainedshop/types/languages';
4
- declare type HelperType<T> = (root: never, params: never, context: Context) => Promise<T>;
4
+ type HelperType<T> = (root: never, params: never, context: Context) => Promise<T>;
5
5
  interface ShopHelperTypes {
6
6
  _id: () => string;
7
7
  country: HelperType<Country>;
@@ -10,7 +10,7 @@ import { PaymentCredentials } from '@unchainedshop/types/payments';
10
10
  import { Quotation } from '@unchainedshop/types/quotations';
11
11
  import { Email, User as UserType, UserProfile } from '@unchainedshop/types/user';
12
12
  import type { Locale } from 'locale';
13
- declare type HelperType<P, T> = (user: UserType, params: P, context: Context) => Promise<T>;
13
+ type HelperType<P, T> = (user: UserType, params: P, context: Context) => Promise<T>;
14
14
  export interface UserHelperTypes {
15
15
  _id: HelperType<any, boolean>;
16
16
  avatar: HelperType<{
@@ -1,6 +1,6 @@
1
1
  import { Context } from '@unchainedshop/types/api';
2
2
  import { Work as WorkType } from '@unchainedshop/types/worker';
3
- declare type HelperType<P, T> = (work: WorkType, params: P, context: Context) => T;
3
+ type HelperType<P, T> = (work: WorkType, params: P, context: Context) => T;
4
4
  export interface WorkHelperTypes {
5
5
  status: HelperType<never, string>;
6
6
  type: HelperType<never, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/api",
3
- "version": "1.2.48",
3
+ "version": "1.2.50",
4
4
  "main": "lib/api-index.js",
5
5
  "exports": {
6
6
  ".": "./lib/api-index.js",
@@ -34,14 +34,14 @@
34
34
  "graphql": "^15.x"
35
35
  },
36
36
  "dependencies": {
37
- "@unchainedshop/core": "^1.2.48",
38
- "@unchainedshop/events": "^1.2.48",
39
- "@unchainedshop/logger": "^1.2.48",
40
- "@unchainedshop/roles": "^1.2.48",
41
- "@unchainedshop/utils": "^1.2.48",
37
+ "@unchainedshop/core": "^1.2.50",
38
+ "@unchainedshop/events": "^1.2.50",
39
+ "@unchainedshop/logger": "^1.2.50",
40
+ "@unchainedshop/roles": "^1.2.50",
41
+ "@unchainedshop/utils": "^1.2.50",
42
42
  "accounting": "0.4.1",
43
43
  "dataloader": "^2.1.0",
44
- "graphql-scalars": "^1.20.0",
44
+ "graphql-scalars": "^1.20.1",
45
45
  "graphql-upload": "^13.0.0",
46
46
  "locale": "0.1.0",
47
47
  "lodash.isnumber": "3.0.3",
@@ -51,11 +51,11 @@
51
51
  "@types/graphql-upload": "^8.0.12",
52
52
  "@types/locale": "^0.1.1",
53
53
  "@types/node": "^16.18.3",
54
- "@unchainedshop/types": "^1.2.48",
54
+ "@unchainedshop/types": "^1.2.50",
55
55
  "apollo-server-express": "^2.26.0",
56
56
  "graphql": "^15.8.0",
57
57
  "jest": "^29.3.1",
58
58
  "ts-jest": "^29.0.3",
59
- "typescript": "^4.8.4"
59
+ "typescript": "^4.9.3"
60
60
  }
61
61
  }
@@ -91,10 +91,6 @@ export default (expressApp, options) => {
91
91
  }
92
92
  : corsOrigins;
93
93
 
94
- // server.start().then(() => {
95
- //
96
- // });
97
-
98
94
  const middleware = server.getMiddleware({
99
95
  path: '/graphql',
100
96
  cors: !originFn
@@ -73,6 +73,7 @@ export default async (
73
73
 
74
74
  const filters = await unchainedAPI.modules.filters.findFilters({
75
75
  filterIds,
76
+ includeInactive: true,
76
77
  });
77
78
 
78
79
  return queries.map(({ filterId }) => {
@@ -14,7 +14,7 @@ export default async function removeAssortment(
14
14
  const assortment = await modules.assortments.findAssortment({ assortmentId });
15
15
  if (!assortment) throw new AssortmentNotFoundError({ assortmentId });
16
16
 
17
- await modules.assortments.delete(assortmentId, { skipInvalidation: false }, userId);
17
+ await modules.assortments.delete(assortmentId, { skipInvalidation: false });
18
18
 
19
19
  return assortment;
20
20
  }
@@ -18,7 +18,7 @@ export default async function removeAssortmentFilter(
18
18
 
19
19
  if (!assortmentFilter) throw new AssortmentFilterNotFoundError({ assortmentFilterId });
20
20
 
21
- await modules.assortments.filters.delete(assortmentFilterId, userId);
21
+ await modules.assortments.filters.delete(assortmentFilterId);
22
22
 
23
23
  return assortmentFilter;
24
24
  }
@@ -16,7 +16,7 @@ export default async function removeAssortmentLink(
16
16
 
17
17
  if (!assortmentLink) throw new AssortmentLinkNotFoundError({ assortmentLinkId });
18
18
 
19
- await modules.assortments.links.delete(assortmentLinkId, { skipInvalidation: false }, userId);
19
+ await modules.assortments.links.delete(assortmentLinkId, { skipInvalidation: false });
20
20
 
21
21
  return assortmentLink;
22
22
  }
@@ -18,7 +18,7 @@ export default async function removeAssortmentProduct(
18
18
  });
19
19
  if (!assortmentProduct) throw new AssortmentProductNotFoundError({ assortmentProductId });
20
20
 
21
- await modules.assortments.products.delete(assortmentProductId, { skipInvalidation: false }, userId);
21
+ await modules.assortments.products.delete(assortmentProductId, { skipInvalidation: false });
22
22
 
23
23
  return assortmentProduct;
24
24
  }
@@ -15,7 +15,7 @@ export default async function removeFilter(
15
15
  const filter = await modules.filters.findFilter({ filterId });
16
16
  if (!filter) throw new FilterNotFoundError({ filterId });
17
17
 
18
- await modules.assortments.filters.deleteMany({ filterId }, userId);
18
+ await modules.assortments.filters.deleteMany({ filterId });
19
19
  await modules.filters.delete(filterId, userId);
20
20
 
21
21
  return filter;
@@ -1,10 +1,10 @@
1
1
  import { log } from '@unchainedshop/logger';
2
2
  import { emit } from '@unchainedshop/events';
3
3
 
4
- export default (root, { path, referrer }, { userId }) => {
4
+ export default async (root, { path, referrer }, { userId }) => {
5
5
  log(`mutation pageView ${path} ${referrer}`, { userId });
6
6
 
7
- emit('PAGE_VIEW', {
7
+ await emit('PAGE_VIEW', {
8
8
  path,
9
9
  referrer,
10
10
  });
@@ -1,23 +1,21 @@
1
1
  import { log } from '@unchainedshop/logger';
2
2
  import { Context, Root } from '@unchainedshop/types/api';
3
- import { ProductNotFoundError, ProductWrongStatusError, InvalidIdError } from '../../../errors';
3
+ import { ProductNotFoundError, InvalidIdError } from '../../../errors';
4
4
 
5
5
  export default async function removeProduct(
6
6
  root: Root,
7
7
  { productId }: { productId: string },
8
- { modules, userId }: Context,
8
+ context: Context,
9
9
  ) {
10
+ const { modules, services, userId } = context;
10
11
  log(`mutation removeProduct ${productId}`, { userId });
11
12
 
12
13
  if (!productId) throw new InvalidIdError({ productId });
13
14
 
14
- const product = await modules.products.findProduct({ productId });
15
- if (!product) throw new ProductNotFoundError({ productId });
15
+ if (!(await modules.products.productExists({ productId })))
16
+ throw new ProductNotFoundError({ productId });
16
17
 
17
- if (!modules.products.isDraft(product)) throw new ProductWrongStatusError({ status: product.status });
18
-
19
- await modules.assortments.products.delete(productId as string, {}, userId);
20
- await modules.products.delete(productId, userId);
18
+ await services.products.removeProduct({ productId, userId: context.userId }, context);
21
19
 
22
20
  return modules.products.findProduct({ productId });
23
21
  }