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,8 +1,14 @@
1
1
  import { ProcessingType } from "../common/Common.model";
2
2
  import { CidaasUser } from "../common/User.model";
3
3
  export interface GetUserProfileRequest {
4
- /** Access token needed to authorized api call */
5
- access_token: string;
4
+ /** Access token needed to authorized api call. If not provided, access token from UserStorage will be used. */
5
+ access_token?: string;
6
+ }
7
+ export interface GetRegistrationSetupRequest {
8
+ /** Request id returned from the authorization call */
9
+ requestId: string;
10
+ /** Response language, which is configured in cidaas admin ui */
11
+ acceptlanguage?: string;
6
12
  }
7
13
  export interface RegisterRequest extends CidaasUser {
8
14
  /** id which is generated during user invitation process */
@@ -14,21 +20,19 @@ export interface GetInviteUserDetailsRequest {
14
20
  /** described whether latest api or legacy api should be called */
15
21
  callLatestAPI?: boolean;
16
22
  }
17
- export interface getCommunicationStatusRequest {
23
+ export interface GetCommunicationStatusRequest {
18
24
  /** Subject (User) identifier */
19
25
  sub: string;
20
26
  }
21
27
  export interface InitiateResetPasswordRequest {
22
28
  /**
23
29
  * Type of medium to be used to reset password
24
- * BREAKING TODO: change type to ResetMedium only in next major version
25
- * */
26
- resetMedium: ResetMedium | string;
30
+ */
31
+ resetMedium: ResetMedium;
27
32
  /**
28
33
  * defines whether the password can be resetted via email link or whether the user needs to enter a code to complete the reset password process.
29
- * BREAKING TODO: change type to ProcessingType only in next major version
30
- * */
31
- processingType: ProcessingType | string;
34
+ */
35
+ processingType: ProcessingType;
32
36
  /** Email of the user */
33
37
  email?: string;
34
38
  /** Mobile number of the user */
@@ -105,10 +109,10 @@ export interface InitiateLinkAccountRequest {
105
109
  user_name_to_link: string;
106
110
  }
107
111
  export interface DeleteUserAccountRequest {
108
- /** Access token needed to authorized api call */
109
- access_token?: string;
110
112
  /** Subject (User) identifier */
111
113
  sub: string;
114
+ /** Access token needed to authorized api call. If not provided, access token from UserStorage will be used. */
115
+ access_token?: string;
112
116
  }
113
117
  export interface CompleteLinkAccountRequest {
114
118
  /** code will be sent to account to be linked */
@@ -134,9 +138,39 @@ export interface UserCheckExistsRequest {
134
138
  /** If filled, will be sent as query parameter */
135
139
  webfinger?: string;
136
140
  }
141
+ export interface GetUserActivitiesRequest {
142
+ /** sub of user to get its activities */
143
+ sub: string;
144
+ /** limits activities number to be shown */
145
+ size?: number;
146
+ /** shows activities starting from the 'from' number. Default is 0 */
147
+ from?: number;
148
+ /** if true, the activites will be sorted with the latest one at start */
149
+ descending?: boolean;
150
+ /** activities are shown based on the dateFilter */
151
+ dateFilter?: DateFilter;
152
+ }
153
+ export interface UserActionOnEnrollmentRequest {
154
+ /** action to be executed */
155
+ action: string;
156
+ }
157
+ export interface UpdateProfileImageRequest {
158
+ /** id for the image */
159
+ image_key: string;
160
+ /** name of the image */
161
+ filename: string;
162
+ /** image file */
163
+ photo: Blob;
164
+ }
165
+ export interface DateFilter {
166
+ /** earliest time to show activities */
167
+ from_date: string;
168
+ /** latest time to show activities */
169
+ to_date: string;
170
+ }
137
171
  /** Type of medium to be used to reset password */
138
172
  export declare enum ResetMedium {
139
- 'SMS' = 0,
140
- 'EMAIL' = 1,
141
- 'IVR' = 2
173
+ Sms = "SMS",
174
+ Email = "EMAIL",
175
+ Ivr = "IVR"
142
176
  }
@@ -4,7 +4,7 @@ exports.ResetMedium = void 0;
4
4
  /** Type of medium to be used to reset password */
5
5
  var ResetMedium;
6
6
  (function (ResetMedium) {
7
- ResetMedium[ResetMedium["SMS"] = 0] = "SMS";
8
- ResetMedium[ResetMedium["EMAIL"] = 1] = "EMAIL";
9
- ResetMedium[ResetMedium["IVR"] = 2] = "IVR";
10
- })(ResetMedium = exports.ResetMedium || (exports.ResetMedium = {}));
7
+ ResetMedium["Sms"] = "SMS";
8
+ ResetMedium["Email"] = "EMAIL";
9
+ ResetMedium["Ivr"] = "IVR";
10
+ })(ResetMedium || (exports.ResetMedium = ResetMedium = {}));
@@ -1,225 +1,283 @@
1
1
  import { HTTPRequestHeader } from "../common/Common.model";
2
+ import ConfigUserProvider from "../common/ConfigUserProvider";
2
3
  import { AuthenticateMFARequest, CancelMFARequest, CheckVerificationTypeConfiguredRequest, ConfigureFriendlyNameRequest, ConfigureVerificationRequest, EnrollVerificationRequest, GetMFAListRequest, InitiateAccountVerificationRequest, InitiateEnrollmentRequest, InitiateMFARequest, InitiateVerificationRequest, VerifyAccountRequest } from "./VerificationService.model";
3
- /**
4
- * To initiate the account verification, call **initiateAccountVerification()**. This will send verification code email or sms or ivr based on the verificationMedium you mentioned.
5
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/cgans5erj5alg-init-account-verification for more details.
6
- * @example
7
- * ```js
8
- * cidaas.initiateAccountVerification({
9
- * verificationMedium: 'email',
10
- * requestId: 'your requestId',
11
- * processingType: ProcessingType.CODE,
12
- * email: 'your email'
13
- * }).then(function (response) {
14
- * // the response will give you account verification details.
15
- * }).catch(function(ex) {
16
- * // your failure code here
17
- * });
18
- * ```
19
- */
20
- export declare function initiateAccountVerification(options: InitiateAccountVerificationRequest): void;
21
- /**
22
- * To complete the verification, call **verifyAccount()**.
23
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/r8h9mvavvw2e6-verify-account for more details.
24
- * @example
25
- * ```js
26
- * cidaas.verifyAccount({
27
- * accvid: 'your accvid', // which you will get on initiate account verification response
28
- * code: 'your code in email or sms or ivr'
29
- * }).then(function (response) {
30
- * // the response will give you account verification ID and unique code.
31
- * }).catch(function(ex) {
32
- * // your failure code here
33
- * });
34
- * ```
35
- */
36
- export declare function verifyAccount(options: VerifyAccountRequest, headers?: HTTPRequestHeader): Promise<any>;
37
- /**
38
- * To get all configured multi factor authentication, call **getMFAList()**.
39
- *
40
- * As Parameter, you need to pass request id & one of the following: email or mobile phone or username.
41
- *
42
- * In case you are in prelogin page and don't have user information yet (such as mfa-required & account-verification page), you could pass
43
- * request id & masked sub (one of the following: sub or q), depends on which one is available in the query parameter generated by cidaas.
44
- *
45
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/ee688a9c52b63-list-of-configured-verification-methods for more details.
46
- * @example
47
- * ```js
48
- * cidaas.getMFAList({
49
- * request_id: 'your request id',
50
- * email: 'your email'
51
- * }).then(function (response) {
52
- * // the response will give you list of configured multi factor authentication
53
- * }).catch(function(ex) {
54
- * // your failure code here
55
- * });
56
- * ```
57
- */
58
- export declare function getMFAList(options: GetMFAListRequest, headers?: HTTPRequestHeader): Promise<any>;
59
- /**
60
- * to cancel mfa process, call **cancelMFA()**.
61
- * @example
62
- * ```js
63
- * cidaas.cancelMFA({
64
- * exchange_id: 'exchange id from initiateMFA() response',
65
- * reason: 'reason of mfa cancelation',
66
- * type: 'authentication type e.g. email'
67
- * }).then(function (response) {
68
- * // your success code here
69
- * }).catch(function(ex) {
70
- * // your failure code here
71
- * });
72
- * ```
73
- */
74
- export declare function cancelMFA(options: CancelMFARequest, headers?: HTTPRequestHeader): Promise<any>;
75
- /**
76
- * To get list of all verification type configured, call **getAllVerificationList()**. access_token must be passed as function parameter.
77
- * @example
78
- * ```js
79
- * const access_token = "your access token";
80
- *
81
- * cidaas.getAllVerificationList(access_token)
82
- * .then(function (response) {
83
- * // type your code here
84
- * })
85
- * .catch(function (ex) {
86
- * // your failure code here
87
- * });
88
- * ```
89
- */
90
- export declare function getAllVerificationList(access_token: string, headers?: HTTPRequestHeader): Promise<any>;
91
- /**
92
- * To initiate enrollment of new multi factor authentication, call **initiateEnrollment()**.
93
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/f85aef6754714-initiate-physical-verification-setup for more details.
94
- * @example
95
- * ```js
96
- * const access_token = "your access token";
97
- * const options = {
98
- * verification_type: 'one of verification_type such as fido2, face, ivr',
99
- * deviceInfo: {
100
- * deviceId: '',
101
- * location: {lat: '', lon: ''}
102
- * }
103
- * }
104
- *
105
- * cidaas.initiateEnrollment(options, access_token)
106
- * .then(function (response) {
107
- * // type your code here
108
- * })
109
- * .catch(function (ex) {
110
- * // your failure code here
111
- * });
112
- * ```
113
- */
114
- export declare function initiateEnrollment(options: InitiateEnrollmentRequest, accessToken: string): Promise<any>;
115
- /**
116
- * to get the status of MFA enrollment, call **getEnrollmentStatus()**.
117
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/b06447d02d8e0-get-status-of-physical-verification-setup-configuration for more details.
118
- * @example
119
- * ```js
120
- * cidaas.getEnrollmentStatus('statusId from initiateEnrollment()', 'your access token')
121
- * .then(function (response) {
122
- * // type your code here
123
- * })
124
- * .catch(function (ex) {
125
- * // your failure code here
126
- * });
127
- * ```
128
- */
129
- export declare function getEnrollmentStatus(status_id: string, accessToken: string, headers?: HTTPRequestHeader): Promise<any>;
130
- /**
131
- * to finish enrollment process of new multi factor authentication, call **enrollVerification()**.
132
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/20ec76e937b27-enroll-physical-verification-setup for more details.
133
- * @example
134
- * ```js
135
- * const fidoPayload = {
136
- * sub: 'your sub',
137
- * exchange_id: 'exchange_id from initiateEnrollment()',
138
- * verification_type: 'fido2',
139
- * fido2_client_response: {
140
- * client_response: 'client_response from doing fido process',
141
- * fidoRequestId: 'fidoRequestId from initiateEnrollment',
142
- * }
143
- * }
144
- * cidaas.enrollVerification(fidoPayload)
145
- * .then(function (response) {
146
- * // type your code here
147
- * })
148
- * .catch(function (ex) {
149
- * // your failure code here
150
- * });
151
- * ```
152
- */
153
- export declare function enrollVerification(options: EnrollVerificationRequest): Promise<any>;
154
- /**
155
- * to see details of configured verification type, call **checkVerificationTypeConfigured()**.
156
- * @example
157
- * ```js
158
- * cidaas.checkVerificationTypeConfigured({
159
- * request_id: 'your request id',
160
- * email: 'your email',
161
- * verification_type: 'email'
162
- * }).then(function (response) {
163
- * // type your code here
164
- * })
165
- * .catch(function (ex) {
166
- * // your failure code here
167
- * });
168
- * ```
169
- */
170
- export declare function checkVerificationTypeConfigured(options: CheckVerificationTypeConfiguredRequest): Promise<any>;
171
- /**
172
- * to initiate multi factor auhentication, call **initiateMFA()**.
173
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/2a3ea581bb249-initiate-verification for more details.
174
- * @example
175
- * ```js
176
- * const access_token = "your access token";
177
- * const options = {
178
- * request_id: 'your request id',
179
- * usage_type: 'PASSWORDLESS_AUTHENTICATION',
180
- * type: 'email'
181
- * email: 'your email'
182
- * }
183
- * }
184
- *
185
- * cidaas.initiateMFA(options, access_token)
186
- * .then(function (response) {
187
- * // type your code here
188
- * })
189
- * .catch(function (ex) {
190
- * // your failure code here
191
- * });
192
- * ```
193
- */
194
- export declare function initiateMFA(options: InitiateMFARequest, accessToken?: string, headers?: HTTPRequestHeader): Promise<any>;
195
- /**
196
- * to authenticate with multi factor auhentication, call **authenticateMFA()**.
197
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/1aa38936252d6-perform-the-authentication-method for more details.
198
- * @example
199
- * ```js
200
- * cidaas.authenticateMFA({
201
- * type: 'email',
202
- * client_id: 'your client id',
203
- * exchange_id: exchange id from initiateMFA(),
204
- * pass_code: 'code to authenticate'
205
- * }).then(function (response) {
206
- * // type your code here
207
- * })
208
- * .catch(function (ex) {
209
- * // your failure code here
210
- * });
211
- * ```
212
- */
213
- export declare function authenticateMFA(options: AuthenticateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
214
- /**
215
- * to initiate verification process, call **initiateVerification**
216
- */
217
- export declare function initiateVerification(options: InitiateVerificationRequest, trackId: string, method: string): Promise<any>;
218
- /**
219
- * to finish configuring verification process, call **configureVerification**
220
- */
221
- export declare function configureVerification(options: ConfigureVerificationRequest, method: string): Promise<any>;
222
- /**
223
- * to configure friendly name, call **configureFriendlyName**
224
- */
225
- export declare function configureFriendlyName(options: ConfigureFriendlyNameRequest, trackId: string, method: string): Promise<any>;
4
+ export declare class VerificationService {
5
+ private config;
6
+ private userManager;
7
+ constructor(configUserProvider: ConfigUserProvider);
8
+ /**
9
+ * To initiate the account verification, call **initiateAccountVerification()**. This will send verification code email or sms or ivr based on the verificationMedium you mentioned.
10
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/cgans5erj5alg-init-account-verification for more details.
11
+ * @example
12
+ * ```js
13
+ * cidaasVerificationService.initiateAccountVerification({
14
+ * verificationMedium: 'email',
15
+ * requestId: 'your requestId',
16
+ * processingType: ProcessingType.Code,
17
+ * email: 'your email'
18
+ * }).then(function (response) {
19
+ * // the response will give you account verification details.
20
+ * }).catch(function(ex) {
21
+ * // your failure code here
22
+ * });
23
+ * ```
24
+ */
25
+ initiateAccountVerification(options: InitiateAccountVerificationRequest): void;
26
+ /**
27
+ * To complete the verification, call **verifyAccount()**.
28
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/r8h9mvavvw2e6-verify-account for more details.
29
+ * @example
30
+ * ```js
31
+ * cidaasVerificationService.verifyAccount({
32
+ * accvid: 'your accvid', // which you will get on initiate account verification response
33
+ * code: 'your code in email or sms or ivr'
34
+ * }).then(function (response) {
35
+ * // the response will give you account verification ID and unique code.
36
+ * }).catch(function(ex) {
37
+ * // your failure code here
38
+ * });
39
+ * ```
40
+ */
41
+ verifyAccount(options: VerifyAccountRequest, headers?: HTTPRequestHeader): Promise<any>;
42
+ /**
43
+ * To get all configured multi factor authentication, call **getMFAList()**.
44
+ *
45
+ * As Parameter, you need to pass request id & one of the following: email or mobile phone or username.
46
+ *
47
+ * In case you are in prelogin page and don't have user information yet (such as mfa-required & account-verification page), you could pass
48
+ * request id & masked sub (one of the following: sub or q), depends on which one is available in the query parameter generated by cidaas.
49
+ *
50
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/ee688a9c52b63-list-of-configured-verification-methods for more details.
51
+ * @example
52
+ * ```js
53
+ * cidaasVerificationService.getMFAList({
54
+ * request_id: 'your request id',
55
+ * email: 'your email'
56
+ * }).then(function (response) {
57
+ * // the response will give you list of configured multi factor authentication
58
+ * }).catch(function(ex) {
59
+ * // your failure code here
60
+ * });
61
+ * ```
62
+ */
63
+ getMFAList(options: GetMFAListRequest, headers?: HTTPRequestHeader): Promise<any>;
64
+ /**
65
+ * to cancel mfa process, call **cancelMFA()**.
66
+ * @example
67
+ * ```js
68
+ * cidaasVerificationService.cancelMFA({
69
+ * exchange_id: 'exchange id from initiateMFA() response',
70
+ * reason: 'reason of mfa cancelation',
71
+ * type: 'authentication type e.g. email'
72
+ * }).then(function (response) {
73
+ * // your success code here
74
+ * }).catch(function(ex) {
75
+ * // your failure code here
76
+ * });
77
+ * ```
78
+ */
79
+ cancelMFA(options: CancelMFARequest, headers?: HTTPRequestHeader): Promise<any>;
80
+ /**
81
+ * To get list of all verification type configured, call **getAllVerificationList()**. access_token must be passed as function parameter.
82
+ * @example
83
+ * ```js
84
+ * cidaasVerificationService.getAllVerificationList()
85
+ * .then(function (response) {
86
+ * // type your code here
87
+ * })
88
+ * .catch(function (ex) {
89
+ * // your failure code here
90
+ * });
91
+ * ```
92
+ */
93
+ getAllVerificationList(access_token?: string, headers?: HTTPRequestHeader): Promise<any>;
94
+ /**
95
+ * To initiate enrollment of new multi factor authentication, call **initiateEnrollment()**.
96
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/f85aef6754714-initiate-physical-verification-setup for more details.
97
+ * @example
98
+ * ```js
99
+ * const options = {
100
+ * verification_type: 'one of verification_type such as fido2, face, ivr',
101
+ * deviceInfo: {
102
+ * deviceId: '',
103
+ * location: {lat: '', lon: ''}
104
+ * }
105
+ * }
106
+ *
107
+ * cidaasVerificationService.initiateEnrollment(options)
108
+ * .then(function (response) {
109
+ * // type your code here
110
+ * })
111
+ * .catch(function (ex) {
112
+ * // your failure code here
113
+ * });
114
+ * ```
115
+ */
116
+ initiateEnrollment(options: InitiateEnrollmentRequest, access_token?: string): Promise<any>;
117
+ /**
118
+ * to get the status of MFA enrollment, call **getEnrollmentStatus()**.
119
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/b06447d02d8e0-get-status-of-physical-verification-setup-configuration for more details.
120
+ * @example
121
+ * ```js
122
+ * cidaasVerificationService.getEnrollmentStatus('statusId from initiateEnrollment()')
123
+ * .then(function (response) {
124
+ * // type your code here
125
+ * })
126
+ * .catch(function (ex) {
127
+ * // your failure code here
128
+ * });
129
+ * ```
130
+ */
131
+ getEnrollmentStatus(status_id: string, access_token?: string, headers?: HTTPRequestHeader): Promise<any>;
132
+ /**
133
+ * to finish enrollment process of new multi factor authentication, call **enrollVerification()**.
134
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/20ec76e937b27-enroll-physical-verification-setup for more details.
135
+ * @example
136
+ * ```js
137
+ * const fidoPayload = {
138
+ * sub: 'your sub',
139
+ * exchange_id: 'exchange_id from initiateEnrollment()',
140
+ * verification_type: 'fido2',
141
+ * fido2_client_response: {
142
+ * client_response: 'client_response from doing fido process',
143
+ * fidoRequestId: 'fidoRequestId from initiateEnrollment',
144
+ * }
145
+ * }
146
+ * cidaasVerificationService.enrollVerification(fidoPayload)
147
+ * .then(function (response) {
148
+ * // type your code here
149
+ * })
150
+ * .catch(function (ex) {
151
+ * // your failure code here
152
+ * });
153
+ * ```
154
+ */
155
+ enrollVerification(options: EnrollVerificationRequest): Promise<any>;
156
+ /**
157
+ * to see details of configured verification type, call **checkVerificationTypeConfigured()**.
158
+ * @example
159
+ * ```js
160
+ * cidaasVerificationService.checkVerificationTypeConfigured({
161
+ * request_id: 'your request id',
162
+ * email: 'your email',
163
+ * verification_type: 'email'
164
+ * }).then(function (response) {
165
+ * // type your code here
166
+ * })
167
+ * .catch(function (ex) {
168
+ * // your failure code here
169
+ * });
170
+ * ```
171
+ */
172
+ checkVerificationTypeConfigured(options: CheckVerificationTypeConfiguredRequest): Promise<any>;
173
+ /**
174
+ * to initiate multi factor auhentication, call **initiateMFA()**.
175
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/2a3ea581bb249-initiate-verification for more details.
176
+ * @example
177
+ * ```js
178
+ * const options = {
179
+ * request_id: 'your request id',
180
+ * usage_type: 'PASSWORDLESS_AUTHENTICATION',
181
+ * type: 'email'
182
+ * email: 'your email'
183
+ * }
184
+ * }
185
+ *
186
+ * cidaasVerificationService.initiateMFA(options)
187
+ * .then(function (response) {
188
+ * // type your code here
189
+ * })
190
+ * .catch(function (ex) {
191
+ * // your failure code here
192
+ * });
193
+ * ```
194
+ */
195
+ initiateMFA(options: InitiateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
196
+ /**
197
+ * to authenticate with multi factor auhentication, call **authenticateMFA()**.
198
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/1aa38936252d6-perform-the-authentication-method for more details.
199
+ * @example
200
+ * ```js
201
+ * cidaasVerificationService.authenticateMFA({
202
+ * type: 'email',
203
+ * client_id: 'your client id',
204
+ * exchange_id: exchange id from initiateMFA(),
205
+ * pass_code: 'code to authenticate'
206
+ * }).then(function (response) {
207
+ * // type your code here
208
+ * })
209
+ * .catch(function (ex) {
210
+ * // your failure code here
211
+ * });
212
+ * ```
213
+ */
214
+ authenticateMFA(options: AuthenticateMFARequest, headers?: HTTPRequestHeader): Promise<any>;
215
+ /**
216
+ * to initiate verification process, call **initiateVerification**
217
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/odmtzu2e53f5k-initiate-verification-enrollment for more details.
218
+ * @example
219
+ * ```js
220
+ * const options = {
221
+ * mobile_number: 'your mobile number',
222
+ * }
223
+ * }
224
+ * const trackId = 'your track id'
225
+ * const method = 'email'
226
+ *
227
+ * cidaasVerificationService.initiateVerification(options, trackId, method)
228
+ * .then(function (response) {
229
+ * // type your code here
230
+ * })
231
+ * .catch(function (ex) {
232
+ * // your failure code here
233
+ * });
234
+ * ```
235
+ */
236
+ initiateVerification(options: InitiateVerificationRequest, trackId: string, method: string): Promise<any>;
237
+ /**
238
+ * to finish configuring verification process, call **configureVerification**
239
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/vurqjgv46yyid-initiate-verification-setup-authenticate for more details.
240
+ * @example
241
+ * ```js
242
+ * const options = {
243
+ * exchange_id: 'your exchange id';
244
+ * sub: 'your sub;
245
+ * pass_code: 'your pass code';
246
+ * }
247
+ * }
248
+ * const method = 'email'
249
+ *
250
+ * cidaasVerificationService.initiateVerification(options, method)
251
+ * .then(function (response) {
252
+ * // type your code here
253
+ * })
254
+ * .catch(function (ex) {
255
+ * // your failure code here
256
+ * });
257
+ * ```
258
+ */
259
+ configureVerification(options: ConfigureVerificationRequest, method: string): Promise<any>;
260
+ /**
261
+ * to configure friendly name, call **configureFriendlyName**
262
+ * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/f0i458vm5zo6z-add-a-friendly-name for more details.
263
+ * @example
264
+ * ```js
265
+ * const options = {
266
+ * sub: 'your sub;
267
+ * friendly_name: 'your friendly name';
268
+ * }
269
+ * }
270
+ * const trackId = 'your track id'
271
+ * const method = 'email'
272
+ *
273
+ * cidaasVerificationService.configureFriendlyName(options, trackId, method)
274
+ * .then(function (response) {
275
+ * // type your code here
276
+ * })
277
+ * .catch(function (ex) {
278
+ * // your failure code here
279
+ * });
280
+ * ```
281
+ */
282
+ configureFriendlyName(options: ConfigureFriendlyNameRequest, trackId: string, method: string): Promise<any>;
283
+ }