Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns OptionStore

Properties

acceptAllForBots

acceptAllForBots: ResponseRouteWpSettings["rcb-accept-all-for-bots"]

addLinksToNavigationMenu

addLinksToNavigationMenu: (id: string) => Promise<boolean> = flow(function* (this: OptionStore, id) {this.busyAddLinksToNavigationMenu = true;try {const { success }: ResponseRouteNavMenuAddLinksPost = yield request<RequestRouteNavMenuAddLinksPost,ParamsRouteNavMenuAddLinksPost,ResponseRouteNavMenuAddLinksPost>({location: locationRestNavMenuAddLinksPost,request: {id}});if (success) {this.rootStore.checklistStore.fetchChecklist();yield this.fetchCurrentRevision();}return success;} catch (e) {console.log(e);throw e;} finally {this.busyAddLinksToNavigationMenu = false;}})

Type declaration

    • (id: string): Promise<boolean>
    • Parameters

      • id: string

      Returns Promise<boolean>

Optional affiliateLabelBehind

affiliateLabelBehind: ResponseRouteWpSettings["rcb-affiliate-label-behind"]

Optional affiliateLabelDescription

affiliateLabelDescription: ResponseRouteWpSettings["rcb-affiliate-description"]

Optional affiliateLink

affiliateLink: ResponseRouteWpSettings["rcb-affiliate-link"]

ageNotice

ageNotice: ResponseRouteWpSettings["rcb-age-notice"]

allBlockerCount

allBlockerCount: ResponseRouteRevisionCurrentGet["all_blocker_count"] = 0

allCookieCount

allCookieCount: ResponseRouteRevisionCurrentGet["all_cookie_count"] = 0

allScannerResultExternalUrlsCount

allScannerResultExternalUrlsCount: ResponseRouteRevisionCurrentGet["all_scanner_result_external_urls_count"] = 0

allScannerResultPresetsCount

allScannerResultPresetsCount: ResponseRouteRevisionCurrentGet["all_scanner_result_presets_count"] = 0

allTcfVendorConfigurationCount

allTcfVendorConfigurationCount: ResponseRouteRevisionCurrentGet["all_tcf_vendor_configuration_count"] = 0

bannerActive

bannerActive: ResponseRouteWpSettings["rcb-banner-active"] = false

blockerActive

blockerActive: ResponseRouteWpSettings["rcb-blocker-active"] = false

busyAddLinksToNavigationMenu

busyAddLinksToNavigationMenu: boolean = false

busyCountryBypassUpdate

busyCountryBypassUpdate: boolean = false

busySettings

busySettings: boolean = false

Optional chunkFolder

chunkFolder: string

Optional chunks

chunks: Record<string, string[]>

consentDuration

consentDuration: ResponseRouteWpSettings["rcb-consent-duration"]

consentForwarding

consentForwarding: ResponseRouteWpSettings["rcb-consent-forwarding"]

consentsDeletedAt

consentsDeletedAt: ResponseRouteRevisionCurrentGet["consents_deleted_at"]

cookieDuration

cookieDuration: ResponseRouteWpSettings["rcb-cookie-duration"]

Optional countryBypass

countryBypass: ResponseRouteWpSettings["rcb-country-bypass"]

Optional countryBypassCountries

countryBypassCountries: string[]

Optional countryBypassDbDownloadTime

countryBypassDbDownloadTime: ResponseRouteWpSettings["rcb-country-bypass-db-download-time"]

Optional countryBypassType

countryBypassType: ResponseRouteWpSettings["rcb-country-bypass-type"]

crossDomains

crossDomains: ResponseRouteWpSettings["rcb-cross-domains"]

dashboardMigration

dashboardMigration: ResponseRouteRevisionCurrentGet["dashboard_migration"]

dismissConfigProNotice

dismissConfigProNotice: () => Promise<void> = flow(function* (this: OptionStore) {try {// Immediate set because it can not failthis.others.isConfigProNoticeVisible = false;yield request<RequestRouteLiteDismissConfigPageProNotice,ParamsRouteLiteDismissConfigPageProNotice,ResponseRouteLiteDismissConfigPageProNotice>({location: locationRestLiteDismissConfigPageProNotice});} catch (e) {console.log(e);throw e;}})

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

dismissMigration

dismissMigration: () => Promise<void> = flow(function* (this: OptionStore) {try {// Immediate set because it can not failconst { id: migration } = this.dashboardMigration;this.dashboardMigration = undefined;yield request<RequestRouteMigrationDelete, ParamsRouteMigrationDelete, ResponseRouteMigrationDelete>({location: locationRestMigrationDelete,params: {migration}});} catch (e) {console.log(e);throw e;}})

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

ePrivacyUSA

ePrivacyUSA: ResponseRouteWpSettings["rcb-eprivacy-usa"]

fetchCurrentRevision

fetchCurrentRevision: () => Promise<void> = flow(function* (this: OptionStore) {this.busySettings = true;try {this.setFromCurrentRevision(yield request<RequestRouteRevisionCurrentGet,ParamsRouteRevisionCurrentGet,ResponseRouteRevisionCurrentGet>({location: locationRestRevisionCurrentGet}));} catch (e) {console.log(e);throw e;} finally {this.busySettings = false;}})

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

fetchSettings

fetchSettings: (setFrom?: ResponseRouteWpSettings) => Promise<void> = flow(function* (this: OptionStore,setFrom) {this.busySettings = true;try {const result: ResponseRouteWpSettings =setFrom ||(yield request<RequestRouteWpSettings, ParamsRouteWpSettings, ResponseRouteWpSettings>({location: locationRestWpSettings}));this.bannerActive = result["rcb-banner-active"];this.blockerActive = result["rcb-blocker-active"];this.imprintId = result["rcb-banner-legal-imprint"];this.imprintExternalUrl = result["rcb-banner-legal-imprint-external-url"];this.imprintIsExternalUrl = result["rcb-banner-legal-imprint-is-external-url"];this.privacyPolicyId = result["rcb-banner-legal-privacy-policy"];this.privacyPolicyExternalUrl = result["rcb-banner-legal-privacy-policy-external-url"];this.privacyPolicyIsExternalUrl = result["rcb-banner-legal-privacy-policy-is-external-url"];this.hidePageIds = (result["rcb-hide-page-ids"] || "").split(",").map(Number).filter(Boolean);this.setCookiesViaManager = result["rcb-set-cookies-via-manager"] || "none";this.acceptAllForBots = result["rcb-accept-all-for-bots"];this.respectDoNotTrack = result["rcb-respect-do-not-track"];// this.onlyEuCookieBanner = result["rcb-only-eu-cookie-banner"] || false;this.cookieDuration = result["rcb-cookie-duration"];this.saveIp = result["rcb-save-ip"];this.ePrivacyUSA = result["rcb-eprivacy-usa"];this.ageNotice = result["rcb-age-notice"];this.listServicesNotice = result["rcb-list-services-notice"];this.consentForwarding = result["rcb-consent-forwarding"] || false;this.forwardTo = (result["rcb-forward-to"] || "").split("|").filter(Boolean);this.crossDomains = result["rcb-cross-domains"] || "";this.countryBypass = result["rcb-country-bypass"];this.countryBypassCountries = (result["rcb-country-bypass-countries"] || "").split(",").filter(Boolean);this.countryBypassType = result["rcb-country-bypass-type"];this.countryBypassDbDownloadTime = result["rcb-country-bypass-db-download-time"];this.tcf = result["rcb-tcf"];this.tcfPublisherCc = result["rcb-tcf-publisher-cc"];this.tcfAcceptedTime = result["rcb-tcf-accepted-time"];this.tcfGvlDownloadTime = result["rcb-tcf-gvl-download-time"];this.tcfScopeOfConsent = result["rcb-tcf-scope-of-consent"];this.consentDuration = result["rcb-consent-duration"];if (process.env.PLUGIN_CTX === "pro") {/* onlypro: start */this.affiliateLink = result["rcb-affiliate-link"];this.affiliateLabelBehind = result["rcb-affiliate-label-behind"];this.affiliateLabelDescription = result["rcb-affiliate-description"];/* onlypro: end */}yield this.fetchCurrentRevision();} catch (e) {console.log(e);throw e;} finally {this.busySettings = false;}})

Type declaration

fomoCoupon

fomoCoupon: ResponseRouteRevisionCurrentGet["fomo_coupon"]

forwardTo

forwardTo: string[]

hasManager

hasManager: ResponseRouteRevisionCurrentGet["has_manager"] = false

hidePageIds

hidePageIds: number[]

imprintExternalUrl

imprintExternalUrl: ResponseRouteWpSettings["rcb-banner-legal-imprint-external-url"]

imprintId

imprintId: ResponseRouteWpSettings["rcb-banner-legal-imprint"]

imprintIsExternalUrl

imprintIsExternalUrl: ResponseRouteWpSettings["rcb-banner-legal-imprint-is-external-url"]

isScanAgainNoticeActive

isScanAgainNoticeActive: ResponseRouteRevisionCurrentGet["scan_again_notice_active"]

listServicesNotice

listServicesNotice: ResponseRouteWpSettings["rcb-list-services-notice"]

nav_menus

nav_menus: ResponseRouteRevisionCurrentGet["nav_menus"] = []

needsRevisionRetrigger

needsRevisionRetrigger: boolean = false

others

others: OtherOptions

privacyPolicyExternalUrl

privacyPolicyExternalUrl: ResponseRouteWpSettings["rcb-banner-legal-privacy-policy-external-url"]

privacyPolicyId

privacyPolicyId: ResponseRouteWpSettings["rcb-banner-legal-privacy-policy"]

privacyPolicyIsExternalUrl

privacyPolicyIsExternalUrl: ResponseRouteWpSettings["rcb-banner-legal-privacy-policy-is-external-url"]

publicCookieCount

publicCookieCount: ResponseRouteRevisionCurrentGet["public_cookie_count"] = 0

Optional publicUrl

publicUrl: string

Readonly pureSlug

pureSlug: ReturnType<typeof getPureSlug>

Readonly pureSlugCamelCased

pureSlugCamelCased: ReturnType<typeof getPureSlug>

respectDoNotTrack

respectDoNotTrack: ResponseRouteWpSettings["rcb-respect-do-not-track"]

Optional restNamespace

restNamespace: string

Optional restNonce

restNonce: string

Optional restQuery

restQuery: {}

Type declaration

Optional restRecreateNonceEndpoint

restRecreateNonceEndpoint: string

Optional restRoot

restRoot: string

Optional restUrl

restUrl: string

Readonly rootStore

rootStore: RootStore

saveIp

saveIp: ResponseRouteWpSettings["rcb-save-ip"]

setCookiesViaManager

setCookiesViaManager: ResponseRouteWpSettings["rcb-set-cookies-via-manager"]

setModalHintSeen

setModalHintSeen: (identifier: ConfigHintTextIdentifier) => Promise<void> = flow(function* (this: OptionStore,identifier) {this.busySettings = true;try {this.others.modalHints.push(identifier); // Immediate push as this can never failyield request<RequestRouteModalHintSeenPut, ParamsRouteModalHintSeenPut, ResponseRouteModalHintSeenPut>({location: locationRestModalHintSeenPut,request: {identifier}});} catch (e) {console.log(e);throw e;} finally {this.busySettings = false;}})

Type declaration

slug

slug: string

Optional tcf

tcf: ResponseRouteWpSettings["rcb-tcf"]

Optional tcfAcceptedTime

tcfAcceptedTime: ResponseRouteWpSettings["rcb-tcf-accepted-time"]

Optional tcfGvlDownloadTime

tcfGvlDownloadTime: ResponseRouteWpSettings["rcb-tcf-gvl-download-time"]

Optional tcfPublisherCc

tcfPublisherCc: ResponseRouteWpSettings["rcb-tcf-publisher-cc"]

Optional tcfScopeOfConsent

tcfScopeOfConsent: ResponseRouteWpSettings["rcb-tcf-scope-of-consent"]

Optional tcfVendorConfigurationCounts

tcfVendorConfigurationCounts: OptionStore["cookieCounts"]

textDomain

textDomain: string

updateCountryBypassDatabase

updateCountryBypassDatabase: () => Promise<void> = flow(function* (this: OptionStore) {this.busyCountryBypassUpdate = true;try {const { dbDownloadTime }: ResponseRouteCountryBypassDatabasePut = yield request<RequestRouteCountryBypassDatabasePut,ParamsRouteCountryBypassDatabasePut,ResponseRouteCountryBypassDatabasePut>({location: locationRestCountryBypassDatabasePut});this.countryBypassDbDownloadTime = dbDownloadTime;} catch (e) {console.log(e);throw e;} finally {this.busyCountryBypassUpdate = false;}})

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

updateCurrentRevision

updateCurrentRevision: (data: RequestRouteRevisionCurrentPut) => Promise<void> = flow(function* (this: OptionStore,data) {this.busySettings = true;try {this.setFromCurrentRevision(yield request<RequestRouteRevisionCurrentPut,ParamsRouteRevisionCurrentPut,ResponseRouteRevisionCurrentPut>({location: locationRestRevisionCurrentPut,request: data}));} catch (e) {console.log(e);throw e;} finally {this.busySettings = false;}})

Type declaration

updateSettings

updateSettings: (update: Partial<OptionStore>) => Promise<void> = flow(function* (this: OptionStore,{bannerActive,blockerActive,imprintId,privacyPolicyId,// Due to incompatibilities with WPML / PolyLang we need to edit this in customizer as// the customizer can save settings per language// imprintExternalUrl,// imprintIsExternalUrl,// privacyPolicyExternalUrl,// privacyPolicyIsExternalUrl,hidePageIds,setCookiesViaManager,acceptAllForBots,respectDoNotTrack,// onlyEuCookieBanner,cookieDuration,saveIp,ePrivacyUSA,ageNotice,listServicesNotice,consentForwarding,forwardTo,crossDomains,affiliateLink,affiliateLabelBehind,affiliateLabelDescription,countryBypass,countryBypassCountries,countryBypassType,tcf,tcfPublisherCc,tcfScopeOfConsent,consentDuration}) {this.busySettings = true;try {const result: ResponseRouteWpSettingsPatch = yield request<RequestRouteWpSettingsPatch,ParamsRouteWpSettingsPatch,ResponseRouteWpSettingsPatch>({location: locationRestWpSettingsPatch,request: {...(bannerActive === undefined? {}: {"rcb-banner-active": bannerActive}),...(blockerActive === undefined? {}: {"rcb-blocker-active": blockerActive}),...(imprintId === undefined? {}: {"rcb-banner-legal-imprint": imprintId}),...(privacyPolicyId === undefined? {}: {"rcb-banner-legal-privacy-policy": privacyPolicyId}),...(hidePageIds === undefined? {}: {"rcb-hide-page-ids": hidePageIds.join(",")}),...(setCookiesViaManager === undefined? {}: {"rcb-set-cookies-via-manager": setCookiesViaManager}),...(acceptAllForBots === undefined? {}: {"rcb-accept-all-for-bots": acceptAllForBots}),...(respectDoNotTrack === undefined? {}: {"rcb-respect-do-not-track": respectDoNotTrack}),...(cookieDuration === undefined? {}: {"rcb-cookie-duration": cookieDuration}),...(saveIp === undefined? {}: {"rcb-save-ip": saveIp}),...(ePrivacyUSA === undefined? {}: {"rcb-eprivacy-usa": ePrivacyUSA}),...(ageNotice === undefined? {}: {"rcb-age-notice": ageNotice}),...(listServicesNotice === undefined? {}: {"rcb-list-services-notice": listServicesNotice}),...(consentForwarding === undefined? {}: {"rcb-consent-forwarding": consentForwarding}),...(forwardTo === undefined? {}: {"rcb-forward-to": forwardTo.join("|")}),...(crossDomains === undefined? {}: {"rcb-cross-domains": crossDomains}),...(countryBypass === undefined? {}: {"rcb-country-bypass": countryBypass}),...(countryBypassCountries === undefined? {}: {"rcb-country-bypass-countries": countryBypassCountries.join(",")}),...(countryBypassType === undefined? {}: {"rcb-country-bypass-type": countryBypassType}),...(tcf === undefined? {}: {"rcb-tcf": tcf}),...(tcfPublisherCc === undefined? {}: {"rcb-tcf-publisher-cc": tcfPublisherCc}),...(tcfScopeOfConsent === undefined? {}: {"rcb-tcf-scope-of-consent": tcfScopeOfConsent}),...(process.env.PLUGIN_CTX === "pro"? affiliateLink === undefined? {}: {"rcb-affiliate-link": affiliateLink}: {}),...(process.env.PLUGIN_CTX === "pro"? affiliateLabelBehind === undefined? {}: {"rcb-affiliate-label-behind": affiliateLabelBehind}: {}),...(process.env.PLUGIN_CTX === "pro"? affiliateLabelDescription === undefined? {}: {"rcb-affiliate-description": affiliateLabelDescription}: {}),...(consentDuration === undefined? {}: {"rcb-consent-duration": consentDuration})}});this.fetchSettings(result);this.rootStore.checklistStore.probablyFetchByChangedItem(["save-settings","activate-banner","privacy-policy"]);} catch (e) {console.log(e);throw e;} finally {this.busySettings = false;}})

Type declaration

version

version: string

Accessors

areSettingsFetched

  • get areSettingsFetched(): boolean
  • Returns boolean

isOnlyRcbCookieCreated

  • get isOnlyRcbCookieCreated(): boolean
  • Ignore real-cookie-banner cookie as it is hidden when no other cookie is created.

    Returns boolean

Methods

setFromCurrentRevision

  • setFromCurrentRevision(__namedParameters: { all_blocker_count: number; all_cookie_count: number; all_scanner_result_external_urls_count: number; all_scanner_result_presets_count: number; all_tcf_vendor_configuration_count: number; consents_deleted_at: string; contexts: Record<string, string>; cookie_counts: { draft: number; private: number; publish: number }; dashboard_migration: DashboardTileMigration; fomo_coupon: { coupon: string; validUntil: string; valueInPercent: number }; has_manager: number | false; nav_menus: ({ applied: boolean; edit_url: string; id: string; languages: Array<{ code: string; language: string; location: string }>; locations: Record<string, string>; name: string; term_id: number; type: "legacy_nav" } | { applied: boolean; edit_url: string; id: string; languages: Array<{ code: string; language: string; location: string }>; name: string; post_id: number; type: "nav_menu" })[]; needs_retrigger: boolean; public_cookie_count: number; scan_again_notice_active: boolean; tcf_vendor_configuration_counts: { draft: number; private: number; publish: number } }): void
  • Parameters

    • __namedParameters: { all_blocker_count: number; all_cookie_count: number; all_scanner_result_external_urls_count: number; all_scanner_result_presets_count: number; all_tcf_vendor_configuration_count: number; consents_deleted_at: string; contexts: Record<string, string>; cookie_counts: { draft: number; private: number; publish: number }; dashboard_migration: DashboardTileMigration; fomo_coupon: { coupon: string; validUntil: string; valueInPercent: number }; has_manager: number | false; nav_menus: ({ applied: boolean; edit_url: string; id: string; languages: Array<{ code: string; language: string; location: string }>; locations: Record<string, string>; name: string; term_id: number; type: "legacy_nav" } | { applied: boolean; edit_url: string; id: string; languages: Array<{ code: string; language: string; location: string }>; name: string; post_id: number; type: "nav_menu" })[]; needs_retrigger: boolean; public_cookie_count: number; scan_again_notice_active: boolean; tcf_vendor_configuration_counts: { draft: number; private: number; publish: number } }
      • all_blocker_count: number
      • all_cookie_count: number
      • all_scanner_result_external_urls_count: number
      • all_scanner_result_presets_count: number
      • all_tcf_vendor_configuration_count: number
      • consents_deleted_at: string
      • contexts: Record<string, string>
      • cookie_counts: { draft: number; private: number; publish: number }
        • [key: string]: number
        • draft: number
        • private: number
        • publish: number
      • dashboard_migration: DashboardTileMigration
      • fomo_coupon: { coupon: string; validUntil: string; valueInPercent: number }
        • coupon: string
        • validUntil: string
        • valueInPercent: number
      • has_manager: number | false
      • nav_menus: ({ applied: boolean; edit_url: string; id: string; languages: Array<{ code: string; language: string; location: string }>; locations: Record<string, string>; name: string; term_id: number; type: "legacy_nav" } | { applied: boolean; edit_url: string; id: string; languages: Array<{ code: string; language: string; location: string }>; name: string; post_id: number; type: "nav_menu" })[]
      • needs_retrigger: boolean
      • public_cookie_count: number
      • scan_again_notice_active: boolean
      • tcf_vendor_configuration_counts: { draft: number; private: number; publish: number }
        • [key: string]: number
        • draft: number
        • private: number
        • publish: number

    Returns void

setShowLicenseFormImmediate

  • setShowLicenseFormImmediate(state: boolean, isLicensed: boolean): void
  • Parameters

    • state: boolean
    • isLicensed: boolean

    Returns void

Static getPureSlug

  • getPureSlug(slug: string, camelCase?: boolean): string
  • Get the slug from the current process (webpack) instead of the PHP plugin output. For some cases you need to use that.

    Parameters

    • slug: string
    • Default value camelCase: boolean = false

    Returns string

Static slugCamelCase

  • slugCamelCase(slug: string): string
  • Convert a slug like "my-plugin" to "myPlugin". This can be useful for library naming (window[""] is bad because the hyphens).

    Parameters

    • slug: string

    Returns string

Object literals

contexts

contexts: object
: string = ""

cookieCounts

cookieCounts: object

draft

draft: number = 0

private

private: number = 0

publish

publish: number = 0

Generated using TypeDoc