/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IssueSnapshotMetadata = { /** * The unique identifier for the issue snapshot. */ id: string; /** * The title of the snapshot */ title?: string | undefined; /** * The description of the snapshot */ description?: string | undefined; /** * The date and time when the snapshot was created. */ createdAt?: Date | undefined; }; /** @internal */ export const IssueSnapshotMetadata$inboundSchema: z.ZodType< IssueSnapshotMetadata, z.ZodTypeDef, unknown > = z.object({ id: z.string(), title: z.string().optional(), description: z.string().optional(), createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), }); export function issueSnapshotMetadataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IssueSnapshotMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IssueSnapshotMetadata' from JSON`, ); }