/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 935c52864367 */ 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 activity task completed events. */ export type ActivityTaskCompletedAttributesResponse = { /** * Unique identifier for the activity task within the workflow. */ taskId: string; /** * The registered name of the activity being executed. */ activityName: string; /** * A payload containing arbitrary JSON data. * * @remarks * * Used for complete state snapshots or final results. */ result: JSONPayloadResponse; }; /** @internal */ export const ActivityTaskCompletedAttributesResponse$inboundSchema: z.ZodType< ActivityTaskCompletedAttributesResponse, unknown > = z.object({ task_id: z.string(), activity_name: z.string(), result: JSONPayloadResponse$inboundSchema, }).transform((v) => { return remap$(v, { "task_id": "taskId", "activity_name": "activityName", }); }); export function activityTaskCompletedAttributesResponseFromJSON( jsonString: string, ): SafeParseResult< ActivityTaskCompletedAttributesResponse, SDKValidationError > { return safeParse( jsonString, (x) => ActivityTaskCompletedAttributesResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ActivityTaskCompletedAttributesResponse' from JSON`, ); }