Skip to Content
Naylence Docs are in active development. Share feedback in Discord.
ReferenceAgent APITypeScript ReferenceFunctionsserializeTaskStatus

naylence-agent-sdk-ts


naylence-agent-sdk-ts / serializeTaskStatus

Function: serializeTaskStatus()

function serializeTaskStatus(status: { message?: | { metadata?: Metadata | null; parts: ( | { metadata?: Metadata | null; text: string; type: "text"; } | { file: { bytes?: string | null; mimeType?: string | null; name?: string | null; uri?: string | null; }; metadata?: Metadata | null; type: "file"; } | { data: Metadata; metadata?: Metadata | null; type: "data"; })[]; role: "user" | "agent"; } | null; state: TaskState; timestamp: Date; }): TaskStatusJSON;

Defined in: src/naylence/agent/a2a-types.ts:384

Parameters

ParameterType
status{ message?: | { metadata?: Metadata | null; parts: ( | { metadata?: Metadata | null; text: string; type: "text"; } | { file: { bytes?: string | null; mimeType?: string | null; name?: string | null; uri?: string | null; }; metadata?: Metadata | null; type: "file"; } | { data: Metadata; metadata?: Metadata | null; type: "data"; })[]; role: "user" | "agent"; } | null; state: TaskState; timestamp: Date; }
status.message?| { metadata?: Metadata | null; parts: ( | { metadata?: Metadata | null; text: string; type: "text"; } | { file: { bytes?: string | null; mimeType?: string | null; name?: string | null; uri?: string | null; }; metadata?: Metadata | null; type: "file"; } | { data: Metadata; metadata?: Metadata | null; type: "data"; })[]; role: "user" | "agent"; } | null
status.stateTaskState
status.timestampDate

Returns

TaskStatusJSON

Last updated on