@pubtech-ai/core 1.6.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/LICENSE +202 -0
- package/README.md +527 -0
- package/lib/cjs/Cloneable.d.ts +27 -0
- package/lib/cjs/Cloneable.js +1 -0
- package/lib/cjs/GVL.d.ts +295 -0
- package/lib/cjs/GVL.js +1 -0
- package/lib/cjs/Json.d.ts +20 -0
- package/lib/cjs/Json.js +1 -0
- package/lib/cjs/TCModel.d.ts +337 -0
- package/lib/cjs/TCModel.js +1 -0
- package/lib/cjs/TCString.d.ts +27 -0
- package/lib/cjs/TCString.js +1 -0
- package/lib/cjs/encoder/Base64Url.d.ts +29 -0
- package/lib/cjs/encoder/Base64Url.js +1 -0
- package/lib/cjs/encoder/BitLength.d.ts +32 -0
- package/lib/cjs/encoder/BitLength.js +1 -0
- package/lib/cjs/encoder/EncodingOptions.d.ts +6 -0
- package/lib/cjs/encoder/EncodingOptions.js +1 -0
- package/lib/cjs/encoder/SegmentEncoder.d.ts +8 -0
- package/lib/cjs/encoder/SegmentEncoder.js +1 -0
- package/lib/cjs/encoder/SemanticPreEncoder.d.ts +6 -0
- package/lib/cjs/encoder/SemanticPreEncoder.js +1 -0
- package/lib/cjs/encoder/field/BooleanEncoder.d.ts +4 -0
- package/lib/cjs/encoder/field/BooleanEncoder.js +1 -0
- package/lib/cjs/encoder/field/DateEncoder.d.ts +4 -0
- package/lib/cjs/encoder/field/DateEncoder.js +1 -0
- package/lib/cjs/encoder/field/FieldEncoderMap.d.ts +1 -0
- package/lib/cjs/encoder/field/FieldEncoderMap.js +1 -0
- package/lib/cjs/encoder/field/FixedVectorEncoder.d.ts +5 -0
- package/lib/cjs/encoder/field/FixedVectorEncoder.js +1 -0
- package/lib/cjs/encoder/field/IntEncoder.d.ts +4 -0
- package/lib/cjs/encoder/field/IntEncoder.js +1 -0
- package/lib/cjs/encoder/field/LangEncoder.d.ts +4 -0
- package/lib/cjs/encoder/field/LangEncoder.js +1 -0
- package/lib/cjs/encoder/field/PurposeRestrictionVectorEncoder.d.ts +5 -0
- package/lib/cjs/encoder/field/PurposeRestrictionVectorEncoder.js +1 -0
- package/lib/cjs/encoder/field/VectorEncodingType.d.ts +4 -0
- package/lib/cjs/encoder/field/VectorEncodingType.js +1 -0
- package/lib/cjs/encoder/field/VendorVectorEncoder.d.ts +6 -0
- package/lib/cjs/encoder/field/VendorVectorEncoder.js +1 -0
- package/lib/cjs/encoder/field/index.d.ts +9 -0
- package/lib/cjs/encoder/field/index.js +1 -0
- package/lib/cjs/encoder/index.d.ts +7 -0
- package/lib/cjs/encoder/index.js +1 -0
- package/lib/cjs/encoder/sequence/FieldSequence.d.ts +5 -0
- package/lib/cjs/encoder/sequence/FieldSequence.js +1 -0
- package/lib/cjs/encoder/sequence/SegmentSequence.d.ts +9 -0
- package/lib/cjs/encoder/sequence/SegmentSequence.js +1 -0
- package/lib/cjs/encoder/sequence/SequenceVersionMap.d.ts +7 -0
- package/lib/cjs/encoder/sequence/SequenceVersionMap.js +1 -0
- package/lib/cjs/encoder/sequence/index.d.ts +3 -0
- package/lib/cjs/encoder/sequence/index.js +1 -0
- package/lib/cjs/errors/DecodingError.d.ts +15 -0
- package/lib/cjs/errors/DecodingError.js +1 -0
- package/lib/cjs/errors/EncodingError.d.ts +15 -0
- package/lib/cjs/errors/EncodingError.js +1 -0
- package/lib/cjs/errors/GVLError.d.ts +15 -0
- package/lib/cjs/errors/GVLError.js +1 -0
- package/lib/cjs/errors/TCModelError.d.ts +16 -0
- package/lib/cjs/errors/TCModelError.js +1 -0
- package/lib/cjs/errors/index.d.ts +4 -0
- package/lib/cjs/errors/index.js +1 -0
- package/lib/cjs/index.d.ts +8 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/model/BinarySearchTree.d.ts +30 -0
- package/lib/cjs/model/BinarySearchTree.js +1 -0
- package/lib/cjs/model/ConsentLanguages.d.ts +6 -0
- package/lib/cjs/model/ConsentLanguages.js +1 -0
- package/lib/cjs/model/DeviceDisclosure.d.ts +9 -0
- package/lib/cjs/model/DeviceDisclosure.js +1 -0
- package/lib/cjs/model/DeviceDisclosureStorageAccessType.d.ts +5 -0
- package/lib/cjs/model/DeviceDisclosureStorageAccessType.js +1 -0
- package/lib/cjs/model/Fields.d.ts +29 -0
- package/lib/cjs/model/Fields.js +1 -0
- package/lib/cjs/model/IntMap.d.ts +13 -0
- package/lib/cjs/model/IntMap.js +1 -0
- package/lib/cjs/model/KeyMap.d.ts +12 -0
- package/lib/cjs/model/KeyMap.js +1 -0
- package/lib/cjs/model/PurposeRestriction.d.ts +33 -0
- package/lib/cjs/model/PurposeRestriction.js +1 -0
- package/lib/cjs/model/PurposeRestrictionVector.d.ts +100 -0
- package/lib/cjs/model/PurposeRestrictionVector.js +1 -0
- package/lib/cjs/model/RestrictionType.d.ts +19 -0
- package/lib/cjs/model/RestrictionType.js +1 -0
- package/lib/cjs/model/Segment.d.ts +6 -0
- package/lib/cjs/model/Segment.js +1 -0
- package/lib/cjs/model/SegmentIDs.d.ts +12 -0
- package/lib/cjs/model/SegmentIDs.js +1 -0
- package/lib/cjs/model/Vector.d.ts +72 -0
- package/lib/cjs/model/Vector.js +1 -0
- package/lib/cjs/model/gvl/ByPurposeVendorMap.d.ts +7 -0
- package/lib/cjs/model/gvl/ByPurposeVendorMap.js +1 -0
- package/lib/cjs/model/gvl/DataCategory.d.ts +4 -0
- package/lib/cjs/model/gvl/DataCategory.js +1 -0
- package/lib/cjs/model/gvl/DataRetention.d.ts +6 -0
- package/lib/cjs/model/gvl/DataRetention.js +1 -0
- package/lib/cjs/model/gvl/Declarations.d.ts +13 -0
- package/lib/cjs/model/gvl/Declarations.js +1 -0
- package/lib/cjs/model/gvl/Feature.d.ts +5 -0
- package/lib/cjs/model/gvl/Feature.js +1 -0
- package/lib/cjs/model/gvl/GVLMapItem.d.ts +4 -0
- package/lib/cjs/model/gvl/GVLMapItem.js +1 -0
- package/lib/cjs/model/gvl/IDSetMap.d.ts +2 -0
- package/lib/cjs/model/gvl/IDSetMap.js +1 -0
- package/lib/cjs/model/gvl/Purpose.d.ts +5 -0
- package/lib/cjs/model/gvl/Purpose.js +1 -0
- package/lib/cjs/model/gvl/Stack.d.ts +6 -0
- package/lib/cjs/model/gvl/Stack.js +1 -0
- package/lib/cjs/model/gvl/Vendor.d.ts +24 -0
- package/lib/cjs/model/gvl/Vendor.js +1 -0
- package/lib/cjs/model/gvl/VendorList.d.ts +10 -0
- package/lib/cjs/model/gvl/VendorList.js +1 -0
- package/lib/cjs/model/gvl/VendorUrl.d.ts +5 -0
- package/lib/cjs/model/gvl/VendorUrl.js +1 -0
- package/lib/cjs/model/gvl/index.d.ts +10 -0
- package/lib/cjs/model/gvl/index.js +1 -0
- package/lib/cjs/model/index.d.ts +14 -0
- package/lib/cjs/model/index.js +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/mjs/Cloneable.d.ts +27 -0
- package/lib/mjs/Cloneable.js +76 -0
- package/lib/mjs/GVL.d.ts +295 -0
- package/lib/mjs/GVL.js +591 -0
- package/lib/mjs/Json.d.ts +20 -0
- package/lib/mjs/Json.js +74 -0
- package/lib/mjs/TCModel.d.ts +337 -0
- package/lib/mjs/TCModel.js +512 -0
- package/lib/mjs/TCString.d.ts +27 -0
- package/lib/mjs/TCString.js +71 -0
- package/lib/mjs/encoder/Base64Url.d.ts +29 -0
- package/lib/mjs/encoder/Base64Url.js +80 -0
- package/lib/mjs/encoder/BitLength.d.ts +32 -0
- package/lib/mjs/encoder/BitLength.js +32 -0
- package/lib/mjs/encoder/EncodingOptions.d.ts +6 -0
- package/lib/mjs/encoder/EncodingOptions.js +1 -0
- package/lib/mjs/encoder/SegmentEncoder.d.ts +8 -0
- package/lib/mjs/encoder/SegmentEncoder.js +106 -0
- package/lib/mjs/encoder/SemanticPreEncoder.d.ts +6 -0
- package/lib/mjs/encoder/SemanticPreEncoder.js +133 -0
- package/lib/mjs/encoder/field/BooleanEncoder.d.ts +4 -0
- package/lib/mjs/encoder/field/BooleanEncoder.js +9 -0
- package/lib/mjs/encoder/field/DateEncoder.d.ts +4 -0
- package/lib/mjs/encoder/field/DateEncoder.js +15 -0
- package/lib/mjs/encoder/field/FieldEncoderMap.d.ts +1 -0
- package/lib/mjs/encoder/field/FieldEncoderMap.js +39 -0
- package/lib/mjs/encoder/field/FixedVectorEncoder.d.ts +5 -0
- package/lib/mjs/encoder/field/FixedVectorEncoder.js +25 -0
- package/lib/mjs/encoder/field/IntEncoder.d.ts +4 -0
- package/lib/mjs/encoder/field/IntEncoder.js +25 -0
- package/lib/mjs/encoder/field/LangEncoder.d.ts +4 -0
- package/lib/mjs/encoder/field/LangEncoder.js +36 -0
- package/lib/mjs/encoder/field/PurposeRestrictionVectorEncoder.d.ts +5 -0
- package/lib/mjs/encoder/field/PurposeRestrictionVectorEncoder.js +109 -0
- package/lib/mjs/encoder/field/VectorEncodingType.d.ts +4 -0
- package/lib/mjs/encoder/field/VectorEncodingType.js +5 -0
- package/lib/mjs/encoder/field/VendorVectorEncoder.d.ts +6 -0
- package/lib/mjs/encoder/field/VendorVectorEncoder.js +156 -0
- package/lib/mjs/encoder/field/index.d.ts +9 -0
- package/lib/mjs/encoder/field/index.js +9 -0
- package/lib/mjs/encoder/index.d.ts +7 -0
- package/lib/mjs/encoder/index.js +7 -0
- package/lib/mjs/encoder/sequence/FieldSequence.d.ts +5 -0
- package/lib/mjs/encoder/sequence/FieldSequence.js +53 -0
- package/lib/mjs/encoder/sequence/SegmentSequence.d.ts +9 -0
- package/lib/mjs/encoder/sequence/SegmentSequence.js +52 -0
- package/lib/mjs/encoder/sequence/SequenceVersionMap.d.ts +7 -0
- package/lib/mjs/encoder/sequence/SequenceVersionMap.js +1 -0
- package/lib/mjs/encoder/sequence/index.d.ts +3 -0
- package/lib/mjs/encoder/sequence/index.js +4 -0
- package/lib/mjs/errors/DecodingError.d.ts +15 -0
- package/lib/mjs/errors/DecodingError.js +18 -0
- package/lib/mjs/errors/EncodingError.d.ts +15 -0
- package/lib/mjs/errors/EncodingError.js +18 -0
- package/lib/mjs/errors/GVLError.d.ts +15 -0
- package/lib/mjs/errors/GVLError.js +18 -0
- package/lib/mjs/errors/TCModelError.d.ts +16 -0
- package/lib/mjs/errors/TCModelError.js +19 -0
- package/lib/mjs/errors/index.d.ts +4 -0
- package/lib/mjs/errors/index.js +4 -0
- package/lib/mjs/index.d.ts +8 -0
- package/lib/mjs/index.js +9 -0
- package/lib/mjs/model/BinarySearchTree.d.ts +30 -0
- package/lib/mjs/model/BinarySearchTree.js +267 -0
- package/lib/mjs/model/ConsentLanguages.d.ts +6 -0
- package/lib/mjs/model/ConsentLanguages.js +42 -0
- package/lib/mjs/model/DeviceDisclosure.d.ts +9 -0
- package/lib/mjs/model/DeviceDisclosure.js +1 -0
- package/lib/mjs/model/DeviceDisclosureStorageAccessType.d.ts +5 -0
- package/lib/mjs/model/DeviceDisclosureStorageAccessType.js +6 -0
- package/lib/mjs/model/Fields.d.ts +29 -0
- package/lib/mjs/model/Fields.js +29 -0
- package/lib/mjs/model/IntMap.d.ts +13 -0
- package/lib/mjs/model/IntMap.js +1 -0
- package/lib/mjs/model/KeyMap.d.ts +12 -0
- package/lib/mjs/model/KeyMap.js +1 -0
- package/lib/mjs/model/PurposeRestriction.d.ts +33 -0
- package/lib/mjs/model/PurposeRestriction.js +69 -0
- package/lib/mjs/model/PurposeRestrictionVector.d.ts +100 -0
- package/lib/mjs/model/PurposeRestrictionVector.js +286 -0
- package/lib/mjs/model/RestrictionType.d.ts +19 -0
- package/lib/mjs/model/RestrictionType.js +20 -0
- package/lib/mjs/model/Segment.d.ts +6 -0
- package/lib/mjs/model/Segment.js +7 -0
- package/lib/mjs/model/SegmentIDs.d.ts +12 -0
- package/lib/mjs/model/SegmentIDs.js +21 -0
- package/lib/mjs/model/Vector.d.ts +72 -0
- package/lib/mjs/model/Vector.js +161 -0
- package/lib/mjs/model/gvl/ByPurposeVendorMap.d.ts +7 -0
- package/lib/mjs/model/gvl/ByPurposeVendorMap.js +1 -0
- package/lib/mjs/model/gvl/DataCategory.d.ts +4 -0
- package/lib/mjs/model/gvl/DataCategory.js +1 -0
- package/lib/mjs/model/gvl/DataRetention.d.ts +6 -0
- package/lib/mjs/model/gvl/DataRetention.js +1 -0
- package/lib/mjs/model/gvl/Declarations.d.ts +13 -0
- package/lib/mjs/model/gvl/Declarations.js +1 -0
- package/lib/mjs/model/gvl/Feature.d.ts +5 -0
- package/lib/mjs/model/gvl/Feature.js +2 -0
- package/lib/mjs/model/gvl/GVLMapItem.d.ts +4 -0
- package/lib/mjs/model/gvl/GVLMapItem.js +1 -0
- package/lib/mjs/model/gvl/IDSetMap.d.ts +2 -0
- package/lib/mjs/model/gvl/IDSetMap.js +1 -0
- package/lib/mjs/model/gvl/Purpose.d.ts +5 -0
- package/lib/mjs/model/gvl/Purpose.js +1 -0
- package/lib/mjs/model/gvl/Stack.d.ts +6 -0
- package/lib/mjs/model/gvl/Stack.js +1 -0
- package/lib/mjs/model/gvl/Vendor.d.ts +24 -0
- package/lib/mjs/model/gvl/Vendor.js +1 -0
- package/lib/mjs/model/gvl/VendorList.d.ts +10 -0
- package/lib/mjs/model/gvl/VendorList.js +1 -0
- package/lib/mjs/model/gvl/VendorUrl.d.ts +5 -0
- package/lib/mjs/model/gvl/VendorUrl.js +1 -0
- package/lib/mjs/model/gvl/index.d.ts +10 -0
- package/lib/mjs/model/gvl/index.js +11 -0
- package/lib/mjs/model/index.d.ts +14 -0
- package/lib/mjs/model/index.js +14 -0
- package/lib/mjs/package.json +3 -0
- package/package.json +95 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { Cloneable } from './Cloneable.js';
|
|
2
|
+
import { GVL } from './GVL.js';
|
|
3
|
+
import { ConsentLanguages, IntMap, PurposeRestrictionVector, Vector } from './model/index.js';
|
|
4
|
+
import { Purpose } from './model/gvl/index.js';
|
|
5
|
+
declare type StringOrNumber = number | string;
|
|
6
|
+
export declare type TCModelPropType = number | Date | string | boolean | Vector | PurposeRestrictionVector;
|
|
7
|
+
export declare class TCModel extends Cloneable<TCModel> {
|
|
8
|
+
/**
|
|
9
|
+
* Set of available consent languages published by the IAB
|
|
10
|
+
*/
|
|
11
|
+
static readonly consentLanguages: ConsentLanguages;
|
|
12
|
+
private isServiceSpecific_;
|
|
13
|
+
private supportOOB_;
|
|
14
|
+
private useNonStandardStacks_;
|
|
15
|
+
private purposeOneTreatment_;
|
|
16
|
+
private publisherCountryCode_;
|
|
17
|
+
private version_;
|
|
18
|
+
private consentScreen_;
|
|
19
|
+
private policyVersion_;
|
|
20
|
+
private consentLanguage_;
|
|
21
|
+
private cmpId_;
|
|
22
|
+
private cmpVersion_;
|
|
23
|
+
private vendorListVersion_;
|
|
24
|
+
private numCustomPurposes_;
|
|
25
|
+
private gvl_;
|
|
26
|
+
created: Date;
|
|
27
|
+
lastUpdated: Date;
|
|
28
|
+
/**
|
|
29
|
+
* The TCF designates certain Features as special, that is, a CMP must afford
|
|
30
|
+
* the user a means to opt in to their use. These Special Features are
|
|
31
|
+
* published and numbered in the GVL separately from normal Features.
|
|
32
|
+
* Provides for up to 12 special features.
|
|
33
|
+
*/
|
|
34
|
+
readonly specialFeatureOptins: Vector;
|
|
35
|
+
/**
|
|
36
|
+
* Renamed from `PurposesAllowed` in TCF v1.1
|
|
37
|
+
* The user’s consent value for each Purpose established on the legal basis
|
|
38
|
+
* of consent. Purposes are published in the Global Vendor List (see. [[GVL]]).
|
|
39
|
+
*/
|
|
40
|
+
readonly purposeConsents: Vector;
|
|
41
|
+
/**
|
|
42
|
+
* The user’s permission for each Purpose established on the legal basis of
|
|
43
|
+
* legitimate interest. If the user has exercised right-to-object for a
|
|
44
|
+
* purpose.
|
|
45
|
+
*/
|
|
46
|
+
readonly purposeLegitimateInterests: Vector;
|
|
47
|
+
/**
|
|
48
|
+
* The user’s consent value for each Purpose established on the legal basis
|
|
49
|
+
* of consent, for the publisher. Purposes are published in the Global
|
|
50
|
+
* Vendor List.
|
|
51
|
+
*/
|
|
52
|
+
readonly publisherConsents: Vector;
|
|
53
|
+
/**
|
|
54
|
+
* The user’s permission for each Purpose established on the legal basis of
|
|
55
|
+
* legitimate interest. If the user has exercised right-to-object for a
|
|
56
|
+
* purpose.
|
|
57
|
+
*/
|
|
58
|
+
readonly publisherLegitimateInterests: Vector;
|
|
59
|
+
/**
|
|
60
|
+
* The user’s consent value for each Purpose established on the legal basis
|
|
61
|
+
* of consent, for the publisher. Purposes are published in the Global
|
|
62
|
+
* Vendor List.
|
|
63
|
+
*/
|
|
64
|
+
readonly publisherCustomConsents: Vector;
|
|
65
|
+
/**
|
|
66
|
+
* The user’s permission for each Purpose established on the legal basis of
|
|
67
|
+
* legitimate interest. If the user has exercised right-to-object for a
|
|
68
|
+
* purpose that is established in the publisher's custom purposes.
|
|
69
|
+
*/
|
|
70
|
+
readonly publisherCustomLegitimateInterests: Vector;
|
|
71
|
+
/**
|
|
72
|
+
* set by a publisher if they wish to collect consent and LI Transparency for
|
|
73
|
+
* purposes outside of the TCF
|
|
74
|
+
*/
|
|
75
|
+
customPurposes: IntMap<Purpose>;
|
|
76
|
+
/**
|
|
77
|
+
* Each [[Vendor]] is keyed by id. Their consent value is true if it is in
|
|
78
|
+
* the Vector
|
|
79
|
+
*/
|
|
80
|
+
readonly vendorConsents: Vector;
|
|
81
|
+
/**
|
|
82
|
+
* Each [[Vendor]] is keyed by id. Whether their Legitimate Interests
|
|
83
|
+
* Disclosures have been established is stored as boolean.
|
|
84
|
+
* see: [[Vector]]
|
|
85
|
+
*/
|
|
86
|
+
readonly vendorLegitimateInterests: Vector;
|
|
87
|
+
/**
|
|
88
|
+
* The value included for disclosed vendors signals which vendors have been
|
|
89
|
+
* disclosed to the user in the interface surfaced by the CMP. This section
|
|
90
|
+
* content is required when writing a TC string to the global (consensu)
|
|
91
|
+
* scope. When a CMP has read from and is updating a TC string from the
|
|
92
|
+
* global consensu.org storage, the CMP MUST retain the existing disclosure
|
|
93
|
+
* information and only add information for vendors that it has disclosed
|
|
94
|
+
* that had not been disclosed by other CMPs in prior interactions with this
|
|
95
|
+
* device/user agent.
|
|
96
|
+
*/
|
|
97
|
+
readonly vendorsDisclosed: Vector;
|
|
98
|
+
/**
|
|
99
|
+
* Signals which vendors the publisher permits to use OOB legal bases.
|
|
100
|
+
*/
|
|
101
|
+
readonly vendorsAllowed: Vector;
|
|
102
|
+
readonly publisherRestrictions: PurposeRestrictionVector;
|
|
103
|
+
/**
|
|
104
|
+
* Constructs the TCModel. Passing a [[GVL]] is optional when constructing
|
|
105
|
+
* as this TCModel may be constructed from decoding an existing encoded
|
|
106
|
+
* TCString.
|
|
107
|
+
*
|
|
108
|
+
* @param {GVL} [gvl]
|
|
109
|
+
*/
|
|
110
|
+
constructor(gvl?: GVL);
|
|
111
|
+
/**
|
|
112
|
+
* sets the [[GVL]] with side effects of also setting the `vendorListVersion`, `policyVersion`, and `consentLanguage`
|
|
113
|
+
* @param {GVL} gvl
|
|
114
|
+
*/
|
|
115
|
+
set gvl(gvl: GVL);
|
|
116
|
+
/**
|
|
117
|
+
* @return {GVL} the gvl instance set on this TCModel instance
|
|
118
|
+
*/
|
|
119
|
+
get gvl(): GVL;
|
|
120
|
+
/**
|
|
121
|
+
* @param {number} integer - A unique ID will be assigned to each Consent
|
|
122
|
+
* Manager Provider (CMP) from the iab.
|
|
123
|
+
*
|
|
124
|
+
* @throws {TCModelError} if the value is not an integer greater than 1 as those are not valid.
|
|
125
|
+
*/
|
|
126
|
+
set cmpId(integer: StringOrNumber);
|
|
127
|
+
get cmpId(): StringOrNumber;
|
|
128
|
+
/**
|
|
129
|
+
* Each change to an operating CMP should receive a
|
|
130
|
+
* new version number, for logging proof of consent. CmpVersion defined by
|
|
131
|
+
* each CMP.
|
|
132
|
+
*
|
|
133
|
+
* @param {number} integer
|
|
134
|
+
*
|
|
135
|
+
* @throws {TCModelError} if the value is not an integer greater than 1 as those are not valid.
|
|
136
|
+
*/
|
|
137
|
+
set cmpVersion(integer: StringOrNumber);
|
|
138
|
+
get cmpVersion(): StringOrNumber;
|
|
139
|
+
/**
|
|
140
|
+
* The screen number is CMP and CmpVersion
|
|
141
|
+
* specific, and is for logging proof of consent.(For example, a CMP could
|
|
142
|
+
* keep records so that a publisher can request information about the context
|
|
143
|
+
* in which consent was gathered.)
|
|
144
|
+
*
|
|
145
|
+
* @param {number} integer
|
|
146
|
+
*
|
|
147
|
+
* @throws {TCModelError} if the value is not an integer greater than 0 as those are not valid.
|
|
148
|
+
*/
|
|
149
|
+
set consentScreen(integer: StringOrNumber);
|
|
150
|
+
get consentScreen(): StringOrNumber;
|
|
151
|
+
/**
|
|
152
|
+
* @param {string} lang - [two-letter ISO 639-1 language
|
|
153
|
+
* code](http://www.loc.gov/standards/iso639-2/php/code_list.php) in which
|
|
154
|
+
* the CMP UI was presented
|
|
155
|
+
*
|
|
156
|
+
* @throws {TCModelError} if the value is not a length-2 string of alpha characters
|
|
157
|
+
*/
|
|
158
|
+
set consentLanguage(lang: string);
|
|
159
|
+
get consentLanguage(): string;
|
|
160
|
+
/**
|
|
161
|
+
* @param {string} countryCode - [two-letter ISO 3166-1 alpha-2 country
|
|
162
|
+
* code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the publisher,
|
|
163
|
+
* determined by the CMP-settings of the publisher.
|
|
164
|
+
*
|
|
165
|
+
* @throws {TCModelError} if the value is not a length-2 string of alpha characters
|
|
166
|
+
*/
|
|
167
|
+
set publisherCountryCode(countryCode: string);
|
|
168
|
+
get publisherCountryCode(): string;
|
|
169
|
+
/**
|
|
170
|
+
* Version of the GVL used to create this TCModel. Global
|
|
171
|
+
* Vendor List versions will be released periodically.
|
|
172
|
+
*
|
|
173
|
+
* @param {number} integer
|
|
174
|
+
*
|
|
175
|
+
* @throws {TCModelError} if the value is not an integer greater than 0 as those are not valid.
|
|
176
|
+
*/
|
|
177
|
+
set vendorListVersion(integer: StringOrNumber);
|
|
178
|
+
get vendorListVersion(): StringOrNumber;
|
|
179
|
+
/**
|
|
180
|
+
* From the corresponding field in the GVL that was
|
|
181
|
+
* used for obtaining consent. A new policy version invalidates existing
|
|
182
|
+
* strings and requires CMPs to re-establish transparency and consent from
|
|
183
|
+
* users.
|
|
184
|
+
*
|
|
185
|
+
* If a TCF policy version number is different from the one from the latest
|
|
186
|
+
* GVL, the CMP must re-establish transparency and consent.
|
|
187
|
+
*
|
|
188
|
+
* @param {number} num - You do not need to set this. This comes
|
|
189
|
+
* directly from the [[GVL]].
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
set policyVersion(num: StringOrNumber);
|
|
193
|
+
get policyVersion(): StringOrNumber;
|
|
194
|
+
set version(num: StringOrNumber);
|
|
195
|
+
get version(): StringOrNumber;
|
|
196
|
+
/**
|
|
197
|
+
* Whether the signals encoded in this TC String were from site-specific
|
|
198
|
+
* storage `true` versus ‘global’ consensu.org shared storage `false`. A
|
|
199
|
+
* string intended to be stored in global/shared scope but the CMP is unable
|
|
200
|
+
* to store due to a user agent not accepting third-party cookies would be
|
|
201
|
+
* considered site-specific `true`.
|
|
202
|
+
*
|
|
203
|
+
* @param {boolean} bool - value to set. Some changes to other fields in this
|
|
204
|
+
* model will automatically change this value like adding publisher
|
|
205
|
+
* restrictions.
|
|
206
|
+
*/
|
|
207
|
+
set isServiceSpecific(bool: boolean);
|
|
208
|
+
get isServiceSpecific(): boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Non-standard stacks means that a CMP is using publisher-customized stack
|
|
211
|
+
* descriptions. Stacks (in terms of purposes in a stack) are pre-set by the
|
|
212
|
+
* IAB. As are titles. Descriptions are pre-set, but publishers can customize
|
|
213
|
+
* them. If they do, they need to set this bit to indicate that they've
|
|
214
|
+
* customized descriptions.
|
|
215
|
+
*
|
|
216
|
+
* @param {boolean} bool - value to set
|
|
217
|
+
*/
|
|
218
|
+
set useNonStandardStacks(bool: boolean);
|
|
219
|
+
get useNonStandardStacks(): boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Whether or not this publisher supports OOB signaling. On Global TC String
|
|
222
|
+
* OOB Vendors Disclosed will be included if the publish wishes to no allow
|
|
223
|
+
* these vendors they should set this to false.
|
|
224
|
+
* @param {boolean} bool - value to set
|
|
225
|
+
*/
|
|
226
|
+
set supportOOB(bool: boolean);
|
|
227
|
+
get supportOOB(): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* `false` There is no special Purpose 1 status.
|
|
230
|
+
* Purpose 1 was disclosed normally (consent) as expected by Policy. `true`
|
|
231
|
+
* Purpose 1 not disclosed at all. CMPs use PublisherCC to indicate the
|
|
232
|
+
* publisher’s country of establishment to help Vendors determine whether the
|
|
233
|
+
* vendor requires Purpose 1 consent. In global scope TC strings, this field
|
|
234
|
+
* must always have a value of `false`. When a CMP encounters a global scope
|
|
235
|
+
* string with `purposeOneTreatment=true` then that string should be
|
|
236
|
+
* considered invalid and the CMP must re-establish transparency and consent.
|
|
237
|
+
*
|
|
238
|
+
* @param {boolean} bool
|
|
239
|
+
*/
|
|
240
|
+
set purposeOneTreatment(bool: boolean);
|
|
241
|
+
get purposeOneTreatment(): boolean;
|
|
242
|
+
/**
|
|
243
|
+
* setAllVendorConsents - sets all vendors on the GVL Consent (true)
|
|
244
|
+
*
|
|
245
|
+
* @return {void}
|
|
246
|
+
*/
|
|
247
|
+
setAllVendorConsents(): void;
|
|
248
|
+
/**
|
|
249
|
+
* unsetAllVendorConsents - unsets all vendors on the GVL Consent (false)
|
|
250
|
+
*
|
|
251
|
+
* @return {void}
|
|
252
|
+
*/
|
|
253
|
+
unsetAllVendorConsents(): void;
|
|
254
|
+
/**
|
|
255
|
+
* setAllVendorsDisclosed - sets all vendors on the GVL Vendors Disclosed (true)
|
|
256
|
+
*
|
|
257
|
+
* @return {void}
|
|
258
|
+
*/
|
|
259
|
+
setAllVendorsDisclosed(): void;
|
|
260
|
+
/**
|
|
261
|
+
* unsetAllVendorsDisclosed - unsets all vendors on the GVL Consent (false)
|
|
262
|
+
*
|
|
263
|
+
* @return {void}
|
|
264
|
+
*/
|
|
265
|
+
unsetAllVendorsDisclosed(): void;
|
|
266
|
+
/**
|
|
267
|
+
* setAllVendorsAllowed - sets all vendors on the GVL Consent (true)
|
|
268
|
+
*
|
|
269
|
+
* @return {void}
|
|
270
|
+
*/
|
|
271
|
+
setAllVendorsAllowed(): void;
|
|
272
|
+
/**
|
|
273
|
+
* unsetAllVendorsAllowed - unsets all vendors on the GVL Consent (false)
|
|
274
|
+
*
|
|
275
|
+
* @return {void}
|
|
276
|
+
*/
|
|
277
|
+
unsetAllVendorsAllowed(): void;
|
|
278
|
+
/**
|
|
279
|
+
* setAllVendorLegitimateInterests - sets all vendors on the GVL LegitimateInterests (true)
|
|
280
|
+
*
|
|
281
|
+
* @return {void}
|
|
282
|
+
*/
|
|
283
|
+
setAllVendorLegitimateInterests(): void;
|
|
284
|
+
/**
|
|
285
|
+
* unsetAllVendorLegitimateInterests - unsets all vendors on the GVL LegitimateInterests (false)
|
|
286
|
+
*
|
|
287
|
+
* @return {void}
|
|
288
|
+
*/
|
|
289
|
+
unsetAllVendorLegitimateInterests(): void;
|
|
290
|
+
/**
|
|
291
|
+
* setAllPurposeConsents - sets all purposes on the GVL Consent (true)
|
|
292
|
+
*
|
|
293
|
+
* @return {void}
|
|
294
|
+
*/
|
|
295
|
+
setAllPurposeConsents(): void;
|
|
296
|
+
/**
|
|
297
|
+
* unsetAllPurposeConsents - unsets all purposes on the GVL Consent (false)
|
|
298
|
+
*
|
|
299
|
+
* @return {void}
|
|
300
|
+
*/
|
|
301
|
+
unsetAllPurposeConsents(): void;
|
|
302
|
+
/**
|
|
303
|
+
* setAllPurposeLegitimateInterests - sets all purposes on the GVL LI Transparency (true)
|
|
304
|
+
*
|
|
305
|
+
* @return {void}
|
|
306
|
+
*/
|
|
307
|
+
setAllPurposeLegitimateInterests(): void;
|
|
308
|
+
/**
|
|
309
|
+
* unsetAllPurposeLegitimateInterests - unsets all purposes on the GVL LI Transparency (false)
|
|
310
|
+
*
|
|
311
|
+
* @return {void}
|
|
312
|
+
*/
|
|
313
|
+
unsetAllPurposeLegitimateInterests(): void;
|
|
314
|
+
/**
|
|
315
|
+
* setAllSpecialFeatureOptins - sets all special featuresOptins on the GVL (true)
|
|
316
|
+
*
|
|
317
|
+
* @return {void}
|
|
318
|
+
*/
|
|
319
|
+
setAllSpecialFeatureOptins(): void;
|
|
320
|
+
/**
|
|
321
|
+
* unsetAllSpecialFeatureOptins - unsets all special featuresOptins on the GVL (true)
|
|
322
|
+
*
|
|
323
|
+
* @return {void}
|
|
324
|
+
*/
|
|
325
|
+
unsetAllSpecialFeatureOptins(): void;
|
|
326
|
+
setAll(): void;
|
|
327
|
+
unsetAll(): void;
|
|
328
|
+
get numCustomPurposes(): StringOrNumber;
|
|
329
|
+
set numCustomPurposes(num: StringOrNumber);
|
|
330
|
+
/**
|
|
331
|
+
* updated - updates the created and lastUpdated dates with a 'now' day-level UTC timestamp
|
|
332
|
+
*
|
|
333
|
+
* @return {void}
|
|
334
|
+
*/
|
|
335
|
+
updated(): void;
|
|
336
|
+
}
|
|
337
|
+
export {};
|