@restorecommerce/facade 1.0.0 → 1.1.0
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 +24 -0
- package/codegen/index.js +1 -1
- package/dist/gql/protos/federation.d.ts +6 -0
- package/dist/gql/protos/federation.js +51 -0
- package/dist/gql/protos/graphql.d.ts +5 -27
- package/dist/gql/protos/graphql.js +3 -564
- package/dist/gql/protos/index.d.ts +3 -0
- package/dist/gql/protos/index.js +3 -0
- package/dist/gql/protos/registry.d.ts +2 -2
- package/dist/gql/protos/resolvers.d.ts +9 -0
- package/dist/gql/protos/resolvers.js +427 -0
- package/dist/gql/protos/schema.d.ts +14 -0
- package/dist/gql/protos/schema.js +234 -0
- package/dist/gql/protos/types.d.ts +20 -0
- package/dist/gql/protos/utils.d.ts +5 -0
- package/dist/gql/protos/utils.js +27 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +78 -7
- package/dist/interfaces.d.ts +2 -0
- package/dist/modules/access-control/gql/schema.generated.d.ts +10 -1
- package/dist/modules/catalog/gql/schema.generated.d.ts +10 -1
- package/dist/modules/fulfillment/gql/schema.generated.d.ts +10 -1
- package/dist/modules/identity/gql/federation.d.ts +1 -1
- package/dist/modules/identity/gql/federation.js +1 -9
- package/dist/modules/identity/gql/schema.generated.d.ts +40 -1
- package/dist/modules/identity/gql/schema.generated.js +7 -1
- package/dist/modules/identity/gql/types.js +2 -0
- package/dist/modules/indexing/gql/federation.d.ts +2 -2
- package/dist/modules/indexing/gql/federation.js +2 -2
- package/dist/modules/indexing/gql/schema.d.ts +2 -2
- package/dist/modules/indexing/gql/schema.generated.d.ts +13 -2
- package/dist/modules/indexing/gql/schema.js +1 -2
- package/dist/modules/indexing/gql/types.d.ts +2 -0
- package/dist/modules/indexing/gql/types.js +5 -2
- package/dist/modules/indexing/interfaces.d.ts +2 -2
- package/dist/modules/invoicing/gql/schema.generated.d.ts +10 -1
- package/dist/modules/notification/gql/schema.generated.d.ts +10 -1
- package/dist/modules/ordering/gql/federation.js +4 -4
- package/dist/modules/ordering/gql/schema.generated.d.ts +10 -1
- package/dist/modules/resource/gql/schema.generated.d.ts +10 -1
- package/dist/modules/scheduling/gql/schema.generated.d.ts +5 -3
- package/generate.ts +6 -3
- package/package.json +18 -9
@@ -31,9 +31,13 @@ export declare type Mutation = {
|
|
31
31
|
};
|
32
32
|
export declare type IndexingMutation = {
|
33
33
|
__typename?: 'IndexingMutation';
|
34
|
+
search: IndexingSearchMutation;
|
35
|
+
};
|
36
|
+
export declare type IndexingSearchMutation = {
|
37
|
+
__typename?: 'IndexingSearchMutation';
|
34
38
|
Search?: Maybe<ProtoIoRestorecommerceSearchSearchResponse>;
|
35
39
|
};
|
36
|
-
export declare type
|
40
|
+
export declare type IndexingSearchMutationSearchArgs = {
|
37
41
|
input: IIoRestorecommerceSearchSearchRequest;
|
38
42
|
};
|
39
43
|
export declare type ProtoIoRestorecommerceSearchSearchResponse = {
|
@@ -86,6 +90,7 @@ export declare type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {
|
|
86
90
|
export declare type ResolversTypes = ResolversObject<{
|
87
91
|
Mutation: ResolverTypeWrapper<{}>;
|
88
92
|
IndexingMutation: ResolverTypeWrapper<IndexingMutation>;
|
93
|
+
IndexingSearchMutation: ResolverTypeWrapper<IndexingSearchMutation>;
|
89
94
|
ProtoIoRestorecommerceSearchSearchResponse: ResolverTypeWrapper<ProtoIoRestorecommerceSearchSearchResponse>;
|
90
95
|
IoRestorecommerceSearchSearchResponse: ResolverTypeWrapper<IoRestorecommerceSearchSearchResponse>;
|
91
96
|
GoogleProtobufAny: ResolverTypeWrapper<GoogleProtobufAny>;
|
@@ -98,6 +103,7 @@ export declare type ResolversTypes = ResolversObject<{
|
|
98
103
|
export declare type ResolversParentTypes = ResolversObject<{
|
99
104
|
Mutation: {};
|
100
105
|
IndexingMutation: IndexingMutation;
|
106
|
+
IndexingSearchMutation: IndexingSearchMutation;
|
101
107
|
ProtoIoRestorecommerceSearchSearchResponse: ProtoIoRestorecommerceSearchSearchResponse;
|
102
108
|
IoRestorecommerceSearchSearchResponse: IoRestorecommerceSearchSearchResponse;
|
103
109
|
GoogleProtobufAny: GoogleProtobufAny;
|
@@ -110,7 +116,11 @@ export declare type MutationResolvers<ContextType = IndexingContext, ParentType
|
|
110
116
|
indexing?: Resolver<ResolversTypes['IndexingMutation'], ParentType, ContextType>;
|
111
117
|
}>;
|
112
118
|
export declare type IndexingMutationResolvers<ContextType = IndexingContext, ParentType extends ResolversParentTypes['IndexingMutation'] = ResolversParentTypes['IndexingMutation']> = ResolversObject<{
|
113
|
-
|
119
|
+
search?: Resolver<ResolversTypes['IndexingSearchMutation'], ParentType, ContextType>;
|
120
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
121
|
+
}>;
|
122
|
+
export declare type IndexingSearchMutationResolvers<ContextType = IndexingContext, ParentType extends ResolversParentTypes['IndexingSearchMutation'] = ResolversParentTypes['IndexingSearchMutation']> = ResolversObject<{
|
123
|
+
Search?: Resolver<Maybe<ResolversTypes['ProtoIoRestorecommerceSearchSearchResponse']>, ParentType, ContextType, RequireFields<IndexingSearchMutationSearchArgs, 'input'>>;
|
114
124
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
115
125
|
}>;
|
116
126
|
export declare type ProtoIoRestorecommerceSearchSearchResponseResolvers<ContextType = IndexingContext, ParentType extends ResolversParentTypes['ProtoIoRestorecommerceSearchSearchResponse'] = ResolversParentTypes['ProtoIoRestorecommerceSearchSearchResponse']> = ResolversObject<{
|
@@ -132,6 +142,7 @@ export interface GoogleProtobufAnyValueScalarConfig extends GraphQLScalarTypeCon
|
|
132
142
|
export declare type Resolvers<ContextType = IndexingContext> = ResolversObject<{
|
133
143
|
Mutation?: MutationResolvers<ContextType>;
|
134
144
|
IndexingMutation?: IndexingMutationResolvers<ContextType>;
|
145
|
+
IndexingSearchMutation?: IndexingSearchMutationResolvers<ContextType>;
|
135
146
|
ProtoIoRestorecommerceSearchSearchResponse?: ProtoIoRestorecommerceSearchSearchResponseResolvers<ContextType>;
|
136
147
|
IoRestorecommerceSearchSearchResponse?: IoRestorecommerceSearchSearchResponseResolvers<ContextType>;
|
137
148
|
GoogleProtobufAny?: GoogleProtobufAnyResolvers<ContextType>;
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.schema = void 0;
|
4
4
|
const types_1 = require("./types");
|
5
5
|
const protos_1 = require("../../../gql/protos");
|
6
|
-
const search_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search");
|
7
6
|
const interfaces_1 = require("../interfaces");
|
8
7
|
(0, types_1.registerTypings)();
|
9
|
-
const schema = (cfg) => (0, protos_1.
|
8
|
+
const schema = (cfg) => (0, protos_1.generateSubServiceSchemas)(types_1.subServices, cfg, interfaces_1.namespace, 'Indexing');
|
10
9
|
exports.schema = schema;
|
@@ -1,9 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.registerTypings = void 0;
|
3
|
+
exports.subServices = exports.registerTypings = void 0;
|
4
4
|
const search_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search");
|
5
5
|
const protos_1 = require("../../../gql/protos");
|
6
6
|
function registerTypings() {
|
7
|
-
(0, protos_1.registerPackagesRecursive)(
|
7
|
+
(0, protos_1.registerPackagesRecursive)(...exports.subServices);
|
8
8
|
}
|
9
9
|
exports.registerTypings = registerTypings;
|
10
|
+
exports.subServices = [
|
11
|
+
search_1.protoMetadata
|
12
|
+
];
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { IndexingSrvGrpcClient } from "./grpc";
|
2
|
-
import {
|
2
|
+
import { SubSpaceServiceConfig } from '../../gql/protos';
|
3
3
|
import { FacadeModule, FacadeContext } from "../../interfaces";
|
4
4
|
export interface IndexingConfig {
|
5
|
-
config:
|
5
|
+
config: SubSpaceServiceConfig;
|
6
6
|
}
|
7
7
|
export interface IndexingContext extends FacadeContext {
|
8
8
|
indexing: {
|
@@ -297,10 +297,10 @@ export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
|
297
297
|
sort?: InputMaybe<Array<IIoRestorecommerceResourcebaseSort>>;
|
298
298
|
filters?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilterOp>>;
|
299
299
|
field?: InputMaybe<Array<IIoRestorecommerceResourcebaseFieldFilter>>;
|
300
|
-
search?: InputMaybe<Array<Scalars['String']>>;
|
301
300
|
localesLimiter?: InputMaybe<Array<Scalars['String']>>;
|
302
301
|
customQueries?: InputMaybe<Array<Scalars['String']>>;
|
303
302
|
customArguments?: InputMaybe<IGoogleProtobufAny>;
|
303
|
+
search?: InputMaybe<IIoRestorecommerceResourcebaseSearch>;
|
304
304
|
/** target scope */
|
305
305
|
scope?: InputMaybe<Scalars['String']>;
|
306
306
|
};
|
@@ -387,6 +387,11 @@ export declare type IGoogleProtobufAny = {
|
|
387
387
|
typeUrl?: InputMaybe<Scalars['String']>;
|
388
388
|
value?: InputMaybe<Scalars['GoogleProtobufAnyValue']>;
|
389
389
|
};
|
390
|
+
export declare type IIoRestorecommerceResourcebaseSearch = {
|
391
|
+
search?: InputMaybe<Scalars['String']>;
|
392
|
+
fields?: InputMaybe<Array<Scalars['String']>>;
|
393
|
+
caseSensitive?: InputMaybe<Scalars['Boolean']>;
|
394
|
+
};
|
390
395
|
export declare type Mutation = {
|
391
396
|
__typename?: 'Mutation';
|
392
397
|
invoicing: InvoicingMutation;
|
@@ -462,6 +467,8 @@ export declare type IoRestorecommerceResourcebaseDeleteResponse = {
|
|
462
467
|
export declare type IIoRestorecommerceResourcebaseDeleteRequest = {
|
463
468
|
collection?: InputMaybe<Scalars['Boolean']>;
|
464
469
|
ids?: InputMaybe<Array<Scalars['String']>>;
|
470
|
+
view?: InputMaybe<Array<Scalars['String']>>;
|
471
|
+
analyzer?: InputMaybe<Array<Scalars['String']>>;
|
465
472
|
/** target scope */
|
466
473
|
scope?: InputMaybe<Scalars['String']>;
|
467
474
|
};
|
@@ -557,6 +564,7 @@ export declare type ResolversTypes = ResolversObject<{
|
|
557
564
|
IoRestorecommerceResourcebaseFilterOpOperator: IoRestorecommerceResourcebaseFilterOpOperator;
|
558
565
|
IIoRestorecommerceResourcebaseFieldFilter: IIoRestorecommerceResourcebaseFieldFilter;
|
559
566
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
567
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
560
568
|
Mutation: ResolverTypeWrapper<{}>;
|
561
569
|
InvoicingMutation: ResolverTypeWrapper<InvoicingMutation>;
|
562
570
|
InvoicingInvoiceMutation: ResolverTypeWrapper<InvoicingInvoiceMutation>;
|
@@ -618,6 +626,7 @@ export declare type ResolversParentTypes = ResolversObject<{
|
|
618
626
|
IIoRestorecommerceFilterFilter: IIoRestorecommerceFilterFilter;
|
619
627
|
IIoRestorecommerceResourcebaseFieldFilter: IIoRestorecommerceResourcebaseFieldFilter;
|
620
628
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
629
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
621
630
|
Mutation: {};
|
622
631
|
InvoicingMutation: InvoicingMutation;
|
623
632
|
InvoicingInvoiceMutation: InvoicingInvoiceMutation;
|
@@ -102,10 +102,10 @@ export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
|
102
102
|
sort?: InputMaybe<Array<IIoRestorecommerceResourcebaseSort>>;
|
103
103
|
filters?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilterOp>>;
|
104
104
|
field?: InputMaybe<Array<IIoRestorecommerceResourcebaseFieldFilter>>;
|
105
|
-
search?: InputMaybe<Array<Scalars['String']>>;
|
106
105
|
localesLimiter?: InputMaybe<Array<Scalars['String']>>;
|
107
106
|
customQueries?: InputMaybe<Array<Scalars['String']>>;
|
108
107
|
customArguments?: InputMaybe<IGoogleProtobufAny>;
|
108
|
+
search?: InputMaybe<IIoRestorecommerceResourcebaseSearch>;
|
109
109
|
/** target scope */
|
110
110
|
scope?: InputMaybe<Scalars['String']>;
|
111
111
|
};
|
@@ -192,6 +192,11 @@ export declare type IGoogleProtobufAny = {
|
|
192
192
|
typeUrl?: InputMaybe<Scalars['String']>;
|
193
193
|
value?: InputMaybe<Scalars['GoogleProtobufAnyValue']>;
|
194
194
|
};
|
195
|
+
export declare type IIoRestorecommerceResourcebaseSearch = {
|
196
|
+
search?: InputMaybe<Scalars['String']>;
|
197
|
+
fields?: InputMaybe<Array<Scalars['String']>>;
|
198
|
+
caseSensitive?: InputMaybe<Scalars['Boolean']>;
|
199
|
+
};
|
195
200
|
export declare type Mutation = {
|
196
201
|
__typename?: 'Mutation';
|
197
202
|
notification: NotificationMutation;
|
@@ -261,6 +266,8 @@ export declare type IoRestorecommerceResourcebaseDeleteResponse = {
|
|
261
266
|
export declare type IIoRestorecommerceResourcebaseDeleteRequest = {
|
262
267
|
collection?: InputMaybe<Scalars['Boolean']>;
|
263
268
|
ids?: InputMaybe<Array<Scalars['String']>>;
|
269
|
+
view?: InputMaybe<Array<Scalars['String']>>;
|
270
|
+
analyzer?: InputMaybe<Array<Scalars['String']>>;
|
264
271
|
/** target scope */
|
265
272
|
scope?: InputMaybe<Scalars['String']>;
|
266
273
|
};
|
@@ -326,6 +333,7 @@ export declare type ResolversTypes = ResolversObject<{
|
|
326
333
|
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
327
334
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
328
335
|
GoogleProtobufAnyValue: ResolverTypeWrapper<Scalars['GoogleProtobufAnyValue']>;
|
336
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
329
337
|
Mutation: ResolverTypeWrapper<{}>;
|
330
338
|
NotificationMutation: ResolverTypeWrapper<NotificationMutation>;
|
331
339
|
NotificationNotificationMutation: ResolverTypeWrapper<NotificationNotificationMutation>;
|
@@ -366,6 +374,7 @@ export declare type ResolversParentTypes = ResolversObject<{
|
|
366
374
|
Boolean: Scalars['Boolean'];
|
367
375
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
368
376
|
GoogleProtobufAnyValue: Scalars['GoogleProtobufAnyValue'];
|
377
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
369
378
|
Mutation: {};
|
370
379
|
NotificationMutation: NotificationMutation;
|
371
380
|
NotificationNotificationMutation: NotificationNotificationMutation;
|
@@ -5,13 +5,13 @@ const apollo_server_koa_1 = require("apollo-server-koa");
|
|
5
5
|
const federation_1 = require("@apollo/federation");
|
6
6
|
const schema_1 = require("./schema");
|
7
7
|
const interfaces_1 = require("../interfaces");
|
8
|
-
const
|
8
|
+
const protos_1 = require("../../../gql/protos");
|
9
9
|
const types_1 = require("./types");
|
10
|
-
const
|
10
|
+
const graphql_1 = require("graphql");
|
11
11
|
// TODO There is currently no way of building a federated schema from GraphQLSchema Object
|
12
12
|
// See https://github.com/apollographql/apollo-server/pull/4310
|
13
13
|
const FederatedOrderingSchema = (cfg) => (0, federation_1.buildFederatedSchema)({
|
14
|
-
typeDefs: (0, apollo_server_koa_1.gql)((0,
|
15
|
-
resolvers: (0,
|
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)
|
16
16
|
});
|
17
17
|
exports.FederatedOrderingSchema = FederatedOrderingSchema;
|
@@ -200,10 +200,10 @@ export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
|
200
200
|
sort?: InputMaybe<Array<IIoRestorecommerceResourcebaseSort>>;
|
201
201
|
filters?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilterOp>>;
|
202
202
|
field?: InputMaybe<Array<IIoRestorecommerceResourcebaseFieldFilter>>;
|
203
|
-
search?: InputMaybe<Array<Scalars['String']>>;
|
204
203
|
localesLimiter?: InputMaybe<Array<Scalars['String']>>;
|
205
204
|
customQueries?: InputMaybe<Array<Scalars['String']>>;
|
206
205
|
customArguments?: InputMaybe<IGoogleProtobufAny>;
|
206
|
+
search?: InputMaybe<IIoRestorecommerceResourcebaseSearch>;
|
207
207
|
/** target scope */
|
208
208
|
scope?: InputMaybe<Scalars['String']>;
|
209
209
|
};
|
@@ -290,6 +290,11 @@ export declare type IGoogleProtobufAny = {
|
|
290
290
|
typeUrl?: InputMaybe<Scalars['String']>;
|
291
291
|
value?: InputMaybe<Scalars['GoogleProtobufAnyValue']>;
|
292
292
|
};
|
293
|
+
export declare type IIoRestorecommerceResourcebaseSearch = {
|
294
|
+
search?: InputMaybe<Scalars['String']>;
|
295
|
+
fields?: InputMaybe<Array<Scalars['String']>>;
|
296
|
+
caseSensitive?: InputMaybe<Scalars['Boolean']>;
|
297
|
+
};
|
293
298
|
export declare type Mutation = {
|
294
299
|
__typename?: 'Mutation';
|
295
300
|
ordering: OrderingMutation;
|
@@ -388,6 +393,8 @@ export declare type IoRestorecommerceResourcebaseDeleteResponse = {
|
|
388
393
|
export declare type IIoRestorecommerceResourcebaseDeleteRequest = {
|
389
394
|
collection?: InputMaybe<Scalars['Boolean']>;
|
390
395
|
ids?: InputMaybe<Array<Scalars['String']>>;
|
396
|
+
view?: InputMaybe<Array<Scalars['String']>>;
|
397
|
+
analyzer?: InputMaybe<Array<Scalars['String']>>;
|
391
398
|
/** target scope */
|
392
399
|
scope?: InputMaybe<Scalars['String']>;
|
393
400
|
};
|
@@ -504,6 +511,7 @@ export declare type ResolversTypes = ResolversObject<{
|
|
504
511
|
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
505
512
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
506
513
|
GoogleProtobufAnyValue: ResolverTypeWrapper<Scalars['GoogleProtobufAnyValue']>;
|
514
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
507
515
|
Mutation: ResolverTypeWrapper<{}>;
|
508
516
|
OrderingMutation: ResolverTypeWrapper<OrderingMutation>;
|
509
517
|
OrderingOrderMutation: ResolverTypeWrapper<OrderingOrderMutation>;
|
@@ -564,6 +572,7 @@ export declare type ResolversParentTypes = ResolversObject<{
|
|
564
572
|
Boolean: Scalars['Boolean'];
|
565
573
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
566
574
|
GoogleProtobufAnyValue: Scalars['GoogleProtobufAnyValue'];
|
575
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
567
576
|
Mutation: {};
|
568
577
|
OrderingMutation: OrderingMutation;
|
569
578
|
OrderingOrderMutation: OrderingOrderMutation;
|
@@ -135,10 +135,10 @@ export declare type IIoRestorecommerceResourcebaseReadRequest = {
|
|
135
135
|
sort?: InputMaybe<Array<IIoRestorecommerceResourcebaseSort>>;
|
136
136
|
filters?: InputMaybe<Array<IIoRestorecommerceResourcebaseFilterOp>>;
|
137
137
|
field?: InputMaybe<Array<IIoRestorecommerceResourcebaseFieldFilter>>;
|
138
|
-
search?: InputMaybe<Array<Scalars['String']>>;
|
139
138
|
localesLimiter?: InputMaybe<Array<Scalars['String']>>;
|
140
139
|
customQueries?: InputMaybe<Array<Scalars['String']>>;
|
141
140
|
customArguments?: InputMaybe<IGoogleProtobufAny>;
|
141
|
+
search?: InputMaybe<IIoRestorecommerceResourcebaseSearch>;
|
142
142
|
/** target scope */
|
143
143
|
scope?: InputMaybe<Scalars['String']>;
|
144
144
|
};
|
@@ -225,6 +225,11 @@ export declare type IGoogleProtobufAny = {
|
|
225
225
|
typeUrl?: InputMaybe<Scalars['String']>;
|
226
226
|
value?: InputMaybe<Scalars['GoogleProtobufAnyValue']>;
|
227
227
|
};
|
228
|
+
export declare type IIoRestorecommerceResourcebaseSearch = {
|
229
|
+
search?: InputMaybe<Scalars['String']>;
|
230
|
+
fields?: InputMaybe<Array<Scalars['String']>>;
|
231
|
+
caseSensitive?: InputMaybe<Scalars['Boolean']>;
|
232
|
+
};
|
228
233
|
export declare type ResourceCountryQuery = {
|
229
234
|
__typename?: 'ResourceCountryQuery';
|
230
235
|
Read?: Maybe<ProtoIoRestorecommerceCountryCountryListResponse>;
|
@@ -770,6 +775,8 @@ export declare type IoRestorecommerceResourcebaseDeleteResponse = {
|
|
770
775
|
export declare type IIoRestorecommerceResourcebaseDeleteRequest = {
|
771
776
|
collection?: InputMaybe<Scalars['Boolean']>;
|
772
777
|
ids?: InputMaybe<Array<Scalars['String']>>;
|
778
|
+
view?: InputMaybe<Array<Scalars['String']>>;
|
779
|
+
analyzer?: InputMaybe<Array<Scalars['String']>>;
|
773
780
|
/** target scope */
|
774
781
|
scope?: InputMaybe<Scalars['String']>;
|
775
782
|
};
|
@@ -1147,6 +1154,7 @@ export declare type ResolversTypes = ResolversObject<{
|
|
1147
1154
|
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
1148
1155
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
1149
1156
|
GoogleProtobufAnyValue: ResolverTypeWrapper<Scalars['GoogleProtobufAnyValue']>;
|
1157
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
1150
1158
|
ResourceCountryQuery: ResolverTypeWrapper<ResourceCountryQuery>;
|
1151
1159
|
ProtoIoRestorecommerceCountryCountryListResponse: ResolverTypeWrapper<ProtoIoRestorecommerceCountryCountryListResponse>;
|
1152
1160
|
IoRestorecommerceCountryCountryListResponse: ResolverTypeWrapper<IoRestorecommerceCountryCountryListResponse>;
|
@@ -1294,6 +1302,7 @@ export declare type ResolversParentTypes = ResolversObject<{
|
|
1294
1302
|
Boolean: Scalars['Boolean'];
|
1295
1303
|
IGoogleProtobufAny: IGoogleProtobufAny;
|
1296
1304
|
GoogleProtobufAnyValue: Scalars['GoogleProtobufAnyValue'];
|
1305
|
+
IIoRestorecommerceResourcebaseSearch: IIoRestorecommerceResourcebaseSearch;
|
1297
1306
|
ResourceCountryQuery: ResourceCountryQuery;
|
1298
1307
|
ProtoIoRestorecommerceCountryCountryListResponse: ProtoIoRestorecommerceCountryCountryListResponse;
|
1299
1308
|
IoRestorecommerceCountryCountryListResponse: IoRestorecommerceCountryCountryListResponse;
|
@@ -65,7 +65,6 @@ export declare type IoRestorecommerceJobJob = {
|
|
65
65
|
};
|
66
66
|
export declare type IoRestorecommerceJobData = {
|
67
67
|
__typename?: 'IoRestorecommerceJobData';
|
68
|
-
timezone?: Maybe<Scalars['String']>;
|
69
68
|
payload?: Maybe<GoogleProtobufAny>;
|
70
69
|
meta?: Maybe<IoRestorecommerceMetaMeta>;
|
71
70
|
subjectId?: Maybe<Scalars['String']>;
|
@@ -127,6 +126,7 @@ export declare type IoRestorecommerceJobRepeat = {
|
|
127
126
|
endDate?: Maybe<Scalars['String']>;
|
128
127
|
count?: Maybe<Scalars['Int']>;
|
129
128
|
jobId?: Maybe<Scalars['String']>;
|
129
|
+
tz?: Maybe<Scalars['String']>;
|
130
130
|
};
|
131
131
|
export declare type IoRestorecommerceStatusStatus = {
|
132
132
|
__typename?: 'IoRestorecommerceStatusStatus';
|
@@ -194,7 +194,6 @@ export declare type IIoRestorecommerceJobJob = {
|
|
194
194
|
options?: InputMaybe<IIoRestorecommerceJobJobOptions>;
|
195
195
|
};
|
196
196
|
export declare type IIoRestorecommerceJobData = {
|
197
|
-
timezone?: InputMaybe<Scalars['String']>;
|
198
197
|
payload?: InputMaybe<IGoogleProtobufAny>;
|
199
198
|
meta?: InputMaybe<IIoRestorecommerceMetaMeta>;
|
200
199
|
subjectId?: InputMaybe<Scalars['String']>;
|
@@ -238,6 +237,7 @@ export declare type IIoRestorecommerceJobRepeat = {
|
|
238
237
|
endDate?: InputMaybe<Scalars['String']>;
|
239
238
|
count?: InputMaybe<Scalars['Int']>;
|
240
239
|
jobId?: InputMaybe<Scalars['String']>;
|
240
|
+
tz?: InputMaybe<Scalars['String']>;
|
241
241
|
};
|
242
242
|
export declare enum ModeType {
|
243
243
|
Create = "CREATE",
|
@@ -256,6 +256,8 @@ export declare type IoRestorecommerceResourcebaseDeleteResponse = {
|
|
256
256
|
export declare type IIoRestorecommerceResourcebaseDeleteRequest = {
|
257
257
|
collection?: InputMaybe<Scalars['Boolean']>;
|
258
258
|
ids?: InputMaybe<Array<Scalars['String']>>;
|
259
|
+
view?: InputMaybe<Array<Scalars['String']>>;
|
260
|
+
analyzer?: InputMaybe<Array<Scalars['String']>>;
|
259
261
|
/** target scope */
|
260
262
|
scope?: InputMaybe<Scalars['String']>;
|
261
263
|
};
|
@@ -414,7 +416,6 @@ export declare type IoRestorecommerceJobJobResolvers<ContextType = SchedulingCon
|
|
414
416
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
415
417
|
}>;
|
416
418
|
export declare type IoRestorecommerceJobDataResolvers<ContextType = SchedulingContext, ParentType extends ResolversParentTypes['IoRestorecommerceJobData'] = ResolversParentTypes['IoRestorecommerceJobData']> = ResolversObject<{
|
417
|
-
timezone?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
418
419
|
payload?: Resolver<Maybe<ResolversTypes['GoogleProtobufAny']>, ParentType, ContextType>;
|
419
420
|
meta?: Resolver<Maybe<ResolversTypes['IoRestorecommerceMetaMeta']>, ParentType, ContextType>;
|
420
421
|
subjectId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
@@ -479,6 +480,7 @@ export declare type IoRestorecommerceJobRepeatResolvers<ContextType = Scheduling
|
|
479
480
|
endDate?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
480
481
|
count?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
481
482
|
jobId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
483
|
+
tz?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
482
484
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
483
485
|
}>;
|
484
486
|
export declare type IoRestorecommerceStatusStatusResolvers<ContextType = SchedulingContext, ParentType extends ResolversParentTypes['IoRestorecommerceStatusStatus'] = ResolversParentTypes['IoRestorecommerceStatusStatus']> = ResolversObject<{
|
package/generate.ts
CHANGED
@@ -39,6 +39,12 @@ import { namespace as identityNamespace } from "./src/modules/identity/interface
|
|
39
39
|
|
40
40
|
import { createServiceConfig } from "@restorecommerce/service-config";
|
41
41
|
import { join } from "path";
|
42
|
+
import { setUseSubscriptions } from './src/gql/protos/utils';
|
43
|
+
|
44
|
+
// TODO Configurable
|
45
|
+
const cfg = createServiceConfig(join(process.cwd(), 'tests'));
|
46
|
+
|
47
|
+
setUseSubscriptions(!!cfg.get('facade:kafka'));
|
42
48
|
|
43
49
|
generateSchemaTypings({
|
44
50
|
schema: facadeStatusSchema,
|
@@ -48,9 +54,6 @@ generateSchemaTypings({
|
|
48
54
|
}
|
49
55
|
});
|
50
56
|
|
51
|
-
// TODO Configurable
|
52
|
-
const cfg = createServiceConfig(join(process.cwd(), 'tests'));
|
53
|
-
|
54
57
|
generateSchemaTypings({
|
55
58
|
schema: orderingSchema(cfg.get(orderingNamespace)),
|
56
59
|
outputFile: './src/modules/ordering/gql/schema.generated.ts',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@restorecommerce/facade",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.0",
|
4
4
|
"description": "Facade for Restorecommerce microservices",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -24,23 +24,29 @@
|
|
24
24
|
"@cloudnative/health": "^2.1.2",
|
25
25
|
"@grpc/grpc-js": "^1.6.7",
|
26
26
|
"@grpc/proto-loader": "^0.6.12",
|
27
|
-
"@restorecommerce/grpc-client": "^1.0.
|
28
|
-
"@restorecommerce/kafka-client": "^1.0.
|
29
|
-
"@restorecommerce/logger": "^1.
|
30
|
-
"@restorecommerce/rc-grpc-clients": "^1.
|
31
|
-
"@restorecommerce/service-config": "^1.0.
|
27
|
+
"@restorecommerce/grpc-client": "^1.0.1",
|
28
|
+
"@restorecommerce/kafka-client": "^1.0.2",
|
29
|
+
"@restorecommerce/logger": "^1.1.0",
|
30
|
+
"@restorecommerce/rc-grpc-clients": "^1.1.0",
|
31
|
+
"@restorecommerce/service-config": "^1.0.1",
|
32
32
|
"apollo-server-core": "^3.7.0",
|
33
33
|
"apollo-server-koa": "^3.7.0",
|
34
34
|
"array.prototype.flat": "^1.3.0",
|
35
|
+
"co": "^4.6.0",
|
35
36
|
"debug": "^4.3.4",
|
37
|
+
"federation-subscription-tools": "^0.2.1",
|
38
|
+
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
36
39
|
"graphql-upload": "^13.0.0",
|
40
|
+
"graphql-ws": "^5.10.1",
|
37
41
|
"handlebars": "^4.7.7",
|
38
42
|
"jose": "^4.8.1",
|
39
43
|
"koa": "^2.13.4",
|
40
44
|
"koa-body": "^5.0.0",
|
45
|
+
"koa-compose": "^4.1.0",
|
41
46
|
"koa-helmet": "^6.1.0",
|
42
47
|
"koa-mount": "^4.0.0",
|
43
48
|
"koa-router": "^10.1.1",
|
49
|
+
"koa-websocket": "^7.0.0",
|
44
50
|
"lodash": "^4.17.21",
|
45
51
|
"lru-cache": "^7.10.1",
|
46
52
|
"nanoid": "^3.3.4",
|
@@ -53,13 +59,15 @@
|
|
53
59
|
"ts-proto-descriptors": "^1.6.0",
|
54
60
|
"useragent": "^2.3.0",
|
55
61
|
"uuid": "^8.3.2",
|
56
|
-
"winston": "^3.
|
62
|
+
"winston": "^3.8.1",
|
63
|
+
"ws": "^8.8.1"
|
57
64
|
},
|
58
65
|
"devDependencies": {
|
59
66
|
"@graphql-codegen/core": "^2.5.1",
|
60
67
|
"@graphql-codegen/typescript": "^2.4.11",
|
61
68
|
"@graphql-codegen/typescript-resolvers": "^2.6.4",
|
62
69
|
"@types/array.prototype.flat": "^1.2.1",
|
70
|
+
"@types/co": "^4.6.3",
|
63
71
|
"@types/debug": "^4.1.7",
|
64
72
|
"@types/ejs": "^3.1.1",
|
65
73
|
"@types/express": "^4.17.13",
|
@@ -70,6 +78,7 @@
|
|
70
78
|
"@types/koa-helmet": "^6.0.4",
|
71
79
|
"@types/koa-mount": "^4.0.1",
|
72
80
|
"@types/koa-router": "^7.4.1",
|
81
|
+
"@types/koa-websocket": "^5.0.7",
|
73
82
|
"@types/lodash": "^4.14.182",
|
74
83
|
"@types/lru-cache": "^7.10.10",
|
75
84
|
"@types/node": "^17.0.33",
|
@@ -79,7 +88,7 @@
|
|
79
88
|
"@types/supertest": "^2.0.12",
|
80
89
|
"@types/useragent": "^2.3.1",
|
81
90
|
"@types/uuid": "^8.3.4",
|
82
|
-
"
|
91
|
+
"@types/ws": "^8.5.3",
|
83
92
|
"jest": "^28.1.0",
|
84
93
|
"nodemon": "^2.0.16",
|
85
94
|
"npm-run-all": "^4.1.5",
|
@@ -121,5 +130,5 @@
|
|
121
130
|
}
|
122
131
|
}
|
123
132
|
},
|
124
|
-
"gitHead": "
|
133
|
+
"gitHead": "0f34bd9515033e3933b0fe578d8e9b7b0b7bcc30"
|
125
134
|
}
|