@sudoplatform/sudo-user 13.0.1 → 13.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/cjs/client/apiClient.js +39 -18
- package/cjs/client/apiClient.js.map +1 -1
- package/cjs/client/transformer/ErrorTransformer.js +23 -0
- package/cjs/client/transformer/ErrorTransformer.js.map +1 -0
- package/cjs/gen/graphql-types.js +26 -1
- package/cjs/gen/graphql-types.js.map +1 -1
- package/cjs/user/user-client.js +8 -0
- package/cjs/user/user-client.js.map +1 -1
- package/docs/assets/main.js +3 -3
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +450 -363
- package/docs/classes/AlreadyRegisteredError.html +78 -70
- package/docs/classes/DefaultSudoUserClient.html +329 -287
- package/docs/classes/IdentityServiceConfigNotFoundError.html +78 -70
- package/docs/classes/LocalAuthenticationProvider.html +59 -52
- package/docs/classes/TESTAuthenticationProvider.html +67 -60
- package/docs/functions/internal.getIdentityServiceConfig.html +32 -26
- package/docs/index.html +33 -45
- package/docs/interfaces/AuthenticationProvider.html +41 -35
- package/docs/interfaces/AuthenticationTokens.html +48 -42
- package/docs/interfaces/SudoUserClient.html +276 -239
- package/docs/modules/internal.html +37 -31
- package/docs/modules.html +29 -34
- package/docs/types/internal.Config.html +30 -24
- package/docs/types/internal.FederatedSignInConfig.html +30 -24
- package/docs/types/internal.IdentityServiceConfig.html +30 -24
- package/docs/variables/internal.Config-1.html +30 -24
- package/docs/variables/internal.FederatedSignInConfigCodec.html +30 -24
- package/docs/variables/internal.IdentityServiceConfigCodec.html +30 -24
- package/lib/client/apiClient.js +41 -20
- package/lib/client/apiClient.js.map +1 -1
- package/lib/client/transformer/ErrorTransformer.js +19 -0
- package/lib/client/transformer/ErrorTransformer.js.map +1 -0
- package/lib/gen/graphql-types.js +25 -0
- package/lib/gen/graphql-types.js.map +1 -1
- package/lib/user/user-client.js +8 -0
- package/lib/user/user-client.js.map +1 -1
- package/package.json +16 -25
- package/types/client/apiClient.d.ts +3 -1
- package/types/client/transformer/ErrorTransformer.d.ts +2 -0
- package/types/gen/graphql-types.d.ts +88 -20
- package/types/user/user-client-interface.d.ts +5 -0
- package/types/user/user-client.d.ts +1 -0
|
@@ -12,53 +12,108 @@ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
|
12
12
|
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
13
13
|
[SubKey in K]: Maybe<T[SubKey]>;
|
|
14
14
|
};
|
|
15
|
+
export type MakeEmpty<T extends {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}, K extends keyof T> = {
|
|
18
|
+
[_ in K]?: never;
|
|
19
|
+
};
|
|
20
|
+
export type Incremental<T> = T | {
|
|
21
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
22
|
+
};
|
|
15
23
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
16
24
|
export type Scalars = {
|
|
17
|
-
ID:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
ID: {
|
|
26
|
+
input: string | number;
|
|
27
|
+
output: string;
|
|
28
|
+
};
|
|
29
|
+
String: {
|
|
30
|
+
input: string;
|
|
31
|
+
output: string;
|
|
32
|
+
};
|
|
33
|
+
Boolean: {
|
|
34
|
+
input: boolean;
|
|
35
|
+
output: boolean;
|
|
36
|
+
};
|
|
37
|
+
Int: {
|
|
38
|
+
input: number;
|
|
39
|
+
output: number;
|
|
40
|
+
};
|
|
41
|
+
Float: {
|
|
42
|
+
input: number;
|
|
43
|
+
output: number;
|
|
44
|
+
};
|
|
45
|
+
AWSDate: {
|
|
46
|
+
input: any;
|
|
47
|
+
output: any;
|
|
48
|
+
};
|
|
49
|
+
AWSDateTime: {
|
|
50
|
+
input: any;
|
|
51
|
+
output: any;
|
|
52
|
+
};
|
|
53
|
+
AWSEmail: {
|
|
54
|
+
input: any;
|
|
55
|
+
output: any;
|
|
56
|
+
};
|
|
57
|
+
AWSIPAddress: {
|
|
58
|
+
input: any;
|
|
59
|
+
output: any;
|
|
60
|
+
};
|
|
61
|
+
AWSJSON: {
|
|
62
|
+
input: unknown;
|
|
63
|
+
output: unknown;
|
|
64
|
+
};
|
|
65
|
+
AWSPhone: {
|
|
66
|
+
input: any;
|
|
67
|
+
output: any;
|
|
68
|
+
};
|
|
69
|
+
AWSTime: {
|
|
70
|
+
input: any;
|
|
71
|
+
output: any;
|
|
72
|
+
};
|
|
73
|
+
AWSTimestamp: {
|
|
74
|
+
input: any;
|
|
75
|
+
output: any;
|
|
76
|
+
};
|
|
77
|
+
AWSURL: {
|
|
78
|
+
input: any;
|
|
79
|
+
output: any;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export type ApiResult = {
|
|
83
|
+
__typename?: 'ApiResult';
|
|
84
|
+
success: Scalars['Boolean']['output'];
|
|
31
85
|
};
|
|
32
86
|
export type Deregister = {
|
|
33
87
|
__typename?: 'Deregister';
|
|
34
|
-
success: Scalars['Boolean'];
|
|
88
|
+
success: Scalars['Boolean']['output'];
|
|
35
89
|
};
|
|
36
90
|
export type FederatedId = {
|
|
37
91
|
__typename?: 'FederatedId';
|
|
38
|
-
identityId: Scalars['String'];
|
|
92
|
+
identityId: Scalars['String']['output'];
|
|
39
93
|
};
|
|
40
94
|
export type GlobalSignOut = {
|
|
41
95
|
__typename?: 'GlobalSignOut';
|
|
42
|
-
success: Scalars['Boolean'];
|
|
96
|
+
success: Scalars['Boolean']['output'];
|
|
43
97
|
};
|
|
44
98
|
export type Mutation = {
|
|
45
99
|
__typename?: 'Mutation';
|
|
46
100
|
deregister?: Maybe<Deregister>;
|
|
47
101
|
globalSignOut?: Maybe<GlobalSignOut>;
|
|
48
102
|
registerFederatedId?: Maybe<FederatedId>;
|
|
103
|
+
reset?: Maybe<ApiResult>;
|
|
49
104
|
};
|
|
50
105
|
export type MutationRegisterFederatedIdArgs = {
|
|
51
106
|
input?: InputMaybe<RegisterFederatedIdInput>;
|
|
52
107
|
};
|
|
53
108
|
export type Query = {
|
|
54
109
|
__typename?: 'Query';
|
|
55
|
-
notImplemented?: Maybe<Scalars['Boolean']>;
|
|
110
|
+
notImplemented?: Maybe<Scalars['Boolean']['output']>;
|
|
56
111
|
};
|
|
57
112
|
export type QueryNotImplementedArgs = {
|
|
58
|
-
dummy: Scalars['String'];
|
|
113
|
+
dummy: Scalars['String']['input'];
|
|
59
114
|
};
|
|
60
115
|
export type RegisterFederatedIdInput = {
|
|
61
|
-
idToken: Scalars['String'];
|
|
116
|
+
idToken: Scalars['String']['input'];
|
|
62
117
|
};
|
|
63
118
|
export type DeregisterMutationVariables = Exact<{
|
|
64
119
|
[key: string]: never;
|
|
@@ -90,6 +145,16 @@ export type RegisterFederatedIdMutation = {
|
|
|
90
145
|
identityId: string;
|
|
91
146
|
} | undefined;
|
|
92
147
|
};
|
|
148
|
+
export type ResetMutationVariables = Exact<{
|
|
149
|
+
[key: string]: never;
|
|
150
|
+
}>;
|
|
151
|
+
export type ResetMutation = {
|
|
152
|
+
__typename?: 'Mutation';
|
|
153
|
+
reset?: {
|
|
154
|
+
__typename?: 'ApiResult';
|
|
155
|
+
success: boolean;
|
|
156
|
+
} | undefined;
|
|
157
|
+
};
|
|
93
158
|
export declare const DeregisterDocument: DocumentNode<DeregisterMutation, Exact<{
|
|
94
159
|
[key: string]: never;
|
|
95
160
|
}>>;
|
|
@@ -99,3 +164,6 @@ export declare const GlobalSignOutDocument: DocumentNode<GlobalSignOutMutation,
|
|
|
99
164
|
export declare const RegisterFederatedIdDocument: DocumentNode<RegisterFederatedIdMutation, Exact<{
|
|
100
165
|
input: RegisterFederatedIdInput;
|
|
101
166
|
}>>;
|
|
167
|
+
export declare const ResetDocument: DocumentNode<ResetMutation, Exact<{
|
|
168
|
+
[key: string]: never;
|
|
169
|
+
}>>;
|
|
@@ -161,6 +161,11 @@ export interface SudoUserClient {
|
|
|
161
161
|
* Resets internal state and clears any cached data.
|
|
162
162
|
*/
|
|
163
163
|
reset(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Removes all data owned by the signed-in user in Sudo Platform Services
|
|
166
|
+
* without deregistering the user
|
|
167
|
+
*/
|
|
168
|
+
resetUserData(): Promise<void>;
|
|
164
169
|
/**
|
|
165
170
|
* De-registers the user associated with this client. The user must
|
|
166
171
|
* be signed in.
|
|
@@ -52,6 +52,7 @@ export declare class DefaultSudoUserClient implements SudoUserClient {
|
|
|
52
52
|
clearAuthenticationTokens(): Promise<void>;
|
|
53
53
|
presentSignOutUI(): void;
|
|
54
54
|
reset(): void;
|
|
55
|
+
resetUserData(): Promise<void>;
|
|
55
56
|
private getTokenClaim;
|
|
56
57
|
/**
|
|
57
58
|
* Store the authentication tokens and user id of the signed in user. This function
|