/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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 { ExecutionDetailsSourceEnum, ExecutionDetailsSourceEnum$inboundSchema, } from "./executiondetailssourceenum.js"; import { ExecutionDetailsStatusEnum, ExecutionDetailsStatusEnum$inboundSchema, } from "./executiondetailsstatusenum.js"; import { ProvidersIdEnum, ProvidersIdEnum$inboundSchema, } from "./providersidenum.js"; export type ActivityNotificationExecutionDetailResponseDto = { /** * Unique identifier of the execution detail */ id: string; /** * Creation time of the execution detail */ createdAt?: string | undefined; /** * Status of the execution detail */ status: ExecutionDetailsStatusEnum; /** * Detailed information about the execution */ detail: string; /** * Whether the execution is a retry or not */ isRetry: boolean; /** * Whether the execution is a test or not */ isTest: boolean; /** * Provider ID of the job */ providerId?: ProvidersIdEnum | undefined; /** * Raw data of the execution */ raw?: string | null | undefined; /** * Source of the execution detail */ source: ExecutionDetailsSourceEnum; }; /** @internal */ export const ActivityNotificationExecutionDetailResponseDto$inboundSchema: z.ZodType< ActivityNotificationExecutionDetailResponseDto, z.ZodTypeDef, unknown > = z.object({ _id: z.string(), createdAt: z.string().optional(), status: ExecutionDetailsStatusEnum$inboundSchema, detail: z.string(), isRetry: z.boolean(), isTest: z.boolean(), providerId: ProvidersIdEnum$inboundSchema.optional(), raw: z.nullable(z.string()).optional(), source: ExecutionDetailsSourceEnum$inboundSchema, }).transform((v) => { return remap$(v, { "_id": "id", }); }); export function activityNotificationExecutionDetailResponseDtoFromJSON( jsonString: string, ): SafeParseResult< ActivityNotificationExecutionDetailResponseDto, SDKValidationError > { return safeParse( jsonString, (x) => ActivityNotificationExecutionDetailResponseDto$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ActivityNotificationExecutionDetailResponseDto' from JSON`, ); }