cidaas-javascript-sdk 4.2.4 → 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 (54) hide show
  1. package/CHANGELOG.md +18 -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} +2 -9
  5. package/dist/common/Common.model.d.ts +37 -0
  6. package/dist/common/Common.model.js +26 -0
  7. package/dist/{web-auth → common}/Helper.d.ts +6 -6
  8. package/dist/{web-auth → common}/Helper.js +10 -10
  9. package/dist/common/JwtHelper.d.ts +8 -0
  10. package/dist/{web-auth → common}/JwtHelper.js +8 -8
  11. package/dist/common/User.model.d.ts +134 -0
  12. package/dist/common/User.model.js +2 -0
  13. package/dist/consent-service/ConsentService.d.ts +96 -0
  14. package/dist/consent-service/ConsentService.js +127 -0
  15. package/dist/consent-service/ConsentService.model.d.ts +102 -0
  16. package/dist/consent-service/ConsentService.model.js +2 -0
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/login-service/LoginService.d.ts +143 -0
  20. package/dist/login-service/LoginService.js +247 -0
  21. package/dist/login-service/LoginService.model.d.ts +138 -0
  22. package/dist/login-service/LoginService.model.js +13 -0
  23. package/dist/token-service/TokenService.d.ts +139 -0
  24. package/dist/token-service/TokenService.js +242 -0
  25. package/dist/token-service/TokenService.model.d.ts +149 -0
  26. package/dist/token-service/TokenService.model.js +43 -0
  27. package/dist/user-service/UserService.d.ts +317 -0
  28. package/dist/user-service/UserService.js +451 -0
  29. package/dist/user-service/UserService.model.d.ts +142 -0
  30. package/dist/user-service/UserService.model.js +10 -0
  31. package/dist/verification-service/VerificationService.d.ts +218 -0
  32. package/dist/verification-service/VerificationService.js +288 -0
  33. package/dist/verification-service/VerificationService.model.d.ts +158 -0
  34. package/dist/verification-service/VerificationService.model.js +2 -0
  35. package/dist/web-auth/WebAuth.d.ts +110 -177
  36. package/dist/web-auth/WebAuth.js +120 -150
  37. package/dist/web-auth/webauth.model.d.ts +50 -0
  38. package/dist/web-auth/webauth.model.js +2 -0
  39. package/package.json +1 -1
  40. package/dist/web-auth/ConsentService.d.ts +0 -123
  41. package/dist/web-auth/ConsentService.js +0 -136
  42. package/dist/web-auth/Entities.d.ts +0 -516
  43. package/dist/web-auth/Entities.js +0 -69
  44. package/dist/web-auth/JwtHelper.d.ts +0 -7
  45. package/dist/web-auth/LoginService.d.ts +0 -165
  46. package/dist/web-auth/LoginService.js +0 -246
  47. package/dist/web-auth/TokenService.d.ts +0 -143
  48. package/dist/web-auth/TokenService.js +0 -249
  49. package/dist/web-auth/UserService.d.ts +0 -345
  50. package/dist/web-auth/UserService.js +0 -471
  51. package/dist/web-auth/VerificationService.d.ts +0 -224
  52. package/dist/web-auth/VerificationService.js +0 -278
  53. /package/dist/authentication/{authentication.model.d.ts → Authentication.model.d.ts} +0 -0
  54. /package/dist/authentication/{authentication.model.js → Authentication.model.js} +0 -0
@@ -0,0 +1,50 @@
1
+ export interface LogoutUserRequest {
2
+ /** Access token needed to authorized api call */
3
+ access_token: string;
4
+ }
5
+ export interface GetClientInfoRequest {
6
+ /** Request id returned from the authorization call */
7
+ requestId: string;
8
+ }
9
+ export interface GetRegistrationSetupRequest {
10
+ /** Request id returned from the authorization call */
11
+ requestId: string;
12
+ /** Response language, which is configured in cidaas admin ui */
13
+ acceptlanguage?: string;
14
+ }
15
+ export interface GetUserActivitiesRequest {
16
+ /** sub of user to get its activities */
17
+ sub: string;
18
+ /** limits activities number to be shown */
19
+ size?: number;
20
+ /** shows activities starting from the 'from' number. Default is 0 */
21
+ from?: number;
22
+ /** if true, the activites will be sorted with the latest one at start */
23
+ descending?: boolean;
24
+ /** activities are shown based on the dateFilter */
25
+ dateFilter?: DateFilter;
26
+ }
27
+ export interface UpdateProfileImageRequest {
28
+ /** id for the image */
29
+ image_key: string;
30
+ /** name of the image */
31
+ filename: string;
32
+ /** image file */
33
+ photo: Blob;
34
+ }
35
+ export interface DeleteDeviceRequest {
36
+ /** id of device associated to the client */
37
+ device_id: string;
38
+ /** user-agent information from the browser */
39
+ userAgent?: string;
40
+ }
41
+ export interface DateFilter {
42
+ /** earliest time to show activities */
43
+ from_date: string;
44
+ /** latest time to show activities */
45
+ to_date: string;
46
+ }
47
+ export interface UserActionOnEnrollmentRequest {
48
+ /** action to be executed */
49
+ action: string;
50
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cidaas-javascript-sdk",
3
- "version": "4.2.4",
3
+ "version": "4.3.0",
4
4
  "author": "cidaas by Widas ID GmbH",
5
5
  "description": "Cidaas native javascript sdk",
6
6
  "license": "MIT",
@@ -1,123 +0,0 @@
1
- import { IConsentAcceptEntity } from "./Entities";
2
- /**
3
- * Consent Management
4
- * For the first time login, the user needs to accept the terms and conditions.
5
- */
6
- export declare namespace ConsentService {
7
- /**
8
- * To get consent details , call **getConsentDetails()**.
9
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/858fbeb51c62b-find-consent-info for more details.
10
- * @example
11
- * ```js
12
- * this.cidaas.getConsentDetails({
13
- * consent_id: 'consent id',
14
- * consent_version_id: 'consent version id',
15
- * sub: 'masked sub'
16
- * })
17
- * .then(function (response) {
18
- * // type your code here
19
- * })
20
- * .catch(function (ex) {
21
- * // your failure code here
22
- * });
23
- * ```
24
- */
25
- function getConsentDetails(options: {
26
- consent_id: string;
27
- consent_version_id: string;
28
- sub: string;
29
- }): Promise<unknown>;
30
- /**
31
- * To accept consent, call **acceptConsent()**.
32
- * @example
33
- * ```js
34
- * this.cidaas.acceptConsent({
35
- * client_id: 'your client id',
36
- * consent_id: 'consent id',
37
- * consent_version: 'consent version id',
38
- * sub: 'masked sub'
39
- * }).then((response) => {
40
- * // the response will give you details of accepted consent.
41
- * }).catch((err) => {
42
- * // your failure code here
43
- * });
44
- * ```
45
- */
46
- function acceptConsent(options: IConsentAcceptEntity): Promise<unknown>;
47
- /**
48
- * To get version details of consent, call **getConsentVersionDetails()**.
49
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/7e24ac2113315-get-consent-version-details for more details.
50
- * @example
51
- * ```js
52
- * this.cidaas.getConsentVersionDetails({
53
- * consentid: 'your consent id',
54
- * locale: 'browser accept language or custom language',
55
- * access_token: 'your access token',
56
- * }).then((response) => {
57
- * // type your code here
58
- * }).catch((err) => {
59
- * // your failure code here
60
- * });
61
- * ```
62
- */
63
- function getConsentVersionDetails(options: {
64
- consentid: string;
65
- locale: string;
66
- access_token: string;
67
- }): Promise<unknown>;
68
- /**
69
- * To accept scope consent, call **acceptScopeConsent()**.
70
- * @example
71
- * ```js
72
- * this.cidaas.acceptScopeConsent({
73
- * client_id: 'your client id',
74
- * sub: 'masked sub',
75
- * scopes: [your scope consents]
76
- * });
77
- * ```
78
- */
79
- function acceptScopeConsent(options: {
80
- client_id: string;
81
- sub: string;
82
- scopes: string[];
83
- }): Promise<unknown>;
84
- /**
85
- * To accept claim consent, call **acceptClaimConsent()**.
86
- * @example
87
- * ```js
88
- * this.cidaas.acceptClaimConsent({
89
- * client_id: 'your client id',
90
- * sub: 'masked sub',
91
- * accepted_claims: [your claim consents]
92
- * });
93
- * ```
94
- */
95
- function acceptClaimConsent(options: {
96
- client_id: string;
97
- sub: string;
98
- accepted_claims: string[];
99
- }): Promise<unknown>;
100
- /**
101
- * To revoke claim consent, call **revokeClaimConsent()**.
102
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/9ae62e98842fe-revoke-user-consent-claim for more details.
103
- * @example
104
- * ```js
105
- * this.cidaas.revokeClaimConsent({
106
- * access_token: 'your access token',
107
- * client_id: 'your client id',
108
- * sub: 'masked sub'
109
- * revoked_claims: [your claim consents]
110
- * }).then((response) => {
111
- * // the response will give you revoked claim consent.
112
- * }).catch((err) => {
113
- * // your failure code here
114
- * });
115
- * ```
116
- */
117
- function revokeClaimConsent(options: {
118
- access_token?: string;
119
- client_id: string;
120
- sub: string;
121
- revoked_claims: string[];
122
- }): Promise<unknown>;
123
- }
@@ -1,136 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConsentService = void 0;
4
- const Helper_1 = require("./Helper");
5
- /**
6
- * Consent Management
7
- * For the first time login, the user needs to accept the terms and conditions.
8
- */
9
- var ConsentService;
10
- (function (ConsentService) {
11
- /**
12
- * To get consent details , call **getConsentDetails()**.
13
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/858fbeb51c62b-find-consent-info for more details.
14
- * @example
15
- * ```js
16
- * this.cidaas.getConsentDetails({
17
- * consent_id: 'consent id',
18
- * consent_version_id: 'consent version id',
19
- * sub: 'masked sub'
20
- * })
21
- * .then(function (response) {
22
- * // type your code here
23
- * })
24
- * .catch(function (ex) {
25
- * // your failure code here
26
- * });
27
- * ```
28
- */
29
- function getConsentDetails(options) {
30
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/public/info";
31
- return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
32
- }
33
- ConsentService.getConsentDetails = getConsentDetails;
34
- ;
35
- /**
36
- * To accept consent, call **acceptConsent()**.
37
- * @example
38
- * ```js
39
- * this.cidaas.acceptConsent({
40
- * client_id: 'your client id',
41
- * consent_id: 'consent id',
42
- * consent_version: 'consent version id',
43
- * sub: 'masked sub'
44
- * }).then((response) => {
45
- * // the response will give you details of accepted consent.
46
- * }).catch((err) => {
47
- * // your failure code here
48
- * });
49
- * ```
50
- */
51
- function acceptConsent(options) {
52
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/accept";
53
- return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
54
- }
55
- ConsentService.acceptConsent = acceptConsent;
56
- ;
57
- /**
58
- * To get version details of consent, call **getConsentVersionDetails()**.
59
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/7e24ac2113315-get-consent-version-details for more details.
60
- * @example
61
- * ```js
62
- * this.cidaas.getConsentVersionDetails({
63
- * consentid: 'your consent id',
64
- * locale: 'browser accept language or custom language',
65
- * access_token: 'your access token',
66
- * }).then((response) => {
67
- * // type your code here
68
- * }).catch((err) => {
69
- * // your failure code here
70
- * });
71
- * ```
72
- */
73
- function getConsentVersionDetails(options) {
74
- const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.consentid + "?locale=" + options.locale;
75
- return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", options.access_token);
76
- }
77
- ConsentService.getConsentVersionDetails = getConsentVersionDetails;
78
- ;
79
- /**
80
- * To accept scope consent, call **acceptScopeConsent()**.
81
- * @example
82
- * ```js
83
- * this.cidaas.acceptScopeConsent({
84
- * client_id: 'your client id',
85
- * sub: 'masked sub',
86
- * scopes: [your scope consents]
87
- * });
88
- * ```
89
- */
90
- function acceptScopeConsent(options) {
91
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/scope/accept";
92
- return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
93
- }
94
- ConsentService.acceptScopeConsent = acceptScopeConsent;
95
- ;
96
- /**
97
- * To accept claim consent, call **acceptClaimConsent()**.
98
- * @example
99
- * ```js
100
- * this.cidaas.acceptClaimConsent({
101
- * client_id: 'your client id',
102
- * sub: 'masked sub',
103
- * accepted_claims: [your claim consents]
104
- * });
105
- * ```
106
- */
107
- function acceptClaimConsent(options) {
108
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/accept";
109
- return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
110
- }
111
- ConsentService.acceptClaimConsent = acceptClaimConsent;
112
- ;
113
- /**
114
- * To revoke claim consent, call **revokeClaimConsent()**.
115
- * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/9ae62e98842fe-revoke-user-consent-claim for more details.
116
- * @example
117
- * ```js
118
- * this.cidaas.revokeClaimConsent({
119
- * access_token: 'your access token',
120
- * client_id: 'your client id',
121
- * sub: 'masked sub'
122
- * revoked_claims: [your claim consents]
123
- * }).then((response) => {
124
- * // the response will give you revoked claim consent.
125
- * }).catch((err) => {
126
- * // your failure code here
127
- * });
128
- * ```
129
- */
130
- function revokeClaimConsent(options) {
131
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/revoke";
132
- return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", options.access_token);
133
- }
134
- ConsentService.revokeClaimConsent = revokeClaimConsent;
135
- ;
136
- })(ConsentService = exports.ConsentService || (exports.ConsentService = {}));