@usercentrics/cmp-browser-sdk
Version:
Usercentrics CMP Browser SDK
45 lines (44 loc) • 1.25 kB
TypeScript
import { LEGACY_CONSENT_ACTION, LEGACY_CONSENT_TYPE } from '../../DataFacade/enums/enums.legacy';
import { LOCAL_STORAGE_KEY } from '../enums';
import { StorageSettings } from './interfaces';
export interface LegacyStorageData {
[id: string]: LegacyStorageSettings;
}
export interface LegacyStorageSettings {
ucConsents: {
consents: LegacyStorageService[];
};
usercentrics: {
firstUserInteraction: {
stateSaved: boolean;
};
settings: {
language: string;
settingsId: string;
version: string;
};
};
}
export interface MigratedStorageSettings {
[LOCAL_STORAGE_KEY.SETTINGS]: StorageSettings;
[LOCAL_STORAGE_KEY.USER_INTERACTION]: boolean;
}
interface LegacyStorageService {
consentStatus: boolean;
controllerId: string;
history: LegacyStorageConsentHistory[];
processorId: string;
templateId: string;
}
export interface LegacyStorageConsentHistory {
action: LEGACY_CONSENT_ACTION;
appVersion: string;
consentStatus: boolean;
consentTemplateVersion: string;
language: string;
settingsVersion: string;
templateId: string;
updatedAt: number;
updatedBy: LEGACY_CONSENT_TYPE;
}
export {};