Documentation

Overview

State Properties

Warning: ExtractedTypeTable: Could not extract "StoreRuntimeState" from "./packages/core/src/store/type.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.

Loading…

Action Methods

Warning: ExtractedTypeTable: Could not extract "StoreActions" from "./packages/core/src/store/type.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.

Loading…

Key Types

ConsentState

A record mapping consent category names to their boolean values:

type ConsentState = Record<AllConsentNames, boolean>;
// Example: { necessary: true, measurement: true, marketing: false }
ConsentInfo

Metadata about when and how consent was recorded:

interface ConsentInfo {
  time: number;                    // Epoch timestamp when consent was recorded
  subjectId?: string;              // Client-generated subject ID (sub_xxx format)
  externalId?: string;             // External user ID linked via identifyUser()
  identityProvider?: string;       // Identity provider (e.g. 'clerk', 'auth0')
}
LocationInfo

Detected geographic location from the c15t backend:

interface LocationInfo {
  countryCode: string;     // ISO 3166-1 alpha-2 (e.g. 'DE')
  regionCode: string;      // Region/state code (e.g. 'BY')
  jurisdiction: string;    // Applicable jurisdiction (e.g. 'GDPR', 'CCPA')
}
Model

The active consent model:

type Model = 'opt-in' | 'opt-out' | 'iab' | null;
  • 'opt-in' — Explicit consent required before tracking (GDPR)
  • 'opt-out' — Tracking allowed by default, user can opt out (CCPA)
  • 'iab' — IAB TCF 2.3 compliance mode
  • null — No jurisdiction detected yet