/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: d2c9d8c67885 */ import * as z from "zod/v4"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type VerifyContainerRegistryGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; export type VerifyContainerRegistryRequest = { /** * Unique identifier for the deployment group. */ id: string; }; export const VerifyContainerRegistryStatus = { Resolving: "resolving", Applying: "applying", Connected: "connected", Degraded: "degraded", Revoking: "revoking", Revoked: "revoked", } as const; export type VerifyContainerRegistryStatus = ClosedEnum< typeof VerifyContainerRegistryStatus >; /** * Verification requested */ export type VerifyContainerRegistryResponse = { /** * Unique identifier for the container registry route. */ id: string; /** * Unique identifier for the deployment. */ deploymentId: string; managerId: string; resourceId: string; resourceRevision: string; desiredRevision: number; appliedRevision: number; status: VerifyContainerRegistryStatus; lastVerifiedAt: Date | null; lastError: string | null; }; /** @internal */ export type VerifyContainerRegistryRequest$Outbound = { id: string; }; /** @internal */ export const VerifyContainerRegistryRequest$outboundSchema: z.ZodType< VerifyContainerRegistryRequest$Outbound, VerifyContainerRegistryRequest > = z.object({ id: z.string(), }); export function verifyContainerRegistryRequestToJSON( verifyContainerRegistryRequest: VerifyContainerRegistryRequest, ): string { return JSON.stringify( VerifyContainerRegistryRequest$outboundSchema.parse( verifyContainerRegistryRequest, ), ); } /** @internal */ export const VerifyContainerRegistryStatus$inboundSchema: z.ZodEnum< typeof VerifyContainerRegistryStatus > = z.enum(VerifyContainerRegistryStatus); /** @internal */ export const VerifyContainerRegistryResponse$inboundSchema: z.ZodType< VerifyContainerRegistryResponse, unknown > = z.object({ id: z.string(), deploymentId: z.string(), managerId: z.string(), resourceId: z.string(), resourceRevision: z.string(), desiredRevision: z.int(), appliedRevision: z.int(), status: VerifyContainerRegistryStatus$inboundSchema, lastVerifiedAt: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ), lastError: z.nullable(z.string()), }); export function verifyContainerRegistryResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VerifyContainerRegistryResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VerifyContainerRegistryResponse' from JSON`, ); }