import { z } from "zod"; import type { TResponseUpdate } from "../types/response"; import type { TFileUploadParams } from "../types/storage"; import type { TActionClass } from "./action-class"; import type { TSurvey } from "./survey"; import type { TWorkspace, TWorkspaceStyling } from "./workspace"; export type TWorkspaceStateSettings = Pick & { styling: TWorkspaceStyling; }; export type TWorkspaceStateActionClass = Pick; export interface TWorkspaceState { expiresAt: Date; data: { surveys: TSurvey[]; actionClasses: TWorkspaceStateActionClass[]; settings: TWorkspaceStateSettings; }; } export interface TUserState { expiresAt: Date | null; data: { userId: string | null; contactId: string | null; segments: string[]; displays: { surveyId: string; createdAt: Date; }[]; responses: string[]; lastDisplayAt: Date | null; language?: string; }; } export interface TConfig { workspaceId: string; appUrl: string; workspace: TWorkspaceState; user: TUserState; filteredSurveys: TSurvey[]; status: { value: "success" | "error"; expiresAt: Date | null; }; } export type TConfigUpdateInput = Omit & { status?: { value: "success" | "error"; expiresAt: Date | null; }; }; export type TAttributes = Record; export interface TConfigInput { /** @deprecated Use `workspaceId` instead. Still works as a backward-compatible alias. */ environmentId?: string; workspaceId?: string; appUrl: string; } /** * Legacy config shape persisted before the workspace rename. * Used to migrate AsyncStorage payloads that still use `environmentId` / `environment`. */ export type TLegacyConfig = TConfig & { environmentId?: string; environment?: { expiresAt: Date; data: { surveys: TSurvey[]; actionClasses: TWorkspaceStateActionClass[]; project?: TWorkspaceStateSettings; settings?: TWorkspaceStateSettings; }; }; }; export interface TWebViewOnMessageData { onFinished?: boolean | null; onDisplay?: boolean | null; onResponse?: boolean | null; responseUpdate?: TResponseUpdate | null; onRetry?: boolean | null; onClose?: boolean | null; onFileUpload?: boolean | null; fileUploadParams?: TFileUploadParams | null; uploadId?: string | null; } export declare const ZJsRNWebViewOnMessageData: z.ZodObject<{ onFinished: z.ZodOptional>; onDisplayCreated: z.ZodOptional>; onResponseCreated: z.ZodOptional>; onClose: z.ZodOptional>; onFilePick: z.ZodOptional>; fileUploadParams: z.ZodOptional>; allowMultipleFiles: z.ZodOptional>; }, z.core.$strip>>>; onOpenExternalURL: z.ZodOptional>; onOpenExternalURLParams: z.ZodOptional>>; }, z.core.$strip>; export interface TUpdates { userId: string; attributes?: TAttributes; } //# sourceMappingURL=config.d.ts.map