@jetshop/core 5.12.1 → 5.12.2
Sign up to get free protection for your applications and to get access to all the features.
- package/ChannelHandler/ChannelHandler.js +1 -4
- package/ChannelHandler/ChannelHandler.js.map +1 -1
- package/ChannelHandler/redirectUtils.d.ts +2 -1
- package/ChannelHandler/redirectUtils.js +2 -1
- package/ChannelHandler/redirectUtils.js.map +1 -1
- package/components/SortOrder/SortOrderContainer.d.ts +15 -3
- package/components/SortOrder/SortOrderContainer.js +27 -18
- package/components/SortOrder/SortOrderContainer.js.map +1 -1
- package/hooks/Filters/useSortOrder.d.ts +1 -0
- package/hooks/Filters/useSortOrder.js +6 -3
- package/hooks/Filters/useSortOrder.js.map +1 -1
- package/hooks/ProductList/list-transforms.d.ts +1 -0
- package/package.json +1 -1
- package/resolvers/filters/updateQueryString.d.ts +1 -1
- package/resolvers/filters/updateQueryString.js +4 -2
- package/resolvers/filters/updateQueryString.js.map +1 -1
- package/types.d.ts +4 -0
@@ -42,10 +42,7 @@ export class ChannelHandler {
|
|
42
42
|
return Promise.resolve(path);
|
43
43
|
}
|
44
44
|
if (path) {
|
45
|
-
|
46
|
-
// getPrimaryRoutePath will pick up the selected channel
|
47
|
-
this.setSelectedChannel(newChannel);
|
48
|
-
return this.getPrimaryRoutePath(path);
|
45
|
+
return this.getPrimaryRoutePath(path, newChannel, this.setSelectedChannel);
|
49
46
|
}
|
50
47
|
else {
|
51
48
|
return Promise.resolve('/');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChannelHandler.js","sourceRoot":"","sources":["ChannelHandler.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,OAAO,EACR,MAAM,gBAAgB,CAAC;AAGxB,MAAM,OAAO,cAAc;IAMzB,YACE,OAKI;QACF,eAAe,EAAE,SAAS;QAC1B,kBAAkB,EAAE,SAAS;QAC7B,QAAQ,EAAE,SAAS;QAC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Q,CAAC;QAC9B,aAAa,CAAC,OAAO,CACnB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAC7D,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import ApolloClient from 'apollo-client';
|
2
|
-
|
2
|
+
import { SelectedChannel } from '../components/ChannelContext/ChannelContext';
|
3
|
+
export declare type GetPrimaryRoutePath = (path: string, newChannel: SelectedChannel, setSelectedChannel: (selectedChannel: SelectedChannel) => void) => Promise<string>;
|
3
4
|
export declare function primaryRouteForPathFetcher(client: ApolloClient<any>): GetPrimaryRoutePath;
|
@@ -19,7 +19,7 @@ const PathnameRedirectQueryMap = {
|
|
19
19
|
Page: PagePathnameRedirectQuery
|
20
20
|
};
|
21
21
|
export function primaryRouteForPathFetcher(client) {
|
22
|
-
return (path) => __awaiter(this, void 0, void 0, function* () {
|
22
|
+
return (path, newChannel, setSelectedChannel) => __awaiter(this, void 0, void 0, function* () {
|
23
23
|
try {
|
24
24
|
if (!path) {
|
25
25
|
throw new Error('No path was provided');
|
@@ -31,6 +31,7 @@ export function primaryRouteForPathFetcher(client) {
|
|
31
31
|
}
|
32
32
|
});
|
33
33
|
const { id, __typename } = routeQueryResult.data.route.object;
|
34
|
+
setSelectedChannel(newChannel);
|
34
35
|
const pathnameQueryResult = yield client.query({
|
35
36
|
fetchPolicy: 'network-only',
|
36
37
|
query: PathnameRedirectQueryMap[__typename],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"redirectUtils.js","sourceRoot":"","sources":["redirectUtils.ts"],"names":[],"mappings":";;;;;;;;;AASA,OAAO,0BAA0B,MAAM,kCAAkC,CAAC;AAC1E,OAAO,4BAA4B,MAAM,oCAAoC,CAAC;AAC9E,OAAO,6BAA6B,MAAM,qCAAqC,C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AAC,CAAC,YAAY,CAAC,IAAI,CAAC;SAC/D;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,GAAG,CAAC;SACZ;IACH,CAAC,CAAA,CAAC;AACJ,CAAC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { RouteComponentProps } from 'react-router-dom';
|
3
|
-
import {
|
3
|
+
import type { History, Location } from 'history';
|
4
|
+
import { Direction, ISortOrderContext } from '@jetshop/core/components/SortOrder/SortOrderContext';
|
4
5
|
export interface SortOrderContainerProps extends RouteComponentProps<{}> {
|
5
6
|
children(context: ISortOrderContext): React.ReactNode;
|
6
7
|
}
|
@@ -10,16 +11,27 @@ export declare const sortTypes: {
|
|
10
11
|
export declare const sortValues: {
|
11
12
|
[key: string]: {
|
12
13
|
text: () => {
|
13
|
-
text: React.
|
14
|
+
text: React.FunctionComponent;
|
14
15
|
};
|
15
16
|
direction: string;
|
16
17
|
}[];
|
17
18
|
};
|
19
|
+
export declare function getSortOrderFromQueryString(search: Location['search']): {
|
20
|
+
sortOrder: any;
|
21
|
+
direction: any;
|
22
|
+
};
|
23
|
+
interface SortOrderUpdate {
|
24
|
+
value: string;
|
25
|
+
direction: Direction;
|
26
|
+
history: History;
|
27
|
+
location: Location;
|
28
|
+
}
|
29
|
+
export declare function updateSortOrderHistory({ value, direction, history, location }: SortOrderUpdate): void;
|
18
30
|
declare class SortOrderContainer extends React.Component<SortOrderContainerProps, ISortOrderContext> {
|
19
31
|
state: ISortOrderContext;
|
20
32
|
constructor(props: SortOrderContainerProps);
|
21
33
|
componentDidMount(): void;
|
22
|
-
onSelect: (value: string, direction:
|
34
|
+
onSelect: (value: string, direction: Direction) => boolean;
|
23
35
|
render(): JSX.Element;
|
24
36
|
}
|
25
37
|
declare const _default: React.ComponentClass<Pick<SortOrderContainerProps, "children"> & {
|
@@ -48,21 +48,35 @@ export const sortValues = {
|
|
48
48
|
}
|
49
49
|
]
|
50
50
|
};
|
51
|
+
export function getSortOrderFromQueryString(search) {
|
52
|
+
const parsedSearch = qs.parse(search, {
|
53
|
+
ignoreQueryPrefix: true
|
54
|
+
});
|
55
|
+
if (Object.keys(parsedSearch).includes('orderBy')) {
|
56
|
+
return {
|
57
|
+
sortOrder: parsedSearch.orderBy,
|
58
|
+
direction: parsedSearch.direction
|
59
|
+
};
|
60
|
+
}
|
61
|
+
}
|
62
|
+
export function updateSortOrderHistory({ value, direction, history, location }) {
|
63
|
+
const currentSearch = qs.parse(window.location.search, { ignoreQueryPrefix: true }) || {};
|
64
|
+
const newSearch = Object.assign(Object.assign({}, currentSearch), { orderBy: value, direction });
|
65
|
+
pushHistory({
|
66
|
+
history,
|
67
|
+
pathname: location.pathname,
|
68
|
+
hash: location.hash,
|
69
|
+
search: newSearch,
|
70
|
+
resetPage: true,
|
71
|
+
routeType: 'sortOrderChange'
|
72
|
+
});
|
73
|
+
}
|
51
74
|
class SortOrderContainer extends React.Component {
|
52
75
|
constructor(props) {
|
53
76
|
super(props);
|
54
77
|
this.onSelect = (value, direction) => {
|
55
78
|
const { location, history } = this.props;
|
56
|
-
|
57
|
-
const newSearch = Object.assign(Object.assign({}, currentSearch), { orderBy: value, direction });
|
58
|
-
pushHistory({
|
59
|
-
history,
|
60
|
-
pathname: location.pathname,
|
61
|
-
hash: location.hash,
|
62
|
-
search: newSearch,
|
63
|
-
resetPage: true,
|
64
|
-
routeType: 'sortOrderChange'
|
65
|
-
});
|
79
|
+
updateSortOrderHistory({ location, history, value, direction });
|
66
80
|
this.setState({ sortOrder: value, direction });
|
67
81
|
return true;
|
68
82
|
};
|
@@ -74,14 +88,9 @@ class SortOrderContainer extends React.Component {
|
|
74
88
|
}
|
75
89
|
componentDidMount() {
|
76
90
|
if (this.props.location.search) {
|
77
|
-
const
|
78
|
-
|
79
|
-
|
80
|
-
if (Object.keys(search).includes('orderBy')) {
|
81
|
-
this.setState({
|
82
|
-
sortOrder: search.orderBy,
|
83
|
-
direction: search.direction
|
84
|
-
});
|
91
|
+
const sortOrder = getSortOrderFromQueryString(this.props.location.search);
|
92
|
+
if (sortOrder) {
|
93
|
+
this.setState(sortOrder);
|
85
94
|
}
|
86
95
|
}
|
87
96
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SortOrderContainer.js","sourceRoot":"","sources":["SortOrderContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
1
|
+
{"version":3,"file":"SortOrderContainer.js","sourceRoot":"","sources":["SortOrderContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,gBAGN,MAAM,qDAAqD,CAAC;AAC7D,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAMnF,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,QAAQ;IACxB,YAAY,EAAE,MAAM;IACpB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAKnB;IACF,MAAM,EAAE;QACN;YACE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC;YACjB,SAAS,EAAE,WAAW;SACvB;QACD;YACE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC;YACjB,SAAS,EAAE,YAAY;SACxB;KACF;IACD,MAAM,EAAE;QACN;YACE,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC;YACtB,SAAS,EAAE,WAAW;SACvB;QACD;YACE,IAAI,EAAE,CAAC,CAAC,aA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,KAAa,EAAE,SAAoB,EAAE,EAAE;YACjD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACzC,sBAAsB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QArBA,IAAI,CAAC,KAAK,GAAG;YACX,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,YAAY;YACvB,eAAe,EAAE,IAAI,CAAC,QAAQ;SAC/B,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC9B,MAAM,SAAS,GAAG,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1E,IAAI,SAAS,EAAE;gBACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;aAC1B;SACF;IACH,CAAC;IASM,MAAM;QACX,OAAO,CACL,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IACzC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACN,CAC7B,CAAC;IACJ,CAAC;CACF;AAED,eAAe,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
|
@@ -5,8 +5,12 @@ export function useSortOrder({ sortOrders }) {
|
|
5
5
|
// Mutate sort order obj to include asc/desc & appropriate text
|
6
6
|
// eg { text: 'Price low to high', direction: 'ASCENDING' }
|
7
7
|
const { changeSortOrder, direction, sortOrder } = React.useContext(SortOrderContext);
|
8
|
-
const mappedSortOrder = sortOrders
|
9
|
-
|
8
|
+
const mappedSortOrder = getMappedSortOrder(sortOrders);
|
9
|
+
return { changeSortOrder, direction, sortOrder, mappedSortOrder };
|
10
|
+
}
|
11
|
+
export function getMappedSortOrder(sortOrders) {
|
12
|
+
return sortOrders.reduce((sorts, curr) => {
|
13
|
+
const mutatedSorts = sortValues[sortTypes[curr.value]].map((type) => {
|
10
14
|
return Object.assign(Object.assign({}, curr), { text: (React.createElement("span", null,
|
11
15
|
curr['text'],
|
12
16
|
" ",
|
@@ -14,6 +18,5 @@ export function useSortOrder({ sortOrders }) {
|
|
14
18
|
});
|
15
19
|
return [...sorts, ...mutatedSorts];
|
16
20
|
}, []);
|
17
|
-
return { changeSortOrder, direction, sortOrder, mappedSortOrder };
|
18
21
|
}
|
19
22
|
//# sourceMappingURL=useSortOrder.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useSortOrder.js","sourceRoot":"","sources":["useSortOrder.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACX,MAAM,uDAAuD,CAAC;AAC/D,OAAO,gBAAgB,MAAM,qDAAqD,CAAC;AAEnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EAGX;IACC,+DAA+D;IAC/D,2DAA2D;IAC3D,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"useSortOrder.js","sourceRoot":"","sources":["useSortOrder.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACX,MAAM,uDAAuD,CAAC;AAC/D,OAAO,gBAAgB,MAAM,qDAAqD,CAAC;AAEnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EAGX;IACC,+DAA+D;IAC/D,2DAA2D;IAC3D,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,GAC7C,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACrC,MAAM,eAAe,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,UAA8B;IAE9B,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACvC,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAClE,uCACK,IAAI,KACP,IAAI,EAAE,CACJ;oBACG,IAAI,CAAC,MAAM,CAAC;;oBAAG,IAAI,CAAC,IAAI,CACpB,CACR,EACD,SAAS,EAAE,IAAI,CAAC,SAAS,IACzB;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,YAAY,CAAC,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
@@ -56,6 +56,7 @@ productQueryResult: ProductsQuery): {
|
|
56
56
|
barcode?: string;
|
57
57
|
configurations?: import("../../types").ProductConfiguration[];
|
58
58
|
hasConfigurations: boolean;
|
59
|
+
hasFamilyMembers: boolean;
|
59
60
|
configurationPrice?: import("../../types").ProductConfigurationPrice;
|
60
61
|
quantitySuffix?: string;
|
61
62
|
isPreOrder?: boolean;
|
package/package.json
CHANGED
@@ -8,5 +8,5 @@ import { ActiveFilters } from '.';
|
|
8
8
|
*/
|
9
9
|
export declare function updateListFilterQueryString(activeFilters: ActiveFilters, history?: History): void;
|
10
10
|
export declare function updateBooleanQueryString(activeFilters: ActiveFilters, history?: History): void;
|
11
|
-
export declare function updateRangeQueryString(activeFilters: ActiveFilters): void;
|
11
|
+
export declare function updateRangeQueryString(activeFilters: ActiveFilters, history?: History): void;
|
12
12
|
export declare function updateMultiListQueryString(activeFilters: ActiveFilters): void;
|
@@ -61,8 +61,10 @@ export function updateBooleanQueryString(activeFilters, history) {
|
|
61
61
|
routeType: 'filterChange'
|
62
62
|
});
|
63
63
|
}
|
64
|
-
export function updateRangeQueryString(activeFilters) {
|
65
|
-
|
64
|
+
export function updateRangeQueryString(activeFilters, history) {
|
65
|
+
if (history === undefined) {
|
66
|
+
history = createBrowserHistory();
|
67
|
+
}
|
66
68
|
const activeRangeFilters = activeFilters.rangeFilters;
|
67
69
|
let queryString = '';
|
68
70
|
if (activeRangeFilters.length === 0) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"updateQueryString.js","sourceRoot":"","sources":["updateQueryString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAW,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,aAA4B,EAC5B,OAAiB;IAEjB,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,OAAO,GAAG,oBAAoB,EAAE,CAAC;KAClC;IAED,MAAM,iBAAiB,GAAG,aAAa,CAAC,WAAW,CAAC;IACpD,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;QAClC,gEAAgE;QAChE,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;KAC5C;SAAM;QACL,MAAM,MAAM,GAIR,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACjB,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACzC,CAAC,CAAC,CAAC;QACH,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE;YACjC,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CAAC;QACH,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE;YACjC,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;KACJ;IACD,eAAe,CAAC;QACd,OAAO;QACP,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW;QACX,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,cAAc;KAC1B,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,aAA4B;IACrE,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IACvC,MAAM,kBAAkB,GAAG,aAAa,CAAC,gBAAgB,CAAC;IAE1D,IAAI,WAAW,GAAG,EAAE,CAAC;IAErB,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE;QACnC,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;KACjD;SAAM;QACL,MAAM,MAAM,GAIR,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QAEtB,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACpC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9C,CAAC,CAAC,CAAC;QAEH,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE;YACjC,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;KACJ;IAED,eAAe,CAAC;QACd,OAAO;QACP,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW;QACX,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,cAAc;KAC1B,CAAC,CAAC;AACL,CAAC"}
|
package/types.d.ts
CHANGED
@@ -207,6 +207,7 @@ export type Category = Document & {
|
|
207
207
|
mainHeader?: Maybe<Scalars['String']>;
|
208
208
|
content?: Maybe<Scalars['String']>;
|
209
209
|
externalId?: Maybe<Scalars['String']>;
|
210
|
+
externalDiscountId?: Maybe<Scalars['String']>;
|
210
211
|
images?: Maybe<Array<Maybe<CategoryImage>>>;
|
211
212
|
/** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
|
212
213
|
products?: Maybe<PagedResult>;
|
@@ -736,6 +737,7 @@ export type DeleteCustomerProductListResult = {
|
|
736
737
|
|
737
738
|
export type Discount = {
|
738
739
|
__typename?: 'Discount';
|
740
|
+
externalId?: Maybe<Scalars['ID']>;
|
739
741
|
name?: Maybe<Scalars['String']>;
|
740
742
|
value?: Maybe<Price>;
|
741
743
|
description?: Maybe<Scalars['String']>;
|
@@ -1335,6 +1337,7 @@ export type Order = {
|
|
1335
1337
|
orderDate?: Maybe<Scalars['DateTime']>;
|
1336
1338
|
currency?: Maybe<Currency>;
|
1337
1339
|
attachments?: Maybe<Array<Maybe<OrderAttachment>>>;
|
1340
|
+
orderPurchaseLocation?: Maybe<Scalars['String']>;
|
1338
1341
|
};
|
1339
1342
|
|
1340
1343
|
|
@@ -1700,6 +1703,7 @@ export type Product = Document & {
|
|
1700
1703
|
*/
|
1701
1704
|
configurations?: Maybe<Array<Maybe<ProductConfiguration>>>;
|
1702
1705
|
hasConfigurations: Scalars['Boolean'];
|
1706
|
+
hasFamilyMembers: Scalars['Boolean'];
|
1703
1707
|
/**
|
1704
1708
|
* Calculates the price of the product based on the configuration choices that's
|
1705
1709
|
* been made. NB: Carries a performance cost, as asking for this will result in a
|