@solvenza/cookies-compliance 1.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 (43) hide show
  1. package/README.md +245 -0
  2. package/bin/audit-cli.js +25 -0
  3. package/bin/init-cli.js +126 -0
  4. package/dist/chunk-DDAAVRWG.js +25 -0
  5. package/dist/chunk-DDAAVRWG.js.map +1 -0
  6. package/dist/chunk-LIWFUVWY.js +1858 -0
  7. package/dist/chunk-LIWFUVWY.js.map +1 -0
  8. package/dist/consent-engine-BvsH_wqV.d.cts +191 -0
  9. package/dist/consent-engine-BvsH_wqV.d.ts +191 -0
  10. package/dist/consent.esm.cjs +2051 -0
  11. package/dist/consent.esm.cjs.map +1 -0
  12. package/dist/consent.esm.d.cts +146 -0
  13. package/dist/consent.esm.d.ts +146 -0
  14. package/dist/consent.esm.js +184 -0
  15. package/dist/consent.esm.js.map +1 -0
  16. package/dist/consent.min.js +589 -0
  17. package/dist/consent.min.js.map +1 -0
  18. package/dist/wrappers/angular.cjs +1867 -0
  19. package/dist/wrappers/angular.cjs.map +1 -0
  20. package/dist/wrappers/angular.d.cts +20 -0
  21. package/dist/wrappers/angular.d.ts +20 -0
  22. package/dist/wrappers/angular.js +42 -0
  23. package/dist/wrappers/angular.js.map +1 -0
  24. package/dist/wrappers/next.cjs +1840 -0
  25. package/dist/wrappers/next.cjs.map +1 -0
  26. package/dist/wrappers/next.d.cts +3 -0
  27. package/dist/wrappers/next.d.ts +3 -0
  28. package/dist/wrappers/next.js +15 -0
  29. package/dist/wrappers/next.js.map +1 -0
  30. package/dist/wrappers/react.cjs +1882 -0
  31. package/dist/wrappers/react.cjs.map +1 -0
  32. package/dist/wrappers/react.d.cts +4 -0
  33. package/dist/wrappers/react.d.ts +4 -0
  34. package/dist/wrappers/react.js +56 -0
  35. package/dist/wrappers/react.js.map +1 -0
  36. package/dist/wrappers/wordpress.cjs +64 -0
  37. package/dist/wrappers/wordpress.cjs.map +1 -0
  38. package/dist/wrappers/wordpress.d.cts +10 -0
  39. package/dist/wrappers/wordpress.d.ts +10 -0
  40. package/dist/wrappers/wordpress.js +41 -0
  41. package/dist/wrappers/wordpress.js.map +1 -0
  42. package/package.json +85 -0
  43. package/schema.json +165 -0
package/schema.json ADDED
@@ -0,0 +1,165 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ConsentConfigSchema",
4
+ "type": "object",
5
+ "required": ["schemaVersion", "policyVersion", "categories"],
6
+ "properties": {
7
+ "schemaVersion": {
8
+ "type": "integer",
9
+ "minimum": 1
10
+ },
11
+ "policyVersion": {
12
+ "type": "string"
13
+ },
14
+ "jurisdiction": {
15
+ "type": "array",
16
+ "items": { "type": "string" }
17
+ },
18
+ "locale": {
19
+ "type": "object",
20
+ "properties": {
21
+ "default": { "type": "string" },
22
+ "fallback": { "type": "string" }
23
+ }
24
+ },
25
+ "policy": {
26
+ "type": "object",
27
+ "properties": {
28
+ "privacyUrl": { "type": "string" },
29
+ "cookiesUrl": { "type": "string" }
30
+ }
31
+ },
32
+ "consent": {
33
+ "type": "object",
34
+ "properties": {
35
+ "maxAgeDays": { "type": "integer", "default": 365 },
36
+ "renewOnPolicyChange": { "type": "boolean", "default": true },
37
+ "reloadOnRevoke": { "type": "string", "enum": ["auto", "always", "never"] }
38
+ }
39
+ },
40
+ "storage": {
41
+ "type": "object",
42
+ "properties": {
43
+ "type": { "type": "string", "enum": ["cookie", "memory"] },
44
+ "name": { "type": "string" },
45
+ "path": { "type": "string" },
46
+ "sameSite": { "type": "string", "enum": ["Lax", "Strict", "None"] },
47
+ "secure": { "type": "boolean" }
48
+ }
49
+ },
50
+ "categories": {
51
+ "type": "object",
52
+ "additionalProperties": {
53
+ "type": "object",
54
+ "required": ["required", "label", "description"],
55
+ "properties": {
56
+ "required": { "type": "boolean" },
57
+ "default": { "type": "boolean" },
58
+ "label": { "type": "string" },
59
+ "description": { "type": "string" }
60
+ }
61
+ }
62
+ },
63
+ "services": {
64
+ "type": "object",
65
+ "additionalProperties": {
66
+ "type": "object",
67
+ "required": ["category", "label"],
68
+ "properties": {
69
+ "category": { "type": "string" },
70
+ "label": { "type": "string" },
71
+ "provider": { "type": "string" },
72
+ "consent": {
73
+ "type": "object",
74
+ "properties": {
75
+ "mode": { "type": "string", "enum": ["required", "exempt"] },
76
+ "legalReviewRequired": { "type": "boolean" },
77
+ "reviewReference": { "type": "string" }
78
+ }
79
+ },
80
+ "domains": {
81
+ "type": "array",
82
+ "items": { "type": "string" }
83
+ },
84
+ "cookies": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "object",
88
+ "properties": {
89
+ "name": { "type": "string" },
90
+ "duration": { "type": "string" }
91
+ }
92
+ }
93
+ },
94
+ "resources": {
95
+ "type": "object",
96
+ "properties": {
97
+ "iframes": {
98
+ "type": "array",
99
+ "items": { "type": "string" }
100
+ },
101
+ "scripts": {
102
+ "type": "array",
103
+ "items": { "type": "string" }
104
+ }
105
+ }
106
+ },
107
+ "placeholder": {
108
+ "type": "object",
109
+ "properties": {
110
+ "enabled": { "type": "boolean" },
111
+ "text": { "type": "string" },
112
+ "allowButton": { "type": "string" }
113
+ }
114
+ },
115
+ "adapter": {
116
+ "type": "object",
117
+ "properties": {
118
+ "type": { "type": "string" },
119
+ "config": { "type": "object" }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ },
125
+ "ui": {
126
+ "type": "object",
127
+ "properties": {
128
+ "position": { "type": "string", "enum": ["bottom", "top", "modal"] },
129
+ "banner": {
130
+ "type": "object",
131
+ "properties": {
132
+ "title": { "type": "string" },
133
+ "description": { "type": "string" },
134
+ "accept": { "type": "string" },
135
+ "reject": { "type": "string" },
136
+ "configure": { "type": "string" }
137
+ }
138
+ },
139
+ "preferences": {
140
+ "type": "object",
141
+ "properties": {
142
+ "title": { "type": "string" },
143
+ "save": { "type": "string" },
144
+ "acceptAll": { "type": "string" },
145
+ "rejectAll": { "type": "string" }
146
+ }
147
+ }
148
+ }
149
+ },
150
+ "logging": {
151
+ "type": "object",
152
+ "properties": {
153
+ "enabled": { "type": "boolean" },
154
+ "endpoint": { "type": ["string", "null"] }
155
+ }
156
+ },
157
+ "diagnostics": {
158
+ "type": "object",
159
+ "properties": {
160
+ "enabled": { "type": "boolean" },
161
+ "warnUnknownResources": { "type": "boolean" }
162
+ }
163
+ }
164
+ }
165
+ }