@bemit/consent-ui
Version:
© 2022 [bemit](https://bemit.eu)
63 lines (62 loc) • 1.5 kB
TypeScript
export interface ConsentUiTrackGroupStoreFeature {
title: string;
entries: ConsentUiTrackGroupStoreEntry[];
}
export interface ConsentUiTrackGroupStoreEntry {
name: string;
domain?: string;
info: {
desc: string;
validity?: string;
};
/**
* @todo this is the `storedIn`/`in`, maybe rename
*/
is: 'cookie' | 'local' | string;
provider?: string;
}
export interface ConsentUiTrackGroupService {
id: string;
title: string;
group: string;
canSelect?: boolean;
desc?: string[];
embed?: {
desc?: string;
noPolicy?: boolean;
};
receives?: string[];
stores?: ConsentUiTrackGroupStoreFeature[];
}
export interface ConsentUiTrackGroup {
id: string;
title: string;
desc?: string;
noSelect?: boolean;
}
export interface ConsentUiDefinition {
title: string;
intro: string[];
desc: string[];
policies: {
[provider: string]: string;
};
groups: ConsentUiTrackGroup[];
services: ConsentUiTrackGroupService[];
}
export interface ConsentUiInfoLocales {
[locale: string]: ConsentUiDefinition;
}
export interface ConsentUiPrefersState {
groups?: {
[preferId: string]: undefined | 1 | 2;
};
services?: {
[preferId: string]: undefined | 1 | 2;
};
}
export interface ConsentUiInfoDefinition {
prefersInitial: ConsentUiPrefersState;
prefersDefault: ConsentUiPrefersState;
localeConsent: ConsentUiInfoLocales;
}