@vendure/dashboard 3.3.6-master-202506290242 → 3.3.6-master-202507010731
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.
- package/package.json +4 -4
- package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +7 -2
- package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_collections/collections.graphql.ts +16 -0
- package/src/app/routes/_authenticated/_collections/collections.tsx +16 -2
- package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_collections/components/assign-collections-to-channel-dialog.tsx +110 -0
- package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +99 -0
- package/src/app/routes/_authenticated/_countries/countries.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +9 -5
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +8 -5
- package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +5 -2
- package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_product-variants/components/product-variant-bulk-actions.tsx +184 -0
- package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +62 -1
- package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +33 -3
- package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +14 -3
- package/src/app/routes/_authenticated/_products/components/assign-facet-values-dialog.tsx +67 -36
- package/src/app/routes/_authenticated/_products/components/assign-to-channel-dialog.tsx +28 -17
- package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +12 -2
- package/src/app/routes/_authenticated/_products/components/product-variants-table.tsx +74 -55
- package/src/app/routes/_authenticated/_products/products_.$id.tsx +6 -1
- package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +6 -2
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +5 -1
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +9 -5
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +8 -4
- package/src/app/routes/_authenticated/_zones/zones.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +8 -4
- package/src/lib/components/shared/detail-page-button.tsx +3 -1
- package/src/lib/components/shared/paginated-list-data-table.tsx +6 -4
- package/src/lib/framework/data-table/data-table-extensions.ts +14 -0
- package/src/lib/framework/document-extension/extend-detail-form-query.ts +50 -0
- package/src/lib/framework/document-extension/extend-document.spec.ts +884 -0
- package/src/lib/framework/document-extension/extend-document.ts +159 -0
- package/src/lib/framework/document-introspection/add-custom-fields.ts +48 -0
- package/src/lib/framework/extension-api/define-dashboard-extension.ts +33 -2
- package/src/lib/framework/extension-api/extension-api-types.ts +21 -2
- package/src/lib/framework/form-engine/custom-form-component-extensions.ts +13 -3
- package/src/lib/framework/layout-engine/page-layout.tsx +1 -0
- package/src/lib/framework/page/detail-page-route-loader.tsx +22 -4
- package/src/lib/framework/page/use-detail-page.ts +11 -2
- package/src/lib/framework/registry/registry-types.ts +3 -0
- package/src/lib/graphql/graphql-env.d.ts +8 -6
- package/src/lib/hooks/use-extended-detail-query.ts +37 -0
- package/src/lib/hooks/use-extended-list-query.ts +73 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { Variables } from '@/graphql/api.js';
|
|
2
|
+
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
import {
|
|
4
|
+
DefinitionNode,
|
|
5
|
+
DocumentNode,
|
|
6
|
+
FieldNode,
|
|
7
|
+
FragmentDefinitionNode,
|
|
8
|
+
Kind,
|
|
9
|
+
OperationDefinitionNode,
|
|
10
|
+
parse,
|
|
11
|
+
SelectionNode,
|
|
12
|
+
SelectionSetNode,
|
|
13
|
+
} from 'graphql';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Type-safe template string function for extending GraphQL documents
|
|
17
|
+
*/
|
|
18
|
+
export function extendDocument<T extends TypedDocumentNode, V extends Variables = Variables>(
|
|
19
|
+
defaultDocument: T,
|
|
20
|
+
template: TemplateStringsArray,
|
|
21
|
+
...values: any[]
|
|
22
|
+
): T;
|
|
23
|
+
export function extendDocument<T extends TypedDocumentNode, V extends Variables = Variables>(
|
|
24
|
+
defaultDocument: T,
|
|
25
|
+
sdl: string | DocumentNode,
|
|
26
|
+
): T;
|
|
27
|
+
export function extendDocument<T extends TypedDocumentNode, V extends Variables = Variables>(
|
|
28
|
+
defaultDocument: T,
|
|
29
|
+
template: TemplateStringsArray | string | DocumentNode,
|
|
30
|
+
...values: any[]
|
|
31
|
+
): T {
|
|
32
|
+
// Handle template strings, regular strings, and DocumentNode
|
|
33
|
+
let extensionDocument: DocumentNode;
|
|
34
|
+
if (Array.isArray(template)) {
|
|
35
|
+
// Template string array
|
|
36
|
+
const sdl = (template as TemplateStringsArray).reduce((result, str, i) => {
|
|
37
|
+
return result + str + String(values[i] ?? '');
|
|
38
|
+
}, '');
|
|
39
|
+
extensionDocument = parse(sdl);
|
|
40
|
+
} else if (typeof template === 'string') {
|
|
41
|
+
// Regular string
|
|
42
|
+
extensionDocument = parse(template);
|
|
43
|
+
} else {
|
|
44
|
+
// DocumentNode
|
|
45
|
+
extensionDocument = template as DocumentNode;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Merge the documents
|
|
49
|
+
const mergedDocument = mergeDocuments(defaultDocument, extensionDocument);
|
|
50
|
+
|
|
51
|
+
return mergedDocument as T;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Merges two GraphQL documents, adding fields from the extension to the base document
|
|
56
|
+
*/
|
|
57
|
+
function mergeDocuments(baseDocument: DocumentNode, extensionDocument: DocumentNode): DocumentNode {
|
|
58
|
+
const baseClone = JSON.parse(JSON.stringify(baseDocument)) as DocumentNode;
|
|
59
|
+
|
|
60
|
+
// Get all operation definitions from both documents
|
|
61
|
+
const baseOperations = baseClone.definitions.filter(isOperationDefinition);
|
|
62
|
+
const extensionOperations = extensionDocument.definitions.filter(isOperationDefinition);
|
|
63
|
+
|
|
64
|
+
// Get all fragment definitions from both documents
|
|
65
|
+
const baseFragments = baseClone.definitions.filter(isFragmentDefinition);
|
|
66
|
+
const extensionFragments = extensionDocument.definitions.filter(isFragmentDefinition);
|
|
67
|
+
|
|
68
|
+
// Merge fragments first (extensions can reference them)
|
|
69
|
+
const mergedFragments = [...baseFragments, ...extensionFragments];
|
|
70
|
+
|
|
71
|
+
// For each operation in the extension, find the corresponding base operation and merge
|
|
72
|
+
for (const extensionOp of extensionOperations) {
|
|
73
|
+
// Get the top-level field name from the extension operation
|
|
74
|
+
const extensionField = extensionOp.selectionSet.selections[0] as FieldNode;
|
|
75
|
+
if (!extensionField) {
|
|
76
|
+
throw new Error('Extension query must have at least one top-level field');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Find a base operation that has the same top-level field
|
|
80
|
+
const baseOp = baseOperations.find(op => {
|
|
81
|
+
const baseField = op.selectionSet.selections[0] as FieldNode;
|
|
82
|
+
return baseField && baseField.name.value === extensionField.name.value;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
if (!baseOp) {
|
|
86
|
+
const validQueryFields = baseOperations
|
|
87
|
+
.map(op => {
|
|
88
|
+
const field = op.selectionSet.selections[0] as FieldNode;
|
|
89
|
+
return field ? field.name.value : 'unknown';
|
|
90
|
+
})
|
|
91
|
+
.join(', ');
|
|
92
|
+
throw new Error(
|
|
93
|
+
`The query extension must extend the '${validQueryFields}' query. ` +
|
|
94
|
+
`Got '${extensionField.name.value}' instead.`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Merge the selection sets of the matching top-level fields
|
|
99
|
+
const baseFieldNode = baseOp.selectionSet.selections[0] as FieldNode;
|
|
100
|
+
if (baseFieldNode.selectionSet && extensionField.selectionSet) {
|
|
101
|
+
mergeSelectionSets(baseFieldNode.selectionSet, extensionField.selectionSet);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Update the document with merged definitions
|
|
106
|
+
(baseClone as any).definitions = [...baseOperations, ...mergedFragments];
|
|
107
|
+
|
|
108
|
+
return baseClone;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Merges two selection sets, adding fields from the extension to the base
|
|
113
|
+
*/
|
|
114
|
+
function mergeSelectionSets(
|
|
115
|
+
baseSelectionSet: SelectionSetNode,
|
|
116
|
+
extensionSelectionSet: SelectionSetNode,
|
|
117
|
+
): void {
|
|
118
|
+
const baseFields = baseSelectionSet.selections.filter(isFieldNode);
|
|
119
|
+
const extensionFields = extensionSelectionSet.selections.filter(isFieldNode);
|
|
120
|
+
|
|
121
|
+
for (const extensionField of extensionFields) {
|
|
122
|
+
const existingField = baseFields.find(field => field.name.value === extensionField.name.value);
|
|
123
|
+
|
|
124
|
+
if (existingField) {
|
|
125
|
+
// Field already exists, merge their selection sets if both have them
|
|
126
|
+
if (existingField.selectionSet && extensionField.selectionSet) {
|
|
127
|
+
mergeSelectionSets(existingField.selectionSet, extensionField.selectionSet);
|
|
128
|
+
} else if (extensionField.selectionSet && !existingField.selectionSet) {
|
|
129
|
+
// Extension has a selection set but base doesn't, add it
|
|
130
|
+
(existingField as any).selectionSet = extensionField.selectionSet;
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
// Field doesn't exist, add it
|
|
134
|
+
(baseSelectionSet as any).selections.push(extensionField);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Type guards
|
|
141
|
+
*/
|
|
142
|
+
function isOperationDefinition(value: DefinitionNode): value is OperationDefinitionNode {
|
|
143
|
+
return value.kind === Kind.OPERATION_DEFINITION;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function isFragmentDefinition(value: DefinitionNode): value is FragmentDefinitionNode {
|
|
147
|
+
return value.kind === Kind.FRAGMENT_DEFINITION;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function isFieldNode(value: SelectionNode): value is FieldNode {
|
|
151
|
+
return value.kind === Kind.FIELD;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Utility function to create a template string tag for better DX
|
|
156
|
+
*/
|
|
157
|
+
export function gqlExtend(strings: TemplateStringsArray, ...values: any[]) {
|
|
158
|
+
return (defaultDocument: DocumentNode) => extendDocument(defaultDocument, strings, ...values);
|
|
159
|
+
}
|
|
@@ -25,6 +25,35 @@ type RelationCustomFieldFragment = ResultOf<typeof relationCustomFieldFragment>;
|
|
|
25
25
|
|
|
26
26
|
let globalCustomFieldsMap: Map<string, CustomFieldConfig[]> = new Map();
|
|
27
27
|
|
|
28
|
+
// Memoization cache using WeakMap to avoid memory leaks
|
|
29
|
+
const memoizationCache = new WeakMap<DocumentNode, Map<string, TypedDocumentNode<any, any>>>();
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates a cache key for the options object
|
|
33
|
+
*/
|
|
34
|
+
function createOptionsKey(options?: {
|
|
35
|
+
customFieldsMap?: Map<string, CustomFieldConfig[]>;
|
|
36
|
+
includeCustomFields?: string[];
|
|
37
|
+
}): string {
|
|
38
|
+
if (!options) return 'default';
|
|
39
|
+
|
|
40
|
+
const parts: string[] = [];
|
|
41
|
+
|
|
42
|
+
if (options.customFieldsMap) {
|
|
43
|
+
// Create a deterministic key for the customFieldsMap
|
|
44
|
+
const mapEntries = Array.from(options.customFieldsMap.entries())
|
|
45
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
46
|
+
.map(([key, value]) => `${key}:${value.length}`);
|
|
47
|
+
parts.push(`map:${mapEntries.join(',')}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (options.includeCustomFields) {
|
|
51
|
+
parts.push(`include:${options.includeCustomFields.sort().join(',')}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return parts.join('|') || 'default';
|
|
55
|
+
}
|
|
56
|
+
|
|
28
57
|
/**
|
|
29
58
|
* @description
|
|
30
59
|
* This function is used to set the global custom fields map.
|
|
@@ -56,6 +85,8 @@ export function getCustomFieldsMap() {
|
|
|
56
85
|
/**
|
|
57
86
|
* Given a GraphQL AST (DocumentNode), this function looks for fragment definitions and adds and configured
|
|
58
87
|
* custom fields to those fragments.
|
|
88
|
+
*
|
|
89
|
+
* This function is memoized to return a stable identity for given inputs.
|
|
59
90
|
*/
|
|
60
91
|
export function addCustomFields<T, V extends Variables = Variables>(
|
|
61
92
|
documentNode: DocumentNode | TypedDocumentNode<T, V>,
|
|
@@ -64,6 +95,21 @@ export function addCustomFields<T, V extends Variables = Variables>(
|
|
|
64
95
|
includeCustomFields?: string[];
|
|
65
96
|
},
|
|
66
97
|
): TypedDocumentNode<T, V> {
|
|
98
|
+
const optionsKey = createOptionsKey(options);
|
|
99
|
+
|
|
100
|
+
// Check if we have a cached result for this document and options
|
|
101
|
+
let documentCache = memoizationCache.get(documentNode);
|
|
102
|
+
if (!documentCache) {
|
|
103
|
+
documentCache = new Map();
|
|
104
|
+
memoizationCache.set(documentNode, documentCache);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const cachedResult = documentCache.get(optionsKey);
|
|
108
|
+
if (cachedResult) {
|
|
109
|
+
return cachedResult as TypedDocumentNode<T, V>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// If not cached, compute the result
|
|
67
113
|
const clone = JSON.parse(JSON.stringify(documentNode)) as DocumentNode;
|
|
68
114
|
const customFields = options?.customFieldsMap || globalCustomFieldsMap;
|
|
69
115
|
|
|
@@ -209,6 +255,8 @@ export function addCustomFields<T, V extends Variables = Variables>(
|
|
|
209
255
|
}
|
|
210
256
|
}
|
|
211
257
|
|
|
258
|
+
// Cache the result before returning
|
|
259
|
+
documentCache.set(optionsKey, clone);
|
|
212
260
|
return clone;
|
|
213
261
|
}
|
|
214
262
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { addBulkAction } from '@/framework/data-table/data-table-extensions.js';
|
|
1
|
+
import { addBulkAction, addListQueryDocument } from '@/framework/data-table/data-table-extensions.js';
|
|
2
|
+
import { parse } from 'graphql';
|
|
2
3
|
|
|
3
4
|
import { registerDashboardWidget } from '../dashboard-widget/widget-extensions.js';
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
addCustomFormComponent,
|
|
7
|
+
addDetailQueryDocument,
|
|
8
|
+
} from '../form-engine/custom-form-component-extensions.js';
|
|
5
9
|
import {
|
|
6
10
|
registerDashboardActionBarItem,
|
|
7
11
|
registerDashboardPageBlock,
|
|
@@ -91,6 +95,33 @@ export function defineDashboardExtension(extension: DashboardExtension) {
|
|
|
91
95
|
addBulkAction(dataTable.pageId, dataTable.blockId, action);
|
|
92
96
|
}
|
|
93
97
|
}
|
|
98
|
+
if (dataTable.extendListDocument) {
|
|
99
|
+
const document =
|
|
100
|
+
typeof dataTable.extendListDocument === 'function'
|
|
101
|
+
? dataTable.extendListDocument()
|
|
102
|
+
: dataTable.extendListDocument;
|
|
103
|
+
|
|
104
|
+
addListQueryDocument(
|
|
105
|
+
dataTable.pageId,
|
|
106
|
+
dataTable.blockId,
|
|
107
|
+
typeof document === 'string' ? parse(document) : document,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (extension.detailForms) {
|
|
113
|
+
for (const detailForm of extension.detailForms) {
|
|
114
|
+
if (detailForm.extendDetailDocument) {
|
|
115
|
+
const document =
|
|
116
|
+
typeof detailForm.extendDetailDocument === 'function'
|
|
117
|
+
? detailForm.extendDetailDocument()
|
|
118
|
+
: detailForm.extendDetailDocument;
|
|
119
|
+
|
|
120
|
+
addDetailQueryDocument(
|
|
121
|
+
detailForm.pageId,
|
|
122
|
+
typeof document === 'string' ? parse(document) : document,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
94
125
|
}
|
|
95
126
|
}
|
|
96
127
|
const callbacks = globalRegistry.get('extensionSourceChangeCallbacks');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContextValue } from '@/framework/layout-engine/page-provider.js';
|
|
2
2
|
import { AnyRoute, RouteOptions } from '@tanstack/react-router';
|
|
3
|
+
import { DocumentNode } from 'graphql';
|
|
3
4
|
import { LucideIcon } from 'lucide-react';
|
|
4
5
|
import type React from 'react';
|
|
5
6
|
|
|
@@ -119,7 +120,7 @@ export interface DashboardPageBlockDefinition {
|
|
|
119
120
|
* @docsCategory extensions
|
|
120
121
|
* @since 3.4.0
|
|
121
122
|
*/
|
|
122
|
-
export interface
|
|
123
|
+
export interface DashboardDataTableExtensionDefinition {
|
|
123
124
|
/**
|
|
124
125
|
* @description
|
|
125
126
|
* The ID of the page where the data table is located, e.g. `'product-list'`, `'order-list'`.
|
|
@@ -137,6 +138,23 @@ export interface DashboardDataTableDefinition {
|
|
|
137
138
|
* An array of additional bulk actions that will be available on the data table.
|
|
138
139
|
*/
|
|
139
140
|
bulkActions?: BulkAction[];
|
|
141
|
+
/**
|
|
142
|
+
* @description
|
|
143
|
+
* Allows you to extend the list document for the data table.
|
|
144
|
+
*/
|
|
145
|
+
extendListDocument?: string | DocumentNode | (() => DocumentNode | string);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface DashboardDetailFormExtensionDefinition {
|
|
149
|
+
/**
|
|
150
|
+
* @description
|
|
151
|
+
* The ID of the page where the detail form is located, e.g. `'product-detail'`, `'order-detail'`.
|
|
152
|
+
*/
|
|
153
|
+
pageId: string;
|
|
154
|
+
/**
|
|
155
|
+
* @description
|
|
156
|
+
*/
|
|
157
|
+
extendDetailDocument?: string | DocumentNode | (() => DocumentNode | string);
|
|
140
158
|
}
|
|
141
159
|
|
|
142
160
|
/**
|
|
@@ -189,5 +207,6 @@ export interface DashboardExtension {
|
|
|
189
207
|
* @description
|
|
190
208
|
* Allows you to customize aspects of existing data tables in the dashboard.
|
|
191
209
|
*/
|
|
192
|
-
dataTables?:
|
|
210
|
+
dataTables?: DashboardDataTableExtensionDefinition[];
|
|
211
|
+
detailForms?: DashboardDetailFormExtensionDefinition[];
|
|
193
212
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DocumentNode } from 'graphql';
|
|
2
|
+
|
|
1
3
|
import { DashboardCustomFormComponent } from '../extension-api/extension-api-types.js';
|
|
2
4
|
import { globalRegistry } from '../registry/global-registry.js';
|
|
3
5
|
|
|
@@ -8,9 +10,7 @@ globalRegistry.register(
|
|
|
8
10
|
new Map<string, React.FunctionComponent<CustomFormComponentInputProps>>(),
|
|
9
11
|
);
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
return globalRegistry.get('customFormComponents');
|
|
13
|
-
}
|
|
13
|
+
globalRegistry.register('detailQueryDocumentRegistry', new Map<string, DocumentNode[]>());
|
|
14
14
|
|
|
15
15
|
export function getCustomFormComponent(
|
|
16
16
|
id: string,
|
|
@@ -26,3 +26,13 @@ export function addCustomFormComponent({ id, component }: DashboardCustomFormCom
|
|
|
26
26
|
}
|
|
27
27
|
customFormComponents.set(id, component);
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
export function getDetailQueryDocuments(pageId: string): DocumentNode[] {
|
|
31
|
+
return globalRegistry.get('detailQueryDocumentRegistry').get(pageId) || [];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function addDetailQueryDocument(pageId: string, document: DocumentNode) {
|
|
35
|
+
const listQueryDocumentRegistry = globalRegistry.get('detailQueryDocumentRegistry');
|
|
36
|
+
const existingDocuments = listQueryDocumentRegistry.get(pageId) || [];
|
|
37
|
+
listQueryDocumentRegistry.set(pageId, [...existingDocuments, document]);
|
|
38
|
+
}
|
|
@@ -194,6 +194,7 @@ export function PageLayout({ children, className }: PageLayoutProps) {
|
|
|
194
194
|
if (extensionBlock) {
|
|
195
195
|
const ExtensionBlock = (
|
|
196
196
|
<PageBlock
|
|
197
|
+
key={childBlock.key}
|
|
197
198
|
column={extensionBlock.location.column}
|
|
198
199
|
blockId={extensionBlock.id}
|
|
199
200
|
title={extensionBlock.title}
|
|
@@ -1,37 +1,55 @@
|
|
|
1
1
|
import { NEW_ENTITY_PATH } from '@/constants.js';
|
|
2
2
|
|
|
3
3
|
import { PageBreadcrumb } from '@/components/layout/generated-breadcrumbs.js';
|
|
4
|
+
import { extendDetailFormQuery } from '@/framework/document-extension/extend-detail-form-query.js';
|
|
4
5
|
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
5
|
-
import { FileBaseRouteOptions } from '@tanstack/react-router';
|
|
6
|
+
import { FileBaseRouteOptions, ParsedLocation } from '@tanstack/react-router';
|
|
6
7
|
import { addCustomFields } from '../document-introspection/add-custom-fields.js';
|
|
7
8
|
import { getQueryName, getQueryTypeFieldInfo } from '../document-introspection/get-document-structure.js';
|
|
8
9
|
import { DetailEntity } from './page-types.js';
|
|
9
10
|
import { getDetailQueryOptions } from './use-detail-page.js';
|
|
10
11
|
|
|
11
12
|
export interface DetailPageRouteLoaderConfig<T extends TypedDocumentNode<any, any>> {
|
|
13
|
+
/**
|
|
14
|
+
* @description
|
|
15
|
+
* The pageId is used to ensure any detail form extensions (such as extensions to
|
|
16
|
+
* the detail query document) get correctly applied at the route loader level.
|
|
17
|
+
*/
|
|
18
|
+
pageId?: string;
|
|
12
19
|
queryDocument: T;
|
|
13
|
-
breadcrumb: (
|
|
20
|
+
breadcrumb: (
|
|
21
|
+
isNew: boolean,
|
|
22
|
+
entity: DetailEntity<T>,
|
|
23
|
+
location: ParsedLocation,
|
|
24
|
+
) => Array<PageBreadcrumb | undefined>;
|
|
14
25
|
}
|
|
15
26
|
|
|
16
27
|
export function detailPageRouteLoader<T extends TypedDocumentNode<any, any>>({
|
|
28
|
+
pageId,
|
|
17
29
|
queryDocument,
|
|
18
30
|
breadcrumb,
|
|
19
31
|
}: DetailPageRouteLoaderConfig<T>) {
|
|
20
32
|
const loader: FileBaseRouteOptions<any, any>['loader'] = async ({
|
|
21
33
|
context,
|
|
22
34
|
params,
|
|
35
|
+
location,
|
|
23
36
|
}: {
|
|
24
37
|
context: any;
|
|
25
38
|
params: any;
|
|
39
|
+
location: ParsedLocation;
|
|
26
40
|
}) => {
|
|
27
41
|
if (!params.id) {
|
|
28
42
|
throw new Error('ID param is required');
|
|
29
43
|
}
|
|
30
44
|
const isNew = params.id === NEW_ENTITY_PATH;
|
|
45
|
+
const { extendedQuery: extendedQueryDocument } = extendDetailFormQuery(
|
|
46
|
+
addCustomFields(queryDocument),
|
|
47
|
+
pageId,
|
|
48
|
+
);
|
|
31
49
|
const result = isNew
|
|
32
50
|
? null
|
|
33
51
|
: await context.queryClient.ensureQueryData(
|
|
34
|
-
getDetailQueryOptions(
|
|
52
|
+
getDetailQueryOptions(extendedQueryDocument, { id: params.id }),
|
|
35
53
|
{ id: params.id },
|
|
36
54
|
);
|
|
37
55
|
|
|
@@ -42,7 +60,7 @@ export function detailPageRouteLoader<T extends TypedDocumentNode<any, any>>({
|
|
|
42
60
|
throw new Error(`${entityName} with the ID ${params.id} was not found`);
|
|
43
61
|
}
|
|
44
62
|
return {
|
|
45
|
-
breadcrumb: breadcrumb(isNew, result?.[entityField]),
|
|
63
|
+
breadcrumb: breadcrumb(isNew, result?.[entityField], location),
|
|
46
64
|
};
|
|
47
65
|
};
|
|
48
66
|
return loader;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NEW_ENTITY_PATH } from '@/constants.js';
|
|
2
2
|
import { api, Variables } from '@/graphql/api.js';
|
|
3
3
|
import { useCustomFieldConfig } from '@/hooks/use-custom-field-config.js';
|
|
4
|
+
import { useExtendedDetailQuery } from '@/hooks/use-extended-detail-query.js';
|
|
4
5
|
import { removeReadonlyCustomFields } from '@/lib/utils.js';
|
|
5
6
|
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
6
7
|
import {
|
|
@@ -48,6 +49,12 @@ export interface DetailPageOptions<
|
|
|
48
49
|
VarNameCreate extends keyof VariablesOf<C> = 'input',
|
|
49
50
|
VarNameUpdate extends keyof VariablesOf<U> = 'input',
|
|
50
51
|
> {
|
|
52
|
+
/**
|
|
53
|
+
* @description
|
|
54
|
+
* The page id. This is optional, but if provided, it will be used to
|
|
55
|
+
* identify the page when extending the detail page query
|
|
56
|
+
*/
|
|
57
|
+
pageId?: string;
|
|
51
58
|
/**
|
|
52
59
|
* @description
|
|
53
60
|
* The query document to fetch the entity.
|
|
@@ -237,6 +244,7 @@ export function useDetailPage<
|
|
|
237
244
|
options: DetailPageOptions<T, C, U, EntityField, VarNameCreate, VarNameUpdate>,
|
|
238
245
|
): UseDetailPageResult<T, C, U, EntityField> {
|
|
239
246
|
const {
|
|
247
|
+
pageId,
|
|
240
248
|
queryDocument,
|
|
241
249
|
createDocument,
|
|
242
250
|
updateDocument,
|
|
@@ -253,11 +261,12 @@ export function useDetailPage<
|
|
|
253
261
|
const queryClient = useQueryClient();
|
|
254
262
|
const returnEntityName = entityName ?? getEntityName(queryDocument);
|
|
255
263
|
const customFieldConfig = useCustomFieldConfig(returnEntityName);
|
|
256
|
-
const
|
|
264
|
+
const extendedDetailQuery = useExtendedDetailQuery(addCustomFields(queryDocument), pageId);
|
|
265
|
+
const detailQueryOptions = getDetailQueryOptions(extendedDetailQuery, {
|
|
257
266
|
id: isNew ? '__NEW__' : params.id,
|
|
258
267
|
});
|
|
259
268
|
const detailQuery = useSuspenseQuery(detailQueryOptions);
|
|
260
|
-
const entityQueryField = entityField ?? getQueryName(
|
|
269
|
+
const entityQueryField = entityField ?? getQueryName(extendedDetailQuery);
|
|
261
270
|
|
|
262
271
|
const entity = (detailQuery?.data as any)[entityQueryField] as
|
|
263
272
|
| DetailPageEntity<T, EntityField>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocumentNode } from 'graphql';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { DashboardAlertDefinition } from '../alert/types.js';
|
|
@@ -20,4 +21,6 @@ export interface GlobalRegistryContents {
|
|
|
20
21
|
dashboardAlertRegistry: Map<string, DashboardAlertDefinition>;
|
|
21
22
|
customFormComponents: Map<string, React.FunctionComponent<CustomFormComponentInputProps>>;
|
|
22
23
|
bulkActionsRegistry: Map<string, BulkAction[]>;
|
|
24
|
+
listQueryDocumentRegistry: Map<string, DocumentNode[]>;
|
|
25
|
+
detailQueryDocumentRegistry: Map<string, DocumentNode[]>;
|
|
23
26
|
}
|
|
@@ -280,8 +280,8 @@ export type introspection_types = {
|
|
|
280
280
|
'PreviewCollectionVariantsInput': { kind: 'INPUT_OBJECT'; name: 'PreviewCollectionVariantsInput'; isOneOf: false; inputFields: [{ name: 'parentId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'inheritFilters'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'filters'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ConfigurableOperationInput'; ofType: null; }; }; }; }; defaultValue: null }]; };
|
|
281
281
|
'PriceRange': { kind: 'OBJECT'; name: 'PriceRange'; fields: { 'max': { name: 'max'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Money'; ofType: null; }; } }; 'min': { name: 'min'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Money'; ofType: null; }; } }; }; };
|
|
282
282
|
'Product': { kind: 'OBJECT'; name: 'Product'; fields: { 'assets': { name: 'assets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Asset'; ofType: null; }; }; }; } }; 'channels': { name: 'channels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Channel'; ofType: null; }; }; }; } }; 'collections': { name: 'collections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Collection'; ofType: null; }; }; }; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'customFields': { name: 'customFields'; type: { kind: 'OBJECT'; name: 'ProductCustomFields'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'enabled': { name: 'enabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'facetValues': { name: 'facetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; }; }; } }; 'featuredAsset': { name: 'featuredAsset'; type: { kind: 'OBJECT'; name: 'Asset'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'languageCode': { name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'optionGroups': { name: 'optionGroups'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; }; }; } }; 'reviews': { name: 'reviews'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductReviewList'; ofType: null; }; } }; 'reviewsHistogram': { name: 'reviewsHistogram'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductReviewHistogramItem'; ofType: null; }; }; }; } }; 'slug': { name: 'slug'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'translations': { name: 'translations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductTranslation'; ofType: null; }; }; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'variantList': { name: 'variantList'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariantList'; ofType: null; }; } }; 'variants': { name: 'variants'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; }; } }; }; };
|
|
283
|
-
'ProductCustomFields': { kind: 'OBJECT'; name: 'ProductCustomFields'; fields: { 'downloadable': { name: 'downloadable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'featuredReview': { name: 'featuredReview'; type: { kind: 'OBJECT'; name: 'ProductReview'; ofType: null; } }; 'infoUrl': { name: 'infoUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'lastUpdated': { name: 'lastUpdated'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'reviewCount': { name: 'reviewCount'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'reviewRating': { name: 'reviewRating'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'shortName': { name: 'shortName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
|
|
284
|
-
'ProductFilterParameter': { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; isOneOf: false; inputFields: [{ name: 'facetValueId'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'sku'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'createdAt'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'updatedAt'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'languageCode'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'slug'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'enabled'; type: { kind: 'INPUT_OBJECT'; name: 'BooleanOperators'; ofType: null; }; defaultValue: null }, { name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; ofType: null; }; }; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; ofType: null; }; }; }; defaultValue: null }, { name: 'infoUrl'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'downloadable'; type: { kind: 'INPUT_OBJECT'; name: 'BooleanOperators'; ofType: null; }; defaultValue: null }, { name: 'shortName'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'lastUpdated'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'reviewRating'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'reviewCount'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }]; };
|
|
283
|
+
'ProductCustomFields': { kind: 'OBJECT'; name: 'ProductCustomFields'; fields: { 'downloadable': { name: 'downloadable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'featuredReview': { name: 'featuredReview'; type: { kind: 'OBJECT'; name: 'ProductReview'; ofType: null; } }; 'infoUrl': { name: 'infoUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'lastUpdated': { name: 'lastUpdated'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'reviewCount': { name: 'reviewCount'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'reviewRating': { name: 'reviewRating'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'shortName': { name: 'shortName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'translatableText': { name: 'translatableText'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
|
|
284
|
+
'ProductFilterParameter': { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; isOneOf: false; inputFields: [{ name: 'facetValueId'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'sku'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'createdAt'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'updatedAt'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'languageCode'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'slug'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'enabled'; type: { kind: 'INPUT_OBJECT'; name: 'BooleanOperators'; ofType: null; }; defaultValue: null }, { name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; ofType: null; }; }; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; ofType: null; }; }; }; defaultValue: null }, { name: 'infoUrl'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'downloadable'; type: { kind: 'INPUT_OBJECT'; name: 'BooleanOperators'; ofType: null; }; defaultValue: null }, { name: 'shortName'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'lastUpdated'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'reviewRating'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'reviewCount'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'translatableText'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }]; };
|
|
285
285
|
'ProductList': { kind: 'OBJECT'; name: 'ProductList'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; }; }; } }; 'totalItems': { name: 'totalItems'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
|
|
286
286
|
'ProductListOptions': { kind: 'INPUT_OBJECT'; name: 'ProductListOptions'; isOneOf: false; inputFields: [{ name: 'skip'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'take'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'sort'; type: { kind: 'INPUT_OBJECT'; name: 'ProductSortParameter'; ofType: null; }; defaultValue: null }, { name: 'filter'; type: { kind: 'INPUT_OBJECT'; name: 'ProductFilterParameter'; ofType: null; }; defaultValue: null }, { name: 'filterOperator'; type: { kind: 'ENUM'; name: 'LogicalOperator'; ofType: null; }; defaultValue: null }]; };
|
|
287
287
|
'ProductOption': { kind: 'OBJECT'; name: 'ProductOption'; fields: { 'code': { name: 'code'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'customFields': { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; } }; 'group': { name: 'group'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionGroup'; ofType: null; }; } }; 'groupId': { name: 'groupId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'languageCode': { name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'translations': { name: 'translations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOptionTranslation'; ofType: null; }; }; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; };
|
|
@@ -300,11 +300,13 @@ export type introspection_types = {
|
|
|
300
300
|
'ProductReviewSortParameter': { kind: 'INPUT_OBJECT'; name: 'ProductReviewSortParameter'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'createdAt'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'updatedAt'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'summary'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'body'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'rating'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'authorName'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'authorLocation'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'upvotes'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'downvotes'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'response'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'responseCreatedAt'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'reviewerName'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'verifiedReviewerName'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; };
|
|
301
301
|
'ProductReviewTranslation': { kind: 'OBJECT'; name: 'ProductReviewTranslation'; fields: { 'customFields': { name: 'customFields'; type: { kind: 'OBJECT'; name: 'ProductReviewTranslationCustomFields'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'languageCode': { name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; } }; 'text': { name: 'text'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
|
|
302
302
|
'ProductReviewTranslationCustomFields': { kind: 'OBJECT'; name: 'ProductReviewTranslationCustomFields'; fields: { 'reviewerName': { name: 'reviewerName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
|
|
303
|
-
'
|
|
303
|
+
'ProductReviewTranslationInput': { kind: 'INPUT_OBJECT'; name: 'ProductReviewTranslationInput'; isOneOf: false; inputFields: [{ name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; }; defaultValue: null }, { name: 'text'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'INPUT_OBJECT'; name: 'ProductReviewTranslationInputCustomFields'; ofType: null; }; defaultValue: null }]; };
|
|
304
|
+
'ProductReviewTranslationInputCustomFields': { kind: 'INPUT_OBJECT'; name: 'ProductReviewTranslationInputCustomFields'; isOneOf: false; inputFields: [{ name: 'reviewerName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; };
|
|
305
|
+
'ProductSortParameter': { kind: 'INPUT_OBJECT'; name: 'ProductSortParameter'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'createdAt'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'updatedAt'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'slug'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'infoUrl'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'downloadable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'shortName'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'lastUpdated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'reviewRating'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'reviewCount'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'featuredReview'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'translatableText'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; };
|
|
304
306
|
'ProductTranslation': { kind: 'OBJECT'; name: 'ProductTranslation'; fields: { 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'customFields': { name: 'customFields'; type: { kind: 'OBJECT'; name: 'ProductTranslationCustomFields'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'languageCode': { name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'slug': { name: 'slug'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; };
|
|
305
|
-
'ProductTranslationCustomFields': { kind: 'OBJECT'; name: 'ProductTranslationCustomFields'; fields: { 'shortName': { name: 'shortName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
|
|
307
|
+
'ProductTranslationCustomFields': { kind: 'OBJECT'; name: 'ProductTranslationCustomFields'; fields: { 'shortName': { name: 'shortName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'translatableText': { name: 'translatableText'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
|
|
306
308
|
'ProductTranslationInput': { kind: 'INPUT_OBJECT'; name: 'ProductTranslationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'slug'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'INPUT_OBJECT'; name: 'ProductTranslationInputCustomFields'; ofType: null; }; defaultValue: null }]; };
|
|
307
|
-
'ProductTranslationInputCustomFields': { kind: 'INPUT_OBJECT'; name: 'ProductTranslationInputCustomFields'; isOneOf: false; inputFields: [{ name: 'shortName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; };
|
|
309
|
+
'ProductTranslationInputCustomFields': { kind: 'INPUT_OBJECT'; name: 'ProductTranslationInputCustomFields'; isOneOf: false; inputFields: [{ name: 'shortName'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'translatableText'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; };
|
|
308
310
|
'ProductVariant': { kind: 'OBJECT'; name: 'ProductVariant'; fields: { 'assets': { name: 'assets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Asset'; ofType: null; }; }; }; } }; 'channels': { name: 'channels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Channel'; ofType: null; }; }; }; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'currencyCode': { name: 'currencyCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'CurrencyCode'; ofType: null; }; } }; 'customFields': { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; } }; 'enabled': { name: 'enabled'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'facetValues': { name: 'facetValues'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FacetValue'; ofType: null; }; }; }; } }; 'featuredAsset': { name: 'featuredAsset'; type: { kind: 'OBJECT'; name: 'Asset'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'languageCode': { name: 'languageCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'LanguageCode'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'options': { name: 'options'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductOption'; ofType: null; }; }; }; } }; 'outOfStockThreshold': { name: 'outOfStockThreshold'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'price': { name: 'price'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Money'; ofType: null; }; } }; 'priceWithTax': { name: 'priceWithTax'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Money'; ofType: null; }; } }; 'prices': { name: 'prices'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariantPrice'; ofType: null; }; }; }; } }; 'product': { name: 'product'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Product'; ofType: null; }; } }; 'productId': { name: 'productId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'sku': { name: 'sku'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'stockAllocated': { name: 'stockAllocated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'stockLevel': { name: 'stockLevel'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'stockLevels': { name: 'stockLevels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockLevel'; ofType: null; }; }; }; } }; 'stockMovements': { name: 'stockMovements'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StockMovementList'; ofType: null; }; } }; 'stockOnHand': { name: 'stockOnHand'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'taxCategory': { name: 'taxCategory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxCategory'; ofType: null; }; } }; 'taxRateApplied': { name: 'taxRateApplied'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TaxRate'; ofType: null; }; } }; 'trackInventory': { name: 'trackInventory'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'GlobalFlag'; ofType: null; }; } }; 'translations': { name: 'translations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariantTranslation'; ofType: null; }; }; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'useGlobalOutOfStockThreshold': { name: 'useGlobalOutOfStockThreshold'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; };
|
|
309
311
|
'ProductVariantFilterParameter': { kind: 'INPUT_OBJECT'; name: 'ProductVariantFilterParameter'; isOneOf: false; inputFields: [{ name: 'facetValueId'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'enabled'; type: { kind: 'INPUT_OBJECT'; name: 'BooleanOperators'; ofType: null; }; defaultValue: null }, { name: 'trackInventory'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'stockOnHand'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'stockAllocated'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'outOfStockThreshold'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'useGlobalOutOfStockThreshold'; type: { kind: 'INPUT_OBJECT'; name: 'BooleanOperators'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'productId'; type: { kind: 'INPUT_OBJECT'; name: 'IDOperators'; ofType: null; }; defaultValue: null }, { name: 'createdAt'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'updatedAt'; type: { kind: 'INPUT_OBJECT'; name: 'DateOperators'; ofType: null; }; defaultValue: null }, { name: 'languageCode'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'sku'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'price'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'currencyCode'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: 'priceWithTax'; type: { kind: 'INPUT_OBJECT'; name: 'NumberOperators'; ofType: null; }; defaultValue: null }, { name: 'stockLevel'; type: { kind: 'INPUT_OBJECT'; name: 'StringOperators'; ofType: null; }; defaultValue: null }, { name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductVariantFilterParameter'; ofType: null; }; }; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductVariantFilterParameter'; ofType: null; }; }; }; defaultValue: null }]; };
|
|
310
312
|
'ProductVariantList': { kind: 'OBJECT'; name: 'ProductVariantList'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ProductVariant'; ofType: null; }; }; }; } }; 'totalItems': { name: 'totalItems'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; };
|
|
@@ -467,7 +469,7 @@ export type introspection_types = {
|
|
|
467
469
|
'UpdateProductInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'enabled'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'featuredAssetId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'assetIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; }; defaultValue: null }, { name: 'facetValueIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; }; defaultValue: null }, { name: 'translations'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductTranslationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'INPUT_OBJECT'; name: 'UpdateProductCustomFieldsInput'; ofType: null; }; defaultValue: null }]; };
|
|
468
470
|
'UpdateProductOptionGroupInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductOptionGroupInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'code'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'translations'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductOptionGroupTranslationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|
|
469
471
|
'UpdateProductOptionInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductOptionInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'code'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'translations'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductOptionGroupTranslationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|
|
470
|
-
'UpdateProductReviewInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductReviewInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'summary'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'body'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'response'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|
|
472
|
+
'UpdateProductReviewInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductReviewInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'summary'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'body'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'response'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'translations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductReviewTranslationInput'; ofType: null; }; }; }; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|
|
471
473
|
'UpdateProductVariantInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductVariantInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'enabled'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'translations'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ProductVariantTranslationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'facetValueIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; }; defaultValue: null }, { name: 'optionIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; }; defaultValue: null }, { name: 'sku'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'taxCategoryId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'price'; type: { kind: 'SCALAR'; name: 'Money'; ofType: null; }; defaultValue: null }, { name: 'prices'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UpdateProductVariantPriceInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'featuredAssetId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'assetIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; }; defaultValue: null }, { name: 'stockOnHand'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'stockLevels'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'StockLevelInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'outOfStockThreshold'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'useGlobalOutOfStockThreshold'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'trackInventory'; type: { kind: 'ENUM'; name: 'GlobalFlag'; ofType: null; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|
|
472
474
|
'UpdateProductVariantPriceInput': { kind: 'INPUT_OBJECT'; name: 'UpdateProductVariantPriceInput'; isOneOf: false; inputFields: [{ name: 'currencyCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'CurrencyCode'; ofType: null; }; }; defaultValue: null }, { name: 'price'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Money'; ofType: null; }; }; defaultValue: null }, { name: 'delete'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|
|
473
475
|
'UpdatePromotionInput': { kind: 'INPUT_OBJECT'; name: 'UpdatePromotionInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'enabled'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'startsAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'endsAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'couponCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'perCustomerUsageLimit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'usageLimit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'conditions'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ConfigurableOperationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'actions'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ConfigurableOperationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'translations'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'PromotionTranslationInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'customFields'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; }; defaultValue: null }]; };
|