@restorecommerce/facade 0.3.5 → 0.3.6
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/CHANGELOG.md +12 -0
- package/dist/gql/protos/graphql.js +33 -162
- package/dist/gql/protos/registry.js +14 -6
- package/dist/modules/access-control/gql/schema.generated.d.ts +0 -34
- package/dist/modules/catalog/gql/schema.generated.d.ts +0 -44
- package/dist/modules/fulfillment/gql/schema.generated.d.ts +0 -54
- package/dist/modules/identity/gql/schema.generated.d.ts +0 -72
- package/dist/modules/indexing/gql/schema.generated.d.ts +0 -2
- package/dist/modules/invoicing/gql/schema.generated.d.ts +0 -22
- package/dist/modules/notification/gql/schema.generated.d.ts +0 -22
- package/dist/modules/ordering/gql/schema.generated.d.ts +0 -32
- package/dist/modules/ostorage/gql/schema.generated.d.ts +0 -28
- package/dist/modules/payment/gql/schema.generated.d.ts +0 -8
- package/dist/modules/resource/gql/schema.generated.d.ts +0 -56
- package/dist/modules/scheduling/gql/schema.generated.d.ts +0 -22
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [0.3.6](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@0.3.5...@restorecommerce/facade@0.3.6) (2022-03-09)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **facade:** merge query and mutation resolvers ([c2481b0](https://github.com/restorecommerce/libs/commit/c2481b05c46a5992d2a05017f9c4d279f3055613))
|
12
|
+
* **facade:** to add scope only to root mutation / query instead of all input types and updated suject scope to read from request scope ([9bbc8da](https://github.com/restorecommerce/libs/commit/9bbc8daba19d1ce5ef16b54f9353b9c2df39258e))
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
6
18
|
## [0.3.5](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@0.3.4...@restorecommerce/facade@0.3.5) (2022-03-04)
|
7
19
|
|
8
20
|
|
@@ -108,7 +108,6 @@ const getGQLResolverFunctions = (service, key, serviceKey, grpcClientConfig) =>
|
|
108
108
|
if (!('fromPartial' in typing.processor)) {
|
109
109
|
throw Error(`Method ${method.name} input type '${method.inputType}' does not contain 'fromPartial' function`);
|
110
110
|
}
|
111
|
-
const defaults = typing.processor.fromPartial({});
|
112
111
|
let subjectField = null;
|
113
112
|
if (typing) {
|
114
113
|
for (let field of typing.meta.field) {
|
@@ -118,16 +117,20 @@ const getGQLResolverFunctions = (service, key, serviceKey, grpcClientConfig) =>
|
|
118
117
|
}
|
119
118
|
}
|
120
119
|
}
|
121
|
-
|
120
|
+
let methodName = method.name;
|
121
|
+
if (Mutate.indexOf(method.name) > -1) {
|
122
|
+
methodName = 'Mutate';
|
123
|
+
}
|
124
|
+
if (methodName in obj) {
|
125
|
+
return obj;
|
126
|
+
}
|
127
|
+
obj[methodName] = async (args, context) => {
|
128
|
+
var _a;
|
122
129
|
const client = context[key].client;
|
123
130
|
const service = client[serviceKey];
|
124
131
|
try {
|
125
132
|
const converted = await (0, exports.recursiveUploadToBuffer)(args.input, typing.input);
|
126
|
-
let req =
|
127
|
-
// Fill defaults
|
128
|
-
...defaults,
|
129
|
-
...converted
|
130
|
-
};
|
133
|
+
let req = typing.processor.fromPartial(converted);
|
131
134
|
// convert enum strings to integers
|
132
135
|
req = (0, utils_1.convertEnumToInt)(typing, req);
|
133
136
|
if (subjectField !== null) {
|
@@ -136,8 +139,27 @@ const getGQLResolverFunctions = (service, key, serviceKey, grpcClientConfig) =>
|
|
136
139
|
if (authToken && authToken.startsWith('Bearer ')) {
|
137
140
|
req.subject.token = authToken.split(' ')[1];
|
138
141
|
}
|
142
|
+
if (req.scope) {
|
143
|
+
req.subject.scope = req.scope;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
let realMethod = method.name;
|
147
|
+
if (Mutate.indexOf(method.name) > -1) {
|
148
|
+
const mode = (_a = args === null || args === void 0 ? void 0 : args.input) === null || _a === void 0 ? void 0 : _a.mode;
|
149
|
+
if (!mode) {
|
150
|
+
throw new Error('Please specify mode');
|
151
|
+
}
|
152
|
+
if (mode === 'CREATE') {
|
153
|
+
realMethod = 'Create';
|
154
|
+
}
|
155
|
+
else if (mode === 'UPDATE') {
|
156
|
+
realMethod = 'Update';
|
157
|
+
}
|
158
|
+
else if (mode === 'UPSERT') {
|
159
|
+
realMethod = 'Upsert';
|
160
|
+
}
|
139
161
|
}
|
140
|
-
const result = await service[
|
162
|
+
const result = await service[realMethod](req);
|
141
163
|
const bufferFields = (0, utils_1.getKeys)(grpcClientConfig === null || grpcClientConfig === void 0 ? void 0 : grpcClientConfig.bufferFields);
|
142
164
|
if (result instanceof stream.Readable) {
|
143
165
|
let operationStatus = { code: 0, message: '' };
|
@@ -226,155 +248,6 @@ const getGQLResolverFunctions = (service, key, serviceKey, grpcClientConfig) =>
|
|
226
248
|
};
|
227
249
|
exports.getGQLResolverFunctions = getGQLResolverFunctions;
|
228
250
|
const namespaceResolverRegistry = new Map();
|
229
|
-
const MutateResolver = async (req, ctx, schema) => {
|
230
|
-
var _a, _b, _c, _d, _e, _f;
|
231
|
-
let module_name, key, service;
|
232
|
-
if ((_b = (_a = schema === null || schema === void 0 ? void 0 : schema.path) === null || _a === void 0 ? void 0 : _a.prev) === null || _b === void 0 ? void 0 : _b.key) {
|
233
|
-
key = schema.path.prev.key;
|
234
|
-
}
|
235
|
-
if ((_d = (_c = schema === null || schema === void 0 ? void 0 : schema.path) === null || _c === void 0 ? void 0 : _c.prev) === null || _d === void 0 ? void 0 : _d.typename) {
|
236
|
-
let typeName = schema.path.prev.typename;
|
237
|
-
if (typeName.endsWith('Mutation')) {
|
238
|
-
module_name = typeName.split('Mutation')[0];
|
239
|
-
}
|
240
|
-
}
|
241
|
-
if (key && module_name) {
|
242
|
-
module_name = (0, utils_1.convertyCamelToSnakeCase)(module_name);
|
243
|
-
key = (0, utils_1.convertyCamelToSnakeCase)(key);
|
244
|
-
service = (_e = ctx[module_name]) === null || _e === void 0 ? void 0 : _e.client[key];
|
245
|
-
}
|
246
|
-
try {
|
247
|
-
let method = '';
|
248
|
-
let input = req.input;
|
249
|
-
const mode = (_f = req === null || req === void 0 ? void 0 : req.input) === null || _f === void 0 ? void 0 : _f.mode;
|
250
|
-
if (!mode) {
|
251
|
-
throw new Error('Please specify mode');
|
252
|
-
}
|
253
|
-
if (mode === 'CREATE') {
|
254
|
-
method = 'Create';
|
255
|
-
}
|
256
|
-
else if (mode === 'UPDATE') {
|
257
|
-
method = 'Update';
|
258
|
-
}
|
259
|
-
else if (mode === 'UPSERT') {
|
260
|
-
method = 'Upsert';
|
261
|
-
}
|
262
|
-
const inputMethodTypeKey = module_name.toLowerCase() + '.' + key.toLowerCase() + '.' + method.toLowerCase();
|
263
|
-
const nsType = inputMethodType.get(inputMethodTypeKey);
|
264
|
-
if (nsType) {
|
265
|
-
const inputTyping = (0, registry_1.getTyping)(nsType);
|
266
|
-
(0, utils_1.convertEnumToInt)(inputTyping, input);
|
267
|
-
}
|
268
|
-
// check service object contains requested mode's method def
|
269
|
-
if (!service[method]) {
|
270
|
-
throw new Error(`Method ${method} not defined on ${module_name}`);
|
271
|
-
}
|
272
|
-
// update subject token from authorizatin header
|
273
|
-
let subject = {
|
274
|
-
id: '',
|
275
|
-
scope: '',
|
276
|
-
roleAssociations: [],
|
277
|
-
hierarchicalScopes: [],
|
278
|
-
token: '',
|
279
|
-
unauthenticated: false
|
280
|
-
};
|
281
|
-
const authToken = ctx.request.req.headers['authorization'];
|
282
|
-
if (authToken && authToken.startsWith('Bearer ')) {
|
283
|
-
subject.token = authToken.split(' ')[1];
|
284
|
-
}
|
285
|
-
// TODO identify google.protobufAny from config
|
286
|
-
for (let item of input.items) {
|
287
|
-
let keys = Object.keys(item);
|
288
|
-
for (let key of keys) {
|
289
|
-
if (item[key] && item[key].value) {
|
290
|
-
item[key] = { typeUrl: '', value: Buffer.from(JSON.stringify(item.data.value)) };
|
291
|
-
}
|
292
|
-
}
|
293
|
-
}
|
294
|
-
const result = await service[method]({
|
295
|
-
items: input === null || input === void 0 ? void 0 : input.items,
|
296
|
-
subject
|
297
|
-
});
|
298
|
-
// TODO read from grpcClientConfig
|
299
|
-
// const bufferFields = getKeys((grpcClientConfig as any)?.bufferFields);
|
300
|
-
const bufferFields = [];
|
301
|
-
if (result instanceof stream.Readable) {
|
302
|
-
let operationStatus = { code: 0, message: '' };
|
303
|
-
let aggregatedResponse = await new Promise((resolve, reject) => {
|
304
|
-
let response = {};
|
305
|
-
result.on('data', (chunk) => {
|
306
|
-
const chunkObj = _.cloneDeep(chunk);
|
307
|
-
if (!response) {
|
308
|
-
response = chunk;
|
309
|
-
}
|
310
|
-
else {
|
311
|
-
Object.assign(response, chunk);
|
312
|
-
}
|
313
|
-
const existingBufferFields = _.intersection(Object.keys(chunk), bufferFields);
|
314
|
-
for (let bufferField of existingBufferFields) {
|
315
|
-
if (chunkObj[bufferField] && chunkObj[bufferField].value) {
|
316
|
-
if (response[bufferField] && response[bufferField].value && !_.isArray(response[bufferField].value)) {
|
317
|
-
response[bufferField].value = [];
|
318
|
-
}
|
319
|
-
let data = JSON.parse(chunkObj[bufferField].value.toString());
|
320
|
-
if (_.isArray(data)) {
|
321
|
-
for (let dataObj of data) {
|
322
|
-
response[bufferField].value.push(dataObj);
|
323
|
-
}
|
324
|
-
}
|
325
|
-
else {
|
326
|
-
response[bufferField].value.push(data);
|
327
|
-
}
|
328
|
-
}
|
329
|
-
}
|
330
|
-
});
|
331
|
-
result.on('error', (err) => {
|
332
|
-
console.error(err);
|
333
|
-
operationStatus.code = err.code ? err.code : 500;
|
334
|
-
operationStatus.message = err.message;
|
335
|
-
});
|
336
|
-
result.on('end', () => {
|
337
|
-
if (_.isEmpty(operationStatus.message)) {
|
338
|
-
operationStatus.code = 200;
|
339
|
-
operationStatus.message = 'success';
|
340
|
-
}
|
341
|
-
resolve(response);
|
342
|
-
});
|
343
|
-
});
|
344
|
-
return { details: { items: aggregatedResponse, operationStatus } };
|
345
|
-
}
|
346
|
-
// TODO identify google.protobufAny from config
|
347
|
-
// let items = decodeBufferFields(result.items, bufferFields);
|
348
|
-
for (let item of result.items) {
|
349
|
-
if (item && item.payload) {
|
350
|
-
const keys = Object.keys(item.payload);
|
351
|
-
for (let bufferField of keys) {
|
352
|
-
if (item.payload[bufferField] && item.payload[bufferField].value) {
|
353
|
-
item.payload[bufferField].value = JSON.parse(item.payload[bufferField].value.toString());
|
354
|
-
}
|
355
|
-
}
|
356
|
-
}
|
357
|
-
}
|
358
|
-
return {
|
359
|
-
details: {
|
360
|
-
items: result.items,
|
361
|
-
operationStatus: result.operationStatus // overall status
|
362
|
-
}
|
363
|
-
};
|
364
|
-
}
|
365
|
-
catch (error) {
|
366
|
-
console.error(error);
|
367
|
-
return {
|
368
|
-
details: {
|
369
|
-
items: [],
|
370
|
-
operationStatus: {
|
371
|
-
code: error.code,
|
372
|
-
message: error.message
|
373
|
-
}
|
374
|
-
}
|
375
|
-
};
|
376
|
-
}
|
377
|
-
};
|
378
251
|
const registerResolverFunction = (namespace, name, func, mutation = false, subspace = undefined, service) => {
|
379
252
|
if (!namespaceResolverRegistry.has(namespace)) {
|
380
253
|
namespaceResolverRegistry.set(namespace, new Map());
|
@@ -404,11 +277,6 @@ const registerResolverFunction = (namespace, name, func, mutation = false, subsp
|
|
404
277
|
inputMethodType.set(key, value.inputType);
|
405
278
|
}
|
406
279
|
}
|
407
|
-
// custom mutation resolver for create, update and upsert - Mutate
|
408
|
-
if (Mutate.indexOf(name) > -1) {
|
409
|
-
name = 'Mutate';
|
410
|
-
func = MutateResolver;
|
411
|
-
}
|
412
280
|
space.set(name, func);
|
413
281
|
};
|
414
282
|
exports.registerResolverFunction = registerResolverFunction;
|
@@ -601,6 +469,9 @@ const getWhitelistBlacklistConfig = (metaService, queries, config) => {
|
|
601
469
|
}
|
602
470
|
}
|
603
471
|
}
|
472
|
+
if (Mutate.findIndex(val => mut.has(val)) > -1) {
|
473
|
+
mut.add('Mutate');
|
474
|
+
}
|
604
475
|
return {
|
605
476
|
mutations: mut,
|
606
477
|
queries: que
|
@@ -15,6 +15,7 @@ const MapScalar = new definition_1.GraphQLScalarType({
|
|
15
15
|
name: 'MapScalar',
|
16
16
|
});
|
17
17
|
const Mutate = ['Create', 'Update', 'Upsert'];
|
18
|
+
const CRUD_OPERATION_NAMES = ['Cretae', 'Update', 'Upsert', 'Delete', 'Read'];
|
18
19
|
const TodoScalar = new definition_1.GraphQLScalarType({
|
19
20
|
name: 'TodoScalar',
|
20
21
|
serialize: () => {
|
@@ -119,6 +120,7 @@ const ModeType = new definition_1.GraphQLEnumType({
|
|
119
120
|
});
|
120
121
|
const registerTyping = (protoPackage, message, methodDef, opts, inputOpts) => {
|
121
122
|
let insertMode = false;
|
123
|
+
let crudOperation = false;
|
122
124
|
const type = (protoPackage.startsWith('.') ? '' : '.') + protoPackage + '.' + message.name;
|
123
125
|
if (methodDef && methodDef.length > 0) {
|
124
126
|
for (let method of methodDef) {
|
@@ -127,6 +129,10 @@ const registerTyping = (protoPackage, message, methodDef, opts, inputOpts) => {
|
|
127
129
|
if ((Mutate.indexOf(method.name) > -1) && type === method.inputType) {
|
128
130
|
insertMode = true;
|
129
131
|
}
|
132
|
+
// add scope
|
133
|
+
if ((CRUD_OPERATION_NAMES.indexOf(method.name) > -1) && type === method.inputType) {
|
134
|
+
crudOperation = true;
|
135
|
+
}
|
130
136
|
}
|
131
137
|
}
|
132
138
|
if (exports.registeredTypings.has(type)) {
|
@@ -166,12 +172,14 @@ const registerTyping = (protoPackage, message, methodDef, opts, inputOpts) => {
|
|
166
172
|
type: ModeType
|
167
173
|
};
|
168
174
|
}
|
169
|
-
|
170
|
-
|
171
|
-
result
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
+
if (crudOperation) {
|
176
|
+
// add scope to all mutations / queries
|
177
|
+
if (!result.scope) {
|
178
|
+
result['scope'] = {
|
179
|
+
description: 'target scope',
|
180
|
+
type: graphql_1.GraphQLString
|
181
|
+
};
|
182
|
+
}
|
175
183
|
}
|
176
184
|
return result;
|
177
185
|
};
|
@@ -78,35 +78,25 @@ export declare type IoRestorecommerceStatusOperationStatus = {
|
|
78
78
|
export declare type IIoRestorecommerceAccessControlRequest = {
|
79
79
|
target?: InputMaybe<IIoRestorecommerceRuleTarget>;
|
80
80
|
context?: InputMaybe<IIoRestorecommerceAccessControlContext>;
|
81
|
-
/** target scope */
|
82
|
-
scope?: InputMaybe<Scalars['String']>;
|
83
81
|
};
|
84
82
|
export declare type IIoRestorecommerceRuleTarget = {
|
85
83
|
subject?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
86
84
|
resources?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
87
85
|
action?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
88
|
-
/** target scope */
|
89
|
-
scope?: InputMaybe<Scalars['String']>;
|
90
86
|
};
|
91
87
|
export declare type IIoRestorecommerceAttributeAttribute = {
|
92
88
|
id?: InputMaybe<Scalars['String']>;
|
93
89
|
value?: InputMaybe<Scalars['String']>;
|
94
90
|
attribute?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
95
|
-
/** target scope */
|
96
|
-
scope?: InputMaybe<Scalars['String']>;
|
97
91
|
};
|
98
92
|
export declare type IIoRestorecommerceAccessControlContext = {
|
99
93
|
subject?: InputMaybe<IGoogleProtobufAny>;
|
100
94
|
resources?: InputMaybe<Array<IGoogleProtobufAny>>;
|
101
95
|
security?: InputMaybe<IGoogleProtobufAny>;
|
102
|
-
/** target scope */
|
103
|
-
scope?: InputMaybe<Scalars['String']>;
|
104
96
|
};
|
105
97
|
export declare type IGoogleProtobufAny = {
|
106
98
|
typeUrl?: InputMaybe<Scalars['String']>;
|
107
99
|
value?: InputMaybe<Scalars['Upload']>;
|
108
|
-
/** target scope */
|
109
|
-
scope?: InputMaybe<Scalars['String']>;
|
110
100
|
};
|
111
101
|
export declare type ProtoIoRestorecommerceAccessControlReverseQuery = {
|
112
102
|
__typename?: 'ProtoIoRestorecommerceAccessControlReverseQuery';
|
@@ -263,8 +253,6 @@ export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
|
263
253
|
export declare type IIoRestorecommerceResourcebaseSort = {
|
264
254
|
field?: InputMaybe<Scalars['String']>;
|
265
255
|
order?: InputMaybe<IoRestorecommerceResourcebaseSortSortOrder>;
|
266
|
-
/** target scope */
|
267
|
-
scope?: InputMaybe<Scalars['String']>;
|
268
256
|
};
|
269
257
|
export declare enum IoRestorecommerceResourcebaseSortSortOrder {
|
270
258
|
Unsorted = 0,
|
@@ -274,8 +262,6 @@ export declare enum IoRestorecommerceResourcebaseSortSortOrder {
|
|
274
262
|
export declare type IIoRestorecommerceResourcebaseFilterOp = {
|
275
263
|
filter?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilter>>;
|
276
264
|
operator?: InputMaybe<IoRestorecommerceResourcebaseFilterOpOperator>;
|
277
|
-
/** target scope */
|
278
|
-
scope?: InputMaybe<Scalars['String']>;
|
279
265
|
};
|
280
266
|
export declare type IIoRestorecommerceResourcebaseFilter = {
|
281
267
|
field?: InputMaybe<Scalars['String']>;
|
@@ -283,8 +269,6 @@ export declare type IIoRestorecommerceResourcebaseFilter = {
|
|
283
269
|
value?: InputMaybe<Scalars['String']>;
|
284
270
|
type?: InputMaybe<IoRestorecommerceResourcebaseFilterValueType>;
|
285
271
|
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
286
|
-
/** target scope */
|
287
|
-
scope?: InputMaybe<Scalars['String']>;
|
288
272
|
};
|
289
273
|
export declare enum IoRestorecommerceResourcebaseFilterOperation {
|
290
274
|
Eq = 0,
|
@@ -307,8 +291,6 @@ export declare enum IoRestorecommerceResourcebaseFilterValueType {
|
|
307
291
|
export declare type IIoRestorecommerceFilterFilterOp = {
|
308
292
|
filter?: InputMaybe<Array<IIoRestorecommerceFilterFilter>>;
|
309
293
|
operator?: InputMaybe<IoRestorecommerceFilterFilterOpOperator>;
|
310
|
-
/** target scope */
|
311
|
-
scope?: InputMaybe<Scalars['String']>;
|
312
294
|
};
|
313
295
|
export declare type IIoRestorecommerceFilterFilter = {
|
314
296
|
field?: InputMaybe<Scalars['String']>;
|
@@ -316,8 +298,6 @@ export declare type IIoRestorecommerceFilterFilter = {
|
|
316
298
|
value?: InputMaybe<Scalars['String']>;
|
317
299
|
type?: InputMaybe<IoRestorecommerceFilterFilterValueType>;
|
318
300
|
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
319
|
-
/** target scope */
|
320
|
-
scope?: InputMaybe<Scalars['String']>;
|
321
301
|
};
|
322
302
|
export declare enum IoRestorecommerceResourcebaseFilterOpOperator {
|
323
303
|
And = 0,
|
@@ -326,8 +306,6 @@ export declare enum IoRestorecommerceResourcebaseFilterOpOperator {
|
|
326
306
|
export declare type IIoRestorecommerceResourcebaseFieldFilter = {
|
327
307
|
name?: InputMaybe<Scalars['String']>;
|
328
308
|
include?: InputMaybe<Scalars['Boolean']>;
|
329
|
-
/** target scope */
|
330
|
-
scope?: InputMaybe<Scalars['String']>;
|
331
309
|
};
|
332
310
|
export declare type AccessControlRuleQuery = {
|
333
311
|
__typename?: 'AccessControlRuleQuery';
|
@@ -433,8 +411,6 @@ export declare type IIoRestorecommercePolicyPolicy = {
|
|
433
411
|
effect?: InputMaybe<IoRestorecommerceRuleEffect>;
|
434
412
|
combiningAlgorithm?: InputMaybe<Scalars['String']>;
|
435
413
|
evaluationCacheable?: InputMaybe<Scalars['Boolean']>;
|
436
|
-
/** target scope */
|
437
|
-
scope?: InputMaybe<Scalars['String']>;
|
438
414
|
};
|
439
415
|
export declare type IIoRestorecommerceMetaMeta = {
|
440
416
|
created?: InputMaybe<Scalars['Float']>;
|
@@ -442,13 +418,9 @@ export declare type IIoRestorecommerceMetaMeta = {
|
|
442
418
|
modifiedBy?: InputMaybe<Scalars['String']>;
|
443
419
|
owner?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
444
420
|
acl?: InputMaybe<Array<IIoRestorecommerceAttributeAttributeObj>>;
|
445
|
-
/** target scope */
|
446
|
-
scope?: InputMaybe<Scalars['String']>;
|
447
421
|
};
|
448
422
|
export declare type IIoRestorecommerceAttributeAttributeObj = {
|
449
423
|
attribute?: InputMaybe<IIoRestorecommerceAttributeAttribute>;
|
450
|
-
/** target scope */
|
451
|
-
scope?: InputMaybe<Scalars['String']>;
|
452
424
|
};
|
453
425
|
export declare enum ModeType {
|
454
426
|
Create = "CREATE",
|
@@ -498,14 +470,10 @@ export declare type IIoRestorecommerceRuleRule = {
|
|
498
470
|
condition?: InputMaybe<Scalars['String']>;
|
499
471
|
effect?: InputMaybe<IoRestorecommerceRuleEffect>;
|
500
472
|
evaluationCacheable?: InputMaybe<Scalars['Boolean']>;
|
501
|
-
/** target scope */
|
502
|
-
scope?: InputMaybe<Scalars['String']>;
|
503
473
|
};
|
504
474
|
export declare type IIoRestorecommerceRuleContextQuery = {
|
505
475
|
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
506
476
|
query?: InputMaybe<Scalars['String']>;
|
507
|
-
/** target scope */
|
508
|
-
scope?: InputMaybe<Scalars['String']>;
|
509
477
|
};
|
510
478
|
export declare type AccessControlPolicySetMutation = {
|
511
479
|
__typename?: 'AccessControlPolicySetMutation';
|
@@ -533,8 +501,6 @@ export declare type IIoRestorecommercePolicySetPolicySet = {
|
|
533
501
|
target?: InputMaybe<IIoRestorecommerceRuleTarget>;
|
534
502
|
combiningAlgorithm?: InputMaybe<Scalars['String']>;
|
535
503
|
policies?: InputMaybe<Array<Scalars['String']>>;
|
536
|
-
/** target scope */
|
537
|
-
scope?: InputMaybe<Scalars['String']>;
|
538
504
|
};
|
539
505
|
export declare type WithIndex<TObject> = TObject & Record<string, any>;
|
540
506
|
export declare type ResolversObject<TObject> = WithIndex<TObject>;
|
@@ -168,8 +168,6 @@ export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
|
168
168
|
export declare type IIoRestorecommerceResourcebaseSort = {
|
169
169
|
field?: InputMaybe<Scalars['String']>;
|
170
170
|
order?: InputMaybe<IoRestorecommerceResourcebaseSortSortOrder>;
|
171
|
-
/** target scope */
|
172
|
-
scope?: InputMaybe<Scalars['String']>;
|
173
171
|
};
|
174
172
|
export declare enum IoRestorecommerceResourcebaseSortSortOrder {
|
175
173
|
Unsorted = 0,
|
@@ -179,8 +177,6 @@ export declare enum IoRestorecommerceResourcebaseSortSortOrder {
|
|
179
177
|
export declare type IIoRestorecommerceResourcebaseFilterOp = {
|
180
178
|
filter?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilter>>;
|
181
179
|
operator?: InputMaybe<IoRestorecommerceResourcebaseFilterOpOperator>;
|
182
|
-
/** target scope */
|
183
|
-
scope?: InputMaybe<Scalars['String']>;
|
184
180
|
};
|
185
181
|
export declare type IIoRestorecommerceResourcebaseFilter = {
|
186
182
|
field?: InputMaybe<Scalars['String']>;
|
@@ -188,8 +184,6 @@ export declare type IIoRestorecommerceResourcebaseFilter = {
|
|
188
184
|
value?: InputMaybe<Scalars['String']>;
|
189
185
|
type?: InputMaybe<IoRestorecommerceResourcebaseFilterValueType>;
|
190
186
|
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
191
|
-
/** target scope */
|
192
|
-
scope?: InputMaybe<Scalars['String']>;
|
193
187
|
};
|
194
188
|
export declare enum IoRestorecommerceResourcebaseFilterOperation {
|
195
189
|
Eq = 0,
|
@@ -212,8 +206,6 @@ export declare enum IoRestorecommerceResourcebaseFilterValueType {
|
|
212
206
|
export declare type IIoRestorecommerceFilterFilterOp = {
|
213
207
|
filter?: InputMaybe<Array<IIoRestorecommerceFilterFilter>>;
|
214
208
|
operator?: InputMaybe<IoRestorecommerceFilterFilterOpOperator>;
|
215
|
-
/** target scope */
|
216
|
-
scope?: InputMaybe<Scalars['String']>;
|
217
209
|
};
|
218
210
|
export declare type IIoRestorecommerceFilterFilter = {
|
219
211
|
field?: InputMaybe<Scalars['String']>;
|
@@ -221,8 +213,6 @@ export declare type IIoRestorecommerceFilterFilter = {
|
|
221
213
|
value?: InputMaybe<Scalars['String']>;
|
222
214
|
type?: InputMaybe<IoRestorecommerceFilterFilterValueType>;
|
223
215
|
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
224
|
-
/** target scope */
|
225
|
-
scope?: InputMaybe<Scalars['String']>;
|
226
216
|
};
|
227
217
|
export declare enum IoRestorecommerceFilterFilterOperation {
|
228
218
|
Eq = 0,
|
@@ -253,14 +243,10 @@ export declare enum IoRestorecommerceResourcebaseFilterOpOperator {
|
|
253
243
|
export declare type IIoRestorecommerceResourcebaseFieldFilter = {
|
254
244
|
name?: InputMaybe<Scalars['String']>;
|
255
245
|
include?: InputMaybe<Scalars['Boolean']>;
|
256
|
-
/** target scope */
|
257
|
-
scope?: InputMaybe<Scalars['String']>;
|
258
246
|
};
|
259
247
|
export declare type IGoogleProtobufAny = {
|
260
248
|
typeUrl?: InputMaybe<Scalars['String']>;
|
261
249
|
value?: InputMaybe<Scalars['Upload']>;
|
262
|
-
/** target scope */
|
263
|
-
scope?: InputMaybe<Scalars['String']>;
|
264
250
|
};
|
265
251
|
export declare type CatalogProductPrototypeQuery = {
|
266
252
|
__typename?: 'CatalogProductPrototypeQuery';
|
@@ -423,8 +409,6 @@ export declare type IIoRestorecommerceProductMainProduct = {
|
|
423
409
|
bundle?: InputMaybe<IIoRestorecommerceProductBundle>;
|
424
410
|
active?: InputMaybe<Scalars['Boolean']>;
|
425
411
|
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
426
|
-
/** target scope */
|
427
|
-
scope?: InputMaybe<Scalars['String']>;
|
428
412
|
};
|
429
413
|
export declare type IIoRestorecommerceProductProduct = {
|
430
414
|
id?: InputMaybe<Scalars['String']>;
|
@@ -437,13 +421,9 @@ export declare type IIoRestorecommerceProductProduct = {
|
|
437
421
|
taxId?: InputMaybe<Array<Scalars['String']>>;
|
438
422
|
variants?: InputMaybe<Array<IIoRestorecommerceProductVariant>>;
|
439
423
|
gtin?: InputMaybe<Scalars['String']>;
|
440
|
-
/** target scope */
|
441
|
-
scope?: InputMaybe<Scalars['String']>;
|
442
424
|
};
|
443
425
|
export declare type IIoRestorecommerceProductIdentifier = {
|
444
426
|
id?: InputMaybe<Scalars['String']>;
|
445
|
-
/** target scope */
|
446
|
-
scope?: InputMaybe<Scalars['String']>;
|
447
427
|
};
|
448
428
|
export declare type IIoRestorecommerceProductVariant = {
|
449
429
|
id?: InputMaybe<Scalars['String']>;
|
@@ -457,8 +437,6 @@ export declare type IIoRestorecommerceProductVariant = {
|
|
457
437
|
stockKeepingUnit?: InputMaybe<Scalars['String']>;
|
458
438
|
templateVariant?: InputMaybe<Scalars['String']>;
|
459
439
|
attributes?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
460
|
-
/** target scope */
|
461
|
-
scope?: InputMaybe<Scalars['String']>;
|
462
440
|
};
|
463
441
|
export declare type IIoRestorecommerceImageImage = {
|
464
442
|
id?: InputMaybe<Scalars['String']>;
|
@@ -469,15 +447,11 @@ export declare type IIoRestorecommerceImageImage = {
|
|
469
447
|
width?: InputMaybe<Scalars['Float']>;
|
470
448
|
height?: InputMaybe<Scalars['Float']>;
|
471
449
|
length?: InputMaybe<Scalars['Float']>;
|
472
|
-
/** target scope */
|
473
|
-
scope?: InputMaybe<Scalars['String']>;
|
474
450
|
};
|
475
451
|
export declare type IIoRestorecommerceAttributeAttribute = {
|
476
452
|
id?: InputMaybe<Scalars['String']>;
|
477
453
|
value?: InputMaybe<Scalars['String']>;
|
478
454
|
attribute?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
479
|
-
/** target scope */
|
480
|
-
scope?: InputMaybe<Scalars['String']>;
|
481
455
|
};
|
482
456
|
export declare type IIoRestorecommerceProductBundle = {
|
483
457
|
id?: InputMaybe<Scalars['String']>;
|
@@ -486,14 +460,10 @@ export declare type IIoRestorecommerceProductBundle = {
|
|
486
460
|
image?: InputMaybe<Array<IIoRestorecommerceImageImage>>;
|
487
461
|
product?: InputMaybe<Array<IIoRestorecommerceProductBundleProduct>>;
|
488
462
|
price?: InputMaybe<Scalars['Float']>;
|
489
|
-
/** target scope */
|
490
|
-
scope?: InputMaybe<Scalars['String']>;
|
491
463
|
};
|
492
464
|
export declare type IIoRestorecommerceProductBundleProduct = {
|
493
465
|
productId?: InputMaybe<Scalars['String']>;
|
494
466
|
quantity?: InputMaybe<Scalars['Int']>;
|
495
|
-
/** target scope */
|
496
|
-
scope?: InputMaybe<Scalars['String']>;
|
497
467
|
};
|
498
468
|
export declare type IIoRestorecommerceMetaMeta = {
|
499
469
|
created?: InputMaybe<Scalars['Float']>;
|
@@ -501,13 +471,9 @@ export declare type IIoRestorecommerceMetaMeta = {
|
|
501
471
|
modifiedBy?: InputMaybe<Scalars['String']>;
|
502
472
|
owner?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
503
473
|
acl?: InputMaybe<Array<IIoRestorecommerceAttributeAttributeObj>>;
|
504
|
-
/** target scope */
|
505
|
-
scope?: InputMaybe<Scalars['String']>;
|
506
474
|
};
|
507
475
|
export declare type IIoRestorecommerceAttributeAttributeObj = {
|
508
476
|
attribute?: InputMaybe<IIoRestorecommerceAttributeAttribute>;
|
509
|
-
/** target scope */
|
510
|
-
scope?: InputMaybe<Scalars['String']>;
|
511
477
|
};
|
512
478
|
export declare enum ModeType {
|
513
479
|
Create = "CREATE",
|
@@ -554,8 +520,6 @@ export declare type IIoRestorecommerceProductPrototypeProductPrototype = {
|
|
554
520
|
version?: InputMaybe<Scalars['String']>;
|
555
521
|
description?: InputMaybe<Scalars['String']>;
|
556
522
|
categoryId?: InputMaybe<Scalars['String']>;
|
557
|
-
/** target scope */
|
558
|
-
scope?: InputMaybe<Scalars['String']>;
|
559
523
|
};
|
560
524
|
export declare type CatalogProductCategoryMutation = {
|
561
525
|
__typename?: 'CatalogProductCategoryMutation';
|
@@ -583,13 +547,9 @@ export declare type IIoRestorecommerceProductCategoryProductCategory = {
|
|
583
547
|
priceGroupId?: InputMaybe<Scalars['String']>;
|
584
548
|
image?: InputMaybe<IIoRestorecommerceImageImage>;
|
585
549
|
parent?: InputMaybe<IIoRestorecommerceProductCategoryParent>;
|
586
|
-
/** target scope */
|
587
|
-
scope?: InputMaybe<Scalars['String']>;
|
588
550
|
};
|
589
551
|
export declare type IIoRestorecommerceProductCategoryParent = {
|
590
552
|
parentId?: InputMaybe<Scalars['String']>;
|
591
|
-
/** target scope */
|
592
|
-
scope?: InputMaybe<Scalars['String']>;
|
593
553
|
};
|
594
554
|
export declare type CatalogPriceGroupMutation = {
|
595
555
|
__typename?: 'CatalogPriceGroupMutation';
|
@@ -614,8 +574,6 @@ export declare type IIoRestorecommercePriceGroupPriceGroup = {
|
|
614
574
|
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
615
575
|
name?: InputMaybe<Scalars['String']>;
|
616
576
|
description?: InputMaybe<Scalars['String']>;
|
617
|
-
/** target scope */
|
618
|
-
scope?: InputMaybe<Scalars['String']>;
|
619
577
|
};
|
620
578
|
export declare type CatalogManufacturerMutation = {
|
621
579
|
__typename?: 'CatalogManufacturerMutation';
|
@@ -640,8 +598,6 @@ export declare type IIoRestorecommerceManufacturerManufacturer = {
|
|
640
598
|
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
641
599
|
name?: InputMaybe<Scalars['String']>;
|
642
600
|
description?: InputMaybe<Scalars['String']>;
|
643
|
-
/** target scope */
|
644
|
-
scope?: InputMaybe<Scalars['String']>;
|
645
601
|
};
|
646
602
|
export declare type WithIndex<TObject> = TObject & Record<string, any>;
|
647
603
|
export declare type ResolversObject<TObject> = WithIndex<TObject>;
|