Skip to content

StoredConsent

type StoredConsent = {
c: Record<CategoryId, boolean>;
j: JurisdictionId;
pv: string;
ts: number;
v: 1;
};

Defined in: types.ts:155

The serialised consent record stored in the browser cookie. Schema is versioned via v so future migrations don’t break readers.

Type declaration

NameTypeDescriptionDefined in
cRecord<CategoryId, boolean>Map of category ID to granted/denied.types.ts:159
jJurisdictionIdJurisdiction ID at the time of choice.types.ts:165
pvstringPolicy version at the time of choice.types.ts:161
tsnumberUnix epoch milliseconds when the choice was made.types.ts:163
v1Schema version.types.ts:157