/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 65e2cbc84568 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ReleaseChannel = { /** * Unique identifier for the workspace. */ workspaceId: string; /** * Unique identifier for the project. */ projectId: string; name: string; /** * Unique identifier for the release. */ currentReleaseId: string | null; deploymentCount?: number | undefined; createdAt: Date; updatedAt: Date; }; /** @internal */ export const ReleaseChannel$inboundSchema: z.ZodType = z.object({ workspaceId: z.string(), projectId: z.string(), name: z.string(), currentReleaseId: z.nullable(z.string()), deploymentCount: z.int().optional(), createdAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)), updatedAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)), }); export function releaseChannelFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReleaseChannel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReleaseChannel' from JSON`, ); }