import type { Account, Group } from "../internal.js"; import type { JazzError } from "./JazzError.js"; import { RawCoValueCursor } from "cojson"; export declare const CoValueLoadingState: { /** * The coValue is loaded. */ readonly LOADED: "loaded"; /** * The coValue is being loaded. */ readonly LOADING: "loading"; /** * The coValue existed but has been deleted (tombstoned). */ readonly DELETED: "deleted"; /** * The coValue was loaded but the account is not authorized to access it. */ readonly UNAUTHORIZED: "unauthorized"; /** * Tried to load the coValue but failed. */ readonly UNAVAILABLE: "unavailable"; }; export type CoValueLoadingState = (typeof CoValueLoadingState)[keyof typeof CoValueLoadingState]; export type CoValueErrorState = typeof CoValueLoadingState.UNAVAILABLE | typeof CoValueLoadingState.DELETED | typeof CoValueLoadingState.UNAUTHORIZED; export type NotLoadedCoValueState = typeof CoValueLoadingState.LOADING | CoValueErrorState; export type SubscriptionValue = { type: typeof CoValueLoadingState.LOADED; value: D; id: string; } | JazzError; export type SubscriptionValueLoading = { type: typeof CoValueLoadingState.LOADING; id: string; }; export type BranchDefinition = { name: string; owner?: Group | Account; }; export type DecodedCoValueCursor = RawCoValueCursor & { version: 1; resolveFingerprint: Record; }; export type CoValueCursor = `cursor_z${string}`; export type LoadCoValueCursorOption = CoValueCursor | { useCurrentCursor: true; }; /** * Detail structure for subscription performance marks and measures. * Used by SubscriptionScope.trackLoadingPerformance() to emit performance data. */ export interface SubscriptionPerformanceDetail { /** Type of performance entry */ type: "jazz-subscription"; /** Unique identifier for this subscription instance */ uuid: string; /** CoValue ID (e.g., "co_z1234...") */ id: string; /** Source identifier (hook name or API) */ source: string; /** The resolve query object */ resolve: any; /** Current status of the subscription */ status: "pending" | "loaded" | "error"; /** When the subscription started loading (DOMHighResTimeStamp) */ startTime: number; /** When loading completed (if completed) */ endTime?: number; /** Total load time in ms (if completed) */ duration?: number; /** Error type if status is "error" */ errorType?: "unavailable" | "unauthorized" | "deleted"; /** Stack trace captured at subscription creation time */ callerStack?: string; devtools?: ExtensionTrackEntryPayload | ExtensionMarkerPayload; } type DevToolsColor = "primary" | "primary-light" | "primary-dark" | "secondary" | "secondary-light" | "secondary-dark" | "tertiary" | "tertiary-light" | "tertiary-dark" | "error"; interface ExtensionTrackEntryPayload { dataType?: "track-entry"; color?: DevToolsColor; track: string; trackGroup?: string; properties?: [string, string][]; tooltipText?: string; } interface ExtensionMarkerPayload { dataType: "marker"; color?: DevToolsColor; properties?: [string, string][]; tooltipText?: string; } export {}; //# sourceMappingURL=types.d.ts.map