@restorecommerce/facade 0.3.1 → 0.3.4
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 +28 -0
- package/codegen/index.js +1 -1
- package/dist/gql/helpers/schema.d.ts +2 -6
- package/dist/gql/index.js +5 -1
- package/dist/gql/protos/graphql.d.ts +5 -7
- package/dist/gql/protos/graphql.js +43 -44
- package/dist/gql/protos/index.js +5 -1
- package/dist/gql/protos/protos.d.ts +1 -1
- package/dist/gql/protos/protos.js +4 -4
- package/dist/gql/protos/registry.d.ts +1 -1
- package/dist/gql/protos/registry.js +38 -38
- package/dist/gql/protos/types.d.ts +1 -1
- package/dist/gql/protos/utils.d.ts +0 -14
- package/dist/gql/protos/utils.js +16 -40
- package/dist/gql/types/AccessControlTypes.js +2 -2
- package/dist/gql/types/DateType.d.ts +1 -1
- package/dist/gql/types/index.js +5 -1
- package/dist/index.js +13 -6
- package/dist/middlewares/index.js +5 -1
- package/dist/middlewares/req-res-logger/index.js +2 -2
- package/dist/modules/access-control/gql/federation.js +4 -3
- package/dist/modules/access-control/gql/schema.generated.d.ts +135 -94
- package/dist/modules/access-control/gql/schema.js +2 -2
- package/dist/modules/access-control/gql/types.js +1 -1
- package/dist/modules/access-control/grpc/index.js +4 -4
- package/dist/modules/access-control/index.js +2 -2
- package/dist/modules/catalog/gql/federation.js +4 -3
- package/dist/modules/catalog/gql/schema.generated.d.ts +185 -130
- package/dist/modules/catalog/gql/schema.js +2 -2
- package/dist/modules/catalog/gql/types.js +1 -1
- package/dist/modules/catalog/grpc/index.js +5 -5
- package/dist/modules/catalog/index.js +2 -2
- package/dist/modules/facade-status/gql/index.js +2 -2
- package/dist/modules/facade-status/gql/schema.generated.d.ts +6 -7
- package/dist/modules/facade-status/gql/types.js +1 -1
- package/dist/modules/facade-status/index.js +1 -1
- package/dist/modules/fulfillment/gql/federation.js +4 -3
- package/dist/modules/fulfillment/gql/schema.generated.d.ts +180 -123
- package/dist/modules/fulfillment/gql/schema.js +2 -2
- package/dist/modules/fulfillment/gql/types.js +1 -1
- package/dist/modules/fulfillment/grpc/index.js +2 -2
- package/dist/modules/fulfillment/index.js +2 -2
- package/dist/modules/identity/api-key/api-key.js +1 -1
- package/dist/modules/identity/gql/federation.js +4 -3
- package/dist/modules/identity/gql/schema.generated.d.ts +251 -172
- package/dist/modules/identity/gql/schema.js +2 -2
- package/dist/modules/identity/gql/types.js +1 -1
- package/dist/modules/identity/grpc/index.js +5 -5
- package/dist/modules/identity/index.js +5 -5
- package/dist/modules/identity/oauth/oauth.js +11 -11
- package/dist/modules/identity/oidc/adapter.js +2 -2
- package/dist/modules/identity/oidc/in-memory-adapter.js +10 -6
- package/dist/modules/identity/oidc/index.js +6 -6
- package/dist/modules/identity/oidc/password-grant.js +4 -4
- package/dist/modules/identity/oidc/user.js +2 -2
- package/dist/modules/identity/oidc/utils.js +1 -1
- package/dist/modules/index.js +5 -1
- package/dist/modules/indexing/gql/federation.js +4 -3
- package/dist/modules/indexing/gql/schema.generated.d.ts +12 -13
- package/dist/modules/indexing/gql/schema.js +2 -2
- package/dist/modules/indexing/gql/types.js +1 -1
- package/dist/modules/indexing/grpc/index.js +1 -1
- package/dist/modules/indexing/index.js +2 -2
- package/dist/modules/invoicing/gql/federation.js +4 -3
- package/dist/modules/invoicing/gql/schema.generated.d.ts +89 -64
- package/dist/modules/invoicing/gql/schema.js +2 -2
- package/dist/modules/invoicing/gql/types.js +1 -1
- package/dist/modules/invoicing/grpc/index.js +1 -1
- package/dist/modules/invoicing/index.js +2 -2
- package/dist/modules/notification/gql/federation.js +4 -3
- package/dist/modules/notification/gql/schema.generated.d.ts +87 -62
- package/dist/modules/notification/gql/schema.js +2 -2
- package/dist/modules/notification/gql/types.js +1 -1
- package/dist/modules/notification/grpc/index.js +1 -1
- package/dist/modules/notification/index.js +2 -2
- package/dist/modules/ordering/gql/federation.js +4 -3
- package/dist/modules/ordering/gql/schema.generated.d.ts +130 -95
- package/dist/modules/ordering/gql/schema.js +2 -2
- package/dist/modules/ordering/gql/types.js +1 -1
- package/dist/modules/ordering/grpc/index.js +1 -1
- package/dist/modules/ordering/index.js +2 -2
- package/dist/modules/ostorage/gql/federation.js +4 -3
- package/dist/modules/ostorage/gql/schema.generated.d.ts +91 -64
- package/dist/modules/ostorage/gql/schema.js +2 -2
- package/dist/modules/ostorage/gql/types.js +1 -1
- package/dist/modules/ostorage/grpc/index.js +1 -1
- package/dist/modules/ostorage/index.js +2 -2
- package/dist/modules/payment/gql/federation.js +4 -3
- package/dist/modules/payment/gql/schema.generated.d.ts +40 -35
- package/dist/modules/payment/gql/schema.js +2 -2
- package/dist/modules/payment/gql/types.js +1 -1
- package/dist/modules/payment/grpc/index.js +1 -1
- package/dist/modules/payment/index.js +2 -2
- package/dist/modules/resource/gql/federation.js +4 -3
- package/dist/modules/resource/gql/schema.generated.d.ts +263 -182
- package/dist/modules/resource/gql/schema.js +2 -2
- package/dist/modules/resource/gql/types.js +1 -1
- package/dist/modules/resource/grpc/index.js +12 -12
- package/dist/modules/resource/index.js +2 -2
- package/dist/modules/scheduling/gql/federation.js +4 -3
- package/dist/modules/scheduling/gql/schema.generated.d.ts +83 -58
- package/dist/modules/scheduling/gql/schema.js +2 -2
- package/dist/modules/scheduling/gql/types.js +1 -1
- package/dist/modules/scheduling/grpc/index.js +1 -1
- package/dist/modules/scheduling/index.js +2 -2
- package/package.json +43 -42
@@ -7,10 +7,11 @@ const schema_1 = require("./schema");
|
|
7
7
|
const interfaces_1 = require("../interfaces");
|
8
8
|
const protos_1 = require("../../../gql/protos");
|
9
9
|
const types_1 = require("./types");
|
10
|
+
const graphql_1 = require("graphql");
|
10
11
|
// TODO There is currently no way of building a federated schema from GraphQLSchema Object
|
11
12
|
// See https://github.com/apollographql/apollo-server/pull/4310
|
12
|
-
const FederatedCatalogSchema = (cfg) => federation_1.buildFederatedSchema({
|
13
|
-
typeDefs: apollo_server_koa_1.gql(
|
14
|
-
resolvers: protos_1.generateSubServiceResolvers(types_1.subServices, cfg, interfaces_1.namespace)
|
13
|
+
const FederatedCatalogSchema = (cfg) => (0, federation_1.buildFederatedSchema)({
|
14
|
+
typeDefs: (0, apollo_server_koa_1.gql)((0, graphql_1.printSchema)((0, schema_1.schema)(cfg))),
|
15
|
+
resolvers: (0, protos_1.generateSubServiceResolvers)(types_1.subServices, cfg, interfaces_1.namespace)
|
15
16
|
});
|
16
17
|
exports.FederatedCatalogSchema = FederatedCatalogSchema;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
|
2
2
|
import { CatalogContext } from '../interfaces';
|
3
3
|
export declare type Maybe<T> = T | undefined;
|
4
|
+
export declare type InputMaybe<T> = T | undefined;
|
4
5
|
export declare type Exact<T extends {
|
5
6
|
[key: string]: unknown;
|
6
7
|
}> = {
|
@@ -12,9 +13,7 @@ export declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
12
13
|
export declare type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
13
14
|
[SubKey in K]: Maybe<T[SubKey]>;
|
14
15
|
};
|
15
|
-
export declare type RequireFields<T, K extends keyof T> = {
|
16
|
-
[X in Exclude<keyof T, K>]?: T[X];
|
17
|
-
} & {
|
16
|
+
export declare type RequireFields<T, K extends keyof T> = Omit<T, K> & {
|
18
17
|
[P in K]-?: NonNullable<T[P]>;
|
19
18
|
};
|
20
19
|
/** All built-in and custom scalars, mapped to their actual values */
|
@@ -154,19 +153,23 @@ export declare type IoRestorecommerceStatusOperationStatus = {
|
|
154
153
|
message?: Maybe<Scalars['String']>;
|
155
154
|
};
|
156
155
|
export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
157
|
-
offset?:
|
158
|
-
limit?:
|
159
|
-
sort?:
|
160
|
-
filters?:
|
161
|
-
field?:
|
162
|
-
search?:
|
163
|
-
localesLimiter?:
|
164
|
-
customQueries?:
|
165
|
-
customArguments?:
|
156
|
+
offset?: InputMaybe<Scalars['Int']>;
|
157
|
+
limit?: InputMaybe<Scalars['Int']>;
|
158
|
+
sort?: InputMaybe<Array<IIoRestorecommerceResourcebaseSort>>;
|
159
|
+
filters?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilterOp>>;
|
160
|
+
field?: InputMaybe<Array<IIoRestorecommerceResourcebaseFieldFilter>>;
|
161
|
+
search?: InputMaybe<Array<Scalars['String']>>;
|
162
|
+
localesLimiter?: InputMaybe<Array<Scalars['String']>>;
|
163
|
+
customQueries?: InputMaybe<Array<Scalars['String']>>;
|
164
|
+
customArguments?: InputMaybe<IGoogleProtobufAny>;
|
165
|
+
/** target scope */
|
166
|
+
scope?: InputMaybe<Scalars['String']>;
|
166
167
|
};
|
167
168
|
export declare type IIoRestorecommerceResourcebaseSort = {
|
168
|
-
field?:
|
169
|
-
order?:
|
169
|
+
field?: InputMaybe<Scalars['String']>;
|
170
|
+
order?: InputMaybe<IoRestorecommerceResourcebaseSortSortOrder>;
|
171
|
+
/** target scope */
|
172
|
+
scope?: InputMaybe<Scalars['String']>;
|
170
173
|
};
|
171
174
|
export declare enum IoRestorecommerceResourcebaseSortSortOrder {
|
172
175
|
Unsorted = 0,
|
@@ -174,15 +177,19 @@ export declare enum IoRestorecommerceResourcebaseSortSortOrder {
|
|
174
177
|
Descending = 2
|
175
178
|
}
|
176
179
|
export declare type IIoRestorecommerceResourcebaseFilterOp = {
|
177
|
-
filter?:
|
178
|
-
operator?:
|
180
|
+
filter?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilter>>;
|
181
|
+
operator?: InputMaybe<IoRestorecommerceResourcebaseFilterOpOperator>;
|
182
|
+
/** target scope */
|
183
|
+
scope?: InputMaybe<Scalars['String']>;
|
179
184
|
};
|
180
185
|
export declare type IIoRestorecommerceResourcebaseFilter = {
|
181
|
-
field?:
|
182
|
-
operation?:
|
183
|
-
value?:
|
184
|
-
type?:
|
185
|
-
filters?:
|
186
|
+
field?: InputMaybe<Scalars['String']>;
|
187
|
+
operation?: InputMaybe<IoRestorecommerceResourcebaseFilterOperation>;
|
188
|
+
value?: InputMaybe<Scalars['String']>;
|
189
|
+
type?: InputMaybe<IoRestorecommerceResourcebaseFilterValueType>;
|
190
|
+
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
191
|
+
/** target scope */
|
192
|
+
scope?: InputMaybe<Scalars['String']>;
|
186
193
|
};
|
187
194
|
export declare enum IoRestorecommerceResourcebaseFilterOperation {
|
188
195
|
Eq = 0,
|
@@ -203,15 +210,19 @@ export declare enum IoRestorecommerceResourcebaseFilterValueType {
|
|
203
210
|
Array = 4
|
204
211
|
}
|
205
212
|
export declare type IIoRestorecommerceFilterFilterOp = {
|
206
|
-
filter?:
|
207
|
-
operator?:
|
213
|
+
filter?: InputMaybe<Array<IIoRestorecommerceFilterFilter>>;
|
214
|
+
operator?: InputMaybe<IoRestorecommerceFilterFilterOpOperator>;
|
215
|
+
/** target scope */
|
216
|
+
scope?: InputMaybe<Scalars['String']>;
|
208
217
|
};
|
209
218
|
export declare type IIoRestorecommerceFilterFilter = {
|
210
|
-
field?:
|
211
|
-
operation?:
|
212
|
-
value?:
|
213
|
-
type?:
|
214
|
-
filters?:
|
219
|
+
field?: InputMaybe<Scalars['String']>;
|
220
|
+
operation?: InputMaybe<IoRestorecommerceFilterFilterOperation>;
|
221
|
+
value?: InputMaybe<Scalars['String']>;
|
222
|
+
type?: InputMaybe<IoRestorecommerceFilterFilterValueType>;
|
223
|
+
filters?: InputMaybe<Array<IIoRestorecommerceFilterFilterOp>>;
|
224
|
+
/** target scope */
|
225
|
+
scope?: InputMaybe<Scalars['String']>;
|
215
226
|
};
|
216
227
|
export declare enum IoRestorecommerceFilterFilterOperation {
|
217
228
|
Eq = 0,
|
@@ -240,12 +251,16 @@ export declare enum IoRestorecommerceResourcebaseFilterOpOperator {
|
|
240
251
|
Or = 1
|
241
252
|
}
|
242
253
|
export declare type IIoRestorecommerceResourcebaseFieldFilter = {
|
243
|
-
name?:
|
244
|
-
include?:
|
254
|
+
name?: InputMaybe<Scalars['String']>;
|
255
|
+
include?: InputMaybe<Scalars['Boolean']>;
|
256
|
+
/** target scope */
|
257
|
+
scope?: InputMaybe<Scalars['String']>;
|
245
258
|
};
|
246
259
|
export declare type IGoogleProtobufAny = {
|
247
|
-
typeUrl?:
|
248
|
-
value?:
|
260
|
+
typeUrl?: InputMaybe<Scalars['String']>;
|
261
|
+
value?: InputMaybe<Scalars['Upload']>;
|
262
|
+
/** target scope */
|
263
|
+
scope?: InputMaybe<Scalars['String']>;
|
249
264
|
};
|
250
265
|
export declare type CatalogProductPrototypeQuery = {
|
251
266
|
__typename?: 'CatalogProductPrototypeQuery';
|
@@ -396,81 +411,103 @@ export declare type CatalogProductMutationDeleteArgs = {
|
|
396
411
|
input: IIoRestorecommerceResourcebaseDeleteRequest;
|
397
412
|
};
|
398
413
|
export declare type IIoRestorecommerceProductProductList = {
|
399
|
-
items?:
|
400
|
-
totalCount?:
|
401
|
-
mode?:
|
414
|
+
items?: InputMaybe<Array<IIoRestorecommerceProductMainProduct>>;
|
415
|
+
totalCount?: InputMaybe<Scalars['Int']>;
|
416
|
+
mode?: InputMaybe<ModeType>;
|
417
|
+
/** target scope */
|
418
|
+
scope?: InputMaybe<Scalars['String']>;
|
402
419
|
};
|
403
420
|
export declare type IIoRestorecommerceProductMainProduct = {
|
404
|
-
id?:
|
405
|
-
product?:
|
406
|
-
bundle?:
|
407
|
-
active?:
|
408
|
-
meta?:
|
421
|
+
id?: InputMaybe<Scalars['String']>;
|
422
|
+
product?: InputMaybe<IIoRestorecommerceProductProduct>;
|
423
|
+
bundle?: InputMaybe<IIoRestorecommerceProductBundle>;
|
424
|
+
active?: InputMaybe<Scalars['Boolean']>;
|
425
|
+
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
426
|
+
/** target scope */
|
427
|
+
scope?: InputMaybe<Scalars['String']>;
|
409
428
|
};
|
410
429
|
export declare type IIoRestorecommerceProductProduct = {
|
411
|
-
id?:
|
412
|
-
name?:
|
413
|
-
description?:
|
414
|
-
manufacturerId?:
|
415
|
-
taricCode?:
|
416
|
-
prototype?:
|
417
|
-
category?:
|
418
|
-
taxId?:
|
419
|
-
variants?:
|
420
|
-
gtin?:
|
430
|
+
id?: InputMaybe<Scalars['String']>;
|
431
|
+
name?: InputMaybe<Scalars['String']>;
|
432
|
+
description?: InputMaybe<Scalars['String']>;
|
433
|
+
manufacturerId?: InputMaybe<Scalars['String']>;
|
434
|
+
taricCode?: InputMaybe<Scalars['String']>;
|
435
|
+
prototype?: InputMaybe<IIoRestorecommerceProductIdentifier>;
|
436
|
+
category?: InputMaybe<IIoRestorecommerceProductIdentifier>;
|
437
|
+
taxId?: InputMaybe<Array<Scalars['String']>>;
|
438
|
+
variants?: InputMaybe<Array<IIoRestorecommerceProductVariant>>;
|
439
|
+
gtin?: InputMaybe<Scalars['String']>;
|
440
|
+
/** target scope */
|
441
|
+
scope?: InputMaybe<Scalars['String']>;
|
421
442
|
};
|
422
443
|
export declare type IIoRestorecommerceProductIdentifier = {
|
423
|
-
id?:
|
444
|
+
id?: InputMaybe<Scalars['String']>;
|
445
|
+
/** target scope */
|
446
|
+
scope?: InputMaybe<Scalars['String']>;
|
424
447
|
};
|
425
448
|
export declare type IIoRestorecommerceProductVariant = {
|
426
|
-
id?:
|
427
|
-
name?:
|
428
|
-
description?:
|
429
|
-
stockLevel?:
|
430
|
-
price?:
|
431
|
-
sale?:
|
432
|
-
salePrice?:
|
433
|
-
image?:
|
434
|
-
stockKeepingUnit?:
|
435
|
-
templateVariant?:
|
436
|
-
attributes?:
|
449
|
+
id?: InputMaybe<Scalars['String']>;
|
450
|
+
name?: InputMaybe<Scalars['String']>;
|
451
|
+
description?: InputMaybe<Scalars['String']>;
|
452
|
+
stockLevel?: InputMaybe<Scalars['Int']>;
|
453
|
+
price?: InputMaybe<Scalars['Float']>;
|
454
|
+
sale?: InputMaybe<Scalars['Boolean']>;
|
455
|
+
salePrice?: InputMaybe<Scalars['Float']>;
|
456
|
+
image?: InputMaybe<Array<IIoRestorecommerceImageImage>>;
|
457
|
+
stockKeepingUnit?: InputMaybe<Scalars['String']>;
|
458
|
+
templateVariant?: InputMaybe<Scalars['String']>;
|
459
|
+
attributes?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
460
|
+
/** target scope */
|
461
|
+
scope?: InputMaybe<Scalars['String']>;
|
437
462
|
};
|
438
463
|
export declare type IIoRestorecommerceImageImage = {
|
439
|
-
id?:
|
440
|
-
caption?:
|
441
|
-
filename?:
|
442
|
-
contentType?:
|
443
|
-
url?:
|
444
|
-
width?:
|
445
|
-
height?:
|
446
|
-
length?:
|
464
|
+
id?: InputMaybe<Scalars['String']>;
|
465
|
+
caption?: InputMaybe<Scalars['String']>;
|
466
|
+
filename?: InputMaybe<Scalars['String']>;
|
467
|
+
contentType?: InputMaybe<Scalars['String']>;
|
468
|
+
url?: InputMaybe<Scalars['String']>;
|
469
|
+
width?: InputMaybe<Scalars['Float']>;
|
470
|
+
height?: InputMaybe<Scalars['Float']>;
|
471
|
+
length?: InputMaybe<Scalars['Float']>;
|
472
|
+
/** target scope */
|
473
|
+
scope?: InputMaybe<Scalars['String']>;
|
447
474
|
};
|
448
475
|
export declare type IIoRestorecommerceAttributeAttribute = {
|
449
|
-
id?:
|
450
|
-
value?:
|
451
|
-
attribute?:
|
476
|
+
id?: InputMaybe<Scalars['String']>;
|
477
|
+
value?: InputMaybe<Scalars['String']>;
|
478
|
+
attribute?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
479
|
+
/** target scope */
|
480
|
+
scope?: InputMaybe<Scalars['String']>;
|
452
481
|
};
|
453
482
|
export declare type IIoRestorecommerceProductBundle = {
|
454
|
-
id?:
|
455
|
-
name?:
|
456
|
-
description?:
|
457
|
-
image?:
|
458
|
-
product?:
|
459
|
-
price?:
|
483
|
+
id?: InputMaybe<Scalars['String']>;
|
484
|
+
name?: InputMaybe<Scalars['String']>;
|
485
|
+
description?: InputMaybe<Scalars['String']>;
|
486
|
+
image?: InputMaybe<Array<IIoRestorecommerceImageImage>>;
|
487
|
+
product?: InputMaybe<Array<IIoRestorecommerceProductBundleProduct>>;
|
488
|
+
price?: InputMaybe<Scalars['Float']>;
|
489
|
+
/** target scope */
|
490
|
+
scope?: InputMaybe<Scalars['String']>;
|
460
491
|
};
|
461
492
|
export declare type IIoRestorecommerceProductBundleProduct = {
|
462
|
-
productId?:
|
463
|
-
quantity?:
|
493
|
+
productId?: InputMaybe<Scalars['String']>;
|
494
|
+
quantity?: InputMaybe<Scalars['Int']>;
|
495
|
+
/** target scope */
|
496
|
+
scope?: InputMaybe<Scalars['String']>;
|
464
497
|
};
|
465
498
|
export declare type IIoRestorecommerceMetaMeta = {
|
466
|
-
created?:
|
467
|
-
modified?:
|
468
|
-
modifiedBy?:
|
469
|
-
owner?:
|
470
|
-
acl?:
|
499
|
+
created?: InputMaybe<Scalars['Float']>;
|
500
|
+
modified?: InputMaybe<Scalars['Float']>;
|
501
|
+
modifiedBy?: InputMaybe<Scalars['String']>;
|
502
|
+
owner?: InputMaybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
503
|
+
acl?: InputMaybe<Array<IIoRestorecommerceAttributeAttributeObj>>;
|
504
|
+
/** target scope */
|
505
|
+
scope?: InputMaybe<Scalars['String']>;
|
471
506
|
};
|
472
507
|
export declare type IIoRestorecommerceAttributeAttributeObj = {
|
473
|
-
attribute?:
|
508
|
+
attribute?: InputMaybe<IIoRestorecommerceAttributeAttribute>;
|
509
|
+
/** target scope */
|
510
|
+
scope?: InputMaybe<Scalars['String']>;
|
474
511
|
};
|
475
512
|
export declare enum ModeType {
|
476
513
|
Create = "CREATE",
|
@@ -487,8 +524,10 @@ export declare type IoRestorecommerceResourcebaseDeleteResponse = {
|
|
487
524
|
operationStatus?: Maybe<IoRestorecommerceStatusOperationStatus>;
|
488
525
|
};
|
489
526
|
export declare type IIoRestorecommerceResourcebaseDeleteRequest = {
|
490
|
-
collection?:
|
491
|
-
ids?:
|
527
|
+
collection?: InputMaybe<Scalars['Boolean']>;
|
528
|
+
ids?: InputMaybe<Array<Scalars['String']>>;
|
529
|
+
/** target scope */
|
530
|
+
scope?: InputMaybe<Scalars['String']>;
|
492
531
|
};
|
493
532
|
export declare type CatalogProductPrototypeMutation = {
|
494
533
|
__typename?: 'CatalogProductPrototypeMutation';
|
@@ -502,17 +541,21 @@ export declare type CatalogProductPrototypeMutationDeleteArgs = {
|
|
502
541
|
input: IIoRestorecommerceResourcebaseDeleteRequest;
|
503
542
|
};
|
504
543
|
export declare type IIoRestorecommerceProductPrototypeProductPrototypeList = {
|
505
|
-
items?:
|
506
|
-
totalCount?:
|
507
|
-
mode?:
|
544
|
+
items?: InputMaybe<Array<IIoRestorecommerceProductPrototypeProductPrototype>>;
|
545
|
+
totalCount?: InputMaybe<Scalars['Int']>;
|
546
|
+
mode?: InputMaybe<ModeType>;
|
547
|
+
/** target scope */
|
548
|
+
scope?: InputMaybe<Scalars['String']>;
|
508
549
|
};
|
509
550
|
export declare type IIoRestorecommerceProductPrototypeProductPrototype = {
|
510
|
-
id?:
|
511
|
-
meta?:
|
512
|
-
name?:
|
513
|
-
version?:
|
514
|
-
description?:
|
515
|
-
categoryId?:
|
551
|
+
id?: InputMaybe<Scalars['String']>;
|
552
|
+
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
553
|
+
name?: InputMaybe<Scalars['String']>;
|
554
|
+
version?: InputMaybe<Scalars['String']>;
|
555
|
+
description?: InputMaybe<Scalars['String']>;
|
556
|
+
categoryId?: InputMaybe<Scalars['String']>;
|
557
|
+
/** target scope */
|
558
|
+
scope?: InputMaybe<Scalars['String']>;
|
516
559
|
};
|
517
560
|
export declare type CatalogProductCategoryMutation = {
|
518
561
|
__typename?: 'CatalogProductCategoryMutation';
|
@@ -526,21 +569,27 @@ export declare type CatalogProductCategoryMutationDeleteArgs = {
|
|
526
569
|
input: IIoRestorecommerceResourcebaseDeleteRequest;
|
527
570
|
};
|
528
571
|
export declare type IIoRestorecommerceProductCategoryProductCategoryList = {
|
529
|
-
items?:
|
530
|
-
totalCount?:
|
531
|
-
mode?:
|
572
|
+
items?: InputMaybe<Array<IIoRestorecommerceProductCategoryProductCategory>>;
|
573
|
+
totalCount?: InputMaybe<Scalars['Int']>;
|
574
|
+
mode?: InputMaybe<ModeType>;
|
575
|
+
/** target scope */
|
576
|
+
scope?: InputMaybe<Scalars['String']>;
|
532
577
|
};
|
533
578
|
export declare type IIoRestorecommerceProductCategoryProductCategory = {
|
534
|
-
id?:
|
535
|
-
meta?:
|
536
|
-
name?:
|
537
|
-
description?:
|
538
|
-
priceGroupId?:
|
539
|
-
image?:
|
540
|
-
parent?:
|
579
|
+
id?: InputMaybe<Scalars['String']>;
|
580
|
+
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
581
|
+
name?: InputMaybe<Scalars['String']>;
|
582
|
+
description?: InputMaybe<Scalars['String']>;
|
583
|
+
priceGroupId?: InputMaybe<Scalars['String']>;
|
584
|
+
image?: InputMaybe<IIoRestorecommerceImageImage>;
|
585
|
+
parent?: InputMaybe<IIoRestorecommerceProductCategoryParent>;
|
586
|
+
/** target scope */
|
587
|
+
scope?: InputMaybe<Scalars['String']>;
|
541
588
|
};
|
542
589
|
export declare type IIoRestorecommerceProductCategoryParent = {
|
543
|
-
parentId?:
|
590
|
+
parentId?: InputMaybe<Scalars['String']>;
|
591
|
+
/** target scope */
|
592
|
+
scope?: InputMaybe<Scalars['String']>;
|
544
593
|
};
|
545
594
|
export declare type CatalogPriceGroupMutation = {
|
546
595
|
__typename?: 'CatalogPriceGroupMutation';
|
@@ -554,15 +603,19 @@ export declare type CatalogPriceGroupMutationDeleteArgs = {
|
|
554
603
|
input: IIoRestorecommerceResourcebaseDeleteRequest;
|
555
604
|
};
|
556
605
|
export declare type IIoRestorecommercePriceGroupPriceGroupList = {
|
557
|
-
items?:
|
558
|
-
totalCount?:
|
559
|
-
mode?:
|
606
|
+
items?: InputMaybe<Array<IIoRestorecommercePriceGroupPriceGroup>>;
|
607
|
+
totalCount?: InputMaybe<Scalars['Int']>;
|
608
|
+
mode?: InputMaybe<ModeType>;
|
609
|
+
/** target scope */
|
610
|
+
scope?: InputMaybe<Scalars['String']>;
|
560
611
|
};
|
561
612
|
export declare type IIoRestorecommercePriceGroupPriceGroup = {
|
562
|
-
id?:
|
563
|
-
meta?:
|
564
|
-
name?:
|
565
|
-
description?:
|
613
|
+
id?: InputMaybe<Scalars['String']>;
|
614
|
+
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
615
|
+
name?: InputMaybe<Scalars['String']>;
|
616
|
+
description?: InputMaybe<Scalars['String']>;
|
617
|
+
/** target scope */
|
618
|
+
scope?: InputMaybe<Scalars['String']>;
|
566
619
|
};
|
567
620
|
export declare type CatalogManufacturerMutation = {
|
568
621
|
__typename?: 'CatalogManufacturerMutation';
|
@@ -576,22 +629,29 @@ export declare type CatalogManufacturerMutationDeleteArgs = {
|
|
576
629
|
input: IIoRestorecommerceResourcebaseDeleteRequest;
|
577
630
|
};
|
578
631
|
export declare type IIoRestorecommerceManufacturerManufacturerList = {
|
579
|
-
items?:
|
580
|
-
totalCount?:
|
581
|
-
mode?:
|
632
|
+
items?: InputMaybe<Array<IIoRestorecommerceManufacturerManufacturer>>;
|
633
|
+
totalCount?: InputMaybe<Scalars['Int']>;
|
634
|
+
mode?: InputMaybe<ModeType>;
|
635
|
+
/** target scope */
|
636
|
+
scope?: InputMaybe<Scalars['String']>;
|
582
637
|
};
|
583
638
|
export declare type IIoRestorecommerceManufacturerManufacturer = {
|
584
|
-
id?:
|
585
|
-
meta?:
|
586
|
-
name?:
|
587
|
-
description?:
|
639
|
+
id?: InputMaybe<Scalars['String']>;
|
640
|
+
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
641
|
+
name?: InputMaybe<Scalars['String']>;
|
642
|
+
description?: InputMaybe<Scalars['String']>;
|
643
|
+
/** target scope */
|
644
|
+
scope?: InputMaybe<Scalars['String']>;
|
588
645
|
};
|
589
646
|
export declare type WithIndex<TObject> = TObject & Record<string, any>;
|
590
647
|
export declare type ResolversObject<TObject> = WithIndex<TObject>;
|
591
648
|
export declare type ResolverTypeWrapper<T> = Promise<T> | T;
|
592
|
-
export declare type
|
649
|
+
export declare type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
|
650
|
+
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
|
651
|
+
};
|
652
|
+
export declare type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
|
593
653
|
export declare type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
|
594
|
-
export declare type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) =>
|
654
|
+
export declare type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
|
595
655
|
export declare type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
|
596
656
|
export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
|
597
657
|
subscribe: SubscriptionSubscribeFn<{
|
@@ -1180,8 +1240,3 @@ export declare type Resolvers<ContextType = CatalogContext> = ResolversObject<{
|
|
1180
1240
|
CatalogPriceGroupMutation?: CatalogPriceGroupMutationResolvers<ContextType>;
|
1181
1241
|
CatalogManufacturerMutation?: CatalogManufacturerMutationResolvers<ContextType>;
|
1182
1242
|
}>;
|
1183
|
-
/**
|
1184
|
-
* @deprecated
|
1185
|
-
* Use "Resolvers" root object instead. If you wish to get "IResolvers", add "typesPrefix: I" to your config.
|
1186
|
-
*/
|
1187
|
-
export declare type IResolvers<ContextType = CatalogContext> = Resolvers<ContextType>;
|
@@ -4,6 +4,6 @@ exports.schema = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
5
5
|
const protos_1 = require("../../../gql/protos");
|
6
6
|
const interfaces_1 = require("../interfaces");
|
7
|
-
types_1.registerTypings();
|
8
|
-
const schema = (cfg) => protos_1.generateSubServiceSchemas(types_1.subServices, cfg, interfaces_1.namespace, 'Catalog');
|
7
|
+
(0, types_1.registerTypings)();
|
8
|
+
const schema = (cfg) => (0, protos_1.generateSubServiceSchemas)(types_1.subServices, cfg, interfaces_1.namespace, 'Catalog');
|
9
9
|
exports.schema = schema;
|
@@ -8,7 +8,7 @@ const price_group_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/i
|
|
8
8
|
const manufacturer_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/manufacturer");
|
9
9
|
const protos_1 = require("../../../gql/protos");
|
10
10
|
function registerTypings() {
|
11
|
-
protos_1.registerPackagesRecursive(product_1.protoMetadata, product_prototype_1.protoMetadata, product_category_1.protoMetadata, price_group_1.protoMetadata, manufacturer_1.protoMetadata);
|
11
|
+
(0, protos_1.registerPackagesRecursive)(product_1.protoMetadata, product_prototype_1.protoMetadata, product_category_1.protoMetadata, price_group_1.protoMetadata, manufacturer_1.protoMetadata);
|
12
12
|
}
|
13
13
|
exports.registerTypings = registerTypings;
|
14
14
|
exports.subServices = [
|
@@ -11,11 +11,11 @@ const protos_1 = require("../../../gql/protos");
|
|
11
11
|
class CatalogSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
12
12
|
constructor(cfg, logger) {
|
13
13
|
super(cfg, logger);
|
14
|
-
this.product = protos_1.getGRPCService(this, product_1.protobufPackage, product_1.protoMetadata.fileDescriptor.service[0]);
|
15
|
-
this.product_prototype = protos_1.getGRPCService(this, product_prototype_1.protobufPackage, product_prototype_1.protoMetadata.fileDescriptor.service[0]);
|
16
|
-
this.product_category = protos_1.getGRPCService(this, product_category_1.protobufPackage, product_category_1.protoMetadata.fileDescriptor.service[0]);
|
17
|
-
this.price_group = protos_1.getGRPCService(this, price_group_1.protobufPackage, price_group_1.protoMetadata.fileDescriptor.service[0]);
|
18
|
-
this.manufacturer = protos_1.getGRPCService(this, manufacturer_1.protobufPackage, manufacturer_1.protoMetadata.fileDescriptor.service[0]);
|
14
|
+
this.product = (0, protos_1.getGRPCService)(this, product_1.protobufPackage, product_1.protoMetadata.fileDescriptor.service[0]);
|
15
|
+
this.product_prototype = (0, protos_1.getGRPCService)(this, product_prototype_1.protobufPackage, product_prototype_1.protoMetadata.fileDescriptor.service[0]);
|
16
|
+
this.product_category = (0, protos_1.getGRPCService)(this, product_category_1.protobufPackage, product_category_1.protoMetadata.fileDescriptor.service[0]);
|
17
|
+
this.price_group = (0, protos_1.getGRPCService)(this, price_group_1.protobufPackage, price_group_1.protoMetadata.fileDescriptor.service[0]);
|
18
|
+
this.manufacturer = (0, protos_1.getGRPCService)(this, manufacturer_1.protobufPackage, manufacturer_1.protoMetadata.fileDescriptor.service[0]);
|
19
19
|
}
|
20
20
|
}
|
21
21
|
exports.CatalogSrvGrpcClient = CatalogSrvGrpcClient;
|
@@ -5,13 +5,13 @@ const federation_1 = require("./gql/federation");
|
|
5
5
|
const interfaces_1 = require("./interfaces");
|
6
6
|
const grpc_1 = require("./grpc");
|
7
7
|
const utils_1 = require("../../utils");
|
8
|
-
exports.catalogModule = utils_1.createFacadeModuleFactory(interfaces_1.namespace, (facade, config) => {
|
8
|
+
exports.catalogModule = (0, utils_1.createFacadeModuleFactory)(interfaces_1.namespace, (facade, config) => {
|
9
9
|
const catalog = {
|
10
10
|
client: new grpc_1.CatalogSrvGrpcClient(config.config.client, facade.logger)
|
11
11
|
};
|
12
12
|
facade.addApolloService({
|
13
13
|
name: interfaces_1.namespace,
|
14
|
-
schema: federation_1.FederatedCatalogSchema(config.config)
|
14
|
+
schema: (0, federation_1.FederatedCatalogSchema)(config.config)
|
15
15
|
});
|
16
16
|
facade.koa.use(async (ctx, next) => {
|
17
17
|
ctx.catalog = catalog;
|
@@ -8,7 +8,7 @@ const resolvers_1 = require("./resolvers");
|
|
8
8
|
const schema_1 = require("./schema");
|
9
9
|
// TODO There is currently no way of building a federated schema from GraphQLSchema Object
|
10
10
|
// See https://github.com/apollographql/apollo-server/pull/4310
|
11
|
-
exports.FederatedExampleSchema = federation_1.buildFederatedSchema({
|
12
|
-
typeDefs: apollo_server_koa_1.gql(graphql_1.printSchema(schema_1.schema)),
|
11
|
+
exports.FederatedExampleSchema = (0, federation_1.buildFederatedSchema)({
|
12
|
+
typeDefs: (0, apollo_server_koa_1.gql)((0, graphql_1.printSchema)(schema_1.schema)),
|
13
13
|
resolvers: resolvers_1.resolvers
|
14
14
|
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { GraphQLResolveInfo } from 'graphql';
|
2
2
|
import { FacadeStatusContext } from '../interfaces';
|
3
3
|
export declare type Maybe<T> = T | undefined;
|
4
|
+
export declare type InputMaybe<T> = T | undefined;
|
4
5
|
export declare type Exact<T extends {
|
5
6
|
[key: string]: unknown;
|
6
7
|
}> = {
|
@@ -33,9 +34,12 @@ export declare type FacadeStatusType = {
|
|
33
34
|
export declare type WithIndex<TObject> = TObject & Record<string, any>;
|
34
35
|
export declare type ResolversObject<TObject> = WithIndex<TObject>;
|
35
36
|
export declare type ResolverTypeWrapper<T> = Promise<T> | T;
|
36
|
-
export declare type
|
37
|
+
export declare type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
|
38
|
+
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
|
39
|
+
};
|
40
|
+
export declare type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
|
37
41
|
export declare type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
|
38
|
-
export declare type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) =>
|
42
|
+
export declare type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
|
39
43
|
export declare type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
|
40
44
|
export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
|
41
45
|
subscribe: SubscriptionSubscribeFn<{
|
@@ -80,8 +84,3 @@ export declare type Resolvers<ContextType = FacadeStatusContext> = ResolversObje
|
|
80
84
|
Query?: QueryResolvers<ContextType>;
|
81
85
|
FacadeStatusType?: FacadeStatusTypeResolvers<ContextType>;
|
82
86
|
}>;
|
83
|
-
/**
|
84
|
-
* @deprecated
|
85
|
-
* Use "Resolvers" root object instead. If you wish to get "IResolvers", add "typesPrefix: I" to your config.
|
86
|
-
*/
|
87
|
-
export declare type IResolvers<ContextType = FacadeStatusContext> = Resolvers<ContextType>;
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.facadeStatusModule = void 0;
|
4
4
|
const utils_1 = require("../../utils");
|
5
5
|
const index_1 = require("./gql/index");
|
6
|
-
exports.facadeStatusModule = utils_1.createFacadeModule('facade-status', (facade) => {
|
6
|
+
exports.facadeStatusModule = (0, utils_1.createFacadeModule)('facade-status', (facade) => {
|
7
7
|
facade.addApolloService({
|
8
8
|
name: 'status',
|
9
9
|
schema: index_1.FederatedExampleSchema
|
@@ -7,10 +7,11 @@ const schema_1 = require("./schema");
|
|
7
7
|
const interfaces_1 = require("../interfaces");
|
8
8
|
const protos_1 = require("../../../gql/protos");
|
9
9
|
const types_1 = require("./types");
|
10
|
+
const graphql_1 = require("graphql");
|
10
11
|
// TODO There is currently no way of building a federated schema from GraphQLSchema Object
|
11
12
|
// See https://github.com/apollographql/apollo-server/pull/4310
|
12
|
-
const FederatedFulfillmentSchema = (cfg) => federation_1.buildFederatedSchema({
|
13
|
-
typeDefs: apollo_server_koa_1.gql(
|
14
|
-
resolvers: protos_1.generateSubServiceResolvers(types_1.subServices, cfg, interfaces_1.namespace)
|
13
|
+
const FederatedFulfillmentSchema = (cfg) => (0, federation_1.buildFederatedSchema)({
|
14
|
+
typeDefs: (0, apollo_server_koa_1.gql)((0, graphql_1.printSchema)((0, schema_1.schema)(cfg))),
|
15
|
+
resolvers: (0, protos_1.generateSubServiceResolvers)(types_1.subServices, cfg, interfaces_1.namespace)
|
15
16
|
});
|
16
17
|
exports.FederatedFulfillmentSchema = FederatedFulfillmentSchema;
|