@jetshop/core 4.5.16 → 4.5.17-non-polyfill

Sign up to get free protection for your applications and to get access to all the features.
package/boot/apollo.js CHANGED
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { ApolloClient } from 'apollo-client';
2
13
  import { ApolloLink } from 'apollo-link';
3
14
  import { onError } from 'apollo-link-error';
@@ -94,8 +105,9 @@ export const createClient = ({ apolloConfig: { token, shopid, enableGateway, gra
94
105
  }));
95
106
  return forward ? forward(operation) : null;
96
107
  });
97
- const errorMiddleware = onError(({ graphQLErrors, networkError, operation }) => {
98
- var _a, _b;
108
+ const errorMiddleware = onError((_a) => {
109
+ var _b, _c;
110
+ var { graphQLErrors, networkError, operation } = _a, rest = __rest(_a, ["graphQLErrors", "networkError", "operation"]);
99
111
  if (graphQLErrors) {
100
112
  graphQLErrors.forEach(error => {
101
113
  const code = get(error, 'extensions.code');
@@ -112,18 +124,19 @@ export const createClient = ({ apolloConfig: { token, shopid, enableGateway, gra
112
124
  else {
113
125
  console.log(error);
114
126
  // Other graph errors will be logged to Sentry
115
- report(new Error(`${error.message || code}`), {
127
+ report(new Error(`${error.message || code}`), Object.assign({
116
128
  // Include all operation details (query etc)
117
129
  operation,
118
130
  code,
119
- error
120
- });
131
+ error,
132
+ graphQLErrors,
133
+ networkError }, rest));
121
134
  }
122
135
  });
123
136
  }
124
137
  // 503
125
138
  if (networkError) {
126
- const errors = (_b = (_a = networkError) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.Errors;
139
+ const errors = (_c = (_b = networkError) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.Errors;
127
140
  if (errors) {
128
141
  errors.forEach((error) => {
129
142
  if ((error === null || error === void 0 ? void 0 : error.Message) === 'Token has expired') {
@@ -1 +1 @@
1
- {"version":3,"file":"apollo.js","sourceRoot":"","sources":["apollo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAgBlE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,EAC1D,MAAM,EACN,WAAW,EACX,cAAc,EACd,cAAc,EACd,GAAG,EACc,EAAE,EAAE;IACrB,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,CAAC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K,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CACnE;QACD,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC;AAC3C,CAAC,CAAC"}
@@ -16,7 +16,7 @@ import React from 'react';
16
16
  import { renderToString } from 'react-dom/server';
17
17
  import { ChunkExtractor, ChunkExtractorManager } from '@loadable/server';
18
18
  import { StaticRouter } from 'react-router-dom';
19
- import { createPolyfill } from '../../polyfills';
19
+ import { createPolyfillMock } from '../../polyfills';
20
20
  import { getActiveFiltersFromSearch } from '../../resolvers/filters/filterParams';
21
21
  import { createClient } from '../apollo';
22
22
  import SharedTree from '../SharedTree';
@@ -33,7 +33,7 @@ import { getPreloadLinkHeaderString } from './getPreloadAssets';
33
33
  const injectDataIntoSlots = (template, data) => Object.keys(data).reduce((output, key) => key !== 'htmlAttributes'
34
34
  ? output.replace(`<slot name="${key}"/>`, data[key])
35
35
  : output.replace('<html lang="en">', `<html ${data[key]}>`), template);
36
- const wrapTree = (tree, req, renderOptions, client, channelHandler, authHandler, previewHandler, translator, locale, config, extractor) => __awaiter(void 0, void 0, void 0, function* () {
36
+ const wrapTree = (tree, req, renderOptions, client, channelHandler, authHandler, previewHandler, translator, config, extractor) => __awaiter(void 0, void 0, void 0, function* () {
37
37
  const modules = [];
38
38
  const routerContext = { url: null, statusCode: 200 };
39
39
  const helmetContext = { helmet: null };
@@ -82,7 +82,7 @@ const wrapTree = (tree, req, renderOptions, client, channelHandler, authHandler,
82
82
  statusCode: routerContext.statusCode,
83
83
  helmet: helmetContext.helmet,
84
84
  apolloState,
85
- polyfill: createPolyfill(locale)
85
+ polyfill: createPolyfillMock()
86
86
  };
87
87
  });
88
88
  const startResponse = ({ res, head, statusCode }) => {
@@ -163,7 +163,7 @@ const createRenderer = (template, tree, options) => (req, res) => __awaiter(void
163
163
  selectedChannel,
164
164
  options: intl.options
165
165
  });
166
- const { translator, locale } = yield setupIntl({
166
+ const { translator } = yield setupIntl({
167
167
  translations: intl.translations,
168
168
  locale: selectedChannel.language.culture,
169
169
  defaultLocale: intl.defaultLocale,
@@ -183,7 +183,7 @@ const createRenderer = (template, tree, options) => (req, res) => __awaiter(void
183
183
  statsFile: loadableStatsPath,
184
184
  entrypoints: ['client']
185
185
  });
186
- const { wrappedTree, routerUrl, statusCode, helmet: { htmlAttributes, title, meta, style, link }, apolloState, polyfill } = yield wrapTree(tree, req, options, client, channelHandler, authHandler, previewHandler, translator, locale, {
186
+ const { wrappedTree, routerUrl, statusCode, helmet: { htmlAttributes, title, meta, style, link }, apolloState, polyfill } = yield wrapTree(tree, req, options, client, channelHandler, authHandler, previewHandler, translator, {
187
187
  loginPath: options.loginPath,
188
188
  pathsWithNoAuthRequired: options.pathsWithNoAuthRequired
189
189
  }, chunkExtractor);
@@ -1 +1 @@
1
- {"version":3,"file":"createRenderer.js","sourceRoot":"","sources":["createRenderer.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,KAAuB,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;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,EAAE,CAAC;IACpD,MAAM,cAAc,GAAG,cAAc,CAAC,aAAa,EAAE,CAAC;IACtD,SAAS;IACT,MAAM,gBAAgB,GAAG,2CAA2C,GAAG,CAAC,UAAU,aAAa,CAAC;IAChG,MAAM,kBAAkB,GAAG,uCAAuC,YAAY,aAAa,CAAC;IAC5F,MAAM,uBAAuB,GAAG,4CAA4C,IAAI,CAAC,SAAS,CACxF,iBAAiB,CAClB,aAAa,CAAC;IAEf,MAAM,IAAI,GAAG;QACX,WAAW,EAAE,WAAW;QACxB,QAAQ;QACR,YAAY;QACZ,cAAc,EACZ,cAAc,GAAG,kBAAkB,GAAG,uBAAuB;QAC/D,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;QACvB,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE;QACvC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,gBAAgB,GAAG,aAAa;QAC1D,cAAc,EAAE,cAAc,CAAC,QAAQ,EAAE;KAC1C,CAAC;IAEF,MAAM,IAAI,GAAG,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAEvD,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IACzC,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC7D,WAAW,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7B,CAAC,CAAA,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { pushHistory, replaceHistory } from '@jetshop/core/components/Filters/utils/updateHistory';
2
2
  import PaginationContext from '@jetshop/core/components/Pagination/PaginationContext';
3
+ import report from '@jetshop/core/errorReporting';
3
4
  import qs from 'qs';
4
5
  import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
5
6
  import { withCookies } from 'react-cookie';
@@ -37,7 +38,14 @@ const getPageFromSearch = (location, queryParam) => {
37
38
  }
38
39
  return page;
39
40
  };
40
- const calculateOffset = (page, perPage) => (page - 1) * perPage;
41
+ const calculateOffset = (page, perPage) => {
42
+ if (page > 0 && page < 1000) {
43
+ return (page - 1) * perPage;
44
+ }
45
+ else {
46
+ return 0;
47
+ }
48
+ };
41
49
  const PaginationProvider = ({ cookies, defaultProductsPerPage = 16, children, queryParam = 'page' }) => {
42
50
  const history = useHistory();
43
51
  const location = useLocation();
@@ -62,6 +70,14 @@ const PaginationProvider = ({ cookies, defaultProductsPerPage = 16, children, qu
62
70
  }, [cookies]);
63
71
  const cookieProductsPerPage = parseInt(cookies.get('perPage'), 10);
64
72
  const perPage = cookieProductsPerPage || defaultProductsPerPage;
73
+ if (currentPage >= 1000) {
74
+ report(new Error('Page number is too nigh'), {
75
+ currentPage,
76
+ perPage,
77
+ location,
78
+ history
79
+ });
80
+ }
65
81
  const value = useMemo(() => ({
66
82
  currentPage,
67
83
  offset: calculateOffset(currentPage, perPage),
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationProvider.js","sourceRoot":"","sources":["PaginationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,cAAc,EACf,MAAM,sDAAsD,CAAC;AAC9D,OAAO,iBAEN,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,EAAE,EAEZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAoB,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,aAAa,GAAG,CACpB,EAAE,OAAO,EAAE,QAAQ,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,CAAC,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACrC,cAAc,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,OAAO,GAAG,qBAAqB,IAAI,sBAAsB,CAAC;IAEhE,IAAI,WAAW,IAAI,IAAI,EAAE;QACvB,MAAM,CAAC,IAAI,KAAK,CAAC,yBAAyB,CAAC,EAAE;YAC3C,WAAW;YACX,OAAO;YACP,QAAQ;YACR,OAAO;SACR,CAAC,CAAC;KACJ;IAED,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,MAAM,EAAE,eAAe,CAAC,WAAW,EAAE,OAAO,CAAC;QAC7C,OAAO;QACP,QAAQ;QACR,kBAAkB;QAClB,UAAU;KACX,CAAC,EACF,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,UAAU,CAAC,CACjE,CAAC;IAEF,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IACrC,QAAQ,CACkB,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACvC,CAAC;AAED,eAAe,WAAW,CAAC,kBAAkB,CAAC,CAAC"}
@@ -35,15 +35,20 @@ productQueryResult: ProductsQuery): {
35
35
  categories?: import("../../types").Category[];
36
36
  campaigns?: import("../../types").Category[];
37
37
  hasVariants: boolean;
38
+ hasVariantsWithDifferingPrices: boolean;
38
39
  variants?: import("../../types").ProductVariants;
39
40
  images?: import("../../types").ProductImage[];
40
41
  relatedProducts?: Product[];
41
42
  badges?: import("../../types").ProductBadge[];
42
43
  price?: import("../../types").Price;
44
+ hidePrice?: boolean;
43
45
  previousPrice?: import("../../types").Price;
44
46
  defaultPrice?: import("../../types").Price;
45
47
  defaultPreviousPrice?: import("../../types").Price;
46
48
  recommendedPrice?: import("../../types").Price;
49
+ priceDateSpan?: import("../../types").ProductPriceDateSpan;
50
+ hasMemberPrice?: boolean;
51
+ memberPrice?: import("../../types").Price;
47
52
  customerComments?: import("../../types").ProductComment[];
48
53
  stockStatus?: import("../../types").StockStatus;
49
54
  customFields?: import("../../types").CustomField[];
@@ -53,6 +58,7 @@ productQueryResult: ProductsQuery): {
53
58
  barcode?: string;
54
59
  configurations?: import("../../types").ProductConfiguration[];
55
60
  hasConfigurations: boolean;
61
+ hasFamilyMembers: boolean;
56
62
  configurationPrice?: import("../../types").ProductConfigurationPrice;
57
63
  quantitySuffix?: string;
58
64
  isPreOrder?: boolean;
@@ -63,6 +69,7 @@ productQueryResult: ProductsQuery): {
63
69
  inPackages?: Product[];
64
70
  hasUpsell?: boolean;
65
71
  familyMembers?: Product[];
72
+ history?: import("../../types").ProductHistory;
66
73
  }[];
67
74
  export declare function getVariantFromProductDetails(variant: Product['articleNumber'], product: Product): import("../../types").ProductVariant;
68
75
  export declare function flattenList(list: NormalizedProductList): FlattenedProductListItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/core",
3
- "version": "4.5.16",
3
+ "version": "4.5.17-non-polyfill",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -42,9 +42,9 @@
42
42
  "@graphql-codegen/typescript-operations": "^1.4.0",
43
43
  "@loadable/component": "^5.11.0",
44
44
  "@loadable/server": "^5.11.0",
45
- "@sentry/browser": "^5.6.1",
46
- "@sentry/core": "^5.6.1",
47
- "@sentry/node": "^5.6.1",
45
+ "@sentry/browser": "^6.0.0",
46
+ "@sentry/core": "^6.0.0",
47
+ "@sentry/node": "^6.0.0",
48
48
  "@tanem/react-nprogress": "^1.1.0",
49
49
  "@types/accept-language-parser": "^1.5.1",
50
50
  "@types/gtag.js": "^0.0.3",
package/polyfills.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const createPolyfill: (locale: string) => string;
1
+ export declare const createPolyfillMock: () => string;
package/polyfills.js CHANGED
@@ -1,38 +1,4 @@
1
1
  import { enableES5 } from 'immer';
2
2
  enableES5();
3
- const polyfills = (locale) => [
4
- 'es6',
5
- 'Object.values',
6
- 'Object.entries',
7
- 'Object.keys',
8
- 'Object.assign',
9
- 'Array.prototype.find',
10
- 'Array.prototype.findIndex',
11
- 'Array.prototype.flatMap',
12
- 'Array.prototype.includes',
13
- 'Array.prototype.keys',
14
- 'Array.from',
15
- 'Array.prototype.fill',
16
- 'String.prototype.endsWith',
17
- 'String.prototype.startsWith',
18
- 'URL',
19
- 'IntersectionObserver',
20
- `Intl.~locale.${locale}`,
21
- 'Promise',
22
- 'fetch',
23
- 'Symbol',
24
- 'ResizeObserver'
25
- ];
26
- export const createPolyfill = (locale) => {
27
- const features = polyfills(locale).join(',');
28
- // Here we add two script tags to be run once the client is loaded. One sets a global variable 'polyFillsLoaded' to false and adds a function bootShop which, when called will set 'polyFillsLoaded' to true. The second script will load the polyfills and once they are loaded will call the bootShop function to let the client know that the polyfills have been loaded and that the shop can be started.
29
- return `
30
- <script>
31
- window.polyFillsLoaded = false;
32
- window.bootShop = function() {
33
- window.polyFillsLoaded = true;
34
- };
35
- </script>
36
- <script async defer src="https://cdn.polyfill.io/v3/polyfill${process.env.NODE_ENV === 'production' ? '.min' : ''}.js?version=3.89.4&callback=bootShop&features=${features}&flags=gated"></script>`;
37
- };
3
+ export const createPolyfillMock = () => ``;
38
4
  //# sourceMappingURL=polyfills.js.map
package/polyfills.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"polyfills.js","sourceRoot":"","sources":["polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,SAAS,EAAE,CAAC;AAEZ,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC;IACpC,KAAK;IACL,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,sBAAsB;IACtB,2BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;IAC1B,sBAAsB;IACtB,YAAY;IACZ,sBAAsB;IACtB,2BAA2B;IAC3B,6BAA6B;IAC7B,KAAK;IACL,sBAAsB;IACtB,gBAAgB,MAAM,EAAE;IACxB,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,EAAE;IAC/C,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,6YAA6Y;IAC7Y,OAAO;;;;;;;gEAQL,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EACnD,iDAAiD,QAAQ,yBAAyB,CAAC;AACrF,CAAC,CAAC"}
1
+ {"version":3,"file":"polyfills.js","sourceRoot":"","sources":["polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,SAAS,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC"}
package/types.d.ts CHANGED
@@ -13,7 +13,7 @@ export type Scalars = {
13
13
  * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
14
14
  */
15
15
  DateTime: any;
16
- /** The `Paging` scalar type represents a numeric values between (0; 100> */
16
+ /** The `Paging` scalar type represents a numeric values between <1; 100> */
17
17
  Paging: any;
18
18
  };
19
19
 
@@ -41,7 +41,8 @@ export enum ActivationStatusSource {
41
41
  PreexistingCustomer = 'PREEXISTING_CUSTOMER',
42
42
  ActivationRequired = 'ACTIVATION_REQUIRED',
43
43
  AdditionalUserDataRequired = 'ADDITIONAL_USER_DATA_REQUIRED',
44
- NonExistingCustomer = 'NON_EXISTING_CUSTOMER'
44
+ NonExistingCustomer = 'NON_EXISTING_CUSTOMER',
45
+ CountryNotValid = 'COUNTRY_NOT_VALID'
45
46
  }
46
47
 
47
48
  export type ActiveFilters = {
@@ -189,11 +190,15 @@ export type Category = Document & {
189
190
  parentId?: Maybe<Scalars['Int']>;
190
191
  name: Scalars['String'];
191
192
  level: Scalars['Int'];
193
+ /** The time interval of the campaign/category */
194
+ activeDateSpan?: Maybe<CategoryActiveDateSpan>;
192
195
  /** Whether or not this category and all its children are considered hidden */
193
196
  isHidden: Scalars['Boolean'];
194
197
  /** When empty will display the value of the name field */
195
198
  mainHeader?: Maybe<Scalars['String']>;
196
199
  content?: Maybe<Scalars['String']>;
200
+ externalId?: Maybe<Scalars['String']>;
201
+ externalDiscountId?: Maybe<Scalars['String']>;
197
202
  images?: Maybe<Array<Maybe<CategoryImage>>>;
198
203
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
199
204
  products?: Maybe<PagedResult>;
@@ -214,8 +219,19 @@ export type Category = Document & {
214
219
  * product.primaryRoute will have to be used.
215
220
  */
216
221
  isDynamic: Scalars['Boolean'];
217
- /** Get content data set via the Content Editor */
222
+ /** The category's dynamic filtersNB: Carries a performance cost, as asking for
223
+ * this will result in a separate API call in the backend.
224
+ */
225
+ dynamicFiltering?: Maybe<Array<Maybe<CategoryDynamicFilter>>>;
226
+ /** Get content data set via the Content Editor. NB: Carries a performance cost,
227
+ * as asking for this will result in a separate API call in the backend.
228
+ */
218
229
  data?: Maybe<Content>;
230
+ /** When set to false, the category will be excluded from sitemap. The frontend
231
+ * implementation should use this value to set meta tags to exclude the category
232
+ * from being indexed by crawlers. Defaults to true.
233
+ */
234
+ allowWebIndexing?: Maybe<Scalars['Boolean']>;
219
235
  };
220
236
 
221
237
  export type CategoryProductsArgs = {
@@ -226,11 +242,28 @@ export type CategoryProductsArgs = {
226
242
  filters?: Maybe<FilterInput>;
227
243
  };
228
244
 
245
+ export type CategoryActiveDateSpan = {
246
+ __typename?: 'CategoryActiveDateSpan';
247
+ startDate?: Maybe<Scalars['DateTime']>;
248
+ endDate?: Maybe<Scalars['DateTime']>;
249
+ };
250
+
229
251
  export type CategoryAutoCompleteResult = {
230
252
  __typename?: 'CategoryAutoCompleteResult';
231
253
  result?: Maybe<Array<Maybe<Category>>>;
232
254
  };
233
255
 
256
+ export type CategoryDynamicFilter = {
257
+ __typename?: 'CategoryDynamicFilter';
258
+ type?: Maybe<Scalars['String']>;
259
+ value?: Maybe<CategoryDynamicFilterValue>;
260
+ };
261
+
262
+ export type CategoryDynamicFilterValue =
263
+ | StringValue
264
+ | ListStringValue
265
+ | BoolValue;
266
+
234
267
  export type CategoryImage = {
235
268
  __typename?: 'CategoryImage';
236
269
  width?: Maybe<Scalars['Int']>;
@@ -293,17 +326,24 @@ export type Consent = {
293
326
 
294
327
  export type Content = {
295
328
  __typename?: 'Content';
329
+ name?: Maybe<Scalars['String']>;
296
330
  id: Scalars['ID'];
297
331
  items?: Maybe<Array<Maybe<ContentItem>>>;
332
+ tags?: Maybe<Array<Maybe<Scalars['String']>>>;
298
333
  };
299
334
 
300
335
  export type ContentItem = {
301
336
  __typename?: 'ContentItem';
337
+ name?: Maybe<Scalars['String']>;
302
338
  type: Scalars['String'];
303
339
  properties?: Maybe<Array<Maybe<ContentItemProperty>>>;
304
340
  children?: Maybe<Array<Maybe<ContentItem>>>;
305
341
  };
306
342
 
343
+ export type ContentItemPropertiesArgs = {
344
+ getImageAsImageValue?: Maybe<Scalars['Boolean']>;
345
+ };
346
+
307
347
  export type ContentItemProperty = {
308
348
  __typename?: 'ContentItemProperty';
309
349
  name: Scalars['String'];
@@ -314,6 +354,7 @@ export type ContentItemProperty = {
314
354
 
315
355
  export type ContentItemPropertyValue =
316
356
  | StringValue
357
+ | ImageValue
317
358
  | BoolValue
318
359
  | Product
319
360
  | Category;
@@ -610,13 +651,20 @@ export type CustomerUpdateDeliveryAddressInput = {
610
651
  addressName?: Maybe<Scalars['String']>;
611
652
  };
612
653
 
654
+ export type CustomerUpdateExternalAttribute = {
655
+ name: Scalars['String'];
656
+ value: Scalars['String'];
657
+ };
658
+
613
659
  export type CustomerUpdateInput = {
614
660
  pid?: Maybe<Scalars['String']>;
661
+ emailAddress?: Maybe<Scalars['String']>;
615
662
  organizationNumber?: Maybe<Scalars['String']>;
616
663
  billingAddress: CustomerUpdateBillingAddressInput;
617
664
  deliveryAddresses?: Maybe<Array<Maybe<CustomerUpdateDeliveryAddressInput>>>;
618
665
  preferences?: Maybe<CustomerUpdatePreferenceInput>;
619
666
  consents?: Maybe<Array<Maybe<CustomerUpdateConsentInput>>>;
667
+ externalAttributes?: Maybe<Array<Maybe<CustomerUpdateExternalAttribute>>>;
620
668
  dynamicContent?: Maybe<Scalars['String']>;
621
669
  };
622
670
 
@@ -700,12 +748,43 @@ export type DeleteCustomerProductListResult = {
700
748
 
701
749
  export type Discount = {
702
750
  __typename?: 'Discount';
751
+ externalId?: Maybe<Scalars['ID']>;
703
752
  name?: Maybe<Scalars['String']>;
704
753
  value?: Maybe<Price>;
754
+ type?: Maybe<DiscountType>;
705
755
  description?: Maybe<Scalars['String']>;
706
756
  campaign?: Maybe<Category>;
707
757
  };
708
758
 
759
+ export enum DiscountType {
760
+ /** No discount defined */
761
+ Undefined = 'UNDEFINED',
762
+ /** Discount drops price of the order total by defined amount */
763
+ FixedAmount = 'FIXED_AMOUNT',
764
+ /** Discount drops price of the product by X % */
765
+ Percent = 'PERCENT',
766
+ /** Discount will get the amount of the cheapest product and use this as a discount */
767
+ Items = 'ITEMS',
768
+ /** Discount drops total price of the product if there is at least X of them in cart */
769
+ ItemsPercentageLimit = 'ITEMS_PERCENTAGE_LIMIT',
770
+ /** Only a collection of products */
771
+ OnlyUseLandingPage = 'ONLY_USE_LANDING_PAGE',
772
+ /** Discount drops price of the least expensive product in cart */
773
+ PercentOnLeastExpensiveItem = 'PERCENT_ON_LEAST_EXPENSIVE_ITEM',
774
+ /** Discount drops price of the most expensive product in cart */
775
+ PercentOnMostExpensiveItem = 'PERCENT_ON_MOST_EXPENSIVE_ITEM',
776
+ /** Discount allows to get a free gift when the product is added */
777
+ FreeProduct = 'FREE_PRODUCT',
778
+ /** Discount allows to get free shipping option for the product */
779
+ FreeShipping = 'FREE_SHIPPING',
780
+ /** Discount drops price for the package when all products in the package is added to cart */
781
+ PackageDiscount = 'PACKAGE_DISCOUNT',
782
+ /** Discount on the order total from a voucher */
783
+ BonusVoucherDiscount = 'BONUS_VOUCHER_DISCOUNT',
784
+ /** Discount allows to buy amount of X of the article, but pay only for amount of Y */
785
+ BuyXArticlesPayYAmount = 'BUY_X_ARTICLES_PAY_Y_AMOUNT'
786
+ }
787
+
709
788
  export type Document = {
710
789
  head?: Maybe<HtmlHead>;
711
790
  primaryRoute?: Maybe<Route>;
@@ -723,6 +802,7 @@ export type ExternalCustomer = {
723
802
  city?: Maybe<MaskedProperty>;
724
803
  postalCode?: Maybe<MaskedProperty>;
725
804
  country?: Maybe<MaskedProperty>;
805
+ countryCode?: Maybe<Scalars['String']>;
726
806
  phoneNumber?: Maybe<MaskedProperty>;
727
807
  mobilePhoneNumber?: Maybe<MaskedProperty>;
728
808
  pid?: Maybe<MaskedProperty>;
@@ -730,11 +810,14 @@ export type ExternalCustomer = {
730
810
 
731
811
  /** The activation status has 4 states;
732
812
  * PREEXISTING_CUSTOMER: No customer info will be returned and the customer is advised to login to the preexisting account.
733
- * ACTIVATION_REQUIRED: The customer account needs to be activated. Email (masked)
734
- * and externalId will be the only fields set on `customer`.
813
+ * ACTIVATION_REQUIRED: The customer account needs to be activated. Email (masked),
814
+ * FirstName (masked) and externalId will be the only fields set on `customer`.
735
815
  * ADDITIONAL_USER_DATA_REQUIRED: Additional data needed to register the customer,
736
816
  * the existing customer info will be available with masking on customer.
737
817
  * NON_EXISTING_CUSTOMER: Customer does not exist in any system and will have to do a sign up.
818
+ * COUNTRY_NOT_VALID: The customer account may not be activated on this channel as
819
+ * it's missing the customer country. Email (masked), FirstName (masked),
820
+ * externalId and countryCode will be the only fields set on `customer`.
738
821
  */
739
822
  export type ExternalCustomerResult = {
740
823
  __typename?: 'ExternalCustomerResult';
@@ -742,6 +825,12 @@ export type ExternalCustomerResult = {
742
825
  customer?: Maybe<ExternalCustomer>;
743
826
  };
744
827
 
828
+ export type ExternalOrderData = {
829
+ __typename?: 'ExternalOrderData';
830
+ name: Scalars['String'];
831
+ value: Scalars['String'];
832
+ };
833
+
745
834
  export type FacebookConversionsApi = {
746
835
  __typename?: 'FacebookConversionsApi';
747
836
  accessToken?: Maybe<Scalars['String']>;
@@ -772,9 +861,16 @@ export type GoogleAnalytics = {
772
861
  useArticleNumberAsId?: Maybe<Scalars['Boolean']>;
773
862
  };
774
863
 
864
+ export type GoogleAnalytics4 = {
865
+ __typename?: 'GoogleAnalytics4';
866
+ trackingId?: Maybe<Scalars['String']>;
867
+ useArticleNumberAsId?: Maybe<Scalars['Boolean']>;
868
+ };
869
+
775
870
  export type GoogleTagManager = {
776
871
  __typename?: 'GoogleTagManager';
777
872
  containerId?: Maybe<Scalars['String']>;
873
+ useGa4Events?: Maybe<Scalars['Boolean']>;
778
874
  };
779
875
 
780
876
  export type HtmlHead = {
@@ -797,6 +893,13 @@ export type Image = {
797
893
  height?: Maybe<Scalars['Int']>;
798
894
  };
799
895
 
896
+ export type ImageValue = {
897
+ __typename?: 'ImageValue';
898
+ value?: Maybe<Scalars['String']>;
899
+ focalPointX?: Maybe<Scalars['Int']>;
900
+ focalPointY?: Maybe<Scalars['Int']>;
901
+ };
902
+
800
903
  export type InputComment = {
801
904
  name: Scalars['String'];
802
905
  value?: Maybe<Scalars['String']>;
@@ -810,6 +913,12 @@ export type Language = {
810
913
  isDefault?: Maybe<Scalars['Boolean']>;
811
914
  };
812
915
 
916
+ export type Link = {
917
+ __typename?: 'Link';
918
+ target?: Maybe<Scalars['String']>;
919
+ link?: Maybe<Scalars['Uri']>;
920
+ };
921
+
813
922
  export type ListFilter = Filter & {
814
923
  __typename?: 'ListFilter';
815
924
  hasActiveItems: Scalars['Boolean'];
@@ -832,6 +941,11 @@ export type ListFilterItem = {
832
941
  resultCount?: Maybe<Scalars['Int']>;
833
942
  };
834
943
 
944
+ export type ListStringValue = {
945
+ __typename?: 'ListStringValue';
946
+ value?: Maybe<Array<Maybe<Scalars['String']>>>;
947
+ };
948
+
835
949
  export type LoginExternalCustomerInput = {
836
950
  externalCustomerToken: Scalars['String'];
837
951
  };
@@ -845,6 +959,7 @@ export type LoginExternalCustomerResult = {
845
959
  export type LoginResponse = {
846
960
  __typename?: 'LoginResponse';
847
961
  token: Token;
962
+ customerId?: Maybe<Scalars['Int']>;
848
963
  };
849
964
 
850
965
  export type MaskedProperty = {
@@ -874,6 +989,12 @@ export type MultiListFilterList = {
874
989
  items: Array<Maybe<ListFilterItem>>;
875
990
  };
876
991
 
992
+ export type MultipleContent = {
993
+ __typename?: 'MultipleContent';
994
+ notFoundIds: Array<Maybe<Scalars['ID']>>;
995
+ content: Array<Maybe<Content>>;
996
+ };
997
+
877
998
  export type Mutation = {
878
999
  __typename?: 'Mutation';
879
1000
  toggleListFilterItem?: Maybe<ListFilter>;
@@ -989,7 +1110,7 @@ export type Mutation = {
989
1110
  deleteCustomer?: Maybe<Scalars['Boolean']>;
990
1111
  loginExternalCustomer?: Maybe<LoginExternalCustomerResult>;
991
1112
  /** LoginMutation will log a user in.
992
- * One of email, pid, externalId or memberNumber is required, along with a password.
1113
+ * One of email, pid, externalId, memberNumber or customerId is required, along with a password.
993
1114
  * Returns an authorization token if the login was successful.
994
1115
  */
995
1116
  login?: Maybe<LoginResponse>;
@@ -1002,10 +1123,30 @@ export type Mutation = {
1002
1123
  * If the sign up is successful the customer may be considered to be logged on and an authentication token will be returned
1003
1124
  */
1004
1125
  signUp?: Maybe<SignUpResponse>;
1005
- /** This mutation's purpose is to update a existing customer's information. An
1006
- * authorization token is needed in the request, in order to be able to delete the customer.
1126
+ /** ## Description
1127
+ * This mutation's purpose is to update a existing customer's group using an
1128
+ * access code. An authorization token is needed in the request, in order to be
1129
+ * able to update the customer.
1130
+ * ## Error Codes
1131
+ * ### Unauthorized
1132
+ * Unauthorized
1133
+ * ### UnableToUpdateCustomer
1134
+ * Error in underlying API call, more info may be contained in the error message.
1135
+ * ### CustomerAlreadyUpdated
1136
+ * Customer already in the customer group
1137
+ * ### CustomerNotFound
1138
+ * No match on customer with access code
1139
+ */
1140
+ updateCustomerGroup?: Maybe<UpdateCustomerGroupResult>;
1141
+ /** This mutation's purpose is to update an existing customer's information. An
1142
+ * authorization token is needed in the request, in order to be able to update the customer.
1007
1143
  */
1008
1144
  updateCustomer?: Maybe<CustomerUpdateResponse>;
1145
+ /** This mutation's purpose is to update a existing customer's price list using an
1146
+ * access code. An authorization token is needed in the request, in order to be
1147
+ * able to update the customer.
1148
+ */
1149
+ updateCustomerPriceList?: Maybe<UpdateCustomerPriceListResult>;
1009
1150
  /** The updatePassword mutation updates the customers password. Both the old password and a new password is a requirement. */
1010
1151
  updatePassword?: Maybe<UpdatePasswordResult>;
1011
1152
  /** Adds products to the cart where you can add comments to the products and
@@ -1128,11 +1269,15 @@ export type MutationLoginExternalCustomerArgs = {
1128
1269
  };
1129
1270
 
1130
1271
  export type MutationLoginArgs = {
1131
- password: Scalars['String'];
1272
+ password?: Maybe<Scalars['String']>;
1132
1273
  email?: Maybe<Scalars['String']>;
1133
1274
  pid?: Maybe<Scalars['String']>;
1134
1275
  externalId?: Maybe<Scalars['String']>;
1135
1276
  memberNumber?: Maybe<Scalars['String']>;
1277
+ externalHashId?: Maybe<Scalars['String']>;
1278
+ timeStamp?: Maybe<Scalars['String']>;
1279
+ customerId?: Maybe<Scalars['Int']>;
1280
+ cartId?: Maybe<Scalars['String']>;
1136
1281
  };
1137
1282
 
1138
1283
  export type MutationRequestPasswordResetArgs = {
@@ -1148,10 +1293,18 @@ export type MutationSignUpArgs = {
1148
1293
  input: SignUpInput;
1149
1294
  };
1150
1295
 
1296
+ export type MutationUpdateCustomerGroupArgs = {
1297
+ customerGroupAccessCode: Scalars['String'];
1298
+ };
1299
+
1151
1300
  export type MutationUpdateCustomerArgs = {
1152
1301
  input: CustomerUpdateInput;
1153
1302
  };
1154
1303
 
1304
+ export type MutationUpdateCustomerPriceListArgs = {
1305
+ priceListAccessCode: Scalars['String'];
1306
+ };
1307
+
1155
1308
  export type MutationUpdatePasswordArgs = {
1156
1309
  oldPassword: Scalars['String'];
1157
1310
  newPassword: Scalars['String'];
@@ -1221,6 +1374,7 @@ export type Order = {
1221
1374
  orderDate?: Maybe<Scalars['DateTime']>;
1222
1375
  currency?: Maybe<Currency>;
1223
1376
  attachments?: Maybe<Array<Maybe<OrderAttachment>>>;
1377
+ orderPurchaseLocation?: Maybe<Scalars['String']>;
1224
1378
  };
1225
1379
 
1226
1380
  export type OrderItemsArgs = {
@@ -1317,6 +1471,8 @@ export type OrderItem = {
1317
1471
  */
1318
1472
  variantValue?: Maybe<Scalars['String']>;
1319
1473
  preOrderDate?: Maybe<Scalars['DateTime']>;
1474
+ /** list of name, value fields from orders coming from external systems. */
1475
+ externalOrderData?: Maybe<Array<Maybe<ExternalOrderData>>>;
1320
1476
  };
1321
1477
 
1322
1478
  export type OrderItemDiscount = {
@@ -1387,6 +1543,9 @@ export type Page = Document & {
1387
1543
  name: Scalars['String'];
1388
1544
  mainHeader?: Maybe<Scalars['String']>;
1389
1545
  content?: Maybe<Scalars['String']>;
1546
+ hasExternalUrl?: Maybe<Scalars['Boolean']>;
1547
+ /** External URL if page is set to URL, null if not. */
1548
+ externalUrl?: Maybe<Link>;
1390
1549
  images?: Maybe<Array<Maybe<Image>>>;
1391
1550
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1392
1551
  head?: Maybe<HtmlHead>;
@@ -1395,8 +1554,30 @@ export type Page = Document & {
1395
1554
  */
1396
1555
  primaryRoute?: Maybe<Route>;
1397
1556
  breadcrumbText?: Maybe<Scalars['String']>;
1398
- /** Get content data set via the Content Editor */
1557
+ /** Get content data set via the Content Editor. NB: Carries a performance cost,
1558
+ * as asking for this will result in a separate API call in the backend.
1559
+ */
1399
1560
  data?: Maybe<Content>;
1561
+ /** * If this page was fetched by ID using the `page(id)` query, `parent` will be returned even if it is hidden.
1562
+ * * If this page was fetched using the `pages` query, `parent` will not be returned if it is hidden
1563
+ */
1564
+ parent?: Maybe<Page>;
1565
+ /** * If this page was fetched by ID using the `page(id)` query, `subPages` will
1566
+ * be returned even if they are hidden. This can be overridden with the
1567
+ * `includeHidden` flag.
1568
+ * * If this page was fetched using the `pages` query, `subPages` will not be
1569
+ * returned if they are hidden. The `includeHidden` flag has no effect on this.
1570
+ */
1571
+ subPages?: Maybe<Array<Page>>;
1572
+ /** When set to false, the page will be excluded from sitemap. The frontend
1573
+ * implementation should use this value to set meta tags to exclude the page from
1574
+ * being indexed by crawlers. Defaults to true.
1575
+ */
1576
+ allowWebIndexing?: Maybe<Scalars['Boolean']>;
1577
+ };
1578
+
1579
+ export type PageSubPagesArgs = {
1580
+ includeHidden?: Maybe<Scalars['Boolean']>;
1400
1581
  };
1401
1582
 
1402
1583
  export type PagedResult = {
@@ -1446,6 +1627,12 @@ export type Price = {
1446
1627
  vat: Scalars['Decimal'];
1447
1628
  };
1448
1629
 
1630
+ export type PriceHistory = {
1631
+ __typename?: 'PriceHistory';
1632
+ timestamp?: Maybe<Scalars['DateTime']>;
1633
+ price?: Maybe<Price>;
1634
+ };
1635
+
1449
1636
  export type PrivateCustomer = Customer & {
1450
1637
  __typename?: 'PrivateCustomer';
1451
1638
  pid?: Maybe<Scalars['String']>;
@@ -1494,14 +1681,20 @@ export type Product = Document & {
1494
1681
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1495
1682
  campaigns?: Maybe<Array<Maybe<Category>>>;
1496
1683
  hasVariants: Scalars['Boolean'];
1684
+ hasVariantsWithDifferingPrices: Scalars['Boolean'];
1497
1685
  variants?: Maybe<ProductVariants>;
1498
1686
  images?: Maybe<Array<Maybe<ProductImage>>>;
1499
1687
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1500
1688
  relatedProducts?: Maybe<Array<Maybe<Product>>>;
1501
1689
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1502
1690
  badges?: Maybe<Array<Maybe<ProductBadge>>>;
1503
- /** The current price. Will be a Customer specific price, if that Customer has a separate price list. */
1691
+ /** The current price.
1692
+ * - Will be a Customer specific price if that Customer has a separate price list.
1693
+ * - Will be the member price if Customer is logged in and `Product.hasMemberPrice` is true.
1694
+ * - Will be the non-member price if Customer is not logged in and `Product.hasMemberPrice` is true.
1695
+ */
1504
1696
  price?: Maybe<Price>;
1697
+ hidePrice?: Maybe<Scalars['Boolean']>;
1505
1698
  /** The previous price (i.e. this will be higher than `price` if the product is
1506
1699
  * discounted). Will be a Customer specific previous price, if that Customer has
1507
1700
  * a separate price list.
@@ -1513,10 +1706,19 @@ export type Product = Document & {
1513
1706
  defaultPreviousPrice?: Maybe<Price>;
1514
1707
  /** Not in use. Always null. */
1515
1708
  recommendedPrice?: Maybe<Price>;
1709
+ /** The time interval of the discounted price. If the product has variants, the
1710
+ * time interval will be that of the variant which price is shown on the product.
1711
+ */
1712
+ priceDateSpan?: Maybe<ProductPriceDateSpan>;
1713
+ /** Indicates if this product and its variants has member prices. */
1714
+ hasMemberPrice?: Maybe<Scalars['Boolean']>;
1715
+ /** The price a Customer would get if member prices are active and the Customer is logged in.
1716
+ * - Will be null if `Product.hasMemberPrice` is false.
1717
+ * - Will be set if `Product.hasMemberPrice` is true.
1718
+ */
1719
+ memberPrice?: Maybe<Price>;
1516
1720
  /** Specifies input field(s) for the Customer to populate on the Product that will then carry through to the Order.
1517
- * If 'required' is true the Product should not be purchasable
1518
- * until the field is populated.NB: Carries a performance cost, as asking for
1519
- * this will result in a separate API call in the backend.
1721
+ * If 'required' is true the Product should not be purchasable until the field is populated.
1520
1722
  */
1521
1723
  customerComments?: Maybe<Array<Maybe<ProductComment>>>;
1522
1724
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
@@ -1524,7 +1726,6 @@ export type Product = Document & {
1524
1726
  customFields?: Maybe<Array<Maybe<CustomField>>>;
1525
1727
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1526
1728
  warehouseStock?: Maybe<Array<Maybe<Warehouse>>>;
1527
- /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1528
1729
  head?: Maybe<HtmlHead>;
1529
1730
  /** The primary route of this Product. NB: Carries a performance cost, as asking
1530
1731
  * for this will result in a separate API call in the backend.
@@ -1547,12 +1748,13 @@ export type Product = Document & {
1547
1748
  */
1548
1749
  configurations?: Maybe<Array<Maybe<ProductConfiguration>>>;
1549
1750
  hasConfigurations: Scalars['Boolean'];
1751
+ hasFamilyMembers: Scalars['Boolean'];
1550
1752
  /** Calculates the price of the product based on the configuration choices that's
1551
1753
  * been made. NB: Carries a performance cost, as asking for this will result in a
1552
1754
  * separate API call in the backend.
1553
1755
  */
1554
1756
  configurationPrice?: Maybe<ProductConfigurationPrice>;
1555
- /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1757
+ /** Quantity suffix e.g pcs, box, etc. */
1556
1758
  quantitySuffix?: Maybe<Scalars['String']>;
1557
1759
  isPreOrder?: Maybe<Scalars['Boolean']>;
1558
1760
  preOrder?: Maybe<ProductPreOrder>;
@@ -1576,6 +1778,8 @@ export type Product = Document & {
1576
1778
  * performance cost, as asking for this will result in a separate API call in the backend.
1577
1779
  */
1578
1780
  familyMembers?: Maybe<Array<Product>>;
1781
+ /** Get Product History within the set number of days */
1782
+ history?: Maybe<ProductHistory>;
1579
1783
  };
1580
1784
 
1581
1785
  export type ProductCategoriesArgs = {
@@ -1587,6 +1791,10 @@ export type ProductImagesArgs = {
1587
1791
  limit?: Maybe<Scalars['Int']>;
1588
1792
  };
1589
1793
 
1794
+ export type ProductWarehouseStockArgs = {
1795
+ includeInactive?: Maybe<Scalars['Boolean']>;
1796
+ };
1797
+
1590
1798
  export type ProductConfigurationPriceArgs = {
1591
1799
  options?: Maybe<Array<ProductConfigurationPriceInput>>;
1592
1800
  };
@@ -1595,6 +1803,10 @@ export type ProductPackageArgs = {
1595
1803
  articleNumbers?: Maybe<Array<Maybe<PackagePriceInput>>>;
1596
1804
  };
1597
1805
 
1806
+ export type ProductHistoryArgs = {
1807
+ days?: Maybe<Scalars['Int']>;
1808
+ };
1809
+
1598
1810
  export type ProductAutoCompleteResult = {
1599
1811
  __typename?: 'ProductAutoCompleteResult';
1600
1812
  result: Array<Maybe<Product>>;
@@ -1684,6 +1896,11 @@ export enum ProductCustomFieldType {
1684
1896
  MultiLevelList = 'MULTI_LEVEL_LIST'
1685
1897
  }
1686
1898
 
1899
+ export type ProductHistory = {
1900
+ __typename?: 'ProductHistory';
1901
+ previousPrice?: Maybe<Array<Maybe<PriceHistory>>>;
1902
+ };
1903
+
1687
1904
  export type ProductImage = {
1688
1905
  __typename?: 'ProductImage';
1689
1906
  /** Alternate text for the image, commonly used for the alt attribute of img-tags. */
@@ -1718,6 +1935,12 @@ export type ProductPreOrder = {
1718
1935
  toDate?: Maybe<Scalars['DateTime']>;
1719
1936
  };
1720
1937
 
1938
+ export type ProductPriceDateSpan = {
1939
+ __typename?: 'ProductPriceDateSpan';
1940
+ startDate?: Maybe<Scalars['DateTime']>;
1941
+ endDate?: Maybe<Scalars['DateTime']>;
1942
+ };
1943
+
1721
1944
  export type ProductSearchResult = {
1722
1945
  __typename?: 'ProductSearchResult';
1723
1946
  result: Array<Maybe<Product>>;
@@ -1739,7 +1962,11 @@ export type ProductVariant = {
1739
1962
  articleNumber: Scalars['String'];
1740
1963
  /** Variant values (combination of option values) */
1741
1964
  values: Array<Maybe<Scalars['String']>>;
1742
- /** The current price. Will be a Customer specific price, if that Customer has a separate price list. */
1965
+ /** The current price.
1966
+ * - Will be a Customer specific price if that Customer has a separate price list.
1967
+ * - Will be the member price if Customer is logged in and `Product.hasMemberPrice` is true.
1968
+ * - Will be the non-member price if Customer is not logged in and `Product.hasMemberPrice` is true.
1969
+ */
1743
1970
  price?: Maybe<Price>;
1744
1971
  /** The previous price (i.e. this will be higher than `price` if the product is
1745
1972
  * discounted). Will be a Customer specific previous price, if that Customer has
@@ -1752,12 +1979,34 @@ export type ProductVariant = {
1752
1979
  defaultPreviousPrice?: Maybe<Price>;
1753
1980
  /** Not in use. Always null. */
1754
1981
  recommendedPrice?: Maybe<Price>;
1982
+ /** The time interval of the discounted price. */
1983
+ priceDateSpan?: Maybe<ProductPriceDateSpan>;
1984
+ /** The price a Customer would get if member prices are active and the Customer is logged in.
1985
+ * - Will be null if `Product.hasMemberPrice` is false.
1986
+ * - Will be set if `Product.hasMemberPrice` is true.
1987
+ */
1988
+ memberPrice?: Maybe<Price>;
1755
1989
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1756
1990
  stockStatus?: Maybe<StockStatus>;
1757
1991
  /** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
1758
1992
  warehouseStock?: Maybe<Array<Maybe<Warehouse>>>;
1759
1993
  images?: Maybe<Array<Maybe<ProductImage>>>;
1760
1994
  barcode?: Maybe<Scalars['String']>;
1995
+ /** Get Product History within the set number of days */
1996
+ history?: Maybe<ProductVariantHistory>;
1997
+ };
1998
+
1999
+ export type ProductVariantWarehouseStockArgs = {
2000
+ includeInactive?: Maybe<Scalars['Boolean']>;
2001
+ };
2002
+
2003
+ export type ProductVariantHistoryArgs = {
2004
+ days?: Maybe<Scalars['Int']>;
2005
+ };
2006
+
2007
+ export type ProductVariantHistory = {
2008
+ __typename?: 'ProductVariantHistory';
2009
+ previousPrice?: Maybe<Array<Maybe<PriceHistory>>>;
1761
2010
  };
1762
2011
 
1763
2012
  export type ProductVariantOption = {
@@ -1785,7 +2034,9 @@ export type Query = {
1785
2034
  route?: Maybe<Route>;
1786
2035
  product?: Maybe<Product>;
1787
2036
  products: Array<Maybe<Product>>;
2037
+ /** Fetch a single page by ID. */
1788
2038
  page?: Maybe<Page>;
2039
+ /** Fetch all non-hidden pages. If you are using nested pages, only root level pages will be returned. */
1789
2040
  pages: Array<Maybe<Page>>;
1790
2041
  /** fetch order by id */
1791
2042
  order?: Maybe<Order>;
@@ -1796,6 +2047,8 @@ export type Query = {
1796
2047
  customerProductLists: Array<Maybe<CustomerProductList>>;
1797
2048
  /** Fetches customer-unique offers */
1798
2049
  customerLoyalty?: Maybe<CustomerLoyalty>;
2050
+ /** Lookup a customer by a mobile phone number */
2051
+ customerLookup?: Maybe<Customer>;
1799
2052
  customer?: Maybe<Customer>;
1800
2053
  /** Used in the sign up process when the shop has a third party customer repository, e.g. Voyado.
1801
2054
  *
@@ -1804,6 +2057,10 @@ export type Query = {
1804
2057
  externalCustomerLookup?: Maybe<ExternalCustomerResult>;
1805
2058
  /** Get information on person by Key(personal id number or phone number) */
1806
2059
  personLookup?: Maybe<PersonLookup>;
2060
+ /** Returns content found, either by a list of content Ids, or filtered by tags.
2061
+ * In the case of filtering by ids, not found content Ids are listed as well.
2062
+ */
2063
+ content?: Maybe<MultipleContent>;
1807
2064
  /** get channel by id, null gets default channel */
1808
2065
  channel?: Maybe<Channel>;
1809
2066
  /** get all channels */
@@ -1865,6 +2122,10 @@ export type QueryCustomerProductListArgs = {
1865
2122
  shareToken?: Maybe<Scalars['String']>;
1866
2123
  };
1867
2124
 
2125
+ export type QueryCustomerLookupArgs = {
2126
+ phoneNumber?: Maybe<Scalars['String']>;
2127
+ };
2128
+
1868
2129
  export type QueryExternalCustomerLookupArgs = {
1869
2130
  key?: Maybe<Scalars['String']>;
1870
2131
  };
@@ -1873,6 +2134,11 @@ export type QueryPersonLookupArgs = {
1873
2134
  key: Scalars['String'];
1874
2135
  };
1875
2136
 
2137
+ export type QueryContentArgs = {
2138
+ ids?: Maybe<Array<Maybe<Scalars['String']>>>;
2139
+ tags?: Maybe<Array<Maybe<Scalars['String']>>>;
2140
+ };
2141
+
1876
2142
  export type QueryChannelArgs = {
1877
2143
  id?: Maybe<Scalars['String']>;
1878
2144
  };
@@ -1884,7 +2150,7 @@ export type QueryCategoriesArgs = {
1884
2150
  };
1885
2151
 
1886
2152
  export type QueryCategoryArgs = {
1887
- id: Scalars['Int'];
2153
+ id: Scalars['ID'];
1888
2154
  };
1889
2155
 
1890
2156
  export type QueryCartArgs = {
@@ -1961,6 +2227,10 @@ export type Route = {
1961
2227
  * another language.NB: Carries no additional performance cost.
1962
2228
  */
1963
2229
  alternateRoutes?: Maybe<Array<Maybe<AlternateRoute>>>;
2230
+ /** N.B. for troubleshooting routes only! */
2231
+ debug?: Maybe<Scalars['String']>;
2232
+ /** Breadcrumb texts; starting with the root parent, ending on this route. */
2233
+ breadcrumbs?: Maybe<Array<Maybe<Scalars['String']>>>;
1964
2234
  };
1965
2235
 
1966
2236
  export type SearchAutoCompleteResult = {
@@ -2059,6 +2329,11 @@ export type SignUpDeliveryAddressInput = {
2059
2329
  addressName?: Maybe<Scalars['String']>;
2060
2330
  };
2061
2331
 
2332
+ export type SignUpExternalAttribute = {
2333
+ name: Scalars['String'];
2334
+ value: Scalars['String'];
2335
+ };
2336
+
2062
2337
  export type SignUpInput = {
2063
2338
  type: CustomerType;
2064
2339
  pid?: Maybe<Scalars['String']>;
@@ -2071,7 +2346,9 @@ export type SignUpInput = {
2071
2346
  deliveryAddresses?: Maybe<Array<Maybe<SignUpDeliveryAddressInput>>>;
2072
2347
  preferences?: Maybe<SignUpPreferencesInput>;
2073
2348
  consents?: Maybe<Array<Maybe<SignUpConsentInput>>>;
2349
+ externalAttributes?: Maybe<Array<Maybe<SignUpExternalAttribute>>>;
2074
2350
  dynamicContent?: Maybe<Scalars['String']>;
2351
+ priceListAccessCode?: Maybe<Scalars['String']>;
2075
2352
  };
2076
2353
 
2077
2354
  export type SignUpPreferencesCommunicationInput = {
@@ -2119,7 +2396,9 @@ export type StartPage = Document & {
2119
2396
  /** The primary route of this StartPage */
2120
2397
  primaryRoute?: Maybe<Route>;
2121
2398
  breadcrumbText?: Maybe<Scalars['String']>;
2122
- /** Get content data set via the Content Editor */
2399
+ /** Get content data set via the Content Editor. NB: Carries a performance cost,
2400
+ * as asking for this will result in a separate API call in the backend.
2401
+ */
2123
2402
  data?: Maybe<Content>;
2124
2403
  };
2125
2404
 
@@ -2149,6 +2428,7 @@ export type StockStatus = {
2149
2428
  export type Store = {
2150
2429
  __typename?: 'Store';
2151
2430
  id: Scalars['Int'];
2431
+ externalId?: Maybe<Scalars['String']>;
2152
2432
  name?: Maybe<Scalars['String']>;
2153
2433
  city?: Maybe<Scalars['String']>;
2154
2434
  region?: Maybe<Scalars['String']>;
@@ -2180,8 +2460,15 @@ export type Token = {
2180
2460
  export type Tracking = {
2181
2461
  __typename?: 'Tracking';
2182
2462
  ga?: Maybe<GoogleAnalytics>;
2463
+ ga4?: Maybe<GoogleAnalytics4>;
2183
2464
  gtm?: Maybe<GoogleTagManager>;
2184
2465
  fca?: Maybe<FacebookConversionsApi>;
2466
+ trackingConsents?: Maybe<TrackingConsents>;
2467
+ };
2468
+
2469
+ export type TrackingConsents = {
2470
+ __typename?: 'TrackingConsents';
2471
+ useTrackingConsentApi?: Maybe<Scalars['Boolean']>;
2185
2472
  };
2186
2473
 
2187
2474
  export type UpdateCartInput = {
@@ -2201,6 +2488,16 @@ export type UpdateCartMutation = {
2201
2488
  cart?: Maybe<Cart>;
2202
2489
  };
2203
2490
 
2491
+ export type UpdateCustomerGroupResult = {
2492
+ __typename?: 'UpdateCustomerGroupResult';
2493
+ success: Scalars['Boolean'];
2494
+ };
2495
+
2496
+ export type UpdateCustomerPriceListResult = {
2497
+ __typename?: 'UpdateCustomerPriceListResult';
2498
+ success: Scalars['Boolean'];
2499
+ };
2500
+
2204
2501
  export type UpdateCustomerProductListInput = {
2205
2502
  id: Scalars['ID'];
2206
2503
  typeId: Scalars['ID'];