@financial-times/cmp-client 4.1.0 → 5.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.
- package/dist/index.cjs +228 -77
- package/dist/index.js +228 -77
- package/dist/scripts/cmp-static.js +2 -1
- package/dist/src/client.d.ts +1 -1
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/consent-parsers/__fixtures__/gpp.d.ts +20 -0
- package/dist/src/consent-parsers/__fixtures__/gpp.d.ts.map +1 -0
- package/dist/src/consent-parsers/__tests__/index.test.d.ts +2 -0
- package/dist/src/consent-parsers/__tests__/index.test.d.ts.map +1 -0
- package/dist/src/consent-parsers/gpp/__tests__/parse-gpp-consent.test.d.ts +2 -0
- package/dist/src/consent-parsers/gpp/__tests__/parse-gpp-consent.test.d.ts.map +1 -0
- package/dist/src/consent-parsers/gpp/index.d.ts +3 -0
- package/dist/src/consent-parsers/gpp/index.d.ts.map +1 -0
- package/dist/src/consent-parsers/index.d.ts +6 -0
- package/dist/src/consent-parsers/index.d.ts.map +1 -0
- package/dist/src/consent-parsers/tcfv2/__tests__/check-consent.test.d.ts.map +1 -0
- package/dist/src/{consent-ready/utils/get-parsed-consent.d.ts → consent-parsers/tcfv2/index.d.ts} +2 -7
- package/dist/src/consent-parsers/tcfv2/index.d.ts.map +1 -0
- package/dist/src/consent-ready/index.d.ts.map +1 -1
- package/dist/src/html/__tests__/cmp-manage-cookies-links.test.d.ts +2 -0
- package/dist/src/html/__tests__/cmp-manage-cookies-links.test.d.ts.map +1 -0
- package/dist/src/html/cmp-manage-cookies-link.d.ts +6 -9
- package/dist/src/html/cmp-manage-cookies-link.d.ts.map +1 -1
- package/dist/src/html/cmp-scripts.d.ts +2 -2
- package/dist/src/html/cmp-scripts.d.ts.map +1 -1
- package/dist/src/lib/configurators/ft-dot-com.d.ts +7 -0
- package/dist/src/lib/configurators/ft-dot-com.d.ts.map +1 -0
- package/dist/src/lib/configurators/index.d.ts +14 -0
- package/dist/src/lib/configurators/index.d.ts.map +1 -0
- package/dist/src/lib/constants.d.ts +0 -4
- package/dist/src/lib/constants.d.ts.map +1 -1
- package/dist/src/lib/properties.d.ts +3 -12
- package/dist/src/lib/properties.d.ts.map +1 -1
- package/dist/src/utils/url.d.ts +3 -12
- package/dist/src/utils/url.d.ts.map +1 -1
- package/package.json +1 -1
- package/typings/globals.d.ts +5 -1
- package/typings/types.d.ts +97 -4
- package/dist/src/consent-ready/utils/__tests__/check-consent.test.d.ts.map +0 -1
- package/dist/src/consent-ready/utils/__tests__/get-parsed-consent.test.d.ts +0 -2
- package/dist/src/consent-ready/utils/__tests__/get-parsed-consent.test.d.ts.map +0 -1
- package/dist/src/consent-ready/utils/get-parsed-consent.d.ts.map +0 -1
- /package/dist/src/{consent-ready/utils → consent-parsers/tcfv2}/__tests__/check-consent.test.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmp-manage-cookies-link.d.ts","sourceRoot":"","sources":["../../../src/html/cmp-manage-cookies-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"cmp-manage-cookies-link.d.ts","sourceRoot":"","sources":["../../../src/html/cmp-manage-cookies-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIlE,iBAAS,kBAAkB,CACzB,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC,EACtE,yBAAyB,CAAC,EAAE,MAAM,QAenC;AAED,wBAAgB,2BAA2B,CAAC,EAAE,cAAc,EAAE,GAAE,QAAyB,QA+DxF;AAED,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SPConfig } from "../../typings/types";
|
|
1
|
+
import type { CMPInitOptions, SPConfig } from "../../typings/types";
|
|
2
2
|
/**
|
|
3
3
|
* Set up the config and event handlers for the CMP
|
|
4
4
|
* Then add the vendor scripts to the head of the document
|
|
5
5
|
*/
|
|
6
|
-
export declare function bootstrapCmp(config: SPConfig): void;
|
|
6
|
+
export declare function bootstrapCmp(config: SPConfig, options: CMPInitOptions): void;
|
|
7
7
|
//# sourceMappingURL=cmp-scripts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmp-scripts.d.ts","sourceRoot":"","sources":["../../../src/html/cmp-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"cmp-scripts.d.ts","sourceRoot":"","sources":["../../../src/html/cmp-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAsCpE;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,QAOrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ft-dot-com.d.ts","sourceRoot":"","sources":["../../../../src/lib/configurators/ft-dot-com.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA2BvD,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,QAAQ;;;;EAS1D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SPConfig } from "../../../typings/types";
|
|
2
|
+
export declare function getRuntimeOptions(activeProperty: SPConfig): Partial<{
|
|
3
|
+
propertyConfig: SPConfig;
|
|
4
|
+
userId: string;
|
|
5
|
+
useFTSession: boolean;
|
|
6
|
+
consentProxyHost: string;
|
|
7
|
+
cookieDomain: string;
|
|
8
|
+
formOfWordsId: string;
|
|
9
|
+
useConsentStore: boolean;
|
|
10
|
+
trackingContext: import("../../../typings/types").TrackingContext;
|
|
11
|
+
disableFTCookies: boolean;
|
|
12
|
+
includeUsNat: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/configurators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAWlE,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,QAAQ;;;;;;;;;;;GAYzD"}
|
|
@@ -4,10 +4,6 @@ export declare const CONSENT_COOKIE_NAME = "FTConsent";
|
|
|
4
4
|
export declare const SOURCEPOINT_FOW_ID = "sourcepointCmp/VngD.XycZut.595cp9fWdp5XYP9vlFvk";
|
|
5
5
|
export declare const FT_COOKIE_DOMAIN = ".ft.com";
|
|
6
6
|
export declare const FT_CONSENT_PROXY_HOST = "https://consent.ft.com";
|
|
7
|
-
export declare const legislation: {
|
|
8
|
-
CCPA: string;
|
|
9
|
-
GDPR: string;
|
|
10
|
-
};
|
|
11
7
|
export declare const iabCustomCategories: {
|
|
12
8
|
readonly permutiveAds: {
|
|
13
9
|
readonly purposes: readonly [2, 4, 8, 9];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,kBAAkB,oDAAoD,CAAC;AACpF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,kBAAkB,oDAAoD,CAAC;AACpF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BtB,CAAC;AAEX,eAAO,MAAM,gBAAgB,wGAA8D,CAAC"}
|
|
@@ -10,10 +10,10 @@ export declare const FT_DOTCOM_TEST: {
|
|
|
10
10
|
_clientOptions: {
|
|
11
11
|
privacyManagerId: number;
|
|
12
12
|
manageCookiesLinkOverride: string;
|
|
13
|
+
rootDomain: string;
|
|
13
14
|
};
|
|
14
15
|
joinHref: boolean;
|
|
15
16
|
gdpr: {};
|
|
16
|
-
ccpa: {};
|
|
17
17
|
};
|
|
18
18
|
export declare const FT_DOTCOM_PROD: {
|
|
19
19
|
accountId: number;
|
|
@@ -21,12 +21,13 @@ export declare const FT_DOTCOM_PROD: {
|
|
|
21
21
|
propertyId: number;
|
|
22
22
|
_clientOptions: {
|
|
23
23
|
privacyManagerId: number;
|
|
24
|
+
usnatPrivacyManagerId: number;
|
|
25
|
+
ccpaPrivacyManagerId: number;
|
|
24
26
|
manageCookiesLinkOverride: string;
|
|
25
27
|
rootDomain: string;
|
|
26
28
|
};
|
|
27
29
|
joinHref: boolean;
|
|
28
30
|
gdpr: {};
|
|
29
|
-
ccpa: {};
|
|
30
31
|
};
|
|
31
32
|
export declare const SP_PWMNET: {
|
|
32
33
|
accountId: number;
|
|
@@ -37,7 +38,6 @@ export declare const SP_PWMNET: {
|
|
|
37
38
|
};
|
|
38
39
|
joinHref: boolean;
|
|
39
40
|
gdpr: {};
|
|
40
|
-
ccpa: {};
|
|
41
41
|
};
|
|
42
42
|
export declare const SP_FDI_INTELLIGENCE: {
|
|
43
43
|
accountId: number;
|
|
@@ -48,7 +48,6 @@ export declare const SP_FDI_INTELLIGENCE: {
|
|
|
48
48
|
};
|
|
49
49
|
joinHref: boolean;
|
|
50
50
|
gdpr: {};
|
|
51
|
-
ccpa: {};
|
|
52
51
|
};
|
|
53
52
|
export declare const SP_THE_BANKER: {
|
|
54
53
|
accountId: number;
|
|
@@ -59,7 +58,6 @@ export declare const SP_THE_BANKER: {
|
|
|
59
58
|
};
|
|
60
59
|
joinHref: boolean;
|
|
61
60
|
gdpr: {};
|
|
62
|
-
ccpa: {};
|
|
63
61
|
};
|
|
64
62
|
export declare const SP_BANKING_RR: {
|
|
65
63
|
accountId: number;
|
|
@@ -70,7 +68,6 @@ export declare const SP_BANKING_RR: {
|
|
|
70
68
|
};
|
|
71
69
|
joinHref: boolean;
|
|
72
70
|
gdpr: {};
|
|
73
|
-
ccpa: {};
|
|
74
71
|
};
|
|
75
72
|
export declare const SP_SUSTAINABLE_VIEWS: {
|
|
76
73
|
accountId: number;
|
|
@@ -81,7 +78,6 @@ export declare const SP_SUSTAINABLE_VIEWS: {
|
|
|
81
78
|
};
|
|
82
79
|
joinHref: boolean;
|
|
83
80
|
gdpr: {};
|
|
84
|
-
ccpa: {};
|
|
85
81
|
};
|
|
86
82
|
export declare const SP_FT_ADVISER: {
|
|
87
83
|
accountId: number;
|
|
@@ -92,7 +88,6 @@ export declare const SP_FT_ADVISER: {
|
|
|
92
88
|
};
|
|
93
89
|
joinHref: boolean;
|
|
94
90
|
gdpr: {};
|
|
95
|
-
ccpa: {};
|
|
96
91
|
};
|
|
97
92
|
export declare const SP_INVESTORS_CHRONICLE: {
|
|
98
93
|
accountId: number;
|
|
@@ -103,7 +98,6 @@ export declare const SP_INVESTORS_CHRONICLE: {
|
|
|
103
98
|
};
|
|
104
99
|
joinHref: boolean;
|
|
105
100
|
gdpr: {};
|
|
106
|
-
ccpa: {};
|
|
107
101
|
};
|
|
108
102
|
export declare const MM_IGNITES_ASIA: {
|
|
109
103
|
accountId: number;
|
|
@@ -114,7 +108,6 @@ export declare const MM_IGNITES_ASIA: {
|
|
|
114
108
|
};
|
|
115
109
|
joinHref: boolean;
|
|
116
110
|
gdpr: {};
|
|
117
|
-
ccpa: {};
|
|
118
111
|
};
|
|
119
112
|
export declare const MM_IGNITES_EUROPE: {
|
|
120
113
|
accountId: number;
|
|
@@ -125,7 +118,6 @@ export declare const MM_IGNITES_EUROPE: {
|
|
|
125
118
|
};
|
|
126
119
|
joinHref: boolean;
|
|
127
120
|
gdpr: {};
|
|
128
|
-
ccpa: {};
|
|
129
121
|
};
|
|
130
122
|
export declare const SP_MANDATE_WIRE: {
|
|
131
123
|
accountId: number;
|
|
@@ -136,6 +128,5 @@ export declare const SP_MANDATE_WIRE: {
|
|
|
136
128
|
};
|
|
137
129
|
joinHref: boolean;
|
|
138
130
|
gdpr: {};
|
|
139
|
-
ccpa: {};
|
|
140
131
|
};
|
|
141
132
|
//# sourceMappingURL=properties.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/lib/properties.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/lib/properties.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAU1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAY1B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;CAQrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;CAQhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;CAQlC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;CAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC"}
|
package/dist/src/utils/url.d.ts
CHANGED
|
@@ -16,22 +16,23 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
16
16
|
_clientOptions: {
|
|
17
17
|
privacyManagerId: number;
|
|
18
18
|
manageCookiesLinkOverride: string;
|
|
19
|
+
rootDomain: string;
|
|
19
20
|
};
|
|
20
21
|
joinHref: boolean;
|
|
21
22
|
gdpr: {};
|
|
22
|
-
ccpa: {};
|
|
23
23
|
} | {
|
|
24
24
|
accountId: number;
|
|
25
25
|
baseEndpoint: string;
|
|
26
26
|
propertyId: number;
|
|
27
27
|
_clientOptions: {
|
|
28
28
|
privacyManagerId: number;
|
|
29
|
+
usnatPrivacyManagerId: number;
|
|
30
|
+
ccpaPrivacyManagerId: number;
|
|
29
31
|
manageCookiesLinkOverride: string;
|
|
30
32
|
rootDomain: string;
|
|
31
33
|
};
|
|
32
34
|
joinHref: boolean;
|
|
33
35
|
gdpr: {};
|
|
34
|
-
ccpa: {};
|
|
35
36
|
} | {
|
|
36
37
|
accountId: number;
|
|
37
38
|
baseEndpoint: string;
|
|
@@ -41,7 +42,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
41
42
|
};
|
|
42
43
|
joinHref: boolean;
|
|
43
44
|
gdpr: {};
|
|
44
|
-
ccpa: {};
|
|
45
45
|
} | {
|
|
46
46
|
accountId: number;
|
|
47
47
|
baseEndpoint: string;
|
|
@@ -51,7 +51,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
51
51
|
};
|
|
52
52
|
joinHref: boolean;
|
|
53
53
|
gdpr: {};
|
|
54
|
-
ccpa: {};
|
|
55
54
|
} | {
|
|
56
55
|
accountId: number;
|
|
57
56
|
baseEndpoint: string;
|
|
@@ -61,7 +60,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
61
60
|
};
|
|
62
61
|
joinHref: boolean;
|
|
63
62
|
gdpr: {};
|
|
64
|
-
ccpa: {};
|
|
65
63
|
} | {
|
|
66
64
|
accountId: number;
|
|
67
65
|
baseEndpoint: string;
|
|
@@ -71,7 +69,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
71
69
|
};
|
|
72
70
|
joinHref: boolean;
|
|
73
71
|
gdpr: {};
|
|
74
|
-
ccpa: {};
|
|
75
72
|
} | {
|
|
76
73
|
accountId: number;
|
|
77
74
|
baseEndpoint: string;
|
|
@@ -81,7 +78,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
81
78
|
};
|
|
82
79
|
joinHref: boolean;
|
|
83
80
|
gdpr: {};
|
|
84
|
-
ccpa: {};
|
|
85
81
|
} | {
|
|
86
82
|
accountId: number;
|
|
87
83
|
baseEndpoint: string;
|
|
@@ -91,7 +87,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
91
87
|
};
|
|
92
88
|
joinHref: boolean;
|
|
93
89
|
gdpr: {};
|
|
94
|
-
ccpa: {};
|
|
95
90
|
} | {
|
|
96
91
|
accountId: number;
|
|
97
92
|
baseEndpoint: string;
|
|
@@ -101,7 +96,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
101
96
|
};
|
|
102
97
|
joinHref: boolean;
|
|
103
98
|
gdpr: {};
|
|
104
|
-
ccpa: {};
|
|
105
99
|
} | {
|
|
106
100
|
accountId: number;
|
|
107
101
|
baseEndpoint: string;
|
|
@@ -111,7 +105,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
111
105
|
};
|
|
112
106
|
joinHref: boolean;
|
|
113
107
|
gdpr: {};
|
|
114
|
-
ccpa: {};
|
|
115
108
|
} | {
|
|
116
109
|
accountId: number;
|
|
117
110
|
baseEndpoint: string;
|
|
@@ -121,7 +114,6 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
121
114
|
};
|
|
122
115
|
joinHref: boolean;
|
|
123
116
|
gdpr: {};
|
|
124
|
-
ccpa: {};
|
|
125
117
|
} | {
|
|
126
118
|
accountId: number;
|
|
127
119
|
baseEndpoint: string;
|
|
@@ -131,6 +123,5 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
131
123
|
};
|
|
132
124
|
joinHref: boolean;
|
|
133
125
|
gdpr: {};
|
|
134
|
-
ccpa: {};
|
|
135
126
|
};
|
|
136
127
|
//# sourceMappingURL=url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAWtE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAWtE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB3D"}
|
package/package.json
CHANGED
package/typings/globals.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TCData } from "./types";
|
|
1
|
+
import { GPP, TCData } from "./types";
|
|
2
2
|
|
|
3
3
|
export {};
|
|
4
4
|
|
|
@@ -8,9 +8,13 @@ declare global {
|
|
|
8
8
|
_sp_: {
|
|
9
9
|
config: SPConfig;
|
|
10
10
|
addEventListener?: (e: string, callback: SPEventCallback) => void;
|
|
11
|
+
removeEventListener?: (e: string, callback: SPEventCallback) => void;
|
|
11
12
|
gdpr?: { loadPrivacyManagerModal: (id: number | undefined) => void };
|
|
13
|
+
ccpa?: { loadPrivacyManagerModal: (id: number | undefined) => void };
|
|
14
|
+
usnat?: { loadPrivacyManagerModal: (id: number | undefined) => void };
|
|
12
15
|
};
|
|
13
16
|
_sp_queue: (() => void)[];
|
|
14
17
|
__tcfapi: (key: string, n: number, callback: (resp: TCData) => void) => void;
|
|
18
|
+
__gpp: (key: string, callback: (resp: GPP.PingData) => void) => void;
|
|
15
19
|
}
|
|
16
20
|
}
|
package/typings/types.d.ts
CHANGED
|
@@ -8,15 +8,18 @@ export type SPEventId = keyof SPLifecycleEvents;
|
|
|
8
8
|
|
|
9
9
|
export type SPConfigClientOptions = {
|
|
10
10
|
privacyManagerId?: number;
|
|
11
|
+
usnatPrivacyManagerId?: number;
|
|
12
|
+
ccpaPrivacyManagerId?: number;
|
|
11
13
|
manageCookiesLinkOverride?: string;
|
|
12
14
|
rootDomain?: string;
|
|
15
|
+
includeUsNat?: boolean;
|
|
13
16
|
};
|
|
14
17
|
|
|
15
18
|
export interface SPConfig {
|
|
16
19
|
accountId: number;
|
|
17
20
|
baseEndpoint: string;
|
|
18
21
|
gdpr: Record<string, unknown>;
|
|
19
|
-
|
|
22
|
+
usnat?: Record<string, unknown>;
|
|
20
23
|
propertyHref?: string;
|
|
21
24
|
propertyId?: number;
|
|
22
25
|
joinHref?: boolean;
|
|
@@ -34,14 +37,15 @@ export type SPEventCallback = (
|
|
|
34
37
|
|
|
35
38
|
export type CMPInitOptions = Partial<{
|
|
36
39
|
propertyConfig: SPConfig;
|
|
37
|
-
userId
|
|
40
|
+
userId: string;
|
|
38
41
|
useFTSession: boolean;
|
|
39
42
|
consentProxyHost: string;
|
|
40
43
|
cookieDomain: string;
|
|
41
44
|
formOfWordsId: string;
|
|
42
45
|
useConsentStore: boolean;
|
|
43
|
-
trackingContext
|
|
46
|
+
trackingContext: TrackingContext;
|
|
44
47
|
disableFTCookies: boolean;
|
|
48
|
+
includeUsNat: boolean;
|
|
45
49
|
}>;
|
|
46
50
|
|
|
47
51
|
export interface ConsentPayloadOptions {
|
|
@@ -87,7 +91,7 @@ export interface IabCustomCategory {
|
|
|
87
91
|
|
|
88
92
|
export type IabCustomCategoryName = keyof typeof iabCustomCategories;
|
|
89
93
|
|
|
90
|
-
export type Legislation = "gdpr" | "
|
|
94
|
+
export type Legislation = "gdpr" | "usnat";
|
|
91
95
|
|
|
92
96
|
export interface RawConsentState {
|
|
93
97
|
gdpr: string | null;
|
|
@@ -185,3 +189,92 @@ export type TCData = {
|
|
|
185
189
|
restrictions: Record<string, Record<string, 0 | 1 | 2>>;
|
|
186
190
|
};
|
|
187
191
|
};
|
|
192
|
+
|
|
193
|
+
export interface LinkOnClickFunction {
|
|
194
|
+
(e: MouseEvent): void;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface PrivacyManagerRegionId {
|
|
198
|
+
text: string;
|
|
199
|
+
onClick: LinkOnClickFunction;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface regionConfig {
|
|
203
|
+
[key: string]: PrivacyManagerRegionId;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export namespace GPP {
|
|
207
|
+
/**
|
|
208
|
+
* https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20National%20Privacy%20Technical%20Specification.md#section-encoding
|
|
209
|
+
*/
|
|
210
|
+
export interface UsNatSection {
|
|
211
|
+
Version: number;
|
|
212
|
+
SharingNotice: 0 | 1 | 2;
|
|
213
|
+
SaleOptOutNotice: 0 | 1 | 2;
|
|
214
|
+
SharingOptOutNotice: 0 | 1 | 2;
|
|
215
|
+
TargetedAdvertisingOptOutNotice: 0 | 1 | 2;
|
|
216
|
+
SensitiveDataProcessingOptOutNotice: 0 | 1 | 2;
|
|
217
|
+
SensitiveDataLimitUseNotice: 0 | 1 | 2;
|
|
218
|
+
SaleOptOut: 0 | 1 | 2;
|
|
219
|
+
SharingOptOut: 0 | 1 | 2;
|
|
220
|
+
TargetedAdvertisingOptOut: 0 | 1 | 2;
|
|
221
|
+
SensitiveDataProcessing: Array<0 | 1 | 2>;
|
|
222
|
+
KnownChildSensitiveDataConsents: Array<0 | 1 | 2>;
|
|
223
|
+
PersonalDataConsents: 0 | 1 | 2;
|
|
224
|
+
MspaCoveredTransaction: 1 | 2;
|
|
225
|
+
MspaOptOutOptionMode: 0 | 1 | 2;
|
|
226
|
+
MspaServiceProviderMode: 0 | 1 | 2;
|
|
227
|
+
Gpc: boolean;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-States/CA/GPP%20Extension%3A%20IAB%20Privacy%E2%80%99s%20California%20Privacy%20Technical%20Specification.md
|
|
232
|
+
*/
|
|
233
|
+
export interface CaliforniaSection {
|
|
234
|
+
Version: number;
|
|
235
|
+
SaleOptOutNotice: 0 | 1 | 2;
|
|
236
|
+
SharingOptOutNotice: 0 | 1 | 2;
|
|
237
|
+
SensitiveDataLimitUseNotice: 0 | 1 | 2;
|
|
238
|
+
SaleOptOut: 0 | 1 | 2;
|
|
239
|
+
SharingOptOut: 0 | 1 | 2;
|
|
240
|
+
SensitiveDataProcessing: Array<0 | 1 | 2>;
|
|
241
|
+
KnownChildSensitiveDataConsents: Array<0 | 1 | 2>;
|
|
242
|
+
PersonalDataConsents: 0 | 1 | 2;
|
|
243
|
+
MspaCoveredTransaction: 1 | 2;
|
|
244
|
+
MspaOptOutOptionMode: 0 | 1 | 2;
|
|
245
|
+
MspaServiceProviderMode: 0 | 1 | 2;
|
|
246
|
+
Gpc: boolean;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface ParsedSections {
|
|
250
|
+
uscav1: CaliforniaSection;
|
|
251
|
+
usnatv1: UsNatSection;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export type PingData = {
|
|
255
|
+
gppVersion: string;
|
|
256
|
+
cmpStatus: string;
|
|
257
|
+
cmpDisplayStatus: string;
|
|
258
|
+
signalStatus: string;
|
|
259
|
+
supportedAPIs: string[];
|
|
260
|
+
cmpId: number;
|
|
261
|
+
sectionList: number[];
|
|
262
|
+
applicableSections: number[];
|
|
263
|
+
gppString: string;
|
|
264
|
+
parsedSections: ParsedSections;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export type ParsedSectionKey = keyof ParsedSections;
|
|
268
|
+
|
|
269
|
+
export type ParsedSection = ParsedSections[ParsedSectionKey];
|
|
270
|
+
|
|
271
|
+
export interface ParseFunction {
|
|
272
|
+
(sectionData: ParsedSections[ParsedSectionKey]): ParsedConsentState;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export type DeepPartial<T> = T extends object
|
|
277
|
+
? {
|
|
278
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
279
|
+
}
|
|
280
|
+
: T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-consent.test.d.ts","sourceRoot":"","sources":["../../../../../src/consent-ready/utils/__tests__/check-consent.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-parsed-consent.test.d.ts","sourceRoot":"","sources":["../../../../../src/consent-ready/utils/__tests__/get-parsed-consent.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-parsed-consent.d.ts","sourceRoot":"","sources":["../../../../src/consent-ready/utils/get-parsed-consent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAIhC;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,qBAAqB,EACnC,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GACzD,OAAO,CAmBT;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,sBAQnD;AAED,wBAAsB,gBAAgB,gCAerC;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,+BAE3F"}
|
/package/dist/src/{consent-ready/utils → consent-parsers/tcfv2}/__tests__/check-consent.test.d.ts
RENAMED
|
File without changes
|