@arv-bedrock/auth-sso 0.4.2 → 1.0.0-dev.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/README.md +1 -1
- package/dist/cjs/auth.js +124 -11
- package/dist/cjs/index.js +41 -1
- package/dist/cjs/types/auth.d.ts +63 -6
- package/dist/cjs/types/auth.d.ts.map +1 -1
- package/dist/cjs/types/index.d.ts +46 -6
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/utils/_fetch.d.ts.map +1 -1
- package/dist/cjs/types/utils/types.d.ts +132 -6
- package/dist/cjs/types/utils/types.d.ts.map +1 -1
- package/dist/cjs/utils/_fetch.js +5 -2
- package/dist/cjs/utils/types.js +37 -0
- package/dist/esm/auth.js +124 -11
- package/dist/esm/index.mjs +35 -0
- package/dist/esm/types/auth.d.ts +63 -6
- package/dist/esm/types/auth.d.ts.map +1 -1
- package/dist/esm/types/index.d.ts +46 -6
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/utils/_fetch.d.ts.map +1 -1
- package/dist/esm/types/utils/types.d.ts +132 -6
- package/dist/esm/types/utils/types.d.ts.map +1 -1
- package/dist/esm/utils/_fetch.js +6 -3
- package/dist/esm/utils/types.js +36 -1
- package/package.json +32 -8
package/dist/cjs/utils/types.js
CHANGED
|
@@ -1,2 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteLogUserImportResultReasonEnum = exports.UpdateLogUserImportUserReasonEnum = exports.CreateLogUserImportUserReasonEnum = void 0;
|
|
4
|
+
var CreateLogUserImportUserReasonEnum;
|
|
5
|
+
(function (CreateLogUserImportUserReasonEnum) {
|
|
6
|
+
CreateLogUserImportUserReasonEnum["DUPLICATE_EMAIL"] = "DUPLICATE_EMAIL";
|
|
7
|
+
CreateLogUserImportUserReasonEnum["DUPLICATE_PHONE_NUMBER"] = "DUPLICATE_PHONE_NUMBER";
|
|
8
|
+
CreateLogUserImportUserReasonEnum["EXISTS_EMAIL"] = "EXISTS_EMAIL";
|
|
9
|
+
CreateLogUserImportUserReasonEnum["EXISTS_PHONE_NUMBER"] = "EXISTS_PHONE_NUMBER";
|
|
10
|
+
CreateLogUserImportUserReasonEnum["PENDING_REGISTER"] = "PENDING_REGISTER";
|
|
11
|
+
CreateLogUserImportUserReasonEnum["LEGACY_EMAIL"] = "LEGACY_EMAIL";
|
|
12
|
+
CreateLogUserImportUserReasonEnum["LEGACY_PHONE_NUMBER"] = "LEGACY_PHONE_NUMBER";
|
|
13
|
+
CreateLogUserImportUserReasonEnum["MISSING_EMAIL"] = "MISSING_EMAIL";
|
|
14
|
+
CreateLogUserImportUserReasonEnum["INVALID_EMAIL"] = "INVALID_EMAIL";
|
|
15
|
+
CreateLogUserImportUserReasonEnum["INVALID_PHONE_NUMBER"] = "INVALID_PHONE_NUMBER";
|
|
16
|
+
CreateLogUserImportUserReasonEnum["INVALID_TITLE"] = "INVALID_TITLE";
|
|
17
|
+
CreateLogUserImportUserReasonEnum["INVALID_FIRST_NAME"] = "INVALID_FIRST_NAME";
|
|
18
|
+
CreateLogUserImportUserReasonEnum["INVALID_LAST_NAME"] = "INVALID_LAST_NAME";
|
|
19
|
+
CreateLogUserImportUserReasonEnum["PENDING_INVITE"] = "PENDING_INVITE";
|
|
20
|
+
})(CreateLogUserImportUserReasonEnum = exports.CreateLogUserImportUserReasonEnum || (exports.CreateLogUserImportUserReasonEnum = {}));
|
|
21
|
+
var UpdateLogUserImportUserReasonEnum;
|
|
22
|
+
(function (UpdateLogUserImportUserReasonEnum) {
|
|
23
|
+
UpdateLogUserImportUserReasonEnum["INVALID_EMAIL"] = "INVALID_EMAIL";
|
|
24
|
+
UpdateLogUserImportUserReasonEnum["EXISTS_EMAIL"] = "EXISTS_EMAIL";
|
|
25
|
+
UpdateLogUserImportUserReasonEnum["EXISTS_PHONE_NUMBER"] = "EXISTS_PHONE_NUMBER";
|
|
26
|
+
UpdateLogUserImportUserReasonEnum["PENDING_REGISTER"] = "PENDING_REGISTER";
|
|
27
|
+
UpdateLogUserImportUserReasonEnum["LEGACY_EMAIL"] = "LEGACY_EMAIL";
|
|
28
|
+
UpdateLogUserImportUserReasonEnum["LEGACY_PHONE_NUMBER"] = "LEGACY_PHONE_NUMBER";
|
|
29
|
+
UpdateLogUserImportUserReasonEnum["NOT_FOUND"] = "NOT_FOUND";
|
|
30
|
+
UpdateLogUserImportUserReasonEnum["INVALID_PHONE_NUMBER"] = "INVALID_PHONE_NUMBER";
|
|
31
|
+
UpdateLogUserImportUserReasonEnum["INVALID_TITLE"] = "INVALID_TITLE";
|
|
32
|
+
UpdateLogUserImportUserReasonEnum["INVALID_FIRST_NAME"] = "INVALID_FIRST_NAME";
|
|
33
|
+
UpdateLogUserImportUserReasonEnum["INVALID_LAST_NAME"] = "INVALID_LAST_NAME";
|
|
34
|
+
UpdateLogUserImportUserReasonEnum["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
35
|
+
})(UpdateLogUserImportUserReasonEnum = exports.UpdateLogUserImportUserReasonEnum || (exports.UpdateLogUserImportUserReasonEnum = {}));
|
|
36
|
+
var DeleteLogUserImportResultReasonEnum;
|
|
37
|
+
(function (DeleteLogUserImportResultReasonEnum) {
|
|
38
|
+
DeleteLogUserImportResultReasonEnum["NOT_FOUND"] = "NOT_FOUND";
|
|
39
|
+
})(DeleteLogUserImportResultReasonEnum = exports.DeleteLogUserImportResultReasonEnum || (exports.DeleteLogUserImportResultReasonEnum = {}));
|
package/dist/esm/auth.js
CHANGED
|
@@ -181,6 +181,10 @@ class Auth {
|
|
|
181
181
|
method: "POST",
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Retrieves the current user’s profile (Since v1.0.0 expired sessions will no longer automatically refresh)
|
|
186
|
+
* @returns A promise resolving to a response containing the user's profile information.
|
|
187
|
+
*/
|
|
184
188
|
async getProfile() {
|
|
185
189
|
try {
|
|
186
190
|
const secretParam = `&${CLIENT_SECRET}=${this.clientSecret}`;
|
|
@@ -194,7 +198,7 @@ class Auth {
|
|
|
194
198
|
});
|
|
195
199
|
return profile;
|
|
196
200
|
}
|
|
197
|
-
profile = await customFetch(`${this.authHost}/api/
|
|
201
|
+
profile = await customFetch(`${this.authHost}/api/v2/ums/profile?${this.queryString}${secretParam}`);
|
|
198
202
|
return profile;
|
|
199
203
|
}
|
|
200
204
|
catch (error) {
|
|
@@ -207,6 +211,10 @@ class Auth {
|
|
|
207
211
|
}
|
|
208
212
|
window.location.assign(`${this.clientInit.portalHomeUrl}?client_id=${this.clientId}&user_type=${this.userType}`);
|
|
209
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Verify the current session and return expiration unix epoch time if still valid (Since v1.0.0 expired sessions will no longer automatically refresh)
|
|
216
|
+
* @returns A promise resolving to a response indicating the verification status.
|
|
217
|
+
*/
|
|
210
218
|
verifyToken() {
|
|
211
219
|
if (this.isCitizen()) {
|
|
212
220
|
return customFetch(`${this.authHost}/api/v1/auth/verifyToken?${this.queryString}`, {
|
|
@@ -216,14 +224,41 @@ class Auth {
|
|
|
216
224
|
},
|
|
217
225
|
});
|
|
218
226
|
}
|
|
219
|
-
return customFetch(`${this.authHost}/api/
|
|
227
|
+
return customFetch(`${this.authHost}/api/v2/oauth/verifyToken?${this.queryString}`, {
|
|
220
228
|
method: "POST",
|
|
221
229
|
});
|
|
222
230
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
231
|
+
/**
|
|
232
|
+
* Request Inviting
|
|
233
|
+
* @deprecated since version 1.3.0
|
|
234
|
+
* @param email email
|
|
235
|
+
* @param duration duration in hours
|
|
236
|
+
* @returns result
|
|
237
|
+
*/
|
|
238
|
+
requestInviting(email, duration) {
|
|
239
|
+
return this.inviteUser({ email }, duration);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Invite User
|
|
243
|
+
* @description Invite new user and generate code for registration
|
|
244
|
+
* @param body UserImportType
|
|
245
|
+
* @param duration duration in hours
|
|
246
|
+
* @returns InviteUserResponseType
|
|
247
|
+
*/
|
|
248
|
+
inviteUser(body, duration) {
|
|
249
|
+
let queryParam = `${this.queryString}`;
|
|
250
|
+
if (typeof duration === "number")
|
|
251
|
+
queryParam = `${queryParam}&duration=${duration}`;
|
|
252
|
+
if (this.isCitizen())
|
|
253
|
+
throw new Error("Citizen inviteUser() is not support");
|
|
254
|
+
return customFetch(`${this.authHost}/api/v2/register/invite?${queryParam}`, {
|
|
255
|
+
method: "POST",
|
|
256
|
+
retryCount: 1,
|
|
257
|
+
timeout: -1,
|
|
258
|
+
body: JSON.stringify(body),
|
|
259
|
+
headers: {
|
|
260
|
+
"x-client-id": this.clientId,
|
|
261
|
+
},
|
|
227
262
|
});
|
|
228
263
|
}
|
|
229
264
|
updateProfile(body) {
|
|
@@ -248,11 +283,18 @@ class Auth {
|
|
|
248
283
|
body: JSON.stringify({ ...body }),
|
|
249
284
|
});
|
|
250
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Refresh the current session and returns and set new sets of token
|
|
288
|
+
* @returns A promise resolving to a response data containing the refresh token response for citizens,
|
|
289
|
+
* or an empty response data for non-citizens.
|
|
290
|
+
*/
|
|
251
291
|
refreshToken() {
|
|
292
|
+
const query = `${this.queryString}`;
|
|
252
293
|
if (!this.isCitizen()) {
|
|
253
|
-
|
|
294
|
+
return customFetch(`${this.authHost}/api/v2/oauth/refreshToken?${query}`, {
|
|
295
|
+
method: "POST",
|
|
296
|
+
});
|
|
254
297
|
}
|
|
255
|
-
const query = `${this.queryString}`;
|
|
256
298
|
return customFetch(`${this.authHost}/api/v1/auth/refreshToken?${query}`, {
|
|
257
299
|
method: "POST",
|
|
258
300
|
headers: {
|
|
@@ -261,9 +303,6 @@ class Auth {
|
|
|
261
303
|
});
|
|
262
304
|
}
|
|
263
305
|
doManageAccount(redirectUrl) {
|
|
264
|
-
if (this.isCitizen()) {
|
|
265
|
-
throw new Error("support officer only");
|
|
266
|
-
}
|
|
267
306
|
const url = new URL(window.location.origin).toString();
|
|
268
307
|
const query = `${this.queryString}&redirectUri=${redirectUrl ? redirectUrl : url}`;
|
|
269
308
|
window.location.assign(`${this.authHost}/auth/manage-account?${query}`);
|
|
@@ -313,6 +352,80 @@ class Auth {
|
|
|
313
352
|
},
|
|
314
353
|
});
|
|
315
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* Disable User
|
|
357
|
+
* @returns result
|
|
358
|
+
*/
|
|
359
|
+
disableUser() {
|
|
360
|
+
if (this.isCitizen())
|
|
361
|
+
throw new Error("Citizen disableUser() is not support");
|
|
362
|
+
return customFetch(`${this.authHost}/api/v2/ums/disableUser?${this.queryString}`, {
|
|
363
|
+
method: "POST",
|
|
364
|
+
retryCount: 1,
|
|
365
|
+
timeout: -1,
|
|
366
|
+
headers: {
|
|
367
|
+
"x-client-id": this.clientId,
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Get Consents
|
|
373
|
+
* @params filters
|
|
374
|
+
* @returns ResponseData<GetConsentsResponseType[]>
|
|
375
|
+
*/
|
|
376
|
+
getConsents(filters) {
|
|
377
|
+
if (this.isCitizen()) {
|
|
378
|
+
const { isActive, status } = filters;
|
|
379
|
+
const usedFilter = {};
|
|
380
|
+
if (isActive !== undefined)
|
|
381
|
+
usedFilter.isActive = `${isActive}`;
|
|
382
|
+
if (status !== undefined)
|
|
383
|
+
usedFilter.status = status;
|
|
384
|
+
const queryParams = new URLSearchParams(usedFilter).toString();
|
|
385
|
+
const queryParamsString = queryParams ? `?${queryParams}` : "";
|
|
386
|
+
return customFetch(`${this.authHost}/api/v1/users/consents${queryParamsString}`, {
|
|
387
|
+
method: "GET",
|
|
388
|
+
headers: {
|
|
389
|
+
"x-client-id": this.clientId,
|
|
390
|
+
},
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
throw new Error("Officer getConsents() is not support");
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get Consent
|
|
397
|
+
* @param consentId consentId
|
|
398
|
+
* @returns ResponseData<GetConsentResponseType>
|
|
399
|
+
*/
|
|
400
|
+
getConsent(consentId) {
|
|
401
|
+
if (this.isCitizen()) {
|
|
402
|
+
return customFetch(`${this.authHost}/api/v1/consents/${consentId}`, {
|
|
403
|
+
method: "GET",
|
|
404
|
+
headers: {
|
|
405
|
+
"x-client-id": this.clientId,
|
|
406
|
+
},
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
throw new Error("Officer getConsent() is not support");
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Update Consent
|
|
413
|
+
* @param consentId consentId
|
|
414
|
+
* @param detail detail data
|
|
415
|
+
* @returns ResponseData<UpdateConsentResponseType>
|
|
416
|
+
*/
|
|
417
|
+
updateConsent(consentId, detail) {
|
|
418
|
+
if (this.isCitizen()) {
|
|
419
|
+
return customFetch(`${this.authHost}/api/v1/users/consents/${consentId}`, {
|
|
420
|
+
method: "PATCH",
|
|
421
|
+
body: JSON.stringify(detail),
|
|
422
|
+
headers: {
|
|
423
|
+
"x-client-id": this.clientId,
|
|
424
|
+
},
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
throw new Error("Officer updateConsent() is not support");
|
|
428
|
+
}
|
|
316
429
|
}
|
|
317
430
|
const bedRockAuth = new Auth();
|
|
318
431
|
export default bedRockAuth;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -30,7 +30,22 @@ export const getCode = () => BR.getCode();
|
|
|
30
30
|
export const doPortal = () => BR.doPortal();
|
|
31
31
|
export const getRedirectUri = () => BR.getRedirectUri();
|
|
32
32
|
export const verifyToken = () => BR.verifyToken();
|
|
33
|
+
/**
|
|
34
|
+
* Request Inviting
|
|
35
|
+
* @deprecated since version 1.3.0
|
|
36
|
+
* @param email email
|
|
37
|
+
* @param duration duration in hours
|
|
38
|
+
* @returns result
|
|
39
|
+
*/
|
|
33
40
|
export const requestInviting = (email, duration) => BR.requestInviting(email, duration);
|
|
41
|
+
/**
|
|
42
|
+
* InviteUser
|
|
43
|
+
* @description Invite new user and generate code for registration
|
|
44
|
+
* @param data UserImportType
|
|
45
|
+
* @param duration duration in hours
|
|
46
|
+
* @returns InviteUserResponseType
|
|
47
|
+
*/
|
|
48
|
+
export const inviteUser = (data, duration) => BR.inviteUser(data, duration);
|
|
34
49
|
export const disabledAccount = (body) => BR.disabledAccount(body);
|
|
35
50
|
export const updateProfile = (body) => BR.updateProfile(body);
|
|
36
51
|
export const refreshToken = () => BR.refreshToken();
|
|
@@ -54,3 +69,23 @@ export const updateImportUsers = (body) => BR.updateImportUsers(body);
|
|
|
54
69
|
* @param {string[]} body - List of user emails to delete.
|
|
55
70
|
*/
|
|
56
71
|
export const deleteImportUsers = (body) => BR.deleteImportUsers(body);
|
|
72
|
+
/**
|
|
73
|
+
* Disable User
|
|
74
|
+
*/
|
|
75
|
+
export const disableUser = () => BR.disableUser();
|
|
76
|
+
/**
|
|
77
|
+
* Get Consents
|
|
78
|
+
* @params filters
|
|
79
|
+
*/
|
|
80
|
+
export const getConsents = (filters) => BR.getConsents(filters);
|
|
81
|
+
/**
|
|
82
|
+
* Get Consent by ID
|
|
83
|
+
* @param consentId consentId
|
|
84
|
+
*/
|
|
85
|
+
export const getConsent = (consentId) => BR.getConsent(consentId);
|
|
86
|
+
/**
|
|
87
|
+
* Update Consent
|
|
88
|
+
* @param consentId consentId
|
|
89
|
+
* @param detail detail data
|
|
90
|
+
*/
|
|
91
|
+
export const updateConsent = (consentId, detail) => BR.updateConsent(consentId, detail);
|
package/dist/esm/types/auth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthServiceResponse, ClientInfo, ClientInit, DisabledAccount,
|
|
1
|
+
import { AuthServiceResponse, ClientInfo, ClientInit, DeleteImportUserResponseType, DisabledAccount, GetConsentResponseType, GetConsentsResponseType, ImportUserResponseType, ImportUserType, InviteUserResponseType, Options, RefreshTokenResponse, ResponseData, UpdateConsentResponseType, UpdateImportUserResponseType, UpdateProfile, UserConsentStatusType, UserImportType } from "./utils/types";
|
|
2
2
|
declare class Auth {
|
|
3
3
|
private userType;
|
|
4
4
|
private authHost;
|
|
@@ -24,17 +24,74 @@ declare class Auth {
|
|
|
24
24
|
private getClientInit;
|
|
25
25
|
clearCookie(): Promise<void>;
|
|
26
26
|
signOutCitizen(): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the current user’s profile (Since v1.0.0 expired sessions will no longer automatically refresh)
|
|
29
|
+
* @returns A promise resolving to a response containing the user's profile information.
|
|
30
|
+
*/
|
|
27
31
|
getProfile(): Promise<ResponseData<AuthServiceResponse> | undefined>;
|
|
28
32
|
doPortal(): Promise<void> | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Verify the current session and return expiration unix epoch time if still valid (Since v1.0.0 expired sessions will no longer automatically refresh)
|
|
35
|
+
* @returns A promise resolving to a response indicating the verification status.
|
|
36
|
+
*/
|
|
29
37
|
verifyToken(): Promise<ResponseData<[]>>;
|
|
30
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Request Inviting
|
|
40
|
+
* @deprecated since version 1.3.0
|
|
41
|
+
* @param email email
|
|
42
|
+
* @param duration duration in hours
|
|
43
|
+
* @returns result
|
|
44
|
+
*/
|
|
45
|
+
requestInviting(email: string, duration?: number): Promise<ResponseData<InviteUserResponseType>>;
|
|
46
|
+
/**
|
|
47
|
+
* Invite User
|
|
48
|
+
* @description Invite new user and generate code for registration
|
|
49
|
+
* @param body UserImportType
|
|
50
|
+
* @param duration duration in hours
|
|
51
|
+
* @returns InviteUserResponseType
|
|
52
|
+
*/
|
|
53
|
+
inviteUser(body: UserImportType, duration?: number): Promise<ResponseData<InviteUserResponseType>>;
|
|
31
54
|
updateProfile(body: UpdateProfile): Promise<ResponseData<[]>>;
|
|
32
55
|
disabledAccount(body: DisabledAccount): Promise<ResponseData<[]>>;
|
|
33
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Refresh the current session and returns and set new sets of token
|
|
58
|
+
* @returns A promise resolving to a response data containing the refresh token response for citizens,
|
|
59
|
+
* or an empty response data for non-citizens.
|
|
60
|
+
*/
|
|
61
|
+
refreshToken(): Promise<ResponseData<[]>> | Promise<ResponseData<RefreshTokenResponse>>;
|
|
34
62
|
doManageAccount(redirectUrl?: string): void;
|
|
35
|
-
importUsers(users: ImportUserType[], duration?: number): Promise<ResponseData<
|
|
36
|
-
updateImportUsers(users: ImportUserType[]): Promise<ResponseData<
|
|
37
|
-
deleteImportUsers(emails: string[]): Promise<ResponseData<
|
|
63
|
+
importUsers(users: ImportUserType[], duration?: number): Promise<ResponseData<ImportUserResponseType>>;
|
|
64
|
+
updateImportUsers(users: ImportUserType[]): Promise<ResponseData<UpdateImportUserResponseType>>;
|
|
65
|
+
deleteImportUsers(emails: string[]): Promise<ResponseData<DeleteImportUserResponseType>>;
|
|
66
|
+
/**
|
|
67
|
+
* Disable User
|
|
68
|
+
* @returns result
|
|
69
|
+
*/
|
|
70
|
+
disableUser(): Promise<ResponseData<undefined>>;
|
|
71
|
+
/**
|
|
72
|
+
* Get Consents
|
|
73
|
+
* @params filters
|
|
74
|
+
* @returns ResponseData<GetConsentsResponseType[]>
|
|
75
|
+
*/
|
|
76
|
+
getConsents(filters: {
|
|
77
|
+
isActive?: boolean;
|
|
78
|
+
status?: UserConsentStatusType;
|
|
79
|
+
}): Promise<ResponseData<GetConsentsResponseType[]>>;
|
|
80
|
+
/**
|
|
81
|
+
* Get Consent
|
|
82
|
+
* @param consentId consentId
|
|
83
|
+
* @returns ResponseData<GetConsentResponseType>
|
|
84
|
+
*/
|
|
85
|
+
getConsent(consentId: string): Promise<ResponseData<GetConsentResponseType>>;
|
|
86
|
+
/**
|
|
87
|
+
* Update Consent
|
|
88
|
+
* @param consentId consentId
|
|
89
|
+
* @param detail detail data
|
|
90
|
+
* @returns ResponseData<UpdateConsentResponseType>
|
|
91
|
+
*/
|
|
92
|
+
updateConsent(consentId: string, detail: {
|
|
93
|
+
status: Omit<UserConsentStatusType, "pending">;
|
|
94
|
+
}): Promise<ResponseData<UpdateConsentResponseType>>;
|
|
38
95
|
}
|
|
39
96
|
declare const bedRockAuth: Auth;
|
|
40
97
|
export default bedRockAuth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../auth.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,UAAU,EAEV,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../auth.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,UAAU,EAEV,4BAA4B,EAC5B,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EAEtB,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,qBAAqB,EACrB,cAAc,EAEf,MAAM,eAAe,CAAC;AAEvB,cAAM,IAAI;IACR,OAAO,CAAC,QAAQ,CAAW;IAE3B,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAa;;IAqB/B,SAAS;IAIF,OAAO;IAKP,cAAc;IAKrB,OAAO,CAAC,cAAc;IAUf,OAAO,CAAC,WAAW,GAAE,MAA6B;IAalD,QAAQ,iBAAwB,MAAM,mBAkB3C;IAEK,UAAU,CAAC,WAAW,GAAE,MAA6B;IAc5D,OAAO,CAAC,gBAAgB;IAQX,IAAI,CAAC,OAAO,EAAE,OAAO;IAkBrB,SAAS,CAAC,IAAI,EAAE,MAAM;YAuBrB,oBAAoB;IAgBlC,OAAO,CAAC,QAAQ;IAIH,aAAa;YAWZ,aAAa;IAqBd,WAAW;IAYX,cAAc;IAY3B;;;OAGG;IACU,UAAU;IA2BhB,QAAQ;IASf;;;OAGG;IACI,WAAW;IAqBlB;;;;;;OAMG;IACI,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAIvD;;;;;;OAMG;IACI,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,MAAM;IAuBlD,aAAa,CAAC,IAAI,EAAE,aAAa;IAqBjC,eAAe,CAAC,IAAI,EAAE,eAAe;IAY5C;;;;OAIG;IACI,YAAY;IAsBZ,eAAe,CAAC,WAAW,CAAC,EAAE,MAAM;IASpC,WAAW,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM;IAuBtD,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE;IAmBzC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE;IAmBzC;;;OAGG;IACI,WAAW;IAiBlB;;;;OAIG;IACI,WAAW,CAAC,OAAO,EAAE;QAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;KAChC;IA4BD;;;;OAIG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM;IAgBnC;;;;;OAKG;IACI,aAAa,CAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE;QAAE,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAA;KAAE;CAiB7D;AAED,QAAA,MAAM,WAAW,MAAa,CAAC;AAE/B,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisabledAccount, ImportUserType, UpdateProfile, UserType } from "./utils/types";
|
|
1
|
+
import { DisabledAccount, ImportUserType, UpdateProfile, UserConsentStatusType, UserImportType, UserType } from "./utils/types";
|
|
2
2
|
export type AuthProps = {
|
|
3
3
|
userType?: UserType;
|
|
4
4
|
authUri: string;
|
|
@@ -22,10 +22,25 @@ export declare const getCode: () => string;
|
|
|
22
22
|
export declare const doPortal: () => Promise<void> | undefined;
|
|
23
23
|
export declare const getRedirectUri: () => string;
|
|
24
24
|
export declare const verifyToken: () => Promise<import("./utils/types").ResponseData<[]>>;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Request Inviting
|
|
27
|
+
* @deprecated since version 1.3.0
|
|
28
|
+
* @param email email
|
|
29
|
+
* @param duration duration in hours
|
|
30
|
+
* @returns result
|
|
31
|
+
*/
|
|
32
|
+
export declare const requestInviting: (email: string, duration?: number) => Promise<import("./utils/types").ResponseData<import("./utils/types").InviteUserResponseType>>;
|
|
33
|
+
/**
|
|
34
|
+
* InviteUser
|
|
35
|
+
* @description Invite new user and generate code for registration
|
|
36
|
+
* @param data UserImportType
|
|
37
|
+
* @param duration duration in hours
|
|
38
|
+
* @returns InviteUserResponseType
|
|
39
|
+
*/
|
|
40
|
+
export declare const inviteUser: (data: UserImportType, duration?: number) => Promise<import("./utils/types").ResponseData<import("./utils/types").InviteUserResponseType>>;
|
|
26
41
|
export declare const disabledAccount: (body: DisabledAccount) => Promise<import("./utils/types").ResponseData<[]>>;
|
|
27
42
|
export declare const updateProfile: (body: UpdateProfile) => Promise<import("./utils/types").ResponseData<[]>>;
|
|
28
|
-
export declare const refreshToken: () => Promise<import("./utils/types").ResponseData<import("./utils/types").RefreshTokenResponse>>;
|
|
43
|
+
export declare const refreshToken: () => Promise<import("./utils/types").ResponseData<[]>> | Promise<import("./utils/types").ResponseData<import("./utils/types").RefreshTokenResponse>>;
|
|
29
44
|
export declare const doManageAccount: (redirectUrl?: string) => void;
|
|
30
45
|
/**
|
|
31
46
|
* Imports users for preregistration.
|
|
@@ -33,17 +48,42 @@ export declare const doManageAccount: (redirectUrl?: string) => void;
|
|
|
33
48
|
* @param {ImportUserType[]} body - List of users to import
|
|
34
49
|
* @param {number} [duration] - duration (Optional)
|
|
35
50
|
*/
|
|
36
|
-
export declare const importUsers: (body: ImportUserType[], duration?: number) => Promise<import("./utils/types").ResponseData<import("./utils/types").
|
|
51
|
+
export declare const importUsers: (body: ImportUserType[], duration?: number) => Promise<import("./utils/types").ResponseData<import("./utils/types").ImportUserResponseType>>;
|
|
37
52
|
/**
|
|
38
53
|
* Update the previously existing and unexpired imported records via email.
|
|
39
54
|
*
|
|
40
55
|
* @param {ImportUserType[]} body - List of users with updated information.
|
|
41
56
|
*/
|
|
42
|
-
export declare const updateImportUsers: (body: ImportUserType[]) => Promise<import("./utils/types").ResponseData<import("./utils/types").
|
|
57
|
+
export declare const updateImportUsers: (body: ImportUserType[]) => Promise<import("./utils/types").ResponseData<import("./utils/types").UpdateImportUserResponseType>>;
|
|
43
58
|
/**
|
|
44
59
|
* Delete the previously existing and unexpired imported records via email.
|
|
45
60
|
*
|
|
46
61
|
* @param {string[]} body - List of user emails to delete.
|
|
47
62
|
*/
|
|
48
|
-
export declare const deleteImportUsers: (body: string[]) => Promise<import("./utils/types").ResponseData<import("./utils/types").
|
|
63
|
+
export declare const deleteImportUsers: (body: string[]) => Promise<import("./utils/types").ResponseData<import("./utils/types").DeleteImportUserResponseType>>;
|
|
64
|
+
/**
|
|
65
|
+
* Disable User
|
|
66
|
+
*/
|
|
67
|
+
export declare const disableUser: () => Promise<import("./utils/types").ResponseData<undefined>>;
|
|
68
|
+
/**
|
|
69
|
+
* Get Consents
|
|
70
|
+
* @params filters
|
|
71
|
+
*/
|
|
72
|
+
export declare const getConsents: (filters: {
|
|
73
|
+
isActive?: boolean;
|
|
74
|
+
status?: UserConsentStatusType;
|
|
75
|
+
}) => Promise<import("./utils/types").ResponseData<import("./utils/types").GetConsentsResponseType[]>>;
|
|
76
|
+
/**
|
|
77
|
+
* Get Consent by ID
|
|
78
|
+
* @param consentId consentId
|
|
79
|
+
*/
|
|
80
|
+
export declare const getConsent: (consentId: string) => Promise<import("./utils/types").ResponseData<import("./utils/types").GetConsentResponseType>>;
|
|
81
|
+
/**
|
|
82
|
+
* Update Consent
|
|
83
|
+
* @param consentId consentId
|
|
84
|
+
* @param detail detail data
|
|
85
|
+
*/
|
|
86
|
+
export declare const updateConsent: (consentId: string, detail: {
|
|
87
|
+
status: Omit<UserConsentStatusType, "pending">;
|
|
88
|
+
}) => Promise<import("./utils/types").ResponseData<import("./utils/types").UpdateConsentResponseType>>;
|
|
49
89
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,EACb,QAAQ,EACT,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,eAAe,2EAOzB,SAAS,kBAmBX,CAAC;AAEF,eAAO,MAAM,OAAO,iBAAkB,MAAM,SAA4B,CAAC;AAEzE,eAAO,MAAM,QAAQ,iBAAkB,MAAM,kBAA6B,CAAC;AAE3E,eAAO,MAAM,UAAU,iBAAkB,MAAM,SAA+B,CAAC;AAE/E,eAAO,MAAM,SAAS,SAAU,MAAM,kBAAuB,CAAC;AAE9D,eAAO,MAAM,UAAU,8GAAwB,CAAC;AAEhD,eAAO,MAAM,WAAW,qBAAyB,CAAC;AAElD,eAAO,MAAM,OAAO,cAAqB,CAAC;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,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,QAIA;AAED,iBAAe,WAAW,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"_fetch.d.ts","sourceRoot":"","sources":["../../../../utils/_fetch.ts"],"names":[],"mappings":"AAUA,UAAU,kBAAmB,SAAQ,WAAW;IAC9C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,QAIA;AAED,iBAAe,WAAW,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,CAAC,CAAC,CAyEZ;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -25,6 +25,27 @@ export interface StatusResponse {
|
|
|
25
25
|
messageTH: string;
|
|
26
26
|
messageEN: string;
|
|
27
27
|
}
|
|
28
|
+
export type LocalGovUserOrganizationProductType = {
|
|
29
|
+
code: string | null;
|
|
30
|
+
name: string;
|
|
31
|
+
role: string | null;
|
|
32
|
+
licenseStart: string;
|
|
33
|
+
licenseExpired: string;
|
|
34
|
+
updatedAt: string | null;
|
|
35
|
+
};
|
|
36
|
+
export type LocalGovUserOrganizationType = {
|
|
37
|
+
code: string;
|
|
38
|
+
name: string;
|
|
39
|
+
role: string;
|
|
40
|
+
departmentCode: string | null;
|
|
41
|
+
departmentName: string | null;
|
|
42
|
+
positionCode: string | null;
|
|
43
|
+
positionName: string | null;
|
|
44
|
+
resignedAt: string | null;
|
|
45
|
+
status: string;
|
|
46
|
+
updatedAt: string | null;
|
|
47
|
+
products: LocalGovUserOrganizationProductType[];
|
|
48
|
+
};
|
|
28
49
|
export interface AuthServiceResponse {
|
|
29
50
|
id: string;
|
|
30
51
|
title: string;
|
|
@@ -34,6 +55,7 @@ export interface AuthServiceResponse {
|
|
|
34
55
|
picture: string | null;
|
|
35
56
|
status: UserStatus;
|
|
36
57
|
accounts: Accounts[];
|
|
58
|
+
organizations?: LocalGovUserOrganizationType[];
|
|
37
59
|
}
|
|
38
60
|
export interface Accounts {
|
|
39
61
|
account: string;
|
|
@@ -87,20 +109,124 @@ export interface ImportUserType {
|
|
|
87
109
|
lastName?: string;
|
|
88
110
|
phoneNumber?: string;
|
|
89
111
|
}
|
|
90
|
-
export
|
|
112
|
+
export declare enum CreateLogUserImportUserReasonEnum {
|
|
113
|
+
"DUPLICATE_EMAIL" = "DUPLICATE_EMAIL",
|
|
114
|
+
"DUPLICATE_PHONE_NUMBER" = "DUPLICATE_PHONE_NUMBER",
|
|
115
|
+
"EXISTS_EMAIL" = "EXISTS_EMAIL",
|
|
116
|
+
"EXISTS_PHONE_NUMBER" = "EXISTS_PHONE_NUMBER",
|
|
117
|
+
"PENDING_REGISTER" = "PENDING_REGISTER",
|
|
118
|
+
"LEGACY_EMAIL" = "LEGACY_EMAIL",
|
|
119
|
+
"LEGACY_PHONE_NUMBER" = "LEGACY_PHONE_NUMBER",
|
|
120
|
+
"MISSING_EMAIL" = "MISSING_EMAIL",
|
|
121
|
+
"INVALID_EMAIL" = "INVALID_EMAIL",
|
|
122
|
+
"INVALID_PHONE_NUMBER" = "INVALID_PHONE_NUMBER",
|
|
123
|
+
"INVALID_TITLE" = "INVALID_TITLE",
|
|
124
|
+
"INVALID_FIRST_NAME" = "INVALID_FIRST_NAME",
|
|
125
|
+
"INVALID_LAST_NAME" = "INVALID_LAST_NAME",
|
|
126
|
+
"PENDING_INVITE" = "PENDING_INVITE"
|
|
127
|
+
}
|
|
128
|
+
export type ImportUserResponseResultType = {
|
|
129
|
+
i: number;
|
|
130
|
+
userId?: string;
|
|
131
|
+
email: string;
|
|
132
|
+
code?: string;
|
|
133
|
+
success: boolean;
|
|
134
|
+
reasons: CreateLogUserImportUserReasonEnum[];
|
|
135
|
+
title?: string;
|
|
136
|
+
firstName?: string;
|
|
137
|
+
lastName?: string;
|
|
138
|
+
phoneNumber?: string;
|
|
139
|
+
expireAt?: string;
|
|
140
|
+
existing?: {
|
|
141
|
+
userId?: string;
|
|
142
|
+
email?: string;
|
|
143
|
+
title?: string;
|
|
144
|
+
firstName?: string;
|
|
145
|
+
lastName?: string;
|
|
146
|
+
phoneNumber?: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export type ImportUserResponseType = {
|
|
150
|
+
correlationId: string;
|
|
151
|
+
results: ImportUserResponseResultType[];
|
|
152
|
+
};
|
|
153
|
+
export declare enum UpdateLogUserImportUserReasonEnum {
|
|
154
|
+
"INVALID_EMAIL" = "INVALID_EMAIL",
|
|
155
|
+
"EXISTS_EMAIL" = "EXISTS_EMAIL",
|
|
156
|
+
"EXISTS_PHONE_NUMBER" = "EXISTS_PHONE_NUMBER",
|
|
157
|
+
"PENDING_REGISTER" = "PENDING_REGISTER",
|
|
158
|
+
"LEGACY_EMAIL" = "LEGACY_EMAIL",
|
|
159
|
+
"LEGACY_PHONE_NUMBER" = "LEGACY_PHONE_NUMBER",
|
|
160
|
+
"NOT_FOUND" = "NOT_FOUND",
|
|
161
|
+
"INVALID_PHONE_NUMBER" = "INVALID_PHONE_NUMBER",
|
|
162
|
+
"INVALID_TITLE" = "INVALID_TITLE",
|
|
163
|
+
"INVALID_FIRST_NAME" = "INVALID_FIRST_NAME",
|
|
164
|
+
"INVALID_LAST_NAME" = "INVALID_LAST_NAME",
|
|
165
|
+
"INTERNAL_ERROR" = "INTERNAL_ERROR"
|
|
166
|
+
}
|
|
167
|
+
export type UpdateImportUserResponseResultType = Omit<ImportUserResponseResultType, "reasons" | "email"> & {
|
|
168
|
+
email?: string;
|
|
169
|
+
reasons: UpdateLogUserImportUserReasonEnum[];
|
|
170
|
+
};
|
|
171
|
+
export type UpdateImportUserResponseType = {
|
|
91
172
|
correlationId: string;
|
|
92
|
-
results:
|
|
173
|
+
results: UpdateImportUserResponseResultType[];
|
|
174
|
+
};
|
|
175
|
+
export declare enum DeleteLogUserImportResultReasonEnum {
|
|
176
|
+
"NOT_FOUND" = "NOT_FOUND"
|
|
93
177
|
}
|
|
94
|
-
export
|
|
178
|
+
export type DeleteImportUserResponseResultType = {
|
|
95
179
|
i: number;
|
|
96
180
|
email: string;
|
|
181
|
+
reasons: DeleteLogUserImportResultReasonEnum[];
|
|
97
182
|
success: boolean;
|
|
98
|
-
|
|
99
|
-
|
|
183
|
+
};
|
|
184
|
+
export type DeleteImportUserResponseType = {
|
|
185
|
+
correlationId: string;
|
|
186
|
+
results: DeleteImportUserResponseResultType[];
|
|
187
|
+
};
|
|
188
|
+
export type UserImportType = {
|
|
100
189
|
title?: string;
|
|
101
190
|
firstName?: string;
|
|
102
191
|
lastName?: string;
|
|
192
|
+
email: string;
|
|
103
193
|
phoneNumber?: string;
|
|
194
|
+
};
|
|
195
|
+
export type InviteUserResponseType = {
|
|
196
|
+
correlationId: string;
|
|
197
|
+
code?: string;
|
|
198
|
+
userId?: string;
|
|
199
|
+
email?: string;
|
|
104
200
|
expireAt?: string;
|
|
105
|
-
}
|
|
201
|
+
};
|
|
202
|
+
export type UserConsentStatusType = "pending" | "approved" | "declined";
|
|
203
|
+
export type GetConsentsResponseType = {
|
|
204
|
+
id: number;
|
|
205
|
+
type: number;
|
|
206
|
+
name: string;
|
|
207
|
+
version: `${number}`;
|
|
208
|
+
isActive: boolean;
|
|
209
|
+
issuedAt: string;
|
|
210
|
+
status: UserConsentStatusType;
|
|
211
|
+
updatedAt: string | null;
|
|
212
|
+
};
|
|
213
|
+
export type GetConsentResponseType = {
|
|
214
|
+
id: number;
|
|
215
|
+
type: number;
|
|
216
|
+
name: string;
|
|
217
|
+
version: `${number}`;
|
|
218
|
+
content: string;
|
|
219
|
+
isActive: boolean;
|
|
220
|
+
issuedAt: string;
|
|
221
|
+
};
|
|
222
|
+
export type UpdateConsentResponseType = {
|
|
223
|
+
id: number;
|
|
224
|
+
type: number;
|
|
225
|
+
name: string;
|
|
226
|
+
version: `${number}`;
|
|
227
|
+
isActive: boolean;
|
|
228
|
+
issuedAt: string;
|
|
229
|
+
status: UserConsentStatusType;
|
|
230
|
+
updatedAt: string;
|
|
231
|
+
};
|
|
106
232
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEnE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7C,MAAM,WAAW,IAAI;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACn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