@consentera/consent-sdk 2.0.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 (48) hide show
  1. package/CHANGELOG.md +245 -0
  2. package/LICENSE +21 -0
  3. package/README.md +489 -0
  4. package/dist/consentera-consent.cjs +4919 -0
  5. package/dist/consentera-consent.cjs.map +1 -0
  6. package/dist/consentera-consent.min.js +2 -0
  7. package/dist/consentera-consent.min.js.map +1 -0
  8. package/dist/consentera-consent.mjs +4864 -0
  9. package/dist/consentera-consent.mjs.map +1 -0
  10. package/dist/react/index.cjs +2731 -0
  11. package/dist/react/index.cjs.map +1 -0
  12. package/dist/react/index.mjs +2724 -0
  13. package/dist/react/index.mjs.map +1 -0
  14. package/dist/types/consent/CallbackHandler.d.ts +246 -0
  15. package/dist/types/consent/ConsentManager.d.ts +128 -0
  16. package/dist/types/consent/ConsentSession.d.ts +127 -0
  17. package/dist/types/consent/ConsentValidator.d.ts +63 -0
  18. package/dist/types/consent/artifactRead.d.ts +48 -0
  19. package/dist/types/consent/consentPopup.d.ts +115 -0
  20. package/dist/types/core/ConsentEraClient.d.ts +106 -0
  21. package/dist/types/core/ConsenteraConsent.d.ts +163 -0
  22. package/dist/types/core/errors.d.ts +108 -0
  23. package/dist/types/core/http.d.ts +176 -0
  24. package/dist/types/core/version.d.ts +36 -0
  25. package/dist/types/df/DFConfigClient.d.ts +59 -0
  26. package/dist/types/gcm/ConsentModeBridge.d.ts +54 -0
  27. package/dist/types/gpp/GPPManager.d.ts +62 -0
  28. package/dist/types/index.d.mts +5 -0
  29. package/dist/types/index.d.ts +28 -0
  30. package/dist/types/principal/PrincipalClient.d.ts +34 -0
  31. package/dist/types/react/ConsentEraProvider.d.ts +58 -0
  32. package/dist/types/react/ConsentGate.d.ts +40 -0
  33. package/dist/types/react/index.d.mts +4 -0
  34. package/dist/types/react/index.d.ts +10 -0
  35. package/dist/types/react/useConsentEra.d.ts +65 -0
  36. package/dist/types/react/useConsentValidation.d.ts +23 -0
  37. package/dist/types/storage/ConsentStorage.d.ts +39 -0
  38. package/dist/types/tcf/TCFManager.d.ts +46 -0
  39. package/dist/types/types/consent-lifecycle.d.ts +804 -0
  40. package/dist/types/types/index.d.ts +311 -0
  41. package/dist/types/ui/ConsentBanner.d.ts +22 -0
  42. package/dist/types/ui/PreferenceCenter.d.ts +24 -0
  43. package/dist/types/utils/EventEmitter.d.ts +32 -0
  44. package/dist/types/utils/Logger.d.ts +16 -0
  45. package/dist/types/utils/browserStorage.d.ts +35 -0
  46. package/dist/types/utils/context.d.ts +81 -0
  47. package/dist/types/utils/helpers.d.ts +48 -0
  48. package/package.json +132 -0
package/package.json ADDED
@@ -0,0 +1,132 @@
1
+ {
2
+ "name": "@consentera/consent-sdk",
3
+ "version": "2.0.0",
4
+ "description": "Consentera Consent Management SDK for the web \u2014 DPDP (India) first, with GDPR, TCF 2.2 and GPP surfaces",
5
+ "keywords": [
6
+ "consent",
7
+ "dpdp",
8
+ "gdpr",
9
+ "tcf",
10
+ "gpp",
11
+ "privacy",
12
+ "cookie",
13
+ "banner",
14
+ "compliance",
15
+ "consent-management",
16
+ "data-protection"
17
+ ],
18
+ "homepage": "https://docs.consentera.in",
19
+ "bugs": {
20
+ "url": "https://github.com/consentera-platform/consentera-sdks/issues"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/consentera-platform/consentera-sdks.git",
25
+ "directory": "javascript"
26
+ },
27
+ "license": "MIT",
28
+ "author": "Consentera Technologies",
29
+ "sideEffects": [
30
+ "./dist/consentera-consent.min.js"
31
+ ],
32
+ "type": "commonjs",
33
+ "main": "dist/consentera-consent.cjs",
34
+ "module": "dist/consentera-consent.mjs",
35
+ "types": "dist/types/index.d.ts",
36
+ "unpkg": "dist/consentera-consent.min.js",
37
+ "jsdelivr": "dist/consentera-consent.min.js",
38
+ "exports": {
39
+ ".": {
40
+ "import": {
41
+ "types": "./dist/types/index.d.mts",
42
+ "default": "./dist/consentera-consent.mjs"
43
+ },
44
+ "require": {
45
+ "types": "./dist/types/index.d.ts",
46
+ "default": "./dist/consentera-consent.cjs"
47
+ },
48
+ "default": "./dist/consentera-consent.cjs"
49
+ },
50
+ "./react": {
51
+ "import": {
52
+ "types": "./dist/types/react/index.d.mts",
53
+ "default": "./dist/react/index.mjs"
54
+ },
55
+ "require": {
56
+ "types": "./dist/types/react/index.d.ts",
57
+ "default": "./dist/react/index.cjs"
58
+ },
59
+ "default": "./dist/react/index.cjs"
60
+ },
61
+ "./package.json": "./package.json"
62
+ },
63
+ "files": [
64
+ "dist",
65
+ "README.md",
66
+ "CHANGELOG.md",
67
+ "LICENSE"
68
+ ],
69
+ "engines": {
70
+ "node": ">=20"
71
+ },
72
+ "scripts": {
73
+ "build": "npm run clean && npm run build:bundles && npm run build:types",
74
+ "build:bundles": "rollup -c rollup.config.mjs",
75
+ "build:types": "tsc -p tsconfig.build.json && node scripts/emit-esm-types.mjs",
76
+ "dev": "rollup -c rollup.config.mjs -w",
77
+ "test": "jest",
78
+ "test:coverage": "jest --coverage",
79
+ "typecheck": "tsc --noEmit",
80
+ "lint": "eslint .",
81
+ "publint": "publint",
82
+ "attw": "attw --pack .",
83
+ "verify:pack": "bash ../scripts/verify-pack.sh javascript",
84
+ "prepublishOnly": "npm run build && npm run verify:pack && npm run verify:smoke",
85
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
86
+ "verify:smoke": "bash ../scripts/install-smoke.sh javascript"
87
+ },
88
+ "dependencies": {
89
+ "tslib": "^2.8.1"
90
+ },
91
+ "peerDependencies": {
92
+ "react": "^18.0.0 || ^19.0.0"
93
+ },
94
+ "peerDependenciesMeta": {
95
+ "react": {
96
+ "optional": true
97
+ }
98
+ },
99
+ "devDependencies": {
100
+ "@arethetypeswrong/cli": "^0.18.2",
101
+ "@eslint/js": "^9.39.1",
102
+ "@rollup/plugin-commonjs": "^28.0.6",
103
+ "@rollup/plugin-node-resolve": "^16.0.3",
104
+ "@rollup/plugin-terser": "^1.0.0",
105
+ "@rollup/plugin-typescript": "^12.1.4",
106
+ "@testing-library/dom": "^10.4.1",
107
+ "@testing-library/jest-dom": "^6.9.1",
108
+ "@testing-library/react": "^16.3.0",
109
+ "@types/jest": "^30.0.0",
110
+ "@types/react": "^19.2.2",
111
+ "@types/react-dom": "^19.2.1",
112
+ "eslint": "^9.39.1",
113
+ "eslint-plugin-react-hooks": "^5.2.0",
114
+ "globals": "^16.5.0",
115
+ "jest": "^30.2.0",
116
+ "jest-environment-jsdom": "^30.2.0",
117
+ "publint": "^0.3.14",
118
+ "react": "^19.2.0",
119
+ "react-dom": "^19.2.0",
120
+ "rollup": "^4.52.5",
121
+ "ts-jest": "^29.4.4",
122
+ "typescript": "^5.9.3",
123
+ "typescript-eslint": "^8.46.0"
124
+ },
125
+ "typesVersions": {
126
+ "*": {
127
+ "react": [
128
+ "./dist/types/react/index.d.ts"
129
+ ]
130
+ }
131
+ }
132
+ }