@restorecommerce/facade 0.2.0 → 0.2.1
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 +14 -0
- package/copy-hbs.sh +6 -0
- package/debug-run.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/interfaces.d.ts +1 -0
- package/dist/modules/identity/gql/schema.generated.d.ts +26 -20
- package/dist/modules/identity/index.js +2 -2
- package/dist/modules/identity/oauth/oauth.d.ts +2 -2
- package/dist/modules/identity/oauth/oauth.js +8 -8
- package/dist/modules/identity/oauth/views/account.hbs +23 -0
- package/dist/modules/identity/oauth/views/layout.hbs +34 -0
- package/dist/modules/identity/oauth/views/login.hbs +27 -0
- package/dist/modules/identity/oauth/views/register.hbs +134 -0
- package/dist/modules/identity/oidc/router.d.ts +2 -2
- package/dist/modules/identity/oidc/router.js +4 -4
- package/dist/modules/identity/oidc/views/consent.hbs +49 -0
- package/dist/modules/identity/oidc/views/layout.hbs +79 -0
- package/dist/modules/identity/oidc/views/login.hbs +62 -0
- package/dist/modules/resource/gql/schema.generated.d.ts +3 -6
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,20 @@
|
|
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.2.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@0.2.0...@restorecommerce/facade@0.2.1) (2022-02-14)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **facade:** regenerated schema ([a8fba43](https://github.com/restorecommerce/libs/commit/a8fba43233999191d2583139cefe9a8af647706b))
|
12
|
+
* bypass non-compliant koa modules ([8a92b83](https://github.com/restorecommerce/libs/commit/8a92b83ce717f52caa843b00d5db894ca07ab1a9))
|
13
|
+
* copy hbs on build ([efd8e78](https://github.com/restorecommerce/libs/commit/efd8e783a09badb84d76f2b72377de438f34d014))
|
14
|
+
* switch to sh ([5756072](https://github.com/restorecommerce/libs/commit/57560723184a300b2d315068f29339a5f2dc517e))
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
6
20
|
# [0.2.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/facade@0.1.44...@restorecommerce/facade@0.2.0) (2022-02-09)
|
7
21
|
|
8
22
|
|
package/copy-hbs.sh
ADDED
package/debug-run.ts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/interfaces.d.ts
CHANGED
@@ -24,8 +24,8 @@ export declare type Scalars = {
|
|
24
24
|
Boolean: boolean;
|
25
25
|
Int: number;
|
26
26
|
Float: number;
|
27
|
-
Upload: any;
|
28
27
|
TodoScalar: any;
|
28
|
+
Upload: any;
|
29
29
|
};
|
30
30
|
export declare type Query = {
|
31
31
|
__typename?: 'Query';
|
@@ -99,6 +99,7 @@ export declare type IoRestorecommerceUserUser = {
|
|
99
99
|
invitedByUserLastName?: Maybe<Scalars['String']>;
|
100
100
|
tokens?: Maybe<Array<IoRestorecommerceAuthTokens>>;
|
101
101
|
lastAccess?: Maybe<Scalars['Float']>;
|
102
|
+
data?: Maybe<GoogleProtobufAny>;
|
102
103
|
};
|
103
104
|
export declare type IoRestorecommerceMetaMeta = {
|
104
105
|
__typename?: 'IoRestorecommerceMetaMeta';
|
@@ -123,6 +124,7 @@ export declare type IoRestorecommerceAuthRoleAssociation = {
|
|
123
124
|
role?: Maybe<Scalars['String']>;
|
124
125
|
attributes?: Maybe<Array<IoRestorecommerceAttributeAttribute>>;
|
125
126
|
id?: Maybe<Scalars['String']>;
|
127
|
+
created?: Maybe<Scalars['Float']>;
|
126
128
|
};
|
127
129
|
export declare type IoRestorecommerceImageImage = {
|
128
130
|
__typename?: 'IoRestorecommerceImageImage';
|
@@ -151,6 +153,11 @@ export declare type IoRestorecommerceAuthTokens = {
|
|
151
153
|
interactive?: Maybe<Scalars['Boolean']>;
|
152
154
|
lastLogin?: Maybe<Scalars['Float']>;
|
153
155
|
};
|
156
|
+
export declare type GoogleProtobufAny = {
|
157
|
+
__typename?: 'GoogleProtobufAny';
|
158
|
+
typeUrl?: Maybe<Scalars['String']>;
|
159
|
+
value?: Maybe<Scalars['TodoScalar']>;
|
160
|
+
};
|
154
161
|
export declare type IoRestorecommerceStatusStatus = {
|
155
162
|
__typename?: 'IoRestorecommerceStatusStatus';
|
156
163
|
id?: Maybe<Scalars['String']>;
|
@@ -353,11 +360,6 @@ export declare type ProtoGoogleProtobufAny = {
|
|
353
360
|
__typename?: 'ProtoGoogleProtobufAny';
|
354
361
|
details?: Maybe<GoogleProtobufAny>;
|
355
362
|
};
|
356
|
-
export declare type GoogleProtobufAny = {
|
357
|
-
__typename?: 'GoogleProtobufAny';
|
358
|
-
typeUrl?: Maybe<Scalars['String']>;
|
359
|
-
value?: Maybe<Scalars['TodoScalar']>;
|
360
|
-
};
|
361
363
|
export declare type IIoRestorecommerceTokenIdentifier = {
|
362
364
|
id?: Maybe<Scalars['String']>;
|
363
365
|
type?: Maybe<Scalars['String']>;
|
@@ -467,6 +469,7 @@ export declare type IIoRestorecommerceUserUser = {
|
|
467
469
|
invitedByUserLastName?: Maybe<Scalars['String']>;
|
468
470
|
tokens?: Maybe<Array<IIoRestorecommerceAuthTokens>>;
|
469
471
|
lastAccess?: Maybe<Scalars['Float']>;
|
472
|
+
data?: Maybe<IGoogleProtobufAny>;
|
470
473
|
};
|
471
474
|
export declare type IIoRestorecommerceMetaMeta = {
|
472
475
|
created?: Maybe<Scalars['Float']>;
|
@@ -482,6 +485,7 @@ export declare type IIoRestorecommerceAuthRoleAssociation = {
|
|
482
485
|
role?: Maybe<Scalars['String']>;
|
483
486
|
attributes?: Maybe<Array<IIoRestorecommerceAttributeAttribute>>;
|
484
487
|
id?: Maybe<Scalars['String']>;
|
488
|
+
created?: Maybe<Scalars['Float']>;
|
485
489
|
};
|
486
490
|
export declare type IIoRestorecommerceImageImage = {
|
487
491
|
id?: Maybe<Scalars['String']>;
|
@@ -723,6 +727,8 @@ export declare type ResolversTypes = ResolversObject<{
|
|
723
727
|
IoRestorecommerceImageImage: ResolverTypeWrapper<IoRestorecommerceImageImage>;
|
724
728
|
IoRestorecommerceUserUserType: IoRestorecommerceUserUserType;
|
725
729
|
IoRestorecommerceAuthTokens: ResolverTypeWrapper<IoRestorecommerceAuthTokens>;
|
730
|
+
GoogleProtobufAny: ResolverTypeWrapper<GoogleProtobufAny>;
|
731
|
+
TodoScalar: ResolverTypeWrapper<Scalars['TodoScalar']>;
|
726
732
|
IoRestorecommerceStatusStatus: ResolverTypeWrapper<IoRestorecommerceStatusStatus>;
|
727
733
|
Int: ResolverTypeWrapper<Scalars['Int']>;
|
728
734
|
IoRestorecommerceStatusOperationStatus: ResolverTypeWrapper<IoRestorecommerceStatusOperationStatus>;
|
@@ -759,8 +765,6 @@ export declare type ResolversTypes = ResolversObject<{
|
|
759
765
|
IoRestorecommerceAuthenticationLogAuthenticationLog: ResolverTypeWrapper<IoRestorecommerceAuthenticationLogAuthenticationLog>;
|
760
766
|
IdentityTokenQuery: ResolverTypeWrapper<IdentityTokenQuery>;
|
761
767
|
ProtoGoogleProtobufAny: ResolverTypeWrapper<ProtoGoogleProtobufAny>;
|
762
|
-
GoogleProtobufAny: ResolverTypeWrapper<GoogleProtobufAny>;
|
763
|
-
TodoScalar: ResolverTypeWrapper<Scalars['TodoScalar']>;
|
764
768
|
IIoRestorecommerceTokenIdentifier: IIoRestorecommerceTokenIdentifier;
|
765
769
|
Mutation: ResolverTypeWrapper<{}>;
|
766
770
|
IdentityMutation: ResolverTypeWrapper<IdentityMutation>;
|
@@ -821,6 +825,8 @@ export declare type ResolversParentTypes = ResolversObject<{
|
|
821
825
|
IoRestorecommerceAuthRoleAssociation: IoRestorecommerceAuthRoleAssociation;
|
822
826
|
IoRestorecommerceImageImage: IoRestorecommerceImageImage;
|
823
827
|
IoRestorecommerceAuthTokens: IoRestorecommerceAuthTokens;
|
828
|
+
GoogleProtobufAny: GoogleProtobufAny;
|
829
|
+
TodoScalar: Scalars['TodoScalar'];
|
824
830
|
IoRestorecommerceStatusStatus: IoRestorecommerceStatusStatus;
|
825
831
|
Int: Scalars['Int'];
|
826
832
|
IoRestorecommerceStatusOperationStatus: IoRestorecommerceStatusOperationStatus;
|
@@ -850,8 +856,6 @@ export declare type ResolversParentTypes = ResolversObject<{
|
|
850
856
|
IoRestorecommerceAuthenticationLogAuthenticationLog: IoRestorecommerceAuthenticationLogAuthenticationLog;
|
851
857
|
IdentityTokenQuery: IdentityTokenQuery;
|
852
858
|
ProtoGoogleProtobufAny: ProtoGoogleProtobufAny;
|
853
|
-
GoogleProtobufAny: GoogleProtobufAny;
|
854
|
-
TodoScalar: Scalars['TodoScalar'];
|
855
859
|
IIoRestorecommerceTokenIdentifier: IIoRestorecommerceTokenIdentifier;
|
856
860
|
Mutation: {};
|
857
861
|
IdentityMutation: IdentityMutation;
|
@@ -951,6 +955,7 @@ export declare type IoRestorecommerceUserUserResolvers<ContextType = IdentityCon
|
|
951
955
|
invitedByUserLastName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
952
956
|
tokens?: Resolver<Maybe<Array<ResolversTypes['IoRestorecommerceAuthTokens']>>, ParentType, ContextType>;
|
953
957
|
lastAccess?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
958
|
+
data?: Resolver<Maybe<ResolversTypes['GoogleProtobufAny']>, ParentType, ContextType>;
|
954
959
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
955
960
|
}>;
|
956
961
|
export declare type IoRestorecommerceMetaMetaResolvers<ContextType = IdentityContext, ParentType extends ResolversParentTypes['IoRestorecommerceMetaMeta'] = ResolversParentTypes['IoRestorecommerceMetaMeta']> = ResolversObject<{
|
@@ -975,6 +980,7 @@ export declare type IoRestorecommerceAuthRoleAssociationResolvers<ContextType =
|
|
975
980
|
role?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
976
981
|
attributes?: Resolver<Maybe<Array<ResolversTypes['IoRestorecommerceAttributeAttribute']>>, ParentType, ContextType>;
|
977
982
|
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
983
|
+
created?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
978
984
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
979
985
|
}>;
|
980
986
|
export declare type IoRestorecommerceImageImageResolvers<ContextType = IdentityContext, ParentType extends ResolversParentTypes['IoRestorecommerceImageImage'] = ResolversParentTypes['IoRestorecommerceImageImage']> = ResolversObject<{
|
@@ -1004,6 +1010,14 @@ export declare type IoRestorecommerceAuthTokensResolvers<ContextType = IdentityC
|
|
1004
1010
|
lastLogin?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
1005
1011
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
1006
1012
|
}>;
|
1013
|
+
export declare type GoogleProtobufAnyResolvers<ContextType = IdentityContext, ParentType extends ResolversParentTypes['GoogleProtobufAny'] = ResolversParentTypes['GoogleProtobufAny']> = ResolversObject<{
|
1014
|
+
typeUrl?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1015
|
+
value?: Resolver<Maybe<ResolversTypes['TodoScalar']>, ParentType, ContextType>;
|
1016
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
1017
|
+
}>;
|
1018
|
+
export interface TodoScalarScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['TodoScalar'], any> {
|
1019
|
+
name: 'TodoScalar';
|
1020
|
+
}
|
1007
1021
|
export declare type IoRestorecommerceStatusStatusResolvers<ContextType = IdentityContext, ParentType extends ResolversParentTypes['IoRestorecommerceStatusStatus'] = ResolversParentTypes['IoRestorecommerceStatusStatus']> = ResolversObject<{
|
1008
1022
|
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1009
1023
|
code?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
@@ -1138,14 +1152,6 @@ export declare type ProtoGoogleProtobufAnyResolvers<ContextType = IdentityContex
|
|
1138
1152
|
details?: Resolver<Maybe<ResolversTypes['GoogleProtobufAny']>, ParentType, ContextType>;
|
1139
1153
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
1140
1154
|
}>;
|
1141
|
-
export declare type GoogleProtobufAnyResolvers<ContextType = IdentityContext, ParentType extends ResolversParentTypes['GoogleProtobufAny'] = ResolversParentTypes['GoogleProtobufAny']> = ResolversObject<{
|
1142
|
-
typeUrl?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1143
|
-
value?: Resolver<Maybe<ResolversTypes['TodoScalar']>, ParentType, ContextType>;
|
1144
|
-
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
1145
|
-
}>;
|
1146
|
-
export interface TodoScalarScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['TodoScalar'], any> {
|
1147
|
-
name: 'TodoScalar';
|
1148
|
-
}
|
1149
1155
|
export declare type MutationResolvers<ContextType = IdentityContext, ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation']> = ResolversObject<{
|
1150
1156
|
identity?: Resolver<ResolversTypes['IdentityMutation'], ParentType, ContextType>;
|
1151
1157
|
}>;
|
@@ -1232,6 +1238,8 @@ export declare type Resolvers<ContextType = IdentityContext> = ResolversObject<{
|
|
1232
1238
|
IoRestorecommerceImageImage?: IoRestorecommerceImageImageResolvers<ContextType>;
|
1233
1239
|
IoRestorecommerceUserUserType?: IoRestorecommerceUserUserTypeResolvers;
|
1234
1240
|
IoRestorecommerceAuthTokens?: IoRestorecommerceAuthTokensResolvers<ContextType>;
|
1241
|
+
GoogleProtobufAny?: GoogleProtobufAnyResolvers<ContextType>;
|
1242
|
+
TodoScalar?: GraphQLScalarType;
|
1235
1243
|
IoRestorecommerceStatusStatus?: IoRestorecommerceStatusStatusResolvers<ContextType>;
|
1236
1244
|
IoRestorecommerceStatusOperationStatus?: IoRestorecommerceStatusOperationStatusResolvers<ContextType>;
|
1237
1245
|
IoRestorecommerceResourcebaseSortSortOrder?: IoRestorecommerceResourcebaseSortSortOrderResolvers;
|
@@ -1255,8 +1263,6 @@ export declare type Resolvers<ContextType = IdentityContext> = ResolversObject<{
|
|
1255
1263
|
IoRestorecommerceAuthenticationLogAuthenticationLog?: IoRestorecommerceAuthenticationLogAuthenticationLogResolvers<ContextType>;
|
1256
1264
|
IdentityTokenQuery?: IdentityTokenQueryResolvers<ContextType>;
|
1257
1265
|
ProtoGoogleProtobufAny?: ProtoGoogleProtobufAnyResolvers<ContextType>;
|
1258
|
-
GoogleProtobufAny?: GoogleProtobufAnyResolvers<ContextType>;
|
1259
|
-
TodoScalar?: GraphQLScalarType;
|
1260
1266
|
Mutation?: MutationResolvers<ContextType>;
|
1261
1267
|
IdentityMutation?: IdentityMutationResolvers<ContextType>;
|
1262
1268
|
IdentityUserMutation?: IdentityUserMutationResolvers<ContextType>;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.identityModule = void 0;
|
4
|
-
const koa_mount_1 = require("koa-mount");
|
5
4
|
const utils_1 = require("../../utils");
|
6
5
|
const federation_1 = require("./gql/federation");
|
7
6
|
const oidc_1 = require("./oidc");
|
8
7
|
const api_key_1 = require("./api-key/api-key");
|
9
8
|
const grpc_1 = require("./grpc");
|
10
9
|
const oauth_1 = require("./oauth/oauth");
|
10
|
+
const mount = eval('require("koa-mount")');
|
11
11
|
exports.identityModule = utils_1.createFacadeModuleFactory('identity', (facade, config) => {
|
12
12
|
const identitySrvClient = new grpc_1.IdentitySrvGrpcClient(config.identitySrvClientConfig, facade.logger);
|
13
13
|
if (!!config.apiKey) {
|
@@ -28,7 +28,7 @@ exports.identityModule = utils_1.createFacadeModuleFactory('identity', (facade,
|
|
28
28
|
config: config.oidc
|
29
29
|
});
|
30
30
|
facade.koa.use(router.routes());
|
31
|
-
facade.koa.use(
|
31
|
+
facade.koa.use(mount(provider.app));
|
32
32
|
}
|
33
33
|
if (config.oauth) {
|
34
34
|
facade.koa.use(oauth_1.createOAuth().routes());
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
1
|
+
import KoaRouter from "koa-router";
|
2
2
|
import { IdentityContext } from "../interfaces";
|
3
3
|
import { User } from "@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/user";
|
4
|
-
export declare const createOAuth: () =>
|
4
|
+
export declare const createOAuth: () => KoaRouter<{}, IdentityContext>;
|
5
5
|
export declare const layout: (context: {
|
6
6
|
body: string;
|
7
7
|
title: string;
|
@@ -1,17 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.account = exports.login = exports.register = exports.layout = exports.createOAuth = void 0;
|
4
|
-
const koa_router_1 = require("koa-router");
|
5
4
|
const fs_1 = require("fs");
|
6
5
|
const path_1 = require("path");
|
7
6
|
const handlebars_1 = require("handlebars");
|
8
7
|
const utils_1 = require("../oidc/utils");
|
9
8
|
const uuid = require("uuid");
|
10
9
|
const user_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/user");
|
11
|
-
const
|
10
|
+
const Router = eval('require("koa-router")');
|
11
|
+
const bodyParser = eval('require("koa-body")');
|
12
12
|
const createOAuth = () => {
|
13
|
-
const router = new
|
14
|
-
router.use(
|
13
|
+
const router = new Router();
|
14
|
+
router.use(bodyParser({ multipart: true }));
|
15
15
|
router.get('/oauth2-login', async (ctx, next) => {
|
16
16
|
ctx.type = 'html';
|
17
17
|
ctx.body = await exports.login((await ctx.identitySrvClient.oauth.GenerateLinks({})).links);
|
@@ -86,7 +86,7 @@ let layoutHbs;
|
|
86
86
|
const layout = async (context) => {
|
87
87
|
if (!layoutHbs) {
|
88
88
|
const layoutTpl = await new Promise((resolve, reject) => {
|
89
|
-
fs_1.
|
89
|
+
fs_1.readFile(path_1.resolve(__dirname, 'views/layout.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
90
90
|
});
|
91
91
|
layoutHbs = handlebars_1.default.compile(layoutTpl);
|
92
92
|
}
|
@@ -97,7 +97,7 @@ let registerHbs;
|
|
97
97
|
const register = async (email) => {
|
98
98
|
if (!registerHbs) {
|
99
99
|
const registerTpl = await new Promise((resolve, reject) => {
|
100
|
-
fs_1.
|
100
|
+
fs_1.readFile(path_1.resolve(__dirname, 'views/register.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
101
101
|
});
|
102
102
|
registerHbs = handlebars_1.default.compile(registerTpl);
|
103
103
|
}
|
@@ -111,7 +111,7 @@ let loginHbs;
|
|
111
111
|
const login = async (links) => {
|
112
112
|
if (!loginHbs) {
|
113
113
|
const loginTpl = await new Promise((resolve, reject) => {
|
114
|
-
fs_1.
|
114
|
+
fs_1.readFile(path_1.resolve(__dirname, 'views/login.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
115
115
|
});
|
116
116
|
loginHbs = handlebars_1.default.compile(loginTpl);
|
117
117
|
}
|
@@ -125,7 +125,7 @@ let accountHbs;
|
|
125
125
|
const account = async (user) => {
|
126
126
|
if (!accountHbs) {
|
127
127
|
const accountTpl = await new Promise((resolve, reject) => {
|
128
|
-
fs_1.
|
128
|
+
fs_1.readFile(path_1.resolve(__dirname, 'views/account.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
129
129
|
});
|
130
130
|
accountHbs = handlebars_1.default.compile(accountTpl);
|
131
131
|
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<style>
|
2
|
+
.rc-login {
|
3
|
+
height: 100%;
|
4
|
+
background-color: #00adef;
|
5
|
+
}
|
6
|
+
|
7
|
+
.rc-account {
|
8
|
+
width: 815px;
|
9
|
+
box-sizing: border-box;
|
10
|
+
border-radius: .3rem;
|
11
|
+
background: #fff;
|
12
|
+
padding: 1rem;
|
13
|
+
}
|
14
|
+
</style>
|
15
|
+
|
16
|
+
<div class="rc-login flex col justify-center">
|
17
|
+
<div class="self-center justify-center rc-account scale110p">
|
18
|
+
<h2>{{title}}</h2>
|
19
|
+
<div class="row center justify-center">
|
20
|
+
<h3>Welcome {{user.firstName}} {{user.lastName}}!</h3>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html >
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
6
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
7
|
+
<title>{{title}}</title>
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@vcl/vcl@2/dist/index.css">
|
9
|
+
<style>
|
10
|
+
.app {
|
11
|
+
height: 100vh;
|
12
|
+
max-width: 100%;
|
13
|
+
}
|
14
|
+
.debug summary {
|
15
|
+
font-weight: bold;
|
16
|
+
}
|
17
|
+
.debug .debug-content {
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
.debug .debug-content.visible {
|
21
|
+
display: block;
|
22
|
+
}
|
23
|
+
</style>
|
24
|
+
</head>
|
25
|
+
<body>
|
26
|
+
<div class="app col">
|
27
|
+
<main class="flex col">
|
28
|
+
<div class="flex">
|
29
|
+
{{{ body }}}
|
30
|
+
</div>
|
31
|
+
</main>
|
32
|
+
</div>
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<style>
|
2
|
+
.rc-login {
|
3
|
+
height: 100%;
|
4
|
+
background-color: #00adef;
|
5
|
+
}
|
6
|
+
|
7
|
+
.rc-account {
|
8
|
+
width: 815px;
|
9
|
+
box-sizing: border-box;
|
10
|
+
border-radius: .3rem;
|
11
|
+
background: #fff;
|
12
|
+
padding: 1rem;
|
13
|
+
}
|
14
|
+
</style>
|
15
|
+
|
16
|
+
<div class="rc-login flex col justify-center">
|
17
|
+
<div class="self-center justify-center rc-account scale110p">
|
18
|
+
<h2>{{title}}</h2>
|
19
|
+
<div class="col center justify-center">
|
20
|
+
<h3>Login using one of the following providers:</h3>
|
21
|
+
|
22
|
+
<a href="{{links.google}}" class="button emphasized">
|
23
|
+
<div class="icogram"><span class="text">Google</span></div>
|
24
|
+
</a>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
@@ -0,0 +1,134 @@
|
|
1
|
+
<style>
|
2
|
+
.rc-login {
|
3
|
+
height: 100%;
|
4
|
+
background-color: #00adef;
|
5
|
+
}
|
6
|
+
|
7
|
+
.rc-account {
|
8
|
+
width: 815px;
|
9
|
+
box-sizing: border-box;
|
10
|
+
border-radius: .3rem;
|
11
|
+
background: #fff;
|
12
|
+
padding: 1rem;
|
13
|
+
}
|
14
|
+
</style>
|
15
|
+
|
16
|
+
<div class="rc-login flex col justify-center">
|
17
|
+
<div class="self-center justify-center rc-account scale110p">
|
18
|
+
<h2>{{title}}</h2>
|
19
|
+
<div class="col center justify-center">
|
20
|
+
<h3>Please register!</h3>
|
21
|
+
<form class="form w-100p" method="post" action="/oauth2-register">
|
22
|
+
<div class="form-control-group embedded-input-field-label floating">
|
23
|
+
<label for="first_name" class="form-control-label">
|
24
|
+
First Name
|
25
|
+
<em class="required-indicator">•</em>
|
26
|
+
</label>
|
27
|
+
<div class="input-field">
|
28
|
+
<input class="input" type="text" autocomplete="off" name="first_name" required>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="form-control-group embedded-input-field-label floating">
|
33
|
+
<label for="last_name" class="form-control-label">
|
34
|
+
Last Name
|
35
|
+
<em class="required-indicator">•</em>
|
36
|
+
</label>
|
37
|
+
<div class="input-field">
|
38
|
+
<input class="input" type="text" autocomplete="off" name="last_name" required>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="form-control-group embedded-input-field-label floating">
|
43
|
+
<label for="username" class="form-control-label">
|
44
|
+
Username
|
45
|
+
<em class="required-indicator">•</em>
|
46
|
+
</label>
|
47
|
+
<div class="input-field">
|
48
|
+
<input class="input" type="text" autocomplete="off" name="username" required>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div class="form-control-group embedded-input-field-label">
|
53
|
+
<label for="email" class="form-control-label">
|
54
|
+
Email
|
55
|
+
<em class="required-indicator">•</em>
|
56
|
+
</label>
|
57
|
+
<div class="input-field">
|
58
|
+
<input class="input" type="email" autocomplete="off" name="email" value="{{email}}" required>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="form-control-group embedded-input-field-label floating">
|
63
|
+
<label for="password" class="form-control-label">
|
64
|
+
Password
|
65
|
+
<em class="required-indicator">•</em>
|
66
|
+
</label>
|
67
|
+
<div class="input-field">
|
68
|
+
<input class="input" type="password" autocomplete="off" name="password" required>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<div class="form-control-group embedded-input-field-label floating">
|
73
|
+
<label for="password_repeated" class="form-control-label">
|
74
|
+
Password Repeated
|
75
|
+
<em class="required-indicator">•</em>
|
76
|
+
</label>
|
77
|
+
<div class="input-field">
|
78
|
+
<input class="input" type="password" autocomplete="off" name="password_repeated" required>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<button type="submit" class="button emphasized">
|
83
|
+
<div class="icogram"><span class="text">Register</span></div>
|
84
|
+
</button>
|
85
|
+
</form>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
<script>
|
91
|
+
!function() {
|
92
|
+
const docRoot = document.demoShadowRoot || document;
|
93
|
+
|
94
|
+
function registerInputFieldListeners(fcg) {
|
95
|
+
const inputField = fcg.querySelector('.input-field');
|
96
|
+
const input = inputField.querySelector('input, textarea');
|
97
|
+
|
98
|
+
function updateState() {
|
99
|
+
const hasValue = typeof input.value === 'string' && input.value.length > 0;
|
100
|
+
const hasFocus = docRoot.activeElement === input;
|
101
|
+
|
102
|
+
if (hasFocus) {
|
103
|
+
inputField.classList.add('focused');
|
104
|
+
fcg.classList.add('focused');
|
105
|
+
} else {
|
106
|
+
inputField.classList.remove('focused');
|
107
|
+
fcg.classList.remove('focused');
|
108
|
+
}
|
109
|
+
|
110
|
+
if (hasValue || hasFocus) {
|
111
|
+
fcg.classList.remove('floating');
|
112
|
+
} else {
|
113
|
+
fcg.classList.add('floating');
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
input.addEventListener('focus', updateState);
|
118
|
+
input.addEventListener('blur', updateState);
|
119
|
+
input.addEventListener('input', updateState);
|
120
|
+
|
121
|
+
updateState();
|
122
|
+
|
123
|
+
let prependedElements = 0, sibling = input;
|
124
|
+
while (sibling = sibling.previousElementSibling) {
|
125
|
+
prependedElements++;
|
126
|
+
}
|
127
|
+
fcg.style.setProperty('--prepended-elements', prependedElements);
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
const form = docRoot.querySelector('form');
|
132
|
+
form.querySelectorAll('.form-control-group').forEach(fcg => registerInputFieldListeners(fcg));
|
133
|
+
}();
|
134
|
+
</script>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import KoaRouter from 'koa-router';
|
2
2
|
import { Provider } from 'oidc-provider';
|
3
3
|
import { Logger } from 'winston';
|
4
4
|
import { IdentityContext } from '../interfaces';
|
@@ -10,4 +10,4 @@ export interface CreateOIDCRouterArgs {
|
|
10
10
|
templates?: OIDCHbsTemplates;
|
11
11
|
loginFn: OIDCBodyLoginFn;
|
12
12
|
}
|
13
|
-
export declare function createOIDCRouter({ logger, loginFn, provider, env, templates }: CreateOIDCRouterArgs):
|
13
|
+
export declare function createOIDCRouter({ logger, loginFn, provider, env, templates }: CreateOIDCRouterArgs): KoaRouter<{}, IdentityContext>;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.createOIDCRouter = void 0;
|
4
|
-
const koa_router_1 = require("koa-router");
|
5
|
-
const koa_body_1 = require("koa-body");
|
6
4
|
const templates_1 = require("./templates");
|
5
|
+
const Router = eval('require("koa-router")');
|
6
|
+
const bodyParser = eval('require("koa-body")');
|
7
7
|
function createOIDCRouter({ logger, loginFn, provider, env, templates }) {
|
8
8
|
const dev = env === 'development';
|
9
9
|
const tplEngine = new templates_1.OIDCTemplateEngine(templates);
|
10
|
-
const router = new
|
10
|
+
const router = new Router();
|
11
11
|
router.get('/interaction/:uid', async (ctx, next) => {
|
12
12
|
const { uid, prompt, params, session, } = await provider.interactionDetails(ctx.req, ctx.res);
|
13
13
|
const client = await provider.Client.find(params.client_id);
|
@@ -70,7 +70,7 @@ function createOIDCRouter({ logger, loginFn, provider, env, templates }) {
|
|
70
70
|
// mergeWithLastSubmission: true,
|
71
71
|
// });
|
72
72
|
// });
|
73
|
-
router.post('/interaction/:uid/login',
|
73
|
+
router.post('/interaction/:uid/login', bodyParser({
|
74
74
|
text: false, json: false
|
75
75
|
}), async (ctx) => {
|
76
76
|
const { prompt, uid, params, session } = await provider.interactionDetails(ctx.req, ctx.res);
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<style>
|
2
|
+
</style>
|
3
|
+
{{!-- <div class="login-client-image">
|
4
|
+
<% if (client.logoUri) { %><img src="<%= client.logoUri %>"><% } %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<% if ([details.scopes.accepted, details.scopes.rejected, details.claims.accepted, details.claims.rejected].every(({ length }) => length === 0)) { %>
|
9
|
+
<li>this is a new authorization</li>
|
10
|
+
<% } %>
|
11
|
+
|
12
|
+
<% if ([details.scopes.new, details.claims.new].every(({ length }) => length === 0)) { %>
|
13
|
+
<li>the client is asking you to confirm previously given authorization</li>
|
14
|
+
<% } %>
|
15
|
+
|
16
|
+
<% newScopes = new Set(details.scopes.new); newScopes.delete('openid'); newScopes.delete('offline_access') %>
|
17
|
+
<% if (newScopes.size) { %>
|
18
|
+
<li>scopes:</li>
|
19
|
+
<ul>
|
20
|
+
<% newScopes.forEach((scope) => { %>
|
21
|
+
<li><%= scope %></li>
|
22
|
+
<% }) %>
|
23
|
+
</ul>
|
24
|
+
<% } %>
|
25
|
+
|
26
|
+
<% newClaims = new Set(details.claims.new); ['sub', 'sid', 'auth_time', 'acr', 'amr', 'iss'].forEach(Set.prototype.delete.bind(newClaims)) %>
|
27
|
+
<% if (newClaims.size) { %>
|
28
|
+
<li>claims:</li>
|
29
|
+
<ul>
|
30
|
+
<% newClaims.forEach((claim) => { %>
|
31
|
+
<li><%= claim %></li>
|
32
|
+
<% }) %>
|
33
|
+
</ul>
|
34
|
+
<% } %>
|
35
|
+
|
36
|
+
<% if (params.scope && params.scope.includes('offline_access')) { %>
|
37
|
+
<li>
|
38
|
+
the client is asking to have offline access to this authorization
|
39
|
+
<% if (!details.scopes.new.includes('offline_access')) { %>
|
40
|
+
(which you've previously granted)
|
41
|
+
<% } %>
|
42
|
+
</li>
|
43
|
+
<% } %>
|
44
|
+
|
45
|
+
</ul>
|
46
|
+
--}}
|
47
|
+
<form autocomplete="off" action="/interaction/{{ uid }}/confirm" method="post">
|
48
|
+
<button autofocus type="submit" class="login login-submit">Continue</button>
|
49
|
+
</form>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html >
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
6
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
7
|
+
<title>{{title}}</title>
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@vcl/vcl@2/dist/index.css">
|
9
|
+
<style>
|
10
|
+
.app {
|
11
|
+
height: 100vh;
|
12
|
+
max-width: 100%;
|
13
|
+
}
|
14
|
+
.debug summary {
|
15
|
+
font-weight: bold;
|
16
|
+
}
|
17
|
+
.debug .debug-content {
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
.debug .debug-content.visible {
|
21
|
+
display: block;
|
22
|
+
}
|
23
|
+
</style>
|
24
|
+
</head>
|
25
|
+
<body>
|
26
|
+
<div class="app col">
|
27
|
+
<main class="flex col">
|
28
|
+
<div class="flex">
|
29
|
+
{{{ body }}}
|
30
|
+
</div>
|
31
|
+
{{#if dev }}
|
32
|
+
{{#if dbg }}
|
33
|
+
|
34
|
+
<div class="debug col align-items-center">
|
35
|
+
<summary class="" style="cursor: pointer;">(Click to expand) DEBUG information</summary>
|
36
|
+
<div class="debug-content">
|
37
|
+
<div>
|
38
|
+
<h2>uid</h2>
|
39
|
+
<p>{{ uid }}</p>
|
40
|
+
</div>
|
41
|
+
{{#if dbg.session}}
|
42
|
+
<div>
|
43
|
+
<h3>Session</h3>
|
44
|
+
<p>{{{ json dbg.session }}}</p>
|
45
|
+
</div>
|
46
|
+
{{/if}}
|
47
|
+
|
48
|
+
{{#if dbg.params}}
|
49
|
+
<div>
|
50
|
+
<h3>Params</h3>
|
51
|
+
<p>{{{ json dbg.params }}}</p>
|
52
|
+
</div>
|
53
|
+
{{/if}}
|
54
|
+
{{#if dbg.prompt}}
|
55
|
+
<div>
|
56
|
+
<h3>Prompt</h3>
|
57
|
+
<p>{{{ json dbg.prompt }}}</p>
|
58
|
+
</div>
|
59
|
+
{{/if}}
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
<script>
|
63
|
+
const sumEl = document.querySelector('.debug > summary');
|
64
|
+
const debugContentEl = document.querySelector('.debug-content');
|
65
|
+
sumEl.addEventListener('click', () => {
|
66
|
+
if (debugContentEl.classList.contains('visible')) {
|
67
|
+
debugContentEl.classList.remove('visible');
|
68
|
+
} else {
|
69
|
+
debugContentEl.classList.add('visible');
|
70
|
+
}
|
71
|
+
});
|
72
|
+
</script>
|
73
|
+
{{/if}}
|
74
|
+
{{/if}}
|
75
|
+
</main>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
</body>
|
79
|
+
</html>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<style>
|
2
|
+
.rc-login {
|
3
|
+
height: 100%;
|
4
|
+
background-color: #00adef;
|
5
|
+
}
|
6
|
+
|
7
|
+
.rc-login-form {
|
8
|
+
width: 815px;
|
9
|
+
box-sizing: border-box;
|
10
|
+
border-radius: .3rem;
|
11
|
+
background: #fff;
|
12
|
+
padding: 1rem;
|
13
|
+
}
|
14
|
+
</style>
|
15
|
+
|
16
|
+
<div class="rc-login flex col justify-center">
|
17
|
+
<div class="self-center justify-center rc-login-form scale110p">
|
18
|
+
<h2>{{title}}</h2>
|
19
|
+
<div class="row rc-login-form-inner">
|
20
|
+
<div class="w-45p gutter-margin-t-b">
|
21
|
+
<form class="form m-0 ng-pristine ng-invalid ng-touched" autocomplete="off" action="/interaction/{{ uid}}/login" method="post">
|
22
|
+
<div class="form-control-group embedded-input-field-label">
|
23
|
+
<label for="identifier" class="form-control-label">
|
24
|
+
E-Mail or Username
|
25
|
+
</label>
|
26
|
+
<div class="input-field {{#if error}}error{{/if}}">
|
27
|
+
<input value="testuser" id="identifier" name="identifier" type="text">
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<div class="form-control-group embedded-input-field-label">
|
31
|
+
<label for="password" class="form-control-label">
|
32
|
+
Password
|
33
|
+
</label>
|
34
|
+
<div class="input-field {{#if error}}error{{/if}}">
|
35
|
+
<input value="testpassword" name="password" name="password" type="text">
|
36
|
+
</div>
|
37
|
+
{{#if error}}
|
38
|
+
<div class="form-control-hint error">{{error.message}}</div>
|
39
|
+
{{/if}}
|
40
|
+
</div>
|
41
|
+
<div class="row justify-between">
|
42
|
+
<button type="button" class="button half-transparent"> Forgot your password? </button>
|
43
|
+
<button type="submit" class="button emphasized"> Log in </button>
|
44
|
+
</div>
|
45
|
+
</form>
|
46
|
+
</div>
|
47
|
+
<div class="w-10p divider divider-vertical row center justify-center rc-login-form-divider-v">
|
48
|
+
<div class="divider-rule"></div>
|
49
|
+
<div class="icogram divider-element">
|
50
|
+
<div class="text">or</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
<div class="w-45p col justify-center gutter-margin-t-b">
|
54
|
+
<a href="https://todo" class="col justify-center">
|
55
|
+
<button type="button" class="button emphasized">
|
56
|
+
Create an Account
|
57
|
+
</button>
|
58
|
+
</a>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
@@ -442,9 +442,9 @@ export declare type IoRestorecommerceLocationLocation = {
|
|
442
442
|
description?: Maybe<Scalars['String']>;
|
443
443
|
organizationId?: Maybe<Scalars['String']>;
|
444
444
|
parentId?: Maybe<Scalars['String']>;
|
445
|
-
childrenIds?: Maybe<Array<Scalars['String']>>;
|
446
445
|
addressId?: Maybe<Scalars['String']>;
|
447
446
|
data?: Maybe<GoogleProtobufAny>;
|
447
|
+
type?: Maybe<Scalars['String']>;
|
448
448
|
};
|
449
449
|
export declare type GoogleProtobufAny = {
|
450
450
|
__typename?: 'GoogleProtobufAny';
|
@@ -479,7 +479,6 @@ export declare type IoRestorecommerceOrganizationOrganization = {
|
|
479
479
|
meta?: Maybe<IoRestorecommerceMetaMeta>;
|
480
480
|
addressId?: Maybe<Scalars['String']>;
|
481
481
|
parentId?: Maybe<Scalars['String']>;
|
482
|
-
childrenIds?: Maybe<Array<Scalars['String']>>;
|
483
482
|
contactPointIds?: Maybe<Array<Scalars['String']>>;
|
484
483
|
website?: Maybe<Scalars['String']>;
|
485
484
|
email?: Maybe<Scalars['String']>;
|
@@ -860,9 +859,9 @@ export declare type IIoRestorecommerceLocationLocation = {
|
|
860
859
|
description?: Maybe<Scalars['String']>;
|
861
860
|
organizationId?: Maybe<Scalars['String']>;
|
862
861
|
parentId?: Maybe<Scalars['String']>;
|
863
|
-
childrenIds?: Maybe<Array<Scalars['String']>>;
|
864
862
|
addressId?: Maybe<Scalars['String']>;
|
865
863
|
data?: Maybe<IGoogleProtobufAny>;
|
864
|
+
type?: Maybe<Scalars['String']>;
|
866
865
|
};
|
867
866
|
export declare type ResourceOrganizationMutation = {
|
868
867
|
__typename?: 'ResourceOrganizationMutation';
|
@@ -885,7 +884,6 @@ export declare type IIoRestorecommerceOrganizationOrganization = {
|
|
885
884
|
meta?: Maybe<IIoRestorecommerceMetaMeta>;
|
886
885
|
addressId?: Maybe<Scalars['String']>;
|
887
886
|
parentId?: Maybe<Scalars['String']>;
|
888
|
-
childrenIds?: Maybe<Array<Scalars['String']>>;
|
889
887
|
contactPointIds?: Maybe<Array<Scalars['String']>>;
|
890
888
|
website?: Maybe<Scalars['String']>;
|
891
889
|
email?: Maybe<Scalars['String']>;
|
@@ -1636,9 +1634,9 @@ export declare type IoRestorecommerceLocationLocationResolvers<ContextType = Res
|
|
1636
1634
|
description?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1637
1635
|
organizationId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1638
1636
|
parentId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1639
|
-
childrenIds?: Resolver<Maybe<Array<ResolversTypes['String']>>, ParentType, ContextType>;
|
1640
1637
|
addressId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1641
1638
|
data?: Resolver<Maybe<ResolversTypes['GoogleProtobufAny']>, ParentType, ContextType>;
|
1639
|
+
type?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1642
1640
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
1643
1641
|
}>;
|
1644
1642
|
export declare type GoogleProtobufAnyResolvers<ContextType = ResourceContext, ParentType extends ResolversParentTypes['GoogleProtobufAny'] = ResolversParentTypes['GoogleProtobufAny']> = ResolversObject<{
|
@@ -1673,7 +1671,6 @@ export declare type IoRestorecommerceOrganizationOrganizationResolvers<ContextTy
|
|
1673
1671
|
meta?: Resolver<Maybe<ResolversTypes['IoRestorecommerceMetaMeta']>, ParentType, ContextType>;
|
1674
1672
|
addressId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1675
1673
|
parentId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1676
|
-
childrenIds?: Resolver<Maybe<Array<ResolversTypes['String']>>, ParentType, ContextType>;
|
1677
1674
|
contactPointIds?: Resolver<Maybe<Array<ResolversTypes['String']>>, ParentType, ContextType>;
|
1678
1675
|
website?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
1679
1676
|
email?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@restorecommerce/facade",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.1",
|
4
4
|
"description": "Facade for Restorecommerce microservices",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -24,11 +24,11 @@
|
|
24
24
|
"@cloudnative/health": "^2.1.2",
|
25
25
|
"@grpc/grpc-js": "^1.2.12",
|
26
26
|
"@grpc/proto-loader": "^0.6.0",
|
27
|
-
"@restorecommerce/grpc-client": "^0.3.
|
28
|
-
"@restorecommerce/kafka-client": "^0.3.
|
29
|
-
"@restorecommerce/logger": "^0.12.
|
30
|
-
"@restorecommerce/rc-grpc-clients": "^0.4.
|
31
|
-
"@restorecommerce/service-config": "^0.4.
|
27
|
+
"@restorecommerce/grpc-client": "^0.3.1",
|
28
|
+
"@restorecommerce/kafka-client": "^0.3.1",
|
29
|
+
"@restorecommerce/logger": "^0.12.1",
|
30
|
+
"@restorecommerce/rc-grpc-clients": "^0.4.1",
|
31
|
+
"@restorecommerce/service-config": "^0.4.25",
|
32
32
|
"apollo-server-koa": "^2.21.2",
|
33
33
|
"debug": "^4.3.1",
|
34
34
|
"googleapis": "^92.0.0",
|
@@ -85,7 +85,7 @@
|
|
85
85
|
"typescript": "^4.2.3"
|
86
86
|
},
|
87
87
|
"scripts": {
|
88
|
-
"build": "npm-run-all build:clean generate build:compile build:codegen:clean build:codegen:compile",
|
88
|
+
"build": "npm-run-all build:clean generate build:compile build:codegen:clean build:codegen:compile copyhbs",
|
89
89
|
"build:clean": "rimraf -rf ./dist",
|
90
90
|
"build:compile": "tsc -p tsconfig.lib.json",
|
91
91
|
"build:codegen:clean": "rimraf -rf ./codegen",
|
@@ -97,7 +97,8 @@
|
|
97
97
|
"dev:serve": "TS_NODE_PROJECT=tsconfig.test.json nodemon -e ts,hbs -w ./tests -w ./src -x node --inspect=7000 -r ts-node/register tests/server.ts",
|
98
98
|
"generate": "ts-node --project tsconfig.generate.json -r tsconfig-paths/register generate.ts",
|
99
99
|
"prepublishOnly": "npm run build",
|
100
|
-
"debug-run": "ts-node --project tsconfig.debug.json debug-run.ts"
|
100
|
+
"debug-run": "ts-node --project tsconfig.debug.json debug-run.ts",
|
101
|
+
"copyhbs": "sh copy-hbs.sh"
|
101
102
|
},
|
102
103
|
"engines": {
|
103
104
|
"node": ">= 12.18.0"
|
@@ -105,5 +106,5 @@
|
|
105
106
|
"publishConfig": {
|
106
107
|
"access": "public"
|
107
108
|
},
|
108
|
-
"gitHead": "
|
109
|
+
"gitHead": "e97bbfe2fe8166dfe1cd47ae60bce54347a4f1c9"
|
109
110
|
}
|