lineas-romero-cookies-consent 1.1.4 → 1.1.6

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 (2) hide show
  1. package/index.d.ts +27 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,4 +1,18 @@
1
- // index.d.ts
1
+ export interface CookieCategory {
2
+ id: string;
3
+ label?: string;
4
+ description?: string;
5
+ enabled?: boolean;
6
+ readonly?: boolean;
7
+ cookiePatterns?: string[];
8
+ }
9
+
10
+ export interface CookieDetail {
11
+ provider: string; // Ej: "Google Analytics"
12
+ name: string; // Ej: "_ga"
13
+ duration: string; // Ej: "2 años"
14
+ purpose: string; // Ej: "Se usa para distinguir a los usuarios."
15
+ }
2
16
 
3
17
  export interface CookieCategory {
4
18
  id: string;
@@ -7,12 +21,20 @@ export interface CookieCategory {
7
21
  enabled?: boolean;
8
22
  readonly?: boolean;
9
23
  cookiePatterns?: string[];
24
+ cookiesDetails?: CookieDetail[];
10
25
  }
11
26
 
12
27
  export interface UserPreferences {
13
28
  [categoryId: string]: boolean;
14
29
  }
15
30
 
31
+ // Interfaz para los detalles del consentimiento (ID y fecha)
32
+ export interface ConsentDetails {
33
+ consentId: string;
34
+ consentDate: string;
35
+ preferences: UserPreferences;
36
+ }
37
+
16
38
  export interface CookieConsentConfig {
17
39
  siteName?: string;
18
40
  cookieName?: string;
@@ -26,6 +48,10 @@ export interface ConsentAPI {
26
48
  getConfig(): CookieConsentConfig;
27
49
  hasStoredConsent(): boolean;
28
50
  getPreferences(): UserPreferences;
51
+
52
+ // Método para obtener ID y fecha
53
+ getConsentDetails(): ConsentDetails;
54
+
29
55
  acceptAll(): UserPreferences;
30
56
  rejectAll(): UserPreferences;
31
57
  setPreferences(preferences: UserPreferences): UserPreferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lineas-romero-cookies-consent",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Gestor en vanilla JS + CSS para granular las cookies de las páginas de LR, Apartamentos y Visit La Graciosa de manera manual.",
5
5
  "type": "module",
6
6
  "files": [