export interface DataTier { name?: string; type?: string; description?: string; descriptions?: string; reward?: string; } export interface DataRequest { name: string; description: string; reward: string; } export type TrainingScreenMode = 'mock' | 'fast' | 'real' | 'none'; export interface TrainingIntent { requestedScopes: string[]; requiresInference: boolean; requiresMbti: boolean; hasInferenceInput: boolean; priority: 'high' | 'normal'; source: 'sdk'; } export interface AuthorizedData { basic: boolean; personality?: boolean; preferences?: boolean; rawMemories?: boolean; fastTraits?: boolean; wrappedTraits?: boolean; } export interface TrainingStatus { ready: boolean; statusUrl?: string; pollIntervalMs?: number; neverTrained?: boolean; lastPayload?: any; regenerationInFlight?: boolean; traitsComplete?: boolean; } export interface OnairosResult { token: string; apiUrl: string; approved: string[]; userData: { email?: string; username?: string; connectedAccounts: string[]; skipped?: boolean; [key: string]: any; }; apiResponse?: any; platformData?: Record; authorizedData?: AuthorizedData; training?: TrainingStatus; } export interface TestModeOptions { /** @deprecated Internal test-only flow control. */ existingUser?: boolean; /** @deprecated Internal test-only flow control. */ newUser?: boolean; /** @deprecated Internal test-only flow control. */ fastTraining?: boolean; skipRealConnections?: boolean; skipApiCalls?: boolean; } export interface ApiKeyConfig { apiKey: string; environment?: 'production' | 'staging' | 'development'; enableLogging?: boolean; } export declare enum ApiKeyType { DEVELOPER = "developer", ADMIN = "admin", INVALID = "invalid" } export interface ValidatedApplicationContext { id: string; name: string; theme?: string; description?: string; } export interface ApiKeyValidationResult { isValid: boolean; error?: string; permissions?: string[]; rateLimits?: { remaining: number; resetTime: number; }; keyType?: ApiKeyType; isNetworkError?: boolean; application?: ValidatedApplicationContext | null; } export interface OnairosConfig { apiKey: string; environment?: 'production' | 'staging' | 'development'; enableLogging?: boolean; timeout?: number; retryAttempts?: number; } export interface OnairosProps { /** Return link after authentication (used for web-based flows) */ returnLink?: string; /** @deprecated Internal legacy auth prefill. */ prefillUrl?: string; /** Application name to display in dialogs */ AppName: string; /** Button type - 'normal' or 'pill' */ buttonType?: 'normal' | 'pill'; /** Data requests for user consent */ requestData?: any; /** Button width in pixels */ buttonWidth?: number; /** Button height in pixels */ buttonHeight?: number; /** Whether to show stroke/border around button */ hasStroke?: boolean; /** Whether the button is enabled */ enabled?: boolean; /** Button form/shape style */ buttonForm?: 'default' | 'connect'; /** Callback when user rejects or cancels */ onRejection?: (error?: string) => void; /** * Callback when authentication completes successfully. * When autoFetch=true: result.apiResponse contains fetched traits/insights. * When autoFetch=false: Use result.apiUrl + result.token to make your own API call. */ onComplete?: (result: OnairosResult) => void; /** @deprecated Use onComplete(result) instead. */ onResolved?: (apiUrl: string, token: string, userData: any) => void; /** Function to check before starting authentication */ preCheck?: () => Promise; /** Button background color */ color?: string; /** Enable debug mode */ debug?: boolean; /** Enable dark mode */ darkMode?: boolean; /** @deprecated Use priorityPlatform. Kept as a compatibility alias. */ preferredPlatform?: string | string[]; /** Platform to prioritize in the connector/auth flow. */ priorityPlatform?: string | null; /** @deprecated Internal/test-only flow control. Do not use in normal integrations. */ testMode?: boolean; /** Automatically fetch approved data before onComplete. Defaults to true. */ autoFetch?: boolean; /** If true, effective trainingScreenMode defaults to "none" and training/data loading runs in background. */ backgroundLoadData?: boolean; /** Controls the SDK training/loading UI style. Defaults to "fast", or "none" when backgroundLoadData=true. */ trainingScreenMode?: TrainingScreenMode; /** Inference input payload used for preferences/inference endpoints */ inferenceData?: any; /** Close the SDK modal after consent. Defaults to true. */ closeOnConsent?: boolean; /** Optional reasoning shown on the insufficient-data training warning. */ insufficientDataReasoning?: string | null; /** Ask backend inference to return MBTI preference output when preferences is approved. */ preferencesMbti?: boolean; /** Start directly at platform connection for externally authenticated users. */ primaryAuthOnly?: boolean; /** Use the alternate welcome flow when available. */ useNewWelcomeFlow?: boolean; /** Filter which platforms the SDK may show. */ allowedPlatforms?: string[]; /** Platforms to badge as recommended. */ recommendedPlatforms?: string[]; /** Developer app display/routing name. */ webpageName?: string; /** Optional signup attribution metadata forwarded to SDK auth endpoints. */ signupAttribution?: Record | string | null; /** API Key Configuration (REQUIRED) */ apiKey: string; /** Environment setting for API calls */ environment?: 'production' | 'staging' | 'development'; /** Enable logging for debugging */ enableLogging?: boolean; /** Request timeout in milliseconds */ timeout?: number; /** Number of retry attempts for failed requests */ retryAttempts?: number; /** If true, uses a reduced chunk cap for faster trait generation. */ fastTraits?: boolean; /** Optional custom explainer copy shown before onboarding starts. */ dataUsageDescription?: string; } export interface UniversalOnboardingProps { visible: boolean; onClose: (result?: any) => void; AppName: string; appIcon?: any; requestData?: any; returnLink?: string; /** @deprecated Internal legacy auth prefill. */ prefillUrl?: string; onComplete?: (apiUrl: string, token: string, data: any) => void | Promise; embedd?: boolean; debug?: boolean; /** @deprecated Internal/test-only flow control. Do not use in normal integrations. */ testMode?: TestModeOptions | boolean; buttonType?: 'default' | 'pill'; buttonForm?: 'signup' | 'login'; /** @deprecated Use priorityPlatform. Kept as a compatibility alias. */ preferredPlatform?: string | string[]; inferenceData?: any; /** @deprecated Internal legacy auto mode; use autoFetch/inferenceData instead. */ auto?: boolean; /** Automatically fetch approved data before onComplete. Defaults to true. */ autoFetch?: boolean; /** If true, effective trainingScreenMode defaults to "none" and training/data loading runs in background. */ backgroundLoadData?: boolean; /** Controls the SDK training/loading UI style. Defaults to "fast", or "none" when backgroundLoadData=true. */ trainingScreenMode?: TrainingScreenMode; /** @deprecated Internal legacy partner identifier. */ partner?: string; config?: OnairosConfig; /** If true, uses a reduced chunk cap for faster trait generation. */ fastTraits?: boolean; closeOnConsent?: boolean; /** Optional reasoning shown on the insufficient-data training warning. */ insufficientDataReasoning?: string | null; preferencesMbti?: boolean; /** Platform to prioritize in the connector/auth flow. */ priorityPlatform?: string | null; allowedPlatforms?: string[]; recommendedPlatforms?: string[]; primaryAuthOnly?: boolean; useNewWelcomeFlow?: boolean; apiKey?: string; /** Internal test-only bypass for API key initialization. */ skipApiKeyInitialization?: boolean; webpageName?: string; /** @deprecated Internal backend app id override; normal apps should use AppName/webpageName. */ appId?: string | null; /** Optional signup attribution metadata forwarded to SDK auth endpoints. */ signupAttribution?: Record | string | null; /** Optional custom explainer copy shown before onboarding starts. */ dataUsageDescription?: string; } export interface ConnectionStatus { [key: string]: { userName: string; connected: boolean; profileData?: any; }; } export interface OnairosButtonProps { returnLink?: string; prefillUrl?: string; AppName: string; appIcon?: any; buttonType?: 'normal' | 'pill'; requestData?: any; buttonWidth?: number; buttonHeight?: number; hasStroke?: boolean; enabled?: boolean; buttonForm?: 'default' | 'login' | 'signup' | 'connect'; onRejection?: (error?: string) => void; onComplete?: (result: OnairosResult) => void; /** @deprecated Use onComplete(result) instead. */ onResolved?: (apiUrl: string, token: string, userData: any) => void; preCheck?: () => Promise; color?: string; /** @deprecated Internal legacy button effect. */ swerv?: boolean; debug?: boolean; darkMode?: boolean; /** @deprecated Use priorityPlatform. Kept as a compatibility alias. */ preferredPlatform?: string | string[]; /** Platform to prioritize in the connector/auth flow. */ priorityPlatform?: string | null; /** @deprecated Internal/test-only flow control. Do not use in normal integrations. */ testMode?: boolean; /** Automatically fetch approved data before onComplete. Defaults to true. */ autoFetch?: boolean; /** If true, effective trainingScreenMode defaults to "none" and training/data loading runs in background. */ backgroundLoadData?: boolean; /** Controls the SDK training/loading UI style. Defaults to "fast", or "none" when backgroundLoadData=true. */ trainingScreenMode?: TrainingScreenMode; inferenceData?: any; /** @deprecated Internal legacy auto mode; use autoFetch/inferenceData instead. */ auto?: boolean; /** @deprecated Internal legacy partner identifier. */ partner?: string; textLayout?: 'left' | 'right' | 'center'; textColor?: string; /** @deprecated Internal legacy proof UI flag. */ proofMode?: boolean; webpageName?: string; /** If true, uses a reduced chunk cap for faster trait generation. */ fastTraits?: boolean; closeOnConsent?: boolean; /** Optional reasoning shown on the insufficient-data training warning. */ insufficientDataReasoning?: string | null; preferencesMbti?: boolean; primaryAuthOnly?: boolean; useNewWelcomeFlow?: boolean; allowedPlatforms?: string[]; recommendedPlatforms?: string[]; apiKey?: string; /** Internal test-only bypass for API key initialization. */ skipApiKeyInitialization?: boolean; /** @deprecated Internal backend app id override; normal apps should use AppName/webpageName. */ appId?: string | null; /** Optional signup attribution metadata forwarded to SDK auth endpoints. */ signupAttribution?: Record | string | null; /** Optional custom explainer copy shown before onboarding starts. */ dataUsageDescription?: string; } export interface PlatformListProps { platforms?: string[]; onSelect?: (platform: string) => void; selectedPlatform?: string; connections?: ConnectionStatus; onToggle?: (platform: string, connect: boolean) => void; isLoading?: boolean; canProceed?: boolean; onProceed?: () => void; } export interface PinInputProps { onComplete?: (pin: string) => void; length?: number; secure?: boolean; title?: string; subtitle?: string; verification?: boolean; initialPin?: string; onSubmit: (pin: string) => void; minLength?: number; requireSpecialChar?: boolean; requireNumber?: boolean; onBack?: () => void; } export interface TrainingModalProps { visible: boolean; progress: number; eta: string; onCancel: () => void; onComplete?: () => void; modelKey?: string; username?: string; /** @deprecated Internal test-only simulation flag. */ test?: boolean; } export interface OAuthWebViewProps { url: string; onClose: () => void; onSuccess: (code: string) => void; platform?: string; onComplete?: () => void; } export interface PlatformConfig { name: string; icon: string; color: string; description?: string; } export interface PlatformAuthConfig { hasNativeSDK: boolean; nativeSDKPackage?: string; authEndpoint: string; color: string; clientId?: string; iosClientId?: string; redirectUri?: string; scope?: string; responseType?: string; } export interface ApiResponse { success: boolean; data?: T; error?: string; publicKey?: string; } export interface CredentialsResult { success: boolean; credentials?: any; error?: string; isValid?: boolean; } export interface OverlayProps { data: { Small?: DataTier; Medium?: DataTier; Large?: DataTier; personality_traits?: DataRequest; sentiment_analysis?: DataRequest; [key: string]: DataTier | DataRequest | undefined; }; username: string; modelKey: string; onResolved: (apiUrl: string, accessToken: string, loginDetails: any) => void; appName?: string; darkMode?: boolean; platforms?: Array<{ id: string; name: string; icon: any; }>; } export interface BiometricOptions { enableBiometrics?: boolean; biometricPrompt?: string; } export interface PinRequirements { minLength: number; requireUppercase: boolean; requireLowercase: boolean; requireNumber: boolean; requireSpecialChar: boolean; } //# sourceMappingURL=types.d.ts.map