cidaas-javascript-sdk 4.2.3 → 4.3.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 (55) hide show
  1. package/CHANGELOG.md +23 -3
  2. package/README.md +3 -0
  3. package/dist/authentication/{index.d.ts → Authentication.d.ts} +2 -2
  4. package/dist/authentication/{index.js → Authentication.js} +21 -10
  5. package/dist/authentication/Authentication.model.js +23 -0
  6. package/dist/common/Common.model.d.ts +37 -0
  7. package/dist/common/Common.model.js +26 -0
  8. package/dist/{web-auth → common}/Helper.d.ts +6 -6
  9. package/dist/{web-auth → common}/Helper.js +17 -12
  10. package/dist/common/JwtHelper.d.ts +8 -0
  11. package/dist/{web-auth → common}/JwtHelper.js +13 -9
  12. package/dist/common/User.model.d.ts +134 -0
  13. package/dist/common/User.model.js +2 -0
  14. package/dist/consent-service/ConsentService.d.ts +96 -0
  15. package/dist/consent-service/ConsentService.js +127 -0
  16. package/dist/consent-service/ConsentService.model.d.ts +102 -0
  17. package/dist/consent-service/ConsentService.model.js +2 -0
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +20 -3
  20. package/dist/login-service/LoginService.d.ts +143 -0
  21. package/dist/login-service/LoginService.js +247 -0
  22. package/dist/login-service/LoginService.model.d.ts +138 -0
  23. package/dist/login-service/LoginService.model.js +13 -0
  24. package/dist/token-service/TokenService.d.ts +139 -0
  25. package/dist/token-service/TokenService.js +242 -0
  26. package/dist/token-service/TokenService.model.d.ts +149 -0
  27. package/dist/token-service/TokenService.model.js +43 -0
  28. package/dist/user-service/UserService.d.ts +317 -0
  29. package/dist/user-service/UserService.js +451 -0
  30. package/dist/user-service/UserService.model.d.ts +142 -0
  31. package/dist/user-service/UserService.model.js +10 -0
  32. package/dist/verification-service/VerificationService.d.ts +218 -0
  33. package/dist/verification-service/VerificationService.js +288 -0
  34. package/dist/verification-service/VerificationService.model.d.ts +158 -0
  35. package/dist/verification-service/VerificationService.model.js +2 -0
  36. package/dist/web-auth/WebAuth.d.ts +110 -177
  37. package/dist/web-auth/WebAuth.js +98 -123
  38. package/dist/web-auth/webauth.model.d.ts +50 -0
  39. package/dist/web-auth/webauth.model.js +2 -0
  40. package/package.json +1 -1
  41. package/dist/authentication/authentication.model.js +0 -18
  42. package/dist/web-auth/ConsentService.d.ts +0 -123
  43. package/dist/web-auth/ConsentService.js +0 -133
  44. package/dist/web-auth/Entities.d.ts +0 -516
  45. package/dist/web-auth/Entities.js +0 -59
  46. package/dist/web-auth/JwtHelper.d.ts +0 -7
  47. package/dist/web-auth/LoginService.d.ts +0 -165
  48. package/dist/web-auth/LoginService.js +0 -243
  49. package/dist/web-auth/TokenService.d.ts +0 -143
  50. package/dist/web-auth/TokenService.js +0 -246
  51. package/dist/web-auth/UserService.d.ts +0 -345
  52. package/dist/web-auth/UserService.js +0 -468
  53. package/dist/web-auth/VerificationService.d.ts +0 -224
  54. package/dist/web-auth/VerificationService.js +0 -275
  55. /package/dist/authentication/{authentication.model.d.ts → Authentication.model.d.ts} +0 -0
@@ -1,516 +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
- }
96
- export interface FidoSetupEntity {
97
- track_id: string;
98
- fido_request_type: string;
99
- mobile_number: string;
100
- phone: string;
101
- security_questions: string[];
102
- verification_type: string;
103
- }
104
- export declare class FindUserEntity {
105
- sub: string;
106
- email: string;
107
- mobile: string;
108
- username: string;
109
- customFields: any;
110
- provider: string;
111
- providerUserId: string;
112
- rememberMe: string;
113
- webfinger: string;
114
- sub_not: string;
115
- requestId: string;
116
- }
117
- export interface IAddressEntity {
118
- formatted: string;
119
- street_address: string;
120
- locality: string;
121
- region: string;
122
- postal_code: string;
123
- country: string;
124
- }
125
- export interface IAuthVerificationAuthenticationRequestEntity extends FaceVerificationAuthenticationRequestEntity {
126
- type: string;
127
- verification_type?: string;
128
- }
129
- export interface FIDO2EnrollEntity {
130
- client_response?: any;
131
- fidoRequestId?: string;
132
- }
133
- export interface FaceVerificationAuthenticationRequestEntity {
134
- exchange_id: string;
135
- pass_code?: string;
136
- client_id: string;
137
- device_id?: string;
138
- push_id?: string;
139
- password?: string;
140
- upload_attempt?: number;
141
- fido2_client_response?: FIDO2EnrollEntity;
142
- single_factor_auth?: boolean;
143
- captcha?: string;
144
- captcha_ref?: string;
145
- bot_captcha_response?: string;
146
- csrf_token?: string;
147
- }
148
- export interface IConfiguredListRequestEntity {
149
- sub: string;
150
- email: string;
151
- mobile_number: string;
152
- username: string;
153
- request_id: string;
154
- verification_types: string[];
155
- single_factor_sub_ref: string;
156
- device_fp: string;
157
- provider: string;
158
- device_id: string;
159
- verification_type: string;
160
- }
161
- export interface IConsentAcceptEntity {
162
- client_id: string;
163
- consent_id: string;
164
- consent_version_id: string;
165
- sub: string;
166
- scopes: string[];
167
- url: string;
168
- matcher: any;
169
- field_key: string;
170
- accepted_fields: string[];
171
- accepted_by: string;
172
- skipped: boolean;
173
- action_type: string;
174
- action_id: string;
175
- q: string;
176
- revoked: boolean;
177
- }
178
- export interface IEnrollVerificationSetupRequestEntity {
179
- exchange_id: string;
180
- device_id: string;
181
- finger_print: string;
182
- client_id: string;
183
- push_id: string;
184
- pass_code: string;
185
- pkce_key: string;
186
- face_attempt: number;
187
- attempt: number;
188
- fido2_client_response: FIDO2EnrollEntity;
189
- verification_type: string;
190
- }
191
- export interface IInitVerificationAuthenticationRequestEntity {
192
- usage_type: string;
193
- processingType: string;
194
- q?: string;
195
- sub?: string;
196
- email?: string;
197
- mobile_number?: string;
198
- username?: string;
199
- client_id?: string;
200
- request_id: string;
201
- type?: string;
202
- medium_id?: string;
203
- push_id?: string;
204
- device_id?: string;
205
- single_factor_auth?: boolean;
206
- single_factor_sub_ref?: string;
207
- trackId?: string;
208
- }
209
- export interface ISuggestedMFAActionConfig {
210
- sub?: string;
211
- do_not_ask_again?: boolean;
212
- later?: boolean;
213
- }
214
- export interface IUserEntity {
215
- userStatus: string;
216
- user_status: string;
217
- user_status_reason: string;
218
- username: string;
219
- sub: string;
220
- given_name: string;
221
- family_name: string;
222
- middle_name: string;
223
- nickname: string;
224
- originalProviderUserId?: string[];
225
- email: string;
226
- email_verified: boolean;
227
- mobile_number: string;
228
- mobile_number_obj: IMobileEntity | null;
229
- mobile_number_verified: boolean;
230
- phone_number: string;
231
- phone_number_obj: IMobileEntity | null;
232
- phone_number_verified: boolean;
233
- profile: string;
234
- picture: string;
235
- website: string;
236
- gender: string;
237
- zoneinfo: string;
238
- locale: string;
239
- birthdate: Date | null;
240
- address?: IAddressEntity;
241
- customFields?: any;
242
- identityCustomFields?: any;
243
- password: string;
244
- provider: string;
245
- providerUserId: string;
246
- identityId: string;
247
- mfa_enabled?: boolean;
248
- roles: string[];
249
- userGroups: IUserGroupMap[];
250
- groups?: IUserGroupMap[];
251
- rawJSON: string;
252
- trackId: string;
253
- need_reset_password: boolean;
254
- }
255
- export interface IUserLinkEntity {
256
- master_sub: string;
257
- user_name_type: string;
258
- user_name_to_link: string;
259
- link_accepted_by: string;
260
- link_response_time: Date;
261
- link_accepted: boolean;
262
- communication_type: string;
263
- verification_status_id: string;
264
- type: string;
265
- status: string;
266
- }
267
- export type LoginFormRequestAsyncEntity = {
268
- username: string;
269
- password: string;
270
- requestId: string;
271
- provider: string;
272
- captcha: string;
273
- username_type: string;
274
- field_key: string;
275
- bot_captcha_response: string;
276
- csrf_token: string;
277
- dc?: string;
278
- device_fp?: string;
279
- captcha_ref?: string;
280
- locale?: string;
281
- rememberMe: string;
282
- remember_me: string;
283
- };
284
- export interface LoginFormRequestEntity {
285
- username: string;
286
- password: string;
287
- requestId: string;
288
- provider?: string;
289
- captcha?: string;
290
- username_type?: string;
291
- field_key?: string;
292
- bot_captcha_response?: string;
293
- csrf_token?: string;
294
- dc?: string;
295
- device_fp?: string;
296
- captcha_ref?: string;
297
- locale?: string;
298
- rememberMe?: boolean;
299
- remember_me?: boolean;
300
- }
301
- export interface ResetPasswordEntity {
302
- email: string;
303
- mobile?: string;
304
- phone?: string;
305
- username?: string;
306
- resetMedium: "SMS" | "EMAIL" | "IVR";
307
- processingType: "CODE" | "LINK";
308
- requestId: string;
309
- provider?: string;
310
- resetPasswordId?: string;
311
- sub?: string;
312
- }
313
- export declare class TokenIntrospectionEntity {
314
- token: string;
315
- token_type_hint?: string;
316
- roles?: string[];
317
- scopes?: string[];
318
- groups?: GroupValidationEntity[];
319
- strictGroupValidation: boolean;
320
- strictScopeValidation: boolean;
321
- strictRoleValidation: boolean;
322
- strictValidation: boolean;
323
- client_id?: string;
324
- client_secret?: string;
325
- request_url?: string;
326
- request_time?: number;
327
- request_headers?: any;
328
- }
329
- export declare class GroupValidationEntity {
330
- groupId?: string;
331
- groupType?: string;
332
- roles?: string[];
333
- strictRoleValidation: boolean;
334
- strictValidation: boolean;
335
- }
336
- export declare class UpdateReviewDeviceEntity {
337
- userId: string;
338
- device: string;
339
- browser: string;
340
- location: string;
341
- }
342
- export interface UserActivityEntity {
343
- skip?: Number;
344
- take?: Number;
345
- sub?: string;
346
- startDate?: string;
347
- endDate?: string;
348
- events?: [string];
349
- }
350
- export declare class UserEntity {
351
- userStatus?: string;
352
- user_status?: string;
353
- user_status_reason?: string;
354
- username?: string;
355
- sub?: string;
356
- originalProviderUserId?: string[];
357
- given_name: string;
358
- family_name: string;
359
- middle_name?: string;
360
- nickname?: string;
361
- email: string;
362
- email_verified?: boolean;
363
- mobile_number?: string;
364
- mobile_number_obj?: IMobileEntity | null;
365
- mobile_number_verified?: boolean;
366
- phone_number?: string;
367
- phone_number_obj?: IMobileEntity | null;
368
- phone_number_verified?: boolean;
369
- profile?: string;
370
- picture?: string;
371
- website?: string;
372
- gender?: string;
373
- zoneinfo?: string;
374
- locale?: string;
375
- birthdate?: Date | string;
376
- address?: AddressEntity;
377
- customFields?: any;
378
- identityCustomFields?: any;
379
- password: string;
380
- password_echo: string;
381
- password_hash_info?: any | null;
382
- generate_password?: boolean;
383
- provider?: string;
384
- identityId?: string;
385
- providerUserId?: string;
386
- providerBusinessIds?: string[];
387
- street_address?: string;
388
- mfa_enabled?: boolean;
389
- roles?: string[];
390
- groups?: IUserGroupMap[];
391
- userGroups?: IUserGroupMap[];
392
- trackId?: string;
393
- rawJSON?: string;
394
- need_reset_password?: boolean;
395
- no_event?: boolean;
396
- consents?: IConsentField[] | IConsentTrackingEntity[];
397
- consent_track_ids?: string[];
398
- ignore_default_roles?: string[];
399
- createdTime?: Date;
400
- identities?: IIdentity[];
401
- _id?: string;
402
- id?: string;
403
- invite_id?: string;
404
- }
405
- export interface IConsentTrackingEntity {
406
- state?: string;
407
- fieldKey: string;
408
- consentId: string;
409
- versionId?: string;
410
- time?: Date;
411
- scopes: string[];
412
- acceptedBy: string;
413
- }
414
- export interface IConsentField {
415
- field_key?: string;
416
- value?: boolean;
417
- }
418
- export interface IUserGroupMap {
419
- sub: string;
420
- groupId: string;
421
- roles: string[];
422
- appendRole: boolean;
423
- eventType: string;
424
- status: number;
425
- }
426
- export declare class AddressEntity {
427
- formatted: string;
428
- street_address: string;
429
- locality: string;
430
- region: string;
431
- postal_code: string;
432
- country: string;
433
- }
434
- export interface IIdentity {
435
- identityId: string;
436
- sub: string;
437
- given_name: string;
438
- family_name: string;
439
- middle_name: string;
440
- nickname: string;
441
- email: string;
442
- email_verified: boolean;
443
- mobile_number: string;
444
- mobile_number_obj: IMobileEntity;
445
- mobile_number_verified: boolean;
446
- phone_number: string;
447
- phone_number_obj: IMobileEntity;
448
- phone_number_verified: boolean;
449
- profile: string;
450
- picture: string;
451
- website: string;
452
- gender: string;
453
- zoneinfo: string;
454
- locale: string;
455
- birthdate: Date | string;
456
- address: IUserAddress;
457
- street_address: string;
458
- provider: string;
459
- providerUserId: string;
460
- username: string;
461
- identityCustomFields: any;
462
- providerBusinessIds: string[];
463
- originalProviderUserId?: string[];
464
- raw_json: string;
465
- password_hash_info: any | null;
466
- password: string;
467
- createdTime: Date;
468
- updatedTime: Date;
469
- }
470
- export interface IMobileEntity {
471
- _id: string;
472
- id: string;
473
- given_phone: string;
474
- phone: string;
475
- country: string;
476
- dail_code: string;
477
- carrier_type: string;
478
- carrier_name: string;
479
- national_format: string;
480
- international_format: string;
481
- E164_format: string;
482
- }
483
- export interface IUserAddress {
484
- _id: string;
485
- id: string;
486
- formatted: string;
487
- street_address: string;
488
- locality: string;
489
- region: string;
490
- postal_code: string;
491
- country: string;
492
- }
493
- export declare class ValidateResetPasswordEntity {
494
- resetRequestId: string;
495
- code: string;
496
- }
497
- export interface IChangePasswordEntity {
498
- sub?: string;
499
- identityId?: string;
500
- old_password: string;
501
- new_password: string;
502
- confirm_password: string;
503
- accessToken?: string;
504
- loginSettingsId: string;
505
- client_id?: string;
506
- }
507
- export interface IUserActivityPayloadEntity {
508
- sub: string;
509
- size?: number;
510
- from?: number;
511
- descending?: boolean;
512
- dateFilter: {
513
- from_date: string;
514
- to_date: string;
515
- };
516
- }
@@ -1,59 +0,0 @@
1
- export class AccessTokenRequest {
2
- constructor() {
3
- this.user_agent = "";
4
- this.ip_address = "";
5
- this.accept_language = "";
6
- this.lat = "";
7
- this.lng = "";
8
- this.finger_print = "";
9
- this.referrer = "";
10
- this.pre_login_id = "";
11
- this.login_type = "";
12
- // device code flow
13
- this.device_code = "";
14
- }
15
- }
16
- export class PhysicalVerificationLoginRequest {
17
- }
18
- export class FindUserEntity {
19
- constructor() {
20
- this.sub = "";
21
- this.email = "";
22
- this.mobile = "";
23
- this.username = "";
24
- this.provider = "";
25
- this.providerUserId = "";
26
- this.rememberMe = "";
27
- this.webfinger = "";
28
- this.sub_not = "";
29
- }
30
- }
31
- export class TokenIntrospectionEntity {
32
- constructor() {
33
- this.token = "";
34
- this.strictGroupValidation = false;
35
- this.strictScopeValidation = false;
36
- this.strictRoleValidation = false;
37
- this.strictValidation = false;
38
- }
39
- }
40
- export class GroupValidationEntity {
41
- constructor() {
42
- this.strictRoleValidation = false;
43
- this.strictValidation = false;
44
- }
45
- }
46
- export class UpdateReviewDeviceEntity {
47
- constructor() {
48
- this.userId = "";
49
- this.device = "";
50
- this.browser = "";
51
- this.location = "";
52
- }
53
- }
54
- export class ValidateResetPasswordEntity {
55
- constructor() {
56
- this.resetRequestId = "";
57
- this.code = "";
58
- }
59
- }
@@ -1,7 +0,0 @@
1
- export declare class JwtHelper {
2
- static decodeTokenHeader(token: string): any;
3
- static decodeToken(token: string): any;
4
- static urlBase64Decode(str: string): string;
5
- static b64DecodeUnicode(str: any): string;
6
- static b64decode(str: any): any;
7
- }