import type { FashionTracker } from '../tracking/tracker'; import { PropsWithChildren, RefObject } from 'react'; import { AuthCredentials } from './auth'; import { SecureStorageAdapter } from './keychain'; import { Queue, QueueableEvents } from './tracking'; /** * Interface representing the configuration for the state * of the Dressipi context. */ export type ContextConfiguration = { namespaceId: string; domain: string; clientId: string; tracker: FashionTracker | null; queue: RefObject | null> | null; /** Most recent page-view context, shared by tracking hooks in this provider. */ pageViewContext: RefObject | null; credentials: AuthCredentials | null; refreshAuthentication: () => void; }; /** * Additional properties required for the Dressipi context provider. */ type ProviderAdditionalProps = { namespaceId: string; domain: string; clientId: string; enableLogging?: boolean; /** Print access_token and refresh_token values in log objects. Defaults to false. */ logTokens?: boolean; storage?: SecureStorageAdapter; defaultConsent?: boolean; /** Host application version/build for the Snowplow application context. */ appVersion?: string; appBuild?: string; }; /** * Props for the Dressipi context provider. */ export type ProviderProps = PropsWithChildren; export {};