Properties
busyDeclarations
busyDeclarations: boolean = false
busyGvl
busyGvl: boolean = false
busyVendors
busyVendors: boolean = false
Optional chunkFolder
chunkFolder: string
Optional chunks
chunks: Record<string, string[]>
features
features
: Map<string, TcfFeature> = new Map<string, TcfFeature>()
fetchDeclarations
fetchDeclarations: () => Promise<void> = flow(function* (this: TcfStore) {this.busyDeclarations = true;try {const {gvlSpecificationVersion,tcfPolicyVersion,purposes,specialPurposes,features,specialFeatures}: ResponseRouteTcfDeclarationsGet = yield request<RequestRouteTcfDeclarationsGet,ParamsRouteTcfDeclarationsGet,ResponseRouteTcfDeclarationsGet>({location: locationRestTcfDeclarationsGet});for (const pid of Object.keys(purposes)) {this.purposes.set(pid, new TcfPurpose(purposes[pid], false, this));}for (const pid of Object.keys(specialPurposes)) {this.specialPurposes.set(pid, new TcfPurpose(specialPurposes[pid], true, this));}for (const pid of Object.keys(features)) {this.features.set(pid, new TcfFeature(features[pid], false, this));}for (const pid of Object.keys(specialFeatures)) {this.specialFeatures.set(pid, new TcfFeature(specialFeatures[pid], true, this));}this.gvlSpecificationVersion = gvlSpecificationVersion;this.tcfPolicyVersion = tcfPolicyVersion;} catch (e) {console.log(e);throw e;} finally {this.busyDeclarations = false;}})
fetchVendorConfigurations
fetchVendorConfigurations: () => Promise<void> = flow(function* (this: TcfStore) {// In our UI, we do not have pagination, yet, so load allconst perPage = 100;const pages = Math.ceil(this.vendorConfigurationCount / perPage);for (let i = 0; i < pages; i++) {yield this.vendorConfigurations.get({request: {status: ["draft", "publish", "private"]},params: {offset: i * perPage,// eslint-disable-next-line @typescript-eslint/naming-conventionper_page: 100, // Fetch allcontext: "edit"}});}this.fetchedAllVendorConfigurations = true;})
fetchVendors
fetchVendors: () => Promise<void> = flow(function* (this: TcfStore) {this.busyVendors = true;try {const { vendorListVersion, vendors }: ResponseRouteTcfVendorsGet = yield request<RequestRouteTcfVendorsGet,ParamsRouteTcfVendorsGet,ResponseRouteTcfVendorsGet>({location: locationRestTcfVendorsGet});for (const vid of Object.keys(vendors)) {this.vendors.set(vid, new TcfVendor(vendors[vid], this));}this.vendorListVersion = vendorListVersion;} catch (e) {console.log(e);throw e;} finally {this.busyVendors = false;}})
fetchedAllVendorConfigurations
fetchedAllVendorConfigurations: boolean = false
gvlSpecificationVersion
gvlSpecificationVersion: ResponseRouteTcfDeclarationsGet["gvlSpecificationVersion"]
Optional publicUrl
publicUrl: string
purposes
purposes
: Map<string, TcfPurpose> = new Map<string, TcfPurpose>()
Optional restNamespace
restNamespace: string
Optional restNonce
restNonce: string
Optional restQuery
restQuery: {}
Optional restRecreateNonceEndpoint
restRecreateNonceEndpoint: string
Optional restRoot
restRoot: string
Optional restUrl
restUrl: string
Readonly rootStore
specialFeatures
special
Features: Map<string, TcfFeature> = new Map<string, TcfFeature>()
specialPurposes
special
Purposes: Map<string, TcfPurpose> = new Map<string, TcfPurpose>()
tcfPolicyVersion
tcfPolicyVersion: ResponseRouteTcfDeclarationsGet["tcfPolicyVersion"]
textDomain
textDomain: string
updateGvl
updateGvl: () => Promise<void> = flow(function* (this: TcfStore) {this.busyGvl = true;try {const { gvlDownloadTime }: ResponseRouteTcfGvlPut = yield request<RequestRouteTcfGvlPut,ParamsRouteTcfGvlPut,ResponseRouteTcfGvlPut>({location: locationRestTcfGvlPut});this.rootStore.optionStore.tcfGvlDownloadTime = gvlDownloadTime;} catch (e) {console.log(e);throw e;} finally {this.busyGvl = false;}})
vendorConfigurations
vendorListVersion
vendorListVersion: ResponseRouteTcfVendorsGet["vendorListVersion"]
vendors
vendors
: Map<string, TcfVendor> = new Map<string, TcfVendor>()
Get the slug from the current process (webpack) instead of the PHP plugin output. For some cases you need to use that.