cidaas-javascript-sdk 3.1.0 → 3.1.2

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.
@@ -1,73 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.ConsentService = void 0;
4
- var Helper_1 = require("./Helper");
5
- var ConsentService;
6
- (function (ConsentService) {
7
- /**
8
- * get user consent details
9
- * @param options
10
- * @returns
11
- */
12
- function getConsentDetailsV2(options) {
13
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/public/info";
14
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
15
- }
16
- ConsentService.getConsentDetailsV2 = getConsentDetailsV2;
17
- ;
18
- /**
19
- * accept constn v2
20
- * @param options
21
- * @returns
22
- */
23
- function acceptConsentV2(options) {
24
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/accept";
25
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
26
- }
27
- ConsentService.acceptConsentV2 = acceptConsentV2;
28
- ;
29
- /**
30
- * get scope consent version details
31
- * @param options
32
- * @returns
33
- */
34
- function getScopeConsentVersionDetailsV2(options) {
35
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.scopeid + "?locale=" + options.locale;
36
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET", options.access_token);
37
- }
38
- ConsentService.getScopeConsentVersionDetailsV2 = getScopeConsentVersionDetailsV2;
39
- ;
40
- /**
41
- * accept scope Consent
42
- * @param options
43
- * @returns
44
- */
45
- function acceptScopeConsent(options) {
46
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/scope/accept";
47
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
48
- }
49
- ConsentService.acceptScopeConsent = acceptScopeConsent;
50
- ;
51
- /**
52
- * accept claim Consent
53
- * @param options
54
- * @returns
55
- */
56
- function acceptClaimConsent(options) {
57
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/accept";
58
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
59
- }
60
- ConsentService.acceptClaimConsent = acceptClaimConsent;
61
- ;
62
- /**
63
- * revoke claim Consent
64
- * @param options
65
- * @returns
66
- */
67
- function revokeClaimConsent(options) {
68
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/revoke";
69
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
70
- }
71
- ConsentService.revokeClaimConsent = revokeClaimConsent;
72
- ;
73
- })(ConsentService = exports.ConsentService || (exports.ConsentService = {}));
@@ -1,526 +0,0 @@
1
- export interface AcceptResetPasswordEntity {
2
- resetRequestId: string;
3
- exchangeId: string;
4
- password: string;
5
- confirmPassword: string;
6
- provider?: string;
7
- requestId?: string;
8
- }
9
- export declare class AccessTokenRequest {
10
- grant_type?: string;
11
- code?: string;
12
- redirect_uri?: string;
13
- client_id?: string;
14
- client_secret?: string;
15
- state?: string;
16
- scope?: string;
17
- refresh_token?: string;
18
- code_verifier?: string;
19
- username?: string;
20
- password?: string;
21
- requestId?: string;
22
- provider?: string;
23
- host?: string;
24
- client_assertion?: string;
25
- client_assertion_type?: string;
26
- client_ip?: string;
27
- captcha?: string;
28
- locale?: string;
29
- username_type?: string;
30
- signature?: string;
31
- remember_me?: boolean;
32
- user_agent: string;
33
- ip_address: string;
34
- accept_language: string;
35
- lat: string;
36
- lng: string;
37
- finger_print: string;
38
- referrer: string;
39
- pre_login_id: string;
40
- login_type: string;
41
- device_code: string;
42
- sub?: string;
43
- identityId?: string;
44
- providerUserId?: string;
45
- mfa_exchange_id?: string;
46
- dc?: string;
47
- field_key?: string;
48
- }
49
- export declare class PhysicalVerificationLoginRequest {
50
- q?: string;
51
- sub?: string;
52
- requestId?: string;
53
- status_id?: string;
54
- verificationType?: string;
55
- deviceInfo?: IDeviceRequest;
56
- device_fp?: string;
57
- }
58
- export interface IDeviceRequest {
59
- userAgent: string;
60
- ipAddress: string;
61
- lat: string;
62
- lon: string;
63
- deviceId: string;
64
- usedTime: Date;
65
- purpose: string;
66
- requestId: string;
67
- sub: string;
68
- pushNotificationId: string;
69
- deviceMake: string;
70
- deviceModel: string;
71
- deviceType: string;
72
- }
73
- export type AccountVerificationRequestEntity = {
74
- email?: string;
75
- mobile?: string;
76
- phone?: string;
77
- username?: string;
78
- verificationMedium?: string;
79
- processingType?: string;
80
- requestId?: string;
81
- client_id?: string;
82
- redirect_uri?: string;
83
- response_type?: string;
84
- sub: string;
85
- templateKey?: string;
86
- name?: string;
87
- accept_language?: string;
88
- };
89
- export interface ChangePasswordEntity {
90
- sub: string;
91
- identityId: string;
92
- old_password: string;
93
- new_password: string;
94
- confirm_password: string;
95
- accessToken: string;
96
- }
97
- export interface FidoSetupEntity {
98
- track_id: string;
99
- fido_request_type: string;
100
- mobile_number: string;
101
- phone: string;
102
- security_questions: string[];
103
- verification_type: string;
104
- }
105
- export declare class FindUserEntity {
106
- sub: string;
107
- email: string;
108
- mobile: string;
109
- username: string;
110
- customFields: any;
111
- provider: string;
112
- providerUserId: string;
113
- sub_not: string;
114
- requestId: string;
115
- }
116
- export interface IAddressEntity {
117
- formatted: string;
118
- street_address: string;
119
- locality: string;
120
- region: string;
121
- postal_code: string;
122
- country: string;
123
- }
124
- export interface IAuthVerificationAuthenticationRequestEntity extends FaceVerificationAuthenticationRequestEntity {
125
- type: string;
126
- verification_type?: string;
127
- }
128
- export interface FIDO2EnrollEntity {
129
- client_response?: any;
130
- fidoRequestId?: string;
131
- }
132
- export interface FaceVerificationAuthenticationRequestEntity {
133
- exchange_id: string;
134
- pass_code?: string;
135
- client_id: string;
136
- device_id?: string;
137
- push_id?: string;
138
- password?: string;
139
- upload_attempt?: number;
140
- fido2_client_response?: FIDO2EnrollEntity;
141
- single_factor_auth?: boolean;
142
- captcha?: string;
143
- captcha_ref?: string;
144
- bot_captcha_response?: string;
145
- csrf_token?: string;
146
- }
147
- export interface IConfiguredListRequestEntity {
148
- sub: string;
149
- email: string;
150
- mobile_number: string;
151
- username: string;
152
- request_id: string;
153
- verification_types: string[];
154
- single_factor_sub_ref: string;
155
- device_fp: string;
156
- provider: string;
157
- device_id: string;
158
- verification_type: string;
159
- }
160
- export interface IConsentAcceptEntity {
161
- client_id: string;
162
- consent_id: string;
163
- consent_version_id: string;
164
- sub: string;
165
- scopes: string[];
166
- url: string;
167
- matcher: any;
168
- field_key: string;
169
- accepted_fields: string[];
170
- accepted_by: string;
171
- skipped: boolean;
172
- action_type: string;
173
- action_id: string;
174
- q: string;
175
- revoked: boolean;
176
- }
177
- export interface IEnrollVerificationSetupRequestEntity {
178
- exchange_id: string;
179
- device_id: string;
180
- finger_print: string;
181
- client_id: string;
182
- push_id: string;
183
- pass_code: string;
184
- pkce_key: string;
185
- face_attempt: number;
186
- attempt: number;
187
- fido2_client_response: FIDO2EnrollEntity;
188
- verification_type: string;
189
- }
190
- export interface IInitVerificationAuthenticationRequestEntity {
191
- q: string;
192
- sub: string;
193
- email: string;
194
- mobile_number: string;
195
- username: string;
196
- client_id: string;
197
- request_id: string;
198
- usage_type: string;
199
- medium_id: string;
200
- single_factor_auth: boolean;
201
- push_id: string;
202
- device_id: string;
203
- single_factor_sub_ref: string;
204
- verification_types: string[];
205
- device_fp: string;
206
- provider: string;
207
- processingType: string;
208
- trackId: string;
209
- type?: string;
210
- verification_type?: string;
211
- }
212
- export interface IMobileEntity {
213
- given_phone: string;
214
- phone: string;
215
- country: string;
216
- dail_code: string;
217
- carrier_type: string;
218
- carrier_name: string;
219
- national_format: string;
220
- international_format: string;
221
- E164_format: string;
222
- }
223
- export interface ISuggestedMFAActionConfig {
224
- sub?: string;
225
- do_not_ask_again?: boolean;
226
- later?: boolean;
227
- }
228
- export interface IUserEntity {
229
- userStatus: string;
230
- user_status: string;
231
- user_status_reason: string;
232
- username: string;
233
- sub: string;
234
- given_name: string;
235
- family_name: string;
236
- middle_name: string;
237
- nickname: string;
238
- originalProviderUserId?: string[];
239
- email: string;
240
- email_verified: boolean;
241
- mobile_number: string;
242
- mobile_number_obj: IMobileEntity | null;
243
- mobile_number_verified: boolean;
244
- phone_number: string;
245
- phone_number_obj: IMobileEntity | null;
246
- phone_number_verified: boolean;
247
- profile: string;
248
- picture: string;
249
- website: string;
250
- gender: string;
251
- zoneinfo: string;
252
- locale: string;
253
- birthdate: Date | null;
254
- address?: IAddressEntity;
255
- customFields?: any;
256
- identityCustomFields?: any;
257
- password: string;
258
- provider: string;
259
- providerUserId: string;
260
- identityId: string;
261
- mfa_enabled?: boolean;
262
- roles: string[];
263
- userGroups: IUserGroupMap[];
264
- groups?: IUserGroupMap[];
265
- rawJSON: string;
266
- trackId: string;
267
- need_reset_password: boolean;
268
- }
269
- export interface IUserGroupMap {
270
- sub: string;
271
- groupId: string;
272
- roles: string[];
273
- appendRole: boolean;
274
- }
275
- export interface IUserLinkEntity {
276
- master_sub: string;
277
- user_name_type: string;
278
- user_name_to_link: string;
279
- link_accepted_by: string;
280
- link_response_time: Date;
281
- link_accepted: boolean;
282
- communication_type: string;
283
- verification_status_id: string;
284
- type: string;
285
- status: string;
286
- }
287
- export type LoginFormRequestAsyncEntity = {
288
- username: string;
289
- password: string;
290
- requestId: string;
291
- provider: string;
292
- captcha: string;
293
- username_type: string;
294
- field_key: string;
295
- bot_captcha_response: string;
296
- csrf_token: string;
297
- dc?: string;
298
- device_fp?: string;
299
- captcha_ref?: string;
300
- locale?: string;
301
- rememberMe: string;
302
- remember_me: string;
303
- };
304
- export interface LoginFormRequestEntity {
305
- username: string;
306
- password: string;
307
- requestId: string;
308
- provider?: string;
309
- captcha?: string;
310
- username_type?: string;
311
- field_key?: string;
312
- bot_captcha_response?: string;
313
- csrf_token?: string;
314
- dc?: string;
315
- device_fp?: string;
316
- captcha_ref?: string;
317
- locale?: string;
318
- rememberMe?: boolean;
319
- remember_me?: boolean;
320
- }
321
- export interface ResetPasswordEntity {
322
- email: string;
323
- mobile?: string;
324
- phone?: string;
325
- username?: string;
326
- resetMedium: "SMS" | "EMAIL" | "IVR";
327
- processingType: "CODE" | "LINK";
328
- requestId: string;
329
- provider?: string;
330
- resetPasswordId?: string;
331
- sub?: string;
332
- }
333
- export declare class TokenIntrospectionEntity {
334
- token: string;
335
- token_type_hint?: string;
336
- roles?: string[];
337
- scopes?: string[];
338
- groups?: GroupValidationEntity[];
339
- strictGroupValidation: boolean;
340
- strictScopeValidation: boolean;
341
- strictRoleValidation: boolean;
342
- strictValidation: boolean;
343
- client_id?: string;
344
- client_secret?: string;
345
- request_url?: string;
346
- request_time?: number;
347
- request_headers?: any;
348
- }
349
- export declare class GroupValidationEntity {
350
- groupId?: string;
351
- groupType?: string;
352
- roles?: string[];
353
- strictRoleValidation: boolean;
354
- strictValidation: boolean;
355
- }
356
- export declare class UpdateReviewDeviceEntity {
357
- userId: string;
358
- device: string;
359
- browser: string;
360
- location: string;
361
- }
362
- export interface UserActivityEntity {
363
- skip?: Number;
364
- take?: Number;
365
- sub?: string;
366
- startDate?: string;
367
- endDate?: string;
368
- events?: [string];
369
- }
370
- export declare class UserEntity {
371
- userStatus?: string;
372
- user_status?: string;
373
- user_status_reason?: string;
374
- username?: string;
375
- sub?: string;
376
- originalProviderUserId?: string[];
377
- given_name: string;
378
- family_name: string;
379
- middle_name?: string;
380
- nickname?: string;
381
- email: string;
382
- email_verified?: boolean;
383
- mobile_number?: string;
384
- mobile_number_obj?: IMobileEntity | null;
385
- mobile_number_verified?: boolean;
386
- phone_number?: string;
387
- phone_number_obj?: IMobileEntity | null;
388
- phone_number_verified?: boolean;
389
- profile?: string;
390
- picture?: string;
391
- website?: string;
392
- gender?: string;
393
- zoneinfo?: string;
394
- locale?: string;
395
- birthdate?: Date | string;
396
- address?: AddressEntity;
397
- customFields?: any;
398
- identityCustomFields?: any;
399
- password: string;
400
- password_echo: string;
401
- password_hash_info?: any | null;
402
- generate_password?: boolean;
403
- provider?: string;
404
- identityId?: string;
405
- providerUserId?: string;
406
- providerBusinessIds?: string[];
407
- street_address?: string;
408
- mfa_enabled?: boolean;
409
- roles?: string[];
410
- groups?: IUserGroupMap[];
411
- userGroups?: IUserGroupMap[];
412
- trackId?: string;
413
- rawJSON?: string;
414
- need_reset_password?: boolean;
415
- no_event?: boolean;
416
- consents?: IConsentField[] | IConsentTrackingEntity[];
417
- consent_track_ids?: string[];
418
- ignore_default_roles?: string[];
419
- createdTime?: Date;
420
- identities?: IIdentity[];
421
- _id?: string;
422
- id?: string;
423
- invite_id?: string;
424
- }
425
- export interface IConsentTrackingEntity {
426
- state?: string;
427
- fieldKey: string;
428
- consentId: string;
429
- versionId?: string;
430
- time?: Date;
431
- scopes: string[];
432
- acceptedBy: string;
433
- }
434
- export interface IConsentField {
435
- field_key?: string;
436
- value?: boolean;
437
- }
438
- export interface IUserGroupMap {
439
- sub: string;
440
- groupId: string;
441
- roles: string[];
442
- appendRole: boolean;
443
- eventType: string;
444
- status: number;
445
- }
446
- export declare class AddressEntity {
447
- formatted: string;
448
- street_address: string;
449
- locality: string;
450
- region: string;
451
- postal_code: string;
452
- country: string;
453
- }
454
- export interface IIdentity {
455
- identityId: string;
456
- sub: string;
457
- given_name: string;
458
- family_name: string;
459
- middle_name: string;
460
- nickname: string;
461
- email: string;
462
- email_verified: boolean;
463
- mobile_number: string;
464
- mobile_number_obj: IMobileEntity;
465
- mobile_number_verified: boolean;
466
- phone_number: string;
467
- phone_number_obj: IMobileEntity;
468
- phone_number_verified: boolean;
469
- profile: string;
470
- picture: string;
471
- website: string;
472
- gender: string;
473
- zoneinfo: string;
474
- locale: string;
475
- birthdate: Date | string;
476
- address: IUserAddress;
477
- street_address: string;
478
- provider: string;
479
- providerUserId: string;
480
- username: string;
481
- identityCustomFields: any;
482
- providerBusinessIds: string[];
483
- originalProviderUserId?: string[];
484
- raw_json: string;
485
- password_hash_info: any | null;
486
- password: string;
487
- createdTime: Date;
488
- updatedTime: Date;
489
- }
490
- export interface IMobileEntity {
491
- _id: string;
492
- id: string;
493
- given_phone: string;
494
- phone: string;
495
- country: string;
496
- dail_code: string;
497
- carrier_type: string;
498
- carrier_name: string;
499
- national_format: string;
500
- international_format: string;
501
- E164_format: string;
502
- }
503
- export interface IUserAddress {
504
- _id: string;
505
- id: string;
506
- formatted: string;
507
- street_address: string;
508
- locality: string;
509
- region: string;
510
- postal_code: string;
511
- country: string;
512
- }
513
- export declare class ValidateResetPasswordEntity {
514
- resetRequestId: string;
515
- code: string;
516
- }
517
- export interface IChangePasswordEntity {
518
- sub?: string;
519
- identityId?: string;
520
- old_password: string;
521
- new_password: string;
522
- confirm_password: string;
523
- accessToken?: string;
524
- loginSettingsId: string;
525
- client_id?: string;
526
- }
@@ -1,76 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.ValidateResetPasswordEntity = exports.UpdateReviewDeviceEntity = exports.GroupValidationEntity = exports.TokenIntrospectionEntity = exports.FindUserEntity = exports.PhysicalVerificationLoginRequest = exports.AccessTokenRequest = void 0;
4
- var AccessTokenRequest = /** @class */ (function () {
5
- function AccessTokenRequest() {
6
- this.user_agent = "";
7
- this.ip_address = "";
8
- this.accept_language = "";
9
- this.lat = "";
10
- this.lng = "";
11
- this.finger_print = "";
12
- this.referrer = "";
13
- this.pre_login_id = "";
14
- this.login_type = "";
15
- // device code flow
16
- this.device_code = "";
17
- }
18
- return AccessTokenRequest;
19
- }());
20
- exports.AccessTokenRequest = AccessTokenRequest;
21
- var PhysicalVerificationLoginRequest = /** @class */ (function () {
22
- function PhysicalVerificationLoginRequest() {
23
- }
24
- return PhysicalVerificationLoginRequest;
25
- }());
26
- exports.PhysicalVerificationLoginRequest = PhysicalVerificationLoginRequest;
27
- var FindUserEntity = /** @class */ (function () {
28
- function FindUserEntity() {
29
- this.sub = "";
30
- this.email = "";
31
- this.mobile = "";
32
- this.username = "";
33
- this.provider = "";
34
- this.providerUserId = "";
35
- this.sub_not = "";
36
- }
37
- return FindUserEntity;
38
- }());
39
- exports.FindUserEntity = FindUserEntity;
40
- var TokenIntrospectionEntity = /** @class */ (function () {
41
- function TokenIntrospectionEntity() {
42
- this.token = "";
43
- this.strictGroupValidation = false;
44
- this.strictScopeValidation = false;
45
- this.strictRoleValidation = false;
46
- this.strictValidation = false;
47
- }
48
- return TokenIntrospectionEntity;
49
- }());
50
- exports.TokenIntrospectionEntity = TokenIntrospectionEntity;
51
- var GroupValidationEntity = /** @class */ (function () {
52
- function GroupValidationEntity() {
53
- this.strictRoleValidation = false;
54
- this.strictValidation = false;
55
- }
56
- return GroupValidationEntity;
57
- }());
58
- exports.GroupValidationEntity = GroupValidationEntity;
59
- var UpdateReviewDeviceEntity = /** @class */ (function () {
60
- function UpdateReviewDeviceEntity() {
61
- this.userId = "";
62
- this.device = "";
63
- this.browser = "";
64
- this.location = "";
65
- }
66
- return UpdateReviewDeviceEntity;
67
- }());
68
- exports.UpdateReviewDeviceEntity = UpdateReviewDeviceEntity;
69
- var ValidateResetPasswordEntity = /** @class */ (function () {
70
- function ValidateResetPasswordEntity() {
71
- this.resetRequestId = "";
72
- this.code = "";
73
- }
74
- return ValidateResetPasswordEntity;
75
- }());
76
- exports.ValidateResetPasswordEntity = ValidateResetPasswordEntity;
@@ -1,24 +0,0 @@
1
- export declare class Helper {
2
- /**
3
- * create form
4
- * @param form
5
- * @param options
6
- * @returns
7
- */
8
- static createForm(url: string, options: any, method?: string): HTMLFormElement;
9
- /**
10
- * utility function to create and make post request
11
- * @param options
12
- * @param serviceurl
13
- * @param errorResolver
14
- * @param access_token??
15
- * @param headers??
16
- * @returns
17
- */
18
- static createPostPromise(options: any, serviceurl: string, errorResolver: boolean, method: string, access_token?: string, headers?: any): Promise<unknown>;
19
- }
20
- export declare class CustomException {
21
- errorMessage: string;
22
- statusCode: number;
23
- constructor(errorMessage: string, statusCode: number);
24
- }