import type { AxiosResponse } from 'axios'; import type { NextUIResponseData } from '../types/builder.type'; import type { NextUIResolver } from './nextUIResolver.context'; type GetNextUIFn = (userFlow: string, pageId: string, entries: Record, responseKey: string, showLoading?: boolean) => Promise | undefined>; /** * Writes `values` into the request state and asks not-front for the next page * with ONE request. Empty values (`""`, `null`, `[]`) are dropped from the * state, and only the keys of `values` are touched. On a page reply the * entries and the page are set in one synchronous step, so data pieces whose * `dependsOn` lists one of the keys refetch once, with the new values. Loading * is always cleared. Resolves `true` when the page was applied; on failure * nothing is written and it resolves `false` (the caller keeps its draft). * `getNextUI` is the one from `useAction`. * * With `resolveNextUI` (a `stablePage` renderer whose embedder answers the next * UI) the embedder is asked instead of not-front, with the same sanitized * state. A valid answer that is still current (no other write to the stable * page since the request started) is written with the entries in one * synchronous block; a rejection, an invalid answer or an overtaken one writes * nothing and resolves `false`. `pageId` is not used on that path. */ export declare const applyStateValues: (userFlow: string, pageId: string, triggerKey: string, values: Record, getNextUI: GetNextUIFn, resolveNextUI?: NextUIResolver | null) => Promise; export {};