/* * 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"; export type ReportExecutionUrl = { /** * A signed URL to download the report execution file. */ url: string; /** * The date and time when the download URL expires. */ expiresAt: Date; }; /** @internal */ export const ReportExecutionUrl$inboundSchema: z.ZodType< ReportExecutionUrl, z.ZodTypeDef, unknown > = z.object({ url: z.string(), expires_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), }).transform((v) => { return remap$(v, { "expires_at": "expiresAt", }); }); export function reportExecutionUrlFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReportExecutionUrl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReportExecutionUrl' from JSON`, ); }