/** * Proto ↔ SDK type conversion layer. * * Centralizes all conversions between gRPC/proto wire format and SDK types. * This isolates proto structure changes from the rest of the SDK. * * Payloads are passed as raw Buffers (no base64 round-trip) for performance. */ import type { WorkflowTaskPayload, ActivityTaskPayload, WorkflowCompletion, ActivityCompletion, WorkflowCommand } from '../types.js'; /** Convert a protobuf Timestamp to a Date after validating its canonical structure and range. */ export declare function timestampToDate(value: unknown, operation?: string, field?: string): Date; type StepTypeName = 'UNSPECIFIED' | 'ACTIVITY' | 'CHILD_WORKFLOW' | 'TIMER' | 'SIDE_EFFECT' | 'SIGNAL_WAIT'; type StepStatusName = 'UNSPECIFIED' | 'STARTED' | 'COMPLETED' | 'FAILED'; type WorkflowStatusName = 'UNSPECIFIED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'TIMED_OUT' | 'BLOCKED_NONDETERMINISTIC'; export declare function stepTypeToString(t: any): StepTypeName; export declare function stepStatusToString(s: any): StepStatusName; export declare function statusFromProto(status: any): WorkflowStatusName; export declare function parseWorkflowTask(task: any, requireDeliveryIdentity?: boolean): WorkflowTaskPayload; /** Parse a GetCheckpointsResponse (the lazy-hydration fetch, P0.4). */ export declare function parseCheckpointsResponse(resp: any): WorkflowTaskPayload['completed_steps']; export declare function parseActivityTask(task: any, requireDeliveryIdentity?: boolean): ActivityTaskPayload; export declare function cmdToProto(cmd: WorkflowCommand): any; export declare function buildWorkflowCompletionRequest(taskToken: string, completion: WorkflowCompletion, deliveryIdentity?: unknown): any; export declare function buildActivityCompletionRequest(taskToken: string, completion: ActivityCompletion, deliveryIdentity?: unknown): any; export {};