/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 343d397da256 */ 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 DeploymentGroup = { /** * Unique identifier for the deployment group. */ id: string; /** * Deployment group name. */ name: string; /** * Case-sensitive, URL- and header-safe identifier from the integrating application. */ externalId: string | null; /** * Unique identifier for the project. */ projectId: string; /** * Unique identifier for the workspace. */ workspaceId: string; /** * Maximum number of deployments allowed in this deployment group */ maxDeployments: number; createdAt: Date; }; /** @internal */ export const DeploymentGroup$inboundSchema: z.ZodType< DeploymentGroup, unknown > = z.object({ id: z.string(), name: z.string(), externalId: z.nullable(z.string()), projectId: z.string(), workspaceId: z.string(), maxDeployments: z.int().default(100), createdAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)), }); export function deploymentGroupFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentGroup' from JSON`, ); }