/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: f67d991747ae */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { JSONPayloadResponse, JSONPayloadResponse$inboundSchema, } from "./jsonpayloadresponse.js"; /** * Attributes for custom task started events. */ export type CustomTaskStartedAttributesResponse = { /** * Unique identifier for the custom task within the workflow. */ customTaskId: string; /** * The type/category of the custom task (e.g., 'llm_call', 'api_request'). */ customTaskType: string; /** * A payload containing arbitrary JSON data. * * @remarks * * Used for complete state snapshots or final results. */ payload?: JSONPayloadResponse | undefined; }; /** @internal */ export const CustomTaskStartedAttributesResponse$inboundSchema: z.ZodType< CustomTaskStartedAttributesResponse, unknown > = z.object({ custom_task_id: z.string(), custom_task_type: z.string(), payload: JSONPayloadResponse$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "custom_task_id": "customTaskId", "custom_task_type": "customTaskType", }); }); export function customTaskStartedAttributesResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomTaskStartedAttributesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomTaskStartedAttributesResponse' from JSON`, ); }