/** * Types for the consent manager initialization. * * @packageDocumentation */ import type { TranslationConfig } from '@c15t/translations'; import type { StoreApi } from 'zustand/vanilla'; import type { ConsentManagerInterface } from '../../client/client-factory'; import type { IABConfig } from '../iab-tcf/types'; import type { ConsentStoreState, SSRInitialData } from '../../store/type'; import type { ConsentBannerResponse } from '../../types/compliance'; export type { ConsentBannerResponse }; /** * Configuration for initializing the consent manager. */ export interface InitConsentManagerConfig { /** The consent manager client for API calls */ manager: ConsentManagerInterface; /** SSR-prefetched data (init + optional GVL) */ ssrData?: Promise; /** Canonical backend URL for hosted-mode request matching */ backendURL?: string; /** Effective client credentials mode for hosted-mode request matching */ requestCredentials?: RequestCredentials; /** Initial translation configuration to merge with server response */ initialTranslationConfig?: Partial; /** IAB TCF configuration (when provided, IAB manager is lazily created) */ iabConfig?: IABConfig; /** Store state getter */ get: StoreApi['getState']; /** Store state setter */ set: StoreApi['setState']; } /** * Subset of config for functions that only need store access. */ export type StoreAccess = Pick;