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
| Parameter | Type |
|---|---|
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.state | TaskState |
status.timestamp | Date |
Returns
Last updated on