cidaas-javascript-sdk 4.3.3 → 5.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +40 -4
  2. package/README.md +156 -94
  3. package/dist/authentication-service/AuthenticationService.d.ts +140 -0
  4. package/dist/authentication-service/AuthenticationService.js +210 -0
  5. package/dist/{authentication/Authentication.model.d.ts → authentication-service/AuthenticationService.model.d.ts} +18 -12
  6. package/dist/{authentication/Authentication.model.js → authentication-service/AuthenticationService.model.js} +2 -2
  7. package/dist/common/Common.model.d.ts +15 -19
  8. package/dist/common/Common.model.js +17 -17
  9. package/dist/common/ConfigUserProvider.d.ts +10 -0
  10. package/dist/common/ConfigUserProvider.js +28 -0
  11. package/dist/common/Helper.d.ts +7 -0
  12. package/dist/common/Helper.js +19 -0
  13. package/dist/common/User.model.d.ts +0 -4
  14. package/dist/consent-service/ConsentService.d.ts +99 -95
  15. package/dist/consent-service/ConsentService.js +125 -122
  16. package/dist/consent-service/ConsentService.model.d.ts +14 -16
  17. package/dist/device-service/DeviceService.d.ts +49 -0
  18. package/dist/device-service/DeviceService.js +79 -0
  19. package/dist/device-service/DeviceService.model.d.ts +6 -0
  20. package/dist/id-validation-service/IdValidationService.d.ts +28 -0
  21. package/dist/id-validation-service/IdValidationService.js +59 -0
  22. package/dist/id-validation-service/IdValidationService.model.d.ts +8 -0
  23. package/dist/id-validation-service/IdValidationService.model.js +2 -0
  24. package/dist/index.d.ts +22 -3
  25. package/dist/index.js +35 -18
  26. package/dist/login-service/LoginService.d.ts +143 -141
  27. package/dist/login-service/LoginService.js +255 -232
  28. package/dist/login-service/LoginService.model.d.ts +9 -51
  29. package/dist/login-service/LoginService.model.js +1 -1
  30. package/dist/public-service/PublicService.d.ts +57 -0
  31. package/dist/public-service/PublicService.js +73 -0
  32. package/dist/public-service/PublicService.model.d.ts +20 -0
  33. package/dist/public-service/PublicService.model.js +2 -0
  34. package/dist/token-service/TokenService.d.ts +104 -138
  35. package/dist/token-service/TokenService.js +164 -219
  36. package/dist/token-service/TokenService.model.d.ts +3 -44
  37. package/dist/token-service/TokenService.model.js +3 -16
  38. package/dist/user-service/UserService.d.ts +381 -315
  39. package/dist/user-service/UserService.js +552 -426
  40. package/dist/user-service/UserService.model.d.ts +48 -14
  41. package/dist/user-service/UserService.model.js +4 -4
  42. package/dist/verification-service/VerificationService.d.ts +281 -223
  43. package/dist/verification-service/VerificationService.js +343 -287
  44. package/dist/verification-service/VerificationService.model.d.ts +4 -5
  45. package/package.json +6 -4
  46. package/dist/authentication/Authentication.d.ts +0 -139
  47. package/dist/authentication/Authentication.js +0 -186
  48. package/dist/web-auth/WebAuth.d.ts +0 -665
  49. package/dist/web-auth/WebAuth.js +0 -955
  50. package/dist/web-auth/webauth.model.d.ts +0 -66
  51. /package/dist/{web-auth/webauth.model.js → device-service/DeviceService.model.js} +0 -0
@@ -1,665 +0,0 @@
1
- import { GetAccessTokenRequest, RenewTokenRequest, TokenIntrospectionRequest } from '../token-service/TokenService.model';
2
- import { AcceptClaimConsentRequest, AcceptConsentRequest, AcceptScopeConsentRequest, GetConsentDetailsRequest, GetConsentVersionDetailsRequest, RevokeClaimConsentRequest } from '../consent-service/ConsentService.model';
3
- import { FirstTimeChangePasswordRequest, LoginAfterRegisterRequest, LoginWithCredentialsRequest, MfaContinueRequest, PasswordlessLoginRequest, ProgressiveRegistrationHeader, SocialProviderPathParameter, SocialProviderQueryParameter } from '../login-service/LoginService.model';
4
- import { LoginPrecheckRequest } from '../common/Common.model';
5
- import { CidaasUser } from '../common/User.model';
6
- import { ChangePasswordRequest, CompleteLinkAccountRequest, DeduplicationLoginRequest, DeleteUserAccountRequest, GetDeduplicationDetailsRequest, GetInviteUserDetailsRequest, GetUserProfileRequest, HandleResetPasswordRequest, InitiateLinkAccountRequest, InitiateResetPasswordRequest, RegisterDeduplicationRequest, RegisterRequest, ResetPasswordRequest, UserCheckExistsRequest, getCommunicationStatusRequest } from '../user-service/UserService.model';
7
- import { HTTPRequestHeader } from "../common/Common.model";
8
- import { User } from "oidc-client-ts";
9
- import { OidcSettings, LoginRedirectOptions, PopupSignInOptions, SilentSignInOptions, LogoutRedirectOptions, PopupSignOutOptions, LogoutResponse, LoginRequestOptions } from "../authentication/Authentication.model";
10
- import { AuthenticateMFARequest, CancelMFARequest, CheckVerificationTypeConfiguredRequest, ConfigureFriendlyNameRequest, ConfigureVerificationRequest, EnrollVerificationRequest, GetMFAListRequest, InitiateAccountVerificationRequest, InitiateEnrollmentRequest, InitiateMFARequest, InitiateVerificationRequest, VerifyAccountRequest } from "../verification-service/VerificationService.model";
11
- import { DeleteDeviceRequest, GetClientInfoRequest, GetRegistrationSetupRequest, GetUserActivitiesRequest, LogoutUserRequest, UpdateProfileImageRequest, UserActionOnEnrollmentRequest, GetRequestIdRequest } from "./webauth.model";
12
- export declare const createPreloginWebauth: (authority: string) => WebAuth;
13
- export declare class WebAuth {
14
- constructor(settings: OidcSettings);
15
- /**
16
- * Generate and redirect to authz url in same window for logging in.
17
- * @param {LoginRedirectOptions} options options options to over-ride the client config for redirect login
18
- */
19
- loginWithBrowser(options?: LoginRedirectOptions): Promise<void>;
20
- /**
21
- * Generate and open authz url in a popup window.
22
- * On successful sign in, authenticated user is returned.
23
- *
24
- * @param {PopupSignInOptions} options options to over-ride the client config for popup sign in
25
- * @returns {Promise<User>} Authenticated user
26
- * @throws error if unable to get the parse and get user
27
- */
28
- popupSignIn(options?: PopupSignInOptions): Promise<User>;
29
- /**
30
- * Generate and navigate to authz url in an iFrame.
31
- * On successful sign in, authenticated user is returned
32
- *
33
- * @param {SilentSignInOptions} options options to over-ride the client config for silent sign in
34
- * @returns {Promise<User>} Authenticated user
35
- * @throws error if unable to get the parse and get user
36
- */
37
- silentSignIn(options?: SilentSignInOptions): Promise<User>;
38
- /**
39
- * Generate and redirect to authz url in same window for register view.
40
- * @param {LoginRedirectOptions} options options options to over-ride the client config for redirect login
41
- */
42
- registerWithBrowser(options?: LoginRedirectOptions): Promise<void>;
43
- /**
44
- * Once login successful, it will automatically redirects you to the redirect url whatever you mentioned in the options.
45
- * To complete the login process, call **loginCallback()**. This will parses the access_token, id_token and whatever in hash in the redirect url.
46
- *
47
- * @param {string} url optional url from where to process the login state
48
- * @returns {Promise<User>} Authenticated user
49
- * @throws error if unable to get the parse and get user
50
- */
51
- loginCallback(url?: string): Promise<User>;
52
- /**
53
- * To complete the popup login process, call **popupSignInCallback()** from the popup login window.
54
- * Popup window will be closed after doing callback
55
- *
56
- * @param {string} url optional url to read sign-in callback state from
57
- * @param {boolean} keepOpen true to keep the popup open even after sign in, else false
58
- */
59
- popupSignInCallback(url?: string, keepOpen?: boolean): Promise<void>;
60
- /**
61
- * Returns a promise to notify the parent window of response from authz service
62
- * @param {string} url optional url to check authz response, if none window.location is used
63
- */
64
- silentSignInCallback(url?: string): Promise<void>;
65
- /**
66
- * To get the user profile information by using oidc-client-ts library, call **getUserInfo()**. This will return the basic user profile details along with groups, roles and whatever scopes you mentioned in the options.
67
- * @example
68
- * ```js
69
- * cidaas.getUserInfo().then(function (response) {
70
- * // the response will give you profile details.
71
- * }).catch(function(ex) {
72
- * // your failure code here
73
- * });
74
- * ```
75
- * @return {Promise<User|null>} returns authenticated user if present, else null
76
- */
77
- getUserInfo(): Promise<User | null>;
78
- /**
79
- * logout by using oidc-client-ts library
80
- * @param {LogoutRedirectOptions} options optional options to over-ride logout options on redirect
81
- */
82
- logout(options?: LogoutRedirectOptions): Promise<void>;
83
- /**
84
- * logout by using oidc-client-ts library
85
- * @param {PopupSignOutOptions} options optional options to over-ride logout options using popup window
86
- */
87
- popupSignOut(options?: PopupSignOutOptions): Promise<void>;
88
- /**
89
- * get the logout call state from the url provided, if none is provided current window url is used
90
- * @returns {Promise<LogoutResponse>} logout response from auth service
91
- */
92
- logoutCallback(url?: string): Promise<LogoutResponse>;
93
- /**
94
- * listen to popup sign out event
95
- * @param {string} url optional url to override to check for sign out state
96
- * @param {boolean} keepOpen true to keep the popup open even after sign out, else false
97
- */
98
- popupSignOutCallback(url?: string, keepOpen?: boolean): Promise<void>;
99
- /**
100
- * To get the generated login url, call **getLoginURL()**. This will call authz service and generate login url to be used.
101
- * @example
102
- * ```js
103
- * cidaas.getLoginURL().then(function (response) {
104
- * // the response will give you login url.
105
- * }).catch(function(ex) {
106
- * // your failure code here
107
- * });
108
- * ```
109
- * @param {LoginRequestOptions} options login options to override {@link window.webAuthSettings} provided
110
- * @return {Promise<string>} authz url for login
111
- */
112
- getLoginURL(options?: LoginRequestOptions): Promise<string>;
113
- /**
114
- * Each and every proccesses starts with requestId, it is an entry point to login or register. For getting the requestId, call **getRequestId()**.
115
- * @example
116
- * ```js
117
- * // To get requestId using default configured settings, run the function without parameter
118
- * cidaas.getRequestId().then(function (response) {
119
- * // the response will give you request id.
120
- * }).catch(function(ex) {
121
- * // your failure code here
122
- * });
123
- *
124
- * // To get requestId using custom settings, run the function with custom setting(s) inside option parameter. Example below will only override client_id & redirect_uri
125
- * const option: GetRequestIdRequest = {
126
- * 'client_id': 'your client id',
127
- * 'redirect_uri': 'your redirect url',
128
- * }
129
- * cidaas.getRequestId(option).then(function (response) {
130
- * // the response will give you request id.
131
- * }).catch(function(ex) {
132
- * // your failure code here
133
- * });
134
- * ```
135
- */
136
- getRequestId(option?: GetRequestIdRequest): Promise<any>;
137
- /**
138
- * To get the tenant basic information, call **getTenantInfo()**. This will return the basic tenant details such as tenant name and allowed login with types (Email, Mobile, Username).
139
- * @example
140
- * ```js
141
- * cidaas.getTenantInfo().then(function (response) {
142
- * // the response will give you tenant details
143
- * }).catch(function(ex) {
144
- * // your failure code here
145
- * });
146
- * ```
147
- */
148
- getTenantInfo(): Promise<any>;
149
- /**
150
- * To logout the user by using cidaas internal api, call **logoutUser()**.
151
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/3b5ce6a54bf29-logout for more details.
152
- * @example
153
- * ```js
154
- * cidaas.logoutUser({
155
- * access_token : 'your accessToken'
156
- * });
157
- * ```
158
- */
159
- logoutUser(options: LogoutUserRequest): void;
160
- /**
161
- * To get the client basic information, call **getClientInfo()**. This will return the basic client details such as client name and its details.
162
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/dc8a6cfb28abb-public-page-information for more details.
163
- * @example
164
- * ```js
165
- * cidaas.getClientInfo({
166
- * requestId: 'your requestId',
167
- * }).then(function (resp) {
168
- * // the response will give you client info.
169
- * }).catch(function(ex) {
170
- * // your failure code here
171
- * });
172
- * ```
173
- */
174
- getClientInfo(options: GetClientInfoRequest): Promise<any>;
175
- /**
176
- * To get all devices information associated to the client, call **getDevicesInfo()**
177
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/2a2feed70303c-get-device-by-user for more details.
178
- * @example
179
- * ```js
180
- * const options = null; // the payload is deprecated and will be removed in the next major release
181
- * const accessToken = 'your access token';
182
- * cidaas.getDevicesInfo(options, accessToken).then(function (resp) {
183
- * // the response will give you devices informations.
184
- * }).catch(function(ex) {
185
- * // your failure code here
186
- * });
187
- * ```
188
- */
189
- getDevicesInfo(options: void, accessToken: string): Promise<any>;
190
- /**
191
- * To delete device associated to the client, call **deleteDevice()**
192
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/3d44ad903d6e8-logout-the-user-for-a-device for more details.
193
- * @example
194
- * ```js
195
- * const options = {
196
- * device_id: 'id of device associated to the client.' // call **getDevicesInfo()** to get List of device ids and its details.
197
- * };
198
- * const accessToken = 'your access token';
199
- * cidaas.deleteDevice(options, accessToken).then(function (resp) {
200
- * // your success code
201
- * }).catch(function(ex) {
202
- * // your failure code
203
- * });
204
- * ```
205
- */
206
- deleteDevice(options: DeleteDeviceRequest, accessToken: string): Promise<any>;
207
- /**
208
- * To handle registration, first you need the registration fields. To get the registration fields, call **getRegistrationSetup()**. This will return the fields that has to be needed while registration.
209
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/4eae72956f65a-registration-field-setup for more details.
210
- * @example
211
- * ```js
212
- * cidaas.getRegistrationSetup({
213
- * requestId: 'your requestId',
214
- * acceptlanguage: 'your locale' // optional example: de-de, en-US
215
- * }).then(function (resp) {
216
- * // the response will give you fields that are required.
217
- * }).catch(function(ex) {
218
- * // your failure code here
219
- * });
220
- * ```
221
- */
222
- getRegistrationSetup(options: GetRegistrationSetupRequest): Promise<any>;
223
- /**
224
- * to generate device info, call **createDeviceInfo()**.
225
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/9b5a892afaf0b-create-device-info for more details.
226
- * @example
227
- * ```js
228
- * cidaas.createDeviceInfo().then(function (resp) {
229
- * // your success code
230
- * }).catch(function(ex) {
231
- * // your failure code
232
- * });
233
- * ```
234
- */
235
- createDeviceInfo(): Promise<any>;
236
- /**
237
- * get the user profile information
238
- * @param options
239
- * @returns
240
- */
241
- getUserProfile(options: GetUserProfileRequest): Promise<any>;
242
- /**
243
- * renew token using refresh token
244
- * @param options
245
- * @returns
246
- */
247
- renewToken(options: RenewTokenRequest): Promise<any>;
248
- /**
249
- * get access token from code
250
- * @param options
251
- * @returns
252
- */
253
- getAccessToken(options: GetAccessTokenRequest): Promise<any>;
254
- /**
255
- * validate access token
256
- * @param options
257
- * @returns
258
- */
259
- validateAccessToken(options: TokenIntrospectionRequest): Promise<any>;
260
- /**
261
- * login with username and password
262
- * @param options
263
- */
264
- loginWithCredentials(options: LoginWithCredentialsRequest): void;
265
- /**
266
- * login with social
267
- * @param options
268
- * @param queryParams
269
- */
270
- loginWithSocial(options: SocialProviderPathParameter, queryParams?: SocialProviderQueryParameter): void;
271
- /**
272
- * register with social
273
- * @param options
274
- * @param queryParams
275
- */
276
- registerWithSocial(options: SocialProviderPathParameter, queryParams?: SocialProviderQueryParameter): void;
277
- /**
278
- * register user
279
- * @param options
280
- * @param headers
281
- * @returns
282
- */
283
- register(options: RegisterRequest, headers: HTTPRequestHeader): Promise<any>;
284
- /**
285
- * get invite info
286
- * @param options
287
- * @param headers
288
- * @returns
289
- */
290
- getInviteUserDetails(options: GetInviteUserDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
291
- /**
292
- * get Communication status
293
- * @param options
294
- * @param headers
295
- * @returns
296
- */
297
- getCommunicationStatus(options: getCommunicationStatusRequest, headers?: HTTPRequestHeader): Promise<any>;
298
- /**
299
- * initiate verification
300
- * @param options
301
- * @returns
302
- */
303
- initiateAccountVerification(options: InitiateAccountVerificationRequest): void;
304
- /**
305
- * verify account
306
- * @param options
307
- * @param headers
308
- * @returns
309
- */
310
- verifyAccount(options: VerifyAccountRequest, headers?: HTTPRequestHeader): Promise<any>;
311
- /**
312
- * initiate reset password
313
- * @param options
314
- * @param headers
315
- * @returns
316
- */
317
- initiateResetPassword(options: InitiateResetPasswordRequest, headers?: HTTPRequestHeader): Promise<any>;
318
- /**
319
- * handle reset password
320
- * @param options
321
- * @param handleResponseAsJson
322
- * @param headers
323
- */
324
- handleResetPassword(options: HandleResetPasswordRequest, handleResponseAsJson?: boolean, headers?: HTTPRequestHeader): Promise<any>;
325
- /**
326
- * reset password
327
- * @param options
328
- * @param handleResponseAsJson
329
- * @param headers
330
- */
331
- resetPassword(options: ResetPasswordRequest, handleResponseAsJson?: boolean, headers?: HTTPRequestHeader): Promise<any>;
332
- /**
333
- * get mfa list
334
- * @param options
335
- * @param headers
336
- * @returns
337
- */
338
- getMFAList(options: GetMFAListRequest, headers?: HTTPRequestHeader): Promise<any>;
339
- /**
340
- * cancel mfa
341
- * @param options
342
- * @param headers
343
- * @returns
344
- */
345
- cancelMFA(options: CancelMFARequest, headers?: HTTPRequestHeader): Promise<any>;
346
- /**
347
- * passwordless login
348
- * @param options
349
- */
350
- passwordlessLogin(options: PasswordlessLoginRequest): void;
351
- /**
352
- * get user consent details
353
- * @param options
354
- * @returns
355
- */
356
- getConsentDetails(options: GetConsentDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
357
- /**
358
- * accept consent
359
- * @param options
360
- * @param headers
361
- * @returns
362
- */
363
- acceptConsent(options: AcceptConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
364
- /**
365
- * get scope consent details
366
- * @param options
367
- * @param headers
368
- * @returns
369
- */
370
- loginPrecheck(options: LoginPrecheckRequest, headers?: HTTPRequestHeader): Promise<any>;
371
- /**
372
- * get scope consent version details
373
- * @param options
374
- * @param headers
375
- * @returns
376
- */
377
- getConsentVersionDetails(options: GetConsentVersionDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
378
- /**
379
- * accept scope Consent
380
- * @param options
381
- * @param headers
382
- * @returns
383
- */
384
- acceptScopeConsent(options: AcceptScopeConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
385
- /**
386
- * accept claim Consent
387
- * @param options
388
- * @param headers
389
- * @returns
390
- */
391
- acceptClaimConsent(options: AcceptClaimConsentRequest, headers?: HTTPRequestHeader): Promise<any>;
392
- /**
393
- * revoke claim Consent
394
- * @param options
395
- * @returns
396
- */
397
- revokeClaimConsent(options: RevokeClaimConsentRequest): Promise<any>;
398
- /**
399
- * get Deduplication details
400
- * @param options
401
- * @param headers
402
- * @returns
403
- */
404
- getDeduplicationDetails(options: GetDeduplicationDetailsRequest, headers?: HTTPRequestHeader): Promise<any>;
405
- /**
406
- * deduplication login
407
- * @param options
408
- */
409
- deduplicationLogin(options: DeduplicationLoginRequest): void;
410
- /**
411
- * register Deduplication
412
- * @param options
413
- * @param headers
414
- * @returns
415
- */
416
- registerDeduplication(options: RegisterDeduplicationRequest, headers?: HTTPRequestHeader): Promise<any>;
417
- /**
418
- * consent continue login
419
- * @param options
420
- */
421
- consentContinue(options: LoginPrecheckRequest): void;
422
- /**
423
- * mfa continue login
424
- * options: PhysicalVerificationLoginRequest is not needed anymore. It is now DEPRECATED and will be removed in the next major release
425
- * @param options
426
- */
427
- mfaContinue(options: MfaContinueRequest): void;
428
- /**
429
- * change password continue
430
- * @param options
431
- */
432
- firstTimeChangePassword(options: FirstTimeChangePasswordRequest): void;
433
- /**
434
- * change password
435
- * @param options
436
- * @param access_token
437
- * @returns
438
- */
439
- changePassword(options: ChangePasswordRequest, access_token: string): Promise<any>;
440
- /**
441
- * update profile
442
- * @param options
443
- * @param access_token
444
- * @param sub
445
- * @returns
446
- */
447
- updateProfile(options: CidaasUser, access_token: string, sub: string): Promise<any>;
448
- /**
449
- * To get user activities, call **getUserActivities()**.
450
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/346141453781e-get-user-activities for more details.
451
- * @example
452
- * ```js
453
- * const options = {
454
- * sub: 'your sub',
455
- * dateFilter: {
456
- * from_date: 'date in UTC format',
457
- * to:date: 'date in UTC format'
458
- * }
459
- * };
460
- * const accessToken = 'your access token';
461
- * cidaas.getUserActivities(options, accessToken).then(function (resp) {
462
- * // your success code
463
- * }).catch(function(ex) {
464
- * // your failure code
465
- * });
466
- * ```
467
- */
468
- getUserActivities(options: GetUserActivitiesRequest, accessToken: string): Promise<any>;
469
- /**
470
- * To run predefined action after enrollment, call userActionOnEnrollment()
471
- * @param options
472
- * @param trackId
473
- * @example
474
- * ```js
475
- * const options = {
476
- * action: 'predefined action'
477
- * };
478
- * cidaas.userActionOnEnrollment(options, 'trackId');
479
- */
480
- userActionOnEnrollment(options: UserActionOnEnrollmentRequest, trackId: string): Promise<any>;
481
- /**
482
- * @param access_token
483
- * @param headers
484
- * @returns
485
- */
486
- getAllVerificationList(access_token: string, headers?: HTTPRequestHeader): Promise<any>;
487
- /**
488
- * initiate link accoount
489
- * @param options
490
- * @param access_token
491
- * @returns
492
- */
493
- initiateLinkAccount(options: InitiateLinkAccountRequest, access_token: string): Promise<any>;
494
- /**
495
- * complete link accoount
496
- * @param options
497
- * @param access_token
498
- * @returns
499
- */
500
- completeLinkAccount(options: CompleteLinkAccountRequest, access_token: string): Promise<any>;
501
- /**
502
- * get linked users
503
- * @param access_token
504
- * @param sub
505
- * @returns
506
- */
507
- getLinkedUsers(access_token: string, sub: string): Promise<any>;
508
- /**
509
- * unlink accoount
510
- * @param access_token
511
- * @param identityId
512
- * @returns
513
- */
514
- unlinkAccount(access_token: string, identityId: string): Promise<any>;
515
- /**
516
- * To change profile image, call **updateProfileImage()**.
517
- * @example
518
- * ```js
519
- * const options = {
520
- * image_key: 'id for your image e.g. user sub',
521
- * photo: yourImageFile,
522
- * filename: 'name of your image file'
523
- * };
524
- * const accessToken = 'your access token';
525
- * cidaas.updateProfileImage(options, accessToken).then(function (resp) {
526
- * // your success code
527
- * }).catch(function(ex) {
528
- * // your failure code
529
- * });
530
- * ```
531
- */
532
- updateProfileImage(options: UpdateProfileImageRequest, access_token: string): Promise<any>;
533
- /**
534
- * enrollVerification
535
- * @param options
536
- * @returns
537
- */
538
- initiateEnrollment(options: InitiateEnrollmentRequest, accessToken: string): Promise<any>;
539
- /**
540
- * update the status of notification
541
- * @param status_id
542
- * @param headers
543
- * @returns
544
- */
545
- getEnrollmentStatus(status_id: string, accessToken: string, headers?: HTTPRequestHeader): Promise<any>;
546
- /**
547
- * enrollVerification
548
- * @param options
549
- * @returns
550
- */
551
- enrollVerification(options: EnrollVerificationRequest): Promise<any>;
552
- /**
553
- * checkVerificationTypeConfigured
554
- * @param options
555
- * @returns
556
- */
557
- checkVerificationTypeConfigured(options: CheckVerificationTypeConfiguredRequest): Promise<any>;
558
- /**
559
- * deleteUserAccount
560
- * @param options
561
- * @returns
562
- */
563
- deleteUserAccount(options: DeleteUserAccountRequest): Promise<any>;
564
- /**
565
- * getMissingFields
566
- * @param trackId - required. If only trackId is given, it will get missing fields from cidaas after succesful registration using default provider
567
- * @param useSocialProvider - optional. If given, it will get missing fields from social provider after successful registration using social provider
568
- *
569
- * @example
570
- * ```js
571
- * const trackId = 'your track id'
572
- * const useSocialProvider = {
573
- * requestId: 'request id from cidaas'
574
- * };
575
- * cidaas.getMissingFields(trackId, useSocialProvider).then(function (resp) {
576
- * // your success code
577
- * }).catch(function(ex) {
578
- * // your failure code
579
- * });
580
- * ```
581
- *
582
- */
583
- getMissingFields(trackId: string, useSocialProvider?: {
584
- requestId: string;
585
- }, headers?: HTTPRequestHeader): Promise<any>;
586
- /**
587
- * progressiveRegistration
588
- * @param options
589
- * @param headers
590
- * @returns
591
- */
592
- progressiveRegistration(options: CidaasUser, headers: ProgressiveRegistrationHeader): Promise<any>;
593
- /**
594
- * loginAfterRegister
595
- * @param options
596
- */
597
- loginAfterRegister(options: LoginAfterRegisterRequest): void;
598
- /**
599
- * device code flow - initiate
600
- */
601
- initiateDeviceCode(clientId?: string): Promise<any>;
602
- /**
603
- * device code flow - verify
604
- * @param code
605
- */
606
- deviceCodeVerify(code: string): void;
607
- /**
608
- * check if an user exists
609
- * @param options
610
- * @param headers
611
- * @returns
612
- */
613
- userCheckExists(options: UserCheckExistsRequest, headers?: HTTPRequestHeader): Promise<any>;
614
- /**
615
- * To set accept language
616
- * @param acceptLanguage
617
- */
618
- setAcceptLanguageHeader(acceptLanguage: string): void;
619
- /**
620
- * initiate mfa
621
- * @param options
622
- * @param headers
623
- * @returns
624
- */
625
- initiateMFA(options: InitiateMFARequest, accessToken?: string, headers?: HTTPRequestHeader): Promise<any>;
626
- /**
627
- * authenticate mfa
628
- * @param options
629
- * @param headers
630
- * @returns
631
- */
632
- authenticateMFA(options: AuthenticateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
633
- /**
634
- * initiate verification
635
- * @param options
636
- * @returns
637
- */
638
- initiateVerification(options: InitiateVerificationRequest, trackId: string, method: string): Promise<any>;
639
- /**
640
- * configure verification
641
- * @param options
642
- * @returns
643
- */
644
- configureVerification(options: ConfigureVerificationRequest, method: string): Promise<any>;
645
- /**
646
- * configure friendly name
647
- * @param options
648
- * @returns
649
- */
650
- configureFriendlyName(options: ConfigureFriendlyNameRequest, trackId: string, method: string): Promise<any>;
651
- /**
652
- * login as guest
653
- * @param requestId
654
- * @returns
655
- */
656
- actionGuestLogin(requestId: string): void;
657
- /**
658
- * offline token check
659
- */
660
- offlineTokenCheck(accessToken: string): {
661
- isExpiryDateValid: boolean;
662
- isScopesValid: boolean;
663
- isIssuerValid: boolean;
664
- };
665
- }