import type { AdminViewServerPropsOnly, BuildFormStateArgs, BuildTableStateArgs, Data, DocumentPreferences, DocumentSlots, FormState, GetFolderResultsComponentAndDataArgs, Params, RenderDocumentVersionsProperties, ServerFunction, ServerFunctionClient, SlugifyServerFunctionArgs } from 'payload'; import type { Slugify } from 'payload/shared'; import React from 'react'; import type { RenderFieldServerFnArgs, RenderFieldServerFnReturnType } from '../../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js'; import type { buildFormStateHandler } from '../../utilities/buildFormState.js'; import type { buildTableStateHandler } from '../../utilities/buildTableState.js'; import type { CopyDataFromLocaleArgs } from '../../utilities/copyDataFromLocale.js'; import type { getFolderResultsComponentAndDataHandler } from '../../utilities/getFolderResultsComponentAndData.js'; import type { schedulePublishHandler, SchedulePublishHandlerArgs } from '../../utilities/schedulePublishHandler.js'; type GetFormStateClient = (args: { signal?: AbortSignal; } & Omit) => ReturnType; type SchedulePublishClient = (args: { signal?: AbortSignal; } & Omit) => ReturnType; type GetTableStateClient = (args: { signal?: AbortSignal; } & Omit) => ReturnType; type SlugifyClient = (args: { signal?: AbortSignal; } & Omit) => ReturnType; export type RenderDocumentResult = { data: any; Document: React.ReactNode; preferences: DocumentPreferences; }; type RenderDocumentBaseArgs = { collectionSlug: string; disableActions?: boolean; docID: number | string; drawerSlug?: string; initialData?: Data; initialState?: FormState; overrideEntityVisibility?: boolean; paramsOverride?: AdminViewServerPropsOnly['params']; redirectAfterCreate?: boolean; redirectAfterDelete: boolean; redirectAfterDuplicate: boolean; redirectAfterRestore?: boolean; searchParams?: Params; /** * Properties specific to the versions view */ versions?: RenderDocumentVersionsProperties; }; export type RenderDocumentServerFunction = ServerFunction>; type RenderDocumentServerFunctionHookFn = (args: { signal?: AbortSignal; } & RenderDocumentBaseArgs) => Promise; type CopyDataFromLocaleClient = (args: { signal?: AbortSignal; } & Omit) => Promise<{ data: Data; }>; type GetDocumentSlots = (args: { collectionSlug: string; id?: number | string; signal?: AbortSignal; }) => Promise; type GetFolderResultsComponentAndDataClient = (args: { signal?: AbortSignal; } & Omit) => ReturnType; type RenderFieldClient = (args: RenderFieldServerFnArgs) => Promise; export type ServerFunctionsContextType = { _internal_renderField: RenderFieldClient; copyDataFromLocale: CopyDataFromLocaleClient; getDocumentSlots: GetDocumentSlots; getFolderResultsComponentAndData: GetFolderResultsComponentAndDataClient; getFormState: GetFormStateClient; getTableState: GetTableStateClient; renderDocument: RenderDocumentServerFunctionHookFn; schedulePublish: SchedulePublishClient; serverFunction: ServerFunctionClient; slugify: SlugifyClient; }; export declare const ServerFunctionsContext: React.Context; export declare const useServerFunctions: () => ServerFunctionsContextType; export declare const ServerFunctionsProvider: React.FC<{ children: React.ReactNode; serverFunction: ServerFunctionClient; }>; export {}; //# sourceMappingURL=index.d.ts.map