@sudoplatform/sudo-user 15.1.3 → 16.0.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/cjs/client/amplifyClient.js +226 -0
- package/cjs/client/amplifyClient.js.map +1 -0
- package/cjs/client/apiClient.js +50 -59
- package/cjs/client/apiClient.js.map +1 -1
- package/cjs/client/graphqlClient.js +10 -0
- package/cjs/client/graphqlClient.js.map +1 -0
- package/cjs/client/transformer/ErrorTransformer.js +1 -2
- package/cjs/client/transformer/ErrorTransformer.js.map +1 -1
- package/cjs/core/sdk-config.js +2 -2
- package/cjs/core/sdk-config.js.map +1 -1
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/cjs/sdk.js +3 -0
- package/cjs/sdk.js.map +1 -1
- package/cjs/utils/parse-token.js +1 -2
- package/cjs/utils/parse-token.js.map +1 -1
- package/cjs/utils/resolvable-promise.js +1 -2
- package/cjs/utils/resolvable-promise.js.map +1 -1
- package/cjs/utils/sign-options-builder.js +1 -2
- package/cjs/utils/sign-options-builder.js.map +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +56 -0
- package/docs/assets/main.js +5 -5
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +254 -231
- package/docs/classes/AlreadyRegisteredError.html +33 -12
- package/docs/classes/DefaultSudoUserClient.html +75 -75
- package/docs/classes/IdentityServiceConfigNotFoundError.html +33 -12
- package/docs/classes/LocalAuthenticationProvider.html +12 -12
- package/docs/classes/TESTAuthenticationProvider.html +13 -13
- package/docs/classes/internal.AmplifyClient.html +21 -0
- package/docs/enums/GraphQLClientAuthMode.html +4 -0
- package/docs/functions/internal.getIdentityServiceConfig.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +6 -24
- package/docs/interfaces/AuthenticationProvider.html +5 -5
- package/docs/interfaces/AuthenticationTokens.html +10 -10
- package/docs/interfaces/GraphQLClient.html +20 -0
- package/docs/interfaces/GraphQLClientOptions.html +13 -0
- package/docs/interfaces/SudoUserClient.html +66 -66
- package/docs/interfaces/internal.SudoUserOptions.html +9 -9
- package/docs/modules/internal.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/IAMCredentials.html +4 -0
- package/docs/types/TokenProvider.html +1 -0
- package/docs/types/internal.Config.html +1 -1
- package/docs/types/internal.FederatedSignInConfig.html +1 -1
- package/docs/types/internal.IdentityServiceConfig.html +1 -1
- package/docs/variables/internal.Config.html +1 -0
- package/docs/variables/internal.FederatedSignInConfigCodec.html +1 -1
- package/docs/variables/internal.IdentityServiceConfigCodec.html +1 -1
- package/lib/client/amplifyClient.js +222 -0
- package/lib/client/amplifyClient.js.map +1 -0
- package/lib/client/apiClient.js +50 -59
- package/lib/client/apiClient.js.map +1 -1
- package/lib/client/graphqlClient.js +7 -0
- package/lib/client/graphqlClient.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/sdk.js +1 -0
- package/lib/sdk.js.map +1 -1
- package/package.json +58 -40
- package/types/client/amplifyClient.d.ts +60 -0
- package/types/client/graphqlClient.d.ts +84 -0
- package/types/gen/graphql-types.d.ts +4 -12
- package/types/index.d.ts +1 -0
- package/types/sdk.d.ts +1 -0
- package/docs/variables/internal.Config-1.html +0 -1
package/lib/client/apiClient.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AWSAppSyncClient, AUTH_TYPE } from 'aws-appsync';
|
|
7
6
|
import { DeregisterDocument, RegisterFederatedIdDocument, GlobalSignOutDocument, ResetDocument, } from '../gen/graphql-types';
|
|
8
7
|
import { NotSignedInError, FatalError, UnknownGraphQLError, } from '@sudoplatform/sudo-common';
|
|
9
8
|
import { graphQLErrorsToClientError } from './transformer/ErrorTransformer';
|
|
9
|
+
import { AmplifyClient } from './amplifyClient';
|
|
10
10
|
/**
|
|
11
11
|
* AppSync wrapper to use to invoke Identity Service APIs.
|
|
12
12
|
*/
|
|
@@ -16,14 +16,10 @@ export class ApiClient {
|
|
|
16
16
|
this.graphqlUrl = graphqlUrl;
|
|
17
17
|
this.sudoUserClient = sudoUserClient;
|
|
18
18
|
this.logger = logger;
|
|
19
|
-
this.client = new
|
|
20
|
-
|
|
19
|
+
this.client = new AmplifyClient({
|
|
20
|
+
graphqlUrl,
|
|
21
21
|
region: region,
|
|
22
|
-
|
|
23
|
-
type: AUTH_TYPE.AMAZON_COGNITO_USER_POOLS,
|
|
24
|
-
jwtToken: async () => await sudoUserClient.getLatestAuthToken(),
|
|
25
|
-
},
|
|
26
|
-
disableOffline: true,
|
|
22
|
+
tokenProvider: async () => await sudoUserClient.getLatestAuthToken(),
|
|
27
23
|
});
|
|
28
24
|
}
|
|
29
25
|
async resetUserData() {
|
|
@@ -34,25 +30,25 @@ export class ApiClient {
|
|
|
34
30
|
try {
|
|
35
31
|
result = await this.client.mutate({
|
|
36
32
|
mutation: ResetDocument,
|
|
37
|
-
fetchPolicy: 'no-cache',
|
|
38
33
|
});
|
|
39
34
|
}
|
|
40
35
|
catch (err) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
if ('graphQLErrors' in err) {
|
|
37
|
+
const error = err.graphQLErrors?.[0];
|
|
38
|
+
if (error) {
|
|
39
|
+
throw graphQLErrorsToClientError(error, this.logger);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
throw new UnknownGraphQLError(err);
|
|
43
|
+
}
|
|
48
44
|
}
|
|
49
45
|
}
|
|
50
|
-
const error = result
|
|
46
|
+
const error = result?.errors?.[0];
|
|
51
47
|
if (error) {
|
|
52
48
|
throw graphQLErrorsToClientError(error, this.logger);
|
|
53
49
|
}
|
|
54
|
-
if (result
|
|
55
|
-
return { success: result.data.reset?.success
|
|
50
|
+
if (result?.data) {
|
|
51
|
+
return { success: !!result.data.reset?.success };
|
|
56
52
|
}
|
|
57
53
|
else {
|
|
58
54
|
throw new FatalError('reset did not return any result.');
|
|
@@ -66,25 +62,25 @@ export class ApiClient {
|
|
|
66
62
|
try {
|
|
67
63
|
result = await this.client.mutate({
|
|
68
64
|
mutation: DeregisterDocument,
|
|
69
|
-
fetchPolicy: 'no-cache',
|
|
70
65
|
});
|
|
71
66
|
}
|
|
72
67
|
catch (err) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
if ('graphQLErrors' in err) {
|
|
69
|
+
const error = err.graphQLErrors?.[0];
|
|
70
|
+
if (error) {
|
|
71
|
+
throw graphQLErrorsToClientError(error, this.logger);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
throw new UnknownGraphQLError(err);
|
|
75
|
+
}
|
|
80
76
|
}
|
|
81
77
|
}
|
|
82
|
-
const error = result
|
|
78
|
+
const error = result?.errors?.[0];
|
|
83
79
|
if (error) {
|
|
84
80
|
throw graphQLErrorsToClientError(error, this.logger);
|
|
85
81
|
}
|
|
86
|
-
if (result
|
|
87
|
-
return { success: result
|
|
82
|
+
if (result?.data) {
|
|
83
|
+
return { success: !!result?.data.deregister?.success };
|
|
88
84
|
}
|
|
89
85
|
else {
|
|
90
86
|
throw new FatalError('deregister did not return any result.');
|
|
@@ -98,25 +94,25 @@ export class ApiClient {
|
|
|
98
94
|
try {
|
|
99
95
|
result = await this.client.mutate({
|
|
100
96
|
mutation: GlobalSignOutDocument,
|
|
101
|
-
fetchPolicy: 'no-cache',
|
|
102
97
|
});
|
|
103
98
|
}
|
|
104
99
|
catch (err) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
100
|
+
if ('graphQLErrors' in err) {
|
|
101
|
+
const error = err.graphQLErrors?.[0];
|
|
102
|
+
if (error) {
|
|
103
|
+
throw graphQLErrorsToClientError(error, this.logger);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
throw new UnknownGraphQLError(err);
|
|
107
|
+
}
|
|
112
108
|
}
|
|
113
109
|
}
|
|
114
|
-
const error = result
|
|
110
|
+
const error = result?.errors?.[0];
|
|
115
111
|
if (error) {
|
|
116
112
|
throw graphQLErrorsToClientError(error, this.logger);
|
|
117
113
|
}
|
|
118
|
-
if (result
|
|
119
|
-
return { success: result
|
|
114
|
+
if (result?.data) {
|
|
115
|
+
return { success: result?.data.globalSignOut?.success ?? false };
|
|
120
116
|
}
|
|
121
117
|
else {
|
|
122
118
|
throw new FatalError('globalSignOut did not return any result.');
|
|
@@ -128,24 +124,24 @@ export class ApiClient {
|
|
|
128
124
|
result = await this.client.mutate({
|
|
129
125
|
mutation: RegisterFederatedIdDocument,
|
|
130
126
|
variables: { input },
|
|
131
|
-
fetchPolicy: 'no-cache',
|
|
132
127
|
});
|
|
133
128
|
}
|
|
134
129
|
catch (err) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
if ('graphQLErrors' in err) {
|
|
131
|
+
const error = err.graphQLErrors?.[0];
|
|
132
|
+
if (error) {
|
|
133
|
+
throw graphQLErrorsToClientError(error, this.logger);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
throw new UnknownGraphQLError(err);
|
|
137
|
+
}
|
|
142
138
|
}
|
|
143
139
|
}
|
|
144
|
-
const error = result
|
|
140
|
+
const error = result?.errors?.[0];
|
|
145
141
|
if (error) {
|
|
146
142
|
throw graphQLErrorsToClientError(error, this.logger);
|
|
147
143
|
}
|
|
148
|
-
const identityId = result
|
|
144
|
+
const identityId = result?.data?.registerFederatedId?.identityId;
|
|
149
145
|
if (identityId) {
|
|
150
146
|
return {
|
|
151
147
|
identityId,
|
|
@@ -156,15 +152,10 @@ export class ApiClient {
|
|
|
156
152
|
}
|
|
157
153
|
}
|
|
158
154
|
async reset() {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
url: this.graphqlUrl,
|
|
155
|
+
this.client = new AmplifyClient({
|
|
156
|
+
graphqlUrl: this.graphqlUrl,
|
|
162
157
|
region: this.region,
|
|
163
|
-
|
|
164
|
-
type: AUTH_TYPE.AMAZON_COGNITO_USER_POOLS,
|
|
165
|
-
jwtToken: async () => await this.sudoUserClient.getLatestAuthToken(),
|
|
166
|
-
},
|
|
167
|
-
disableOffline: true,
|
|
158
|
+
tokenProvider: async () => await this.sudoUserClient.getLatestAuthToken(),
|
|
168
159
|
});
|
|
169
160
|
}
|
|
170
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiClient.js","sourceRoot":"","sources":["../../src/client/apiClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"apiClient.js","sourceRoot":"","sources":["../../src/client/apiClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,kBAAkB,EAElB,2BAA2B,EAG3B,qBAAqB,EAErB,aAAa,GACd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,mBAAmB,GAEpB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;GAEG;AACH,MAAM,OAAO,SAAS;IAOpB,YACE,MAAc,EACd,UAAkB,EAClB,cAA8B,EAC9B,MAAc;QAEd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QAEpB,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa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ACb,IAAI,eAAe,IAAK,GAAW,EAAE,CAAC;gBACpC,MAAM,KAAK,GAAI,GAAW,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAA;gBAC7C,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;gBACtD,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,mBAAmB,CAAC,GAAG,CAAC,CAAA;gBACpC,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;QACjC,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACtD,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,CAAA;QAChE,IAAI,UAAU,EAAE,CAAC;YACf,OAAO;gBACL,UAAU;aACX,CAAA;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,UAAU,CAClB,qDAAqD,CACtD,CAAA;QACH,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,KAAK;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,CAAC;YAC9B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE;SAC1E,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var GraphQLClientAuthMode;
|
|
2
|
+
(function (GraphQLClientAuthMode) {
|
|
3
|
+
GraphQLClientAuthMode["OpenIDConnect"] = "OPENID_CONNECT";
|
|
4
|
+
GraphQLClientAuthMode["IAM"] = "AWS_IAM";
|
|
5
|
+
GraphQLClientAuthMode["ApiKey"] = "API_KEY";
|
|
6
|
+
})(GraphQLClientAuthMode || (GraphQLClientAuthMode = {}));
|
|
7
|
+
//# sourceMappingURL=graphqlClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphqlClient.js","sourceRoot":"","sources":["../../src/client/graphqlClient.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,yDAAgC,CAAA;IAChC,wCAAe,CAAA;IACf,2CAAkB,CAAA;AACpB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC"}
|
package/lib/index.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/* Everything exported here is considered public API and is documented by typedoc. */
|
|
7
7
|
export { DefaultSudoUserClient } from './user/user-client';
|
|
8
|
+
export { GraphQLClientAuthMode, } from './client/graphqlClient';
|
|
8
9
|
export * from './user/user-client-interface';
|
|
9
10
|
export { TESTAuthenticationProvider, LocalAuthenticationProvider, } from './user/auth-provider';
|
|
10
11
|
export * from './user/error';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qFAAqF;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAE5B,MAAM,sBAAsB,CAAA;AAE7B,cAAc,cAAc,CAAA;AAE5B;;;GAGG;AACH,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qFAAqF;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAEL,qBAAqB,GAItB,MAAM,wBAAwB,CAAA;AAE/B,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAE5B,MAAM,sBAAsB,CAAA;AAE7B,cAAc,cAAc,CAAA;AAE5B;;;GAGG;AACH,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAA"}
|
package/lib/sdk.js
CHANGED
package/lib/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,cAAc,mBAAmB,CAAA;AAGjC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudoplatform/sudo-user",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"author": "Anonyome Labs, Inc.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/sudoplatform/sudo-user-js.git"
|
|
7
|
+
"url": "git+https://github.com/sudoplatform/sudo-user-js.git"
|
|
8
8
|
},
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"scripts": {
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
"lint:eslint": "eslint \"{bin,test,src}/**/*.{ts,tsx}\"",
|
|
14
14
|
"lint:prettier": "prettier -l \"{bin,test,src}/**/*.{js,json,jsx,ts,tsx}\"",
|
|
15
15
|
"codegen": "graphql-codegen -c codegen.yml",
|
|
16
|
-
"verify": "
|
|
16
|
+
"verify": "true",
|
|
17
17
|
"unit-test": "yarn jest test/unit --verbose --coverage",
|
|
18
18
|
"integration-test": "/bin/bash -c 'jest test/integration'",
|
|
19
|
+
"smoketest": "yarn unit-test && yarn integration-test",
|
|
19
20
|
"test": "yarn unit-test",
|
|
20
21
|
"build": "yarn codegen && yarn verify && yarn build:transpile && yarn build:docs",
|
|
21
|
-
"build:report-dependencies": "
|
|
22
|
+
"build:report-dependencies": "true",
|
|
22
23
|
"build:transpile": "concurrently \"yarn build:transpile:declarations\" \"yarn build:transpile:cjs\" \"yarn build:transpile:esm\"",
|
|
23
24
|
"build:transpile:cjs": "tsc --project tsconfig.commonjs.json",
|
|
24
25
|
"build:transpile:esm": "tsc",
|
|
@@ -46,68 +47,85 @@
|
|
|
46
47
|
"./lib/runtimes/node/node-crypto.js": "./lib/runtimes/browser/browser-crypto.js"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@aws-sdk/client-cognito-identity-provider": "
|
|
50
|
+
"@aws-sdk/client-cognito-identity-provider": "3.632.0",
|
|
51
|
+
"@aws-sdk/credential-providers": "^3.929.0",
|
|
50
52
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
51
|
-
"@sudoplatform/sudo-web-crypto-provider": "^
|
|
53
|
+
"@sudoplatform/sudo-web-crypto-provider": "^12.0.0",
|
|
54
|
+
"@types/zen-observable": "^0.8.7",
|
|
52
55
|
"amazon-cognito-auth-js": "^1.3.3",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"graphql": "^15.9.0",
|
|
56
|
+
"aws-amplify": "^6.15.8",
|
|
57
|
+
"fp-ts": "^2.16.11",
|
|
58
|
+
"graphql": "^16.12.0",
|
|
57
59
|
"io-ts": "^2.2.22",
|
|
58
60
|
"jws": "^4.0.0",
|
|
59
61
|
"lodash": "^4.17.21",
|
|
60
62
|
"monocle-ts": "^2.3.13",
|
|
61
63
|
"newtype-ts": "^0.3.5",
|
|
62
64
|
"tslib": "^2.8.1",
|
|
63
|
-
"uuid": "^11.0
|
|
65
|
+
"uuid": "^11.1.0",
|
|
66
|
+
"zen-observable": "^0.10.0"
|
|
64
67
|
},
|
|
65
68
|
"resolutions": {
|
|
66
|
-
"
|
|
69
|
+
"tmp": "^0.2.3",
|
|
70
|
+
"graphql": "^16.12.0"
|
|
67
71
|
},
|
|
68
72
|
"devDependencies": {
|
|
69
|
-
"@graphql-codegen/add": "^
|
|
70
|
-
"@graphql-codegen/cli": "^
|
|
71
|
-
"@graphql-codegen/plugin-helpers": "^
|
|
72
|
-
"@graphql-codegen/typed-document-node": "^
|
|
73
|
-
"@graphql-codegen/typescript": "^
|
|
74
|
-
"@graphql-codegen/typescript-operations": "^
|
|
75
|
-
"@
|
|
76
|
-
"@sudoplatform/sudo-common": "^10.0.0",
|
|
73
|
+
"@graphql-codegen/add": "^6.0.0",
|
|
74
|
+
"@graphql-codegen/cli": "^6.0.1",
|
|
75
|
+
"@graphql-codegen/plugin-helpers": "^6.0.0",
|
|
76
|
+
"@graphql-codegen/typed-document-node": "^6.1.0",
|
|
77
|
+
"@graphql-codegen/typescript": "^5.0.2",
|
|
78
|
+
"@graphql-codegen/typescript-operations": "^5.0.2",
|
|
79
|
+
"@sudoplatform/sudo-common": "^12.2.0",
|
|
77
80
|
"@types/amazon-cognito-auth-js": "^1.3.4",
|
|
78
|
-
"@types/firefox-webext-browser": "^
|
|
81
|
+
"@types/firefox-webext-browser": "^143.0.0",
|
|
79
82
|
"@types/jest": "^29.5.14",
|
|
80
|
-
"@types/jws": "^3.2.
|
|
81
|
-
"@types/lodash": "^4.17.
|
|
82
|
-
"@types/node": "^
|
|
83
|
-
"@
|
|
84
|
-
"@typescript-eslint/
|
|
85
|
-
"
|
|
86
|
-
"apollo-client": "^2.6.10",
|
|
87
|
-
"concurrently": "^9.1.0",
|
|
83
|
+
"@types/jws": "^3.2.11",
|
|
84
|
+
"@types/lodash": "^4.17.20",
|
|
85
|
+
"@types/node": "^22.19.0",
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
|
87
|
+
"@typescript-eslint/parser": "^8.46.3",
|
|
88
|
+
"concurrently": "^9.2.1",
|
|
88
89
|
"eslint": "^8.57.1",
|
|
89
|
-
"eslint-config-prettier": "^9.1.
|
|
90
|
-
"eslint-plugin-import": "^2.
|
|
91
|
-
"eslint-plugin-prettier": "^5.
|
|
90
|
+
"eslint-config-prettier": "^9.1.2",
|
|
91
|
+
"eslint-plugin-import": "^2.32.0",
|
|
92
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
92
93
|
"eslint-plugin-tree-shaking": "^1.12.2",
|
|
93
94
|
"husky": "^9.1.7",
|
|
94
95
|
"isomorphic-fetch": "^3.0.0",
|
|
95
96
|
"jest": "^29.7.0",
|
|
96
97
|
"jest-environment-node": "^29.7.0",
|
|
97
|
-
"prettier": "^3.
|
|
98
|
+
"prettier": "^3.6.2",
|
|
98
99
|
"subscriptions-transport-ws": "^0.11.0",
|
|
99
|
-
"ts-jest": "^29.
|
|
100
|
+
"ts-jest": "^29.4.5",
|
|
100
101
|
"ts-mockito": "^2.6.1",
|
|
101
|
-
"typedoc": "^0.
|
|
102
|
-
"typescript": "
|
|
102
|
+
"typedoc": "^0.28.14",
|
|
103
|
+
"typescript": "^5.9.3",
|
|
103
104
|
"websocket": "^1.0.35"
|
|
104
105
|
},
|
|
105
106
|
"peerDependencies": {
|
|
106
|
-
"@sudoplatform/sudo-common": "^
|
|
107
|
+
"@sudoplatform/sudo-common": "^12.2.0",
|
|
107
108
|
"io-ts": "^2.2.22"
|
|
108
109
|
},
|
|
109
110
|
"engines": {
|
|
110
|
-
"node": ">=
|
|
111
|
+
"node": ">=22"
|
|
111
112
|
},
|
|
112
|
-
"
|
|
113
|
-
|
|
113
|
+
"auditSuppressions": {
|
|
114
|
+
"1109754": {
|
|
115
|
+
"until": 1765917031,
|
|
116
|
+
"untilISO": "2025-12-16T20:30:31Z",
|
|
117
|
+
"reason": "waiting for fix - js-xaml"
|
|
118
|
+
},
|
|
119
|
+
"1109801": {
|
|
120
|
+
"until": 1765917031,
|
|
121
|
+
"untilISO": "2025-12-16T20:30:31Z",
|
|
122
|
+
"reason": "waiting for fix - js-xaml"
|
|
123
|
+
},
|
|
124
|
+
"1109802": {
|
|
125
|
+
"until": 1765917031,
|
|
126
|
+
"untilISO": "2025-12-16T20:30:31Z",
|
|
127
|
+
"reason": "waiting for fix - js-xaml"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"packageManager": "yarn@4.11.0+sha512.4e54aeace9141df2f0177c266b05ec50dc044638157dae128c471ba65994ac802122d7ab35bcd9e81641228b7dcf24867d28e750e0bcae8a05277d600008ad54"
|
|
131
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { GraphQLResult } from '@aws-amplify/api-graphql';
|
|
2
|
+
import { DocumentNode } from 'graphql';
|
|
3
|
+
import Observable from 'zen-observable';
|
|
4
|
+
import { GraphQLClient, GraphQLClientOptions } from './graphqlClient';
|
|
5
|
+
/**
|
|
6
|
+
* Convenience wrapper for GraphQL API using Amplify SDK.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AmplifyClient implements GraphQLClient {
|
|
9
|
+
private readonly options;
|
|
10
|
+
private client;
|
|
11
|
+
private readonly amplify;
|
|
12
|
+
constructor(options: GraphQLClientOptions);
|
|
13
|
+
private configure;
|
|
14
|
+
/**
|
|
15
|
+
* Performs GraphQL query operation.
|
|
16
|
+
*
|
|
17
|
+
* @param options query document, query variables and authentication
|
|
18
|
+
* token (optional). If authentication token is provided then the
|
|
19
|
+
* token provided via the constructor will be ignored.
|
|
20
|
+
* @returns query result.
|
|
21
|
+
*/
|
|
22
|
+
query<T>(options: {
|
|
23
|
+
query: string | DocumentNode;
|
|
24
|
+
variables?: any;
|
|
25
|
+
authToken?: string;
|
|
26
|
+
}): Promise<GraphQLResult<T>>;
|
|
27
|
+
/**
|
|
28
|
+
* Performs GraphQL mutation operation.
|
|
29
|
+
*
|
|
30
|
+
* @param options mutation document, mutation variables and authentication
|
|
31
|
+
* token (optional). If authentication token is provided then the
|
|
32
|
+
* token provided via the constructor will be ignored.
|
|
33
|
+
* @returns mutation result.
|
|
34
|
+
*/
|
|
35
|
+
mutate<T>(options: {
|
|
36
|
+
mutation: string | DocumentNode;
|
|
37
|
+
variables?: any;
|
|
38
|
+
authToken?: string;
|
|
39
|
+
}): Promise<GraphQLResult<T>>;
|
|
40
|
+
/**
|
|
41
|
+
* Performs GraphQL subscription operation.
|
|
42
|
+
*
|
|
43
|
+
* @param options subscription document, subscription variables and
|
|
44
|
+
* authentication token (optional). If authentication token is provided
|
|
45
|
+
* then the token provided via the constructor will be ignored.
|
|
46
|
+
* @returns observable for receiving subscription notifications.
|
|
47
|
+
*/
|
|
48
|
+
subscribe<T>(options: {
|
|
49
|
+
subscription: string | DocumentNode;
|
|
50
|
+
variables?: any;
|
|
51
|
+
authToken?: string;
|
|
52
|
+
}): Promise<Observable<GraphQLResult<T>>>;
|
|
53
|
+
/**
|
|
54
|
+
* Resolves a TokenProvider into its actual token value.
|
|
55
|
+
* Handles both string tokens and async/sync function providers.
|
|
56
|
+
*/
|
|
57
|
+
private resolveToken;
|
|
58
|
+
private transformAuthMode;
|
|
59
|
+
private resolveAuthOptions;
|
|
60
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { GraphQLResult } from '@aws-amplify/api-graphql';
|
|
2
|
+
import { DocumentNode } from 'graphql';
|
|
3
|
+
import Observable from 'zen-observable';
|
|
4
|
+
export declare enum GraphQLClientAuthMode {
|
|
5
|
+
OpenIDConnect = "OPENID_CONNECT",
|
|
6
|
+
IAM = "AWS_IAM",
|
|
7
|
+
ApiKey = "API_KEY"
|
|
8
|
+
}
|
|
9
|
+
export type TokenProvider = (() => string | Promise<string>) | string;
|
|
10
|
+
export type IAMCredentials = {
|
|
11
|
+
accessKeyId: string;
|
|
12
|
+
secretAccessKey: string;
|
|
13
|
+
sessionToken?: string;
|
|
14
|
+
};
|
|
15
|
+
export interface GraphQLClientOptions {
|
|
16
|
+
/**
|
|
17
|
+
* GraphQL URL i.e. AppSync URL in most cases.
|
|
18
|
+
*/
|
|
19
|
+
graphqlUrl: string;
|
|
20
|
+
/**
|
|
21
|
+
* AWS Region to connect to.
|
|
22
|
+
*/
|
|
23
|
+
region: string;
|
|
24
|
+
/**
|
|
25
|
+
* Authentication mode. If not provided, defaults to OPENID_CONNECT - the usual client mode
|
|
26
|
+
*/
|
|
27
|
+
authMode?: GraphQLClientAuthMode;
|
|
28
|
+
/**
|
|
29
|
+
* A provider which resolves to the ID token for authentication.
|
|
30
|
+
*/
|
|
31
|
+
tokenProvider?: TokenProvider;
|
|
32
|
+
/**
|
|
33
|
+
* If authMode is API_KEY, this is the API key to use for authentication.
|
|
34
|
+
*/
|
|
35
|
+
apiKey?: string;
|
|
36
|
+
/**
|
|
37
|
+
* if authMode is IAM, override default credential values with these.
|
|
38
|
+
*/
|
|
39
|
+
credentials?: IAMCredentials;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Interface for GraphQL client operations.
|
|
43
|
+
*/
|
|
44
|
+
export interface GraphQLClient {
|
|
45
|
+
/**
|
|
46
|
+
* Performs GraphQL query operation.
|
|
47
|
+
*
|
|
48
|
+
* @param options query document, query variables and authentication
|
|
49
|
+
* token (optional). If authentication token is provided then the
|
|
50
|
+
* token provided via the constructor will be ignored.
|
|
51
|
+
* @returns query result.
|
|
52
|
+
*/
|
|
53
|
+
query<T>(options: {
|
|
54
|
+
query: string | DocumentNode;
|
|
55
|
+
variables?: any;
|
|
56
|
+
idToken?: string;
|
|
57
|
+
}): Promise<GraphQLResult<T>>;
|
|
58
|
+
/**
|
|
59
|
+
* Performs GraphQL mutation operation.
|
|
60
|
+
*
|
|
61
|
+
* @param options mutation document, mutation variables and authentication
|
|
62
|
+
* token (optional). If authentication token is provided then the
|
|
63
|
+
* token provided via the constructor will be ignored.
|
|
64
|
+
* @returns mutation result.
|
|
65
|
+
*/
|
|
66
|
+
mutate<T>(options: {
|
|
67
|
+
mutation: string | DocumentNode;
|
|
68
|
+
variables?: any;
|
|
69
|
+
idToken?: string;
|
|
70
|
+
}): Promise<GraphQLResult<T>>;
|
|
71
|
+
/**
|
|
72
|
+
* Performs GraphQL subscription operation.
|
|
73
|
+
*
|
|
74
|
+
* @param options subscription document, subscription variables and
|
|
75
|
+
* authentication token (optional). If authentication token is provided
|
|
76
|
+
* then the token provided via the constructor will be ignored.
|
|
77
|
+
* @returns observable for receiving subscription notifications.
|
|
78
|
+
*/
|
|
79
|
+
subscribe<T>(options: {
|
|
80
|
+
subscription: string | DocumentNode;
|
|
81
|
+
variables?: any;
|
|
82
|
+
idToken?: string;
|
|
83
|
+
}): Promise<Observable<GraphQLResult<T>>>;
|
|
84
|
+
}
|
|
@@ -155,15 +155,7 @@ export type ResetMutation = {
|
|
|
155
155
|
success: boolean;
|
|
156
156
|
} | undefined;
|
|
157
157
|
};
|
|
158
|
-
export declare const DeregisterDocument: DocumentNode<DeregisterMutation,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
export declare const
|
|
162
|
-
[key: string]: never;
|
|
163
|
-
}>>;
|
|
164
|
-
export declare const RegisterFederatedIdDocument: DocumentNode<RegisterFederatedIdMutation, Exact<{
|
|
165
|
-
input: RegisterFederatedIdInput;
|
|
166
|
-
}>>;
|
|
167
|
-
export declare const ResetDocument: DocumentNode<ResetMutation, Exact<{
|
|
168
|
-
[key: string]: never;
|
|
169
|
-
}>>;
|
|
158
|
+
export declare const DeregisterDocument: DocumentNode<DeregisterMutation, DeregisterMutationVariables>;
|
|
159
|
+
export declare const GlobalSignOutDocument: DocumentNode<GlobalSignOutMutation, GlobalSignOutMutationVariables>;
|
|
160
|
+
export declare const RegisterFederatedIdDocument: DocumentNode<RegisterFederatedIdMutation, RegisterFederatedIdMutationVariables>;
|
|
161
|
+
export declare const ResetDocument: DocumentNode<ResetMutation, ResetMutationVariables>;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { DefaultSudoUserClient } from './user/user-client';
|
|
2
|
+
export { GraphQLClient, GraphQLClientAuthMode, GraphQLClientOptions, TokenProvider, IAMCredentials, } from './client/graphqlClient';
|
|
2
3
|
export * from './user/user-client-interface';
|
|
3
4
|
export { TESTAuthenticationProvider, LocalAuthenticationProvider, AuthenticationProvider, } from './user/auth-provider';
|
|
4
5
|
export * from './user/error';
|
package/types/sdk.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Config | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@sudoplatform/sudo-user</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@sudoplatform/sudo-user</a></li><li><a href="../modules/internal.html">internal</a></li><li><a href="internal.Config-1.html">Config</a></li></ul><h1>Variable Config<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">Config</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">identityService</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">apiUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">clientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">identityPoolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">poolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">region</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">registrationMethods</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ArrayC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">transientBucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">federatedSignIn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">appClientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signInRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signOutRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">webDomain</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">identityProvider</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/core/sdk-config.ts:54</li><li>Defined in src/core/sdk-config.ts:65</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@sudoplatform/sudo-user</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|