import type { AutosaveSaveStatus } from './autosave-manager'; export type { AutosaveSaveStatus }; /** * AutosaveUtils contains utility APIs for the autosave feature. * The dx layer accesses these via PCore.getAutosaveUtils(). */ declare class AutosaveUtils { /** * Status constants for the current autosave state. * - IDLE — no save in flight * - SAVING — auto save request in progress * - SKIPPED — auto save skipped due to client-side validation error * - ERROR — auto save request failed */ static readonly AUTOSAVE_SAVE_STATUS: { readonly IDLE: "idle"; readonly SAVING: "saving"; readonly SKIPPED: "skipped"; readonly ERROR: "error"; }; /** * Returns true when the given context is currently registered for autosave. * Used by the dx layer to decide whether to show the autosave banner and * subscribe to status updates. * @param context - the container item context (e.g. 'app/primary_1/workarea_1') */ static isAutosaveEnabledForContext(context: string): boolean; /** * Subscribes to autosave status changes for a given context. * Called by the dx layer on mount to receive banner status updates. * @param itemKey - the container item ID * @param callback - called with the new status whenever it changes * @returns an unsubscribe function */ static subscribeAutosaveStatus(itemKey: string, callback: (status: AutosaveSaveStatus) => void): () => void; /** * Notifies the autosave engine that the user is actively editing content in * a context. Resets the autosave debounce timer without triggering a full * field-change cycle (no validation, no refresh). Intended for controls like * textarea and RTE that commit their value only on blur. * The pending value is stored and flushed to the Redux store just before the * autosave HTTP request fires, so the save payload contains the latest typed value. * @param context - the container item context (from pConn.getContextName()) * @param propReference - the full property reference (from pConn.getStateProps().value) * @param value - the current field value */ static notifyChange(context: string, propReference: string, value: string): void; } export default AutosaveUtils;