UNPKG

@usercentrics/cmp-browser-sdk

Version:
98 lines (97 loc) 2.46 kB
import { CONSENT_ACTION, CONSENT_TYPE } from '../../DataFacade/enums'; import { StorageCcpa, StorageTCF } from '../../Storage/interfaces'; import { DataTransferObject } from '../../DataFacade/interfaces'; import { UserCountryData } from '../../..'; export interface API_CONFIG { EU_URI: API_URI; FOLDER: { RULESET: string; SETTINGS: string; TEMPLATES: string; TRANSLATIONS: string; }; URI: API_URI; } interface API_URI { AGGREGATOR: string; CDN: string; FETCH_CONSENTS: string; FETCH_CONSENTS_V2?: string; FETCH_TCF_DATA: string; FETCH_TCF_DATA_V2: string; GRAPHQL: string; RULESET?: string; SAVE_CONSENTS_V2?: string; TRACK_EVENT?: string; TRACK_SESSION: string; } export interface Consents { dataTransferObjects: DataTransferObject[]; consentString?: GraphQLConsentString; consentMeta?: GraphQLConsentMeta; } export interface GraphQLConsent { action: CONSENT_ACTION; appVersion: string; controllerId: string; consentStatus: string; consentTemplateId: string; consentTemplateVersion: string; language: string; processorId: string; referrerControllerId: string; settingsId: string; settingsVersion: string; updatedBy: CONSENT_TYPE; } export interface GraphQLConsentMeta { TCF2?: string; } export interface GraphQLConsentString { CCPA?: string; TCF2?: string; } export interface GraphQLQuery { operationName?: string; query: string; variables?: Record<string, unknown>; } export interface GraphQLTagLoggerVariables { settingsId: string; source: string; targets: string[]; } export interface UserConsentResponse { action: CONSENT_ACTION; consentId: string; settingsVersion: string; status: boolean; templateId: string; timestamp: string | number; updatedBy: CONSENT_TYPE; } export interface UserConsentResponseV2 { consents: UserConsentResponse[]; tcf?: StorageTCF; ccpa?: StorageCcpa; } export type RulesetRule = { settingsId: string; name: string; locations?: string[]; noShow: boolean; }; export type DefaultRulesetRule = { settingsId: string; noShow: boolean; }; export interface Ruleset { description: string; rules: RulesetRule[]; defaultRule: DefaultRulesetRule; location: UserCountryData | null; } export interface AcmVendors { providers: Record<number, [string, string]>; } export {};