import type { LiveActivityAttributesName, LiveActivityPayloadFor } from '../../generatedNames'; export type LiveActivityContentState = Record; export type LiveActivityStartOptions = { attributes: LiveActivityContentState; contentState: LiveActivityContentState; /** * When true (default), end activities for this attributesName before start. * Does not call global `endAll`. */ replaceExisting?: boolean; }; export type LiveActivityHandle = { attributesName: N; start: (options: { attributes: LiveActivityPayloadFor['attributes']; contentState: LiveActivityPayloadFor['contentState']; replaceExisting?: boolean; }) => Promise; update: (activityId: string, contentState: LiveActivityPayloadFor['contentState']) => Promise; end: (activityId: string) => Promise; }; /** Start a Live Activity by configured attributesName (used by target handles). */ export declare function startLiveActivity(attributesName: N, options: { attributes: LiveActivityPayloadFor['attributes']; contentState: LiveActivityPayloadFor['contentState']; replaceExisting?: boolean; }): Promise; export declare function updateLiveActivity(activityId: string, contentState: LiveActivityPayloadFor['contentState']): Promise; export declare function endLiveActivity(activityId: string): Promise; export declare function endAllLiveActivities(): Promise; export declare function areLiveActivitiesEnabled(): Promise; /** Target-scoped Live Activity handle (preferred host API). */ export declare function buildLiveActivityHandle(attributesName: N): LiveActivityHandle; /** * @deprecated Use `createTarget('Folder').liveActivity('AttributesName')` from the widget target entry. */ export declare function createLiveActivity(attributesName: N): LiveActivityHandle; /** OS / session helpers. Prefer target handles for start/update/end. */ export declare const LiveActivity: { /** @deprecated Use `createTarget('Folder').liveActivity('AttributesName')`. */ create: typeof createLiveActivity; /** @deprecated Use the handle from `.liveActivity(...)`. */ start: typeof startLiveActivity; update: typeof updateLiveActivity; end: typeof endLiveActivity; endAll: typeof endAllLiveActivities; areActivitiesEnabled: typeof areLiveActivitiesEnabled; }; //# sourceMappingURL=index.d.ts.map