cidaas-javascript-sdk 3.1.3 → 3.1.5

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.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "cidaas-javascript-sdk",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "author": "cidaas by Widas ID GmbH",
5
5
  "description": "Cidaas native javascript sdk",
6
6
  "license": "MIT",
7
- "main": "types/main/index.js",
8
- "types": "types/main/index.d.ts",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
9
  "testEnvironment": "jsdom",
10
10
  "engine": {
11
11
  "node": ">=8.9.10"
@@ -17,8 +17,7 @@
17
17
  "test:coverage": "jest --coverage --env=jsdom"
18
18
  },
19
19
  "files": [
20
- "src",
21
- "types",
20
+ "dist",
22
21
  "README.md",
23
22
  "license.MD",
24
23
  "Changelogs.md"
@@ -29,8 +28,6 @@
29
28
  "dependencies": {
30
29
  "@fingerprintjs/fingerprintjs": "^3.4.0",
31
30
  "@toolz/is-a-regular-object": "^1.0.1",
32
- "@types/crypto-js": "^4.1.1",
33
- "@types/jest": "^29.5.3",
34
31
  "crypto-js": "^4.1.1",
35
32
  "oidc-client-ts": "^2.2.1"
36
33
  },
@@ -38,9 +35,11 @@
38
35
  "@babel/core": "^7.22.9",
39
36
  "@babel/preset-env": "^7.22.9",
40
37
  "@babel/preset-typescript": "^7.22.5",
41
- "babel-jest": "^29.6.1",
42
38
  "@jest/globals": "^29.6.1",
39
+ "@types/crypto-js": "^4.1.2",
40
+ "@types/jest": "^29.5.4",
43
41
  "@types/mocha": "5.2.7",
42
+ "babel-jest": "^29.6.1",
44
43
  "jest": "^29.6.1",
45
44
  "jest-environment-jsdom": "^29.6.1",
46
45
  "jsdom": "^22.1.0",
@@ -1,10 +0,0 @@
1
- /**
2
- * all the global variables are declared in this file
3
- */
4
-
5
- interface Window {
6
- webAuthSettings: any;
7
- usermanager: any;
8
- localeSettings: string;
9
- authentication: any;
10
- }
package/src/main/index.ts DELETED
@@ -1,6 +0,0 @@
1
- import { Authentication } from "./authentication";
2
- import { WebAuth } from "./web-auth/WebAuth";
3
-
4
- const { version: Version } = require('../../package.json');
5
-
6
- export { WebAuth, Authentication, Version };
@@ -1,76 +0,0 @@
1
- import { IConsentAcceptEntity } from "./Entities"
2
- import { Helper } from "./Helper";
3
-
4
- export namespace ConsentService {
5
- /**
6
- * get user consent details
7
- * @param options
8
- * @returns
9
- */
10
- export function getConsentDetailsV2(options: {
11
- consent_id: string;
12
- consent_version_id: string;
13
- sub: string;
14
- }) {
15
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/public/info";
16
- return Helper.createPostPromise(options, _serviceURL, false,"POST");
17
- };
18
-
19
- /**
20
- * accept constn v2
21
- * @param options
22
- * @returns
23
- */
24
- export function acceptConsentV2(options: IConsentAcceptEntity) {
25
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/accept";
26
- return Helper.createPostPromise(options, _serviceURL, false, "POST" );
27
- };
28
-
29
- /**
30
- * get scope consent version details
31
- * @param options
32
- * @returns
33
- */
34
- export function getScopeConsentVersionDetailsV2(options: {
35
- scopeid: string;
36
- locale: string;
37
- access_token: string;
38
- }) {
39
- const _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.scopeid + "?locale=" + options.locale;
40
- return Helper.createPostPromise(undefined, _serviceURL,false, "GET", options.access_token);
41
- };
42
-
43
- /**
44
- * accept scope Consent
45
- * @param options
46
- * @returns
47
- */
48
- export function acceptScopeConsent(options: {
49
- client_id: string;
50
- sub: string;
51
- scopes: string[];
52
- }) {
53
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/scope/accept";
54
- return Helper.createPostPromise(options, _serviceURL, false, "POST");
55
- };
56
-
57
- /**
58
- * accept claim Consent
59
- * @param options
60
- * @returns
61
- */
62
- export function acceptClaimConsent(options: { client_id: string; sub: string; accepted_claims: string[]; }) {
63
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/accept";
64
- return Helper.createPostPromise(options, _serviceURL, false, "POST");
65
- };
66
-
67
- /**
68
- * revoke claim Consent
69
- * @param options
70
- * @returns
71
- */
72
- export function revokeClaimConsent(options: { client_id: string; sub: string; revoked_claims: string[]; }) {
73
- var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/revoke";
74
- return Helper.createPostPromise(options, _serviceURL, false, "POST");
75
- };
76
- }