import type { SearchAttributeSchema, SearchAttributeValue, StartOptions, StartOrSignalOptions } from '../../core/types.ts'; /** * The raw, transport-supplied start-option fields shared by `weft.workflows.start` * and `weft.workflows.startorsignal`. Each is `unknown` because validation happens * in {@link buildSharedStartWorkflowOptions}, not at the schema boundary, so both * surfaces hit one cross-transport error path. */ export type SharedStartWorkflowOptionInput = { id?: unknown; executionTimeout?: unknown; startAt?: unknown; startAfter?: unknown; tags?: unknown; idempotencyKey?: unknown; searchAttributes?: unknown; }; export type StartOrSignalWorkflowOptionInput = SharedStartWorkflowOptionInput & { onTerminalConflict?: unknown; }; /** * Coerce the shared start-option fields into a validated {@link StartOptions}. * Both start operations call this so they cannot drift in how they validate `id`, * `executionTimeout`, `startAt`/`startAfter`, `tags`, `idempotencyKey`, and * `searchAttributes` (a new field added here covers both surfaces at once). Throws * {@link StartWorkflowValidationError} on any malformed field. * * `onTerminalConflict` is intentionally NOT part of this shared path: * `weft.workflows.start` remains non-restart-capable over transport. The * start-or-signal operation adds its narrower restart policy through * {@link buildStartOrSignalWorkflowOptions}. */ export declare function buildSharedStartWorkflowOptions(input: SharedStartWorkflowOptionInput, searchAttributeSchema: SearchAttributeSchema | undefined): StartOptions; export declare function buildStartOrSignalWorkflowOptions(input: StartOrSignalWorkflowOptionInput, searchAttributeSchema: SearchAttributeSchema | undefined): StartOrSignalOptions; /** * Coerce a transport-supplied `searchAttributes` object into validated * {@link SearchAttributeValue}s. Shared by `weft.workflows.start` and * `weft.workflows.startorsignal` so both apply the same null-prototype guard, * date-time normalization, schema-presence check, and type validation — * preventing the two start surfaces from drifting in how they accept attributes. */ export declare function coerceStartWorkflowSearchAttributes(value: unknown, fieldName: string, schema: SearchAttributeSchema | undefined): Record;