import type { DataFieldSourceLaunchBinding, DataRecordEditInput, UserCandidatePage, UserCandidateSearch } from 'openxiangda-contracts/browser'; export interface WorkflowCandidateBinding { taskId: string; expectedTaskVersion: number | undefined; } export type UserCandidateFieldContext = { kind: 'native'; resourceCode: string; fieldCode: string; operation: 'create'; launch?: DataFieldSourceLaunchBinding; scopeValue?: string; } | { kind: 'native'; resourceCode: string; fieldCode: string; operation: 'update'; recordId: string; expectedRevision: number; action?: DataRecordEditInput; launch?: DataFieldSourceLaunchBinding; } | { kind: 'workflow-task'; taskId: string; fieldCode: string; expectedRevision: number; expectedTaskVersion: number; }; export declare function userCandidateFieldContext(input: { resourceCode?: string; fieldCode: string; operation: 'create' | 'update'; recordId?: string; expectedRevision?: number; workflowCandidateBinding?: WorkflowCandidateBinding; action?: DataRecordEditInput; launch?: DataFieldSourceLaunchBinding; requiresSavedScope?: boolean; prospectiveScope?: boolean; scopeValue?: unknown; }): { context?: UserCandidateFieldContext; error?: string; }; export declare function queryUserCandidateField(context: UserCandidateFieldContext, search: Omit): Promise; export type CandidateSelection = { value: string; label: string; status?: 'valid' | 'invalid'; }; /** Invalid names come only from the existing value, never another directory. */ export declare function reconcileUserCandidateSelection(selected: CandidateSelection[], inspected: UserCandidatePage['selected']): CandidateSelection[]; export declare function userCandidateError(error: unknown): string; //# sourceMappingURL=user-candidate-context.d.ts.map