/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 0785a360dbe2 */ import * as z from "zod/v4"; import { ClosedEnum } from "../../types/enums.js"; import * as models from "../index.js"; export type GetDeploymentStatsGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; /** * Represents the target cloud platform. */ export const GetDeploymentStatsEnvironment = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type GetDeploymentStatsEnvironment = ClosedEnum< typeof GetDeploymentStatsEnvironment >; /** * Deployment status in the deployment lifecycle. * * @remarks * * For observe-only deployments with no release or stack state, `Running` * means the Operator is attached. Connectivity comes from `lastHeartbeatAt`; * resource health comes from inventory and resource heartbeat data. */ export const GetDeploymentStatsStatus = { Pending: "pending", PreflightsFailed: "preflights-failed", InitialSetup: "initial-setup", InitialSetupFailed: "initial-setup-failed", Provisioning: "provisioning", WaitingForMachines: "waiting-for-machines", ProvisioningFailed: "provisioning-failed", Running: "running", RefreshFailed: "refresh-failed", UpdatePending: "update-pending", Updating: "updating", UpdateFailed: "update-failed", DeletePending: "delete-pending", Deleting: "deleting", DeleteFailed: "delete-failed", TeardownRequired: "teardown-required", TeardownFailed: "teardown-failed", Deleted: "deleted", Error: "error", } as const; /** * Deployment status in the deployment lifecycle. * * @remarks * * For observe-only deployments with no release or stack state, `Running` * means the Operator is attached. Connectivity comes from `lastHeartbeatAt`; * resource health comes from inventory and resource heartbeat data. */ export type GetDeploymentStatsStatus = ClosedEnum< typeof GetDeploymentStatsStatus >; export type GetDeploymentStatsRequest = { /** * Filter by project ID or name. */ project?: string | undefined; /** * Filter by deployment group ID or name */ deploymentGroup?: string | undefined; /** * Filter by manager ID */ managerId?: string | undefined; /** * Filter by deployment purpose */ purpose?: models.DeploymentPurpose | undefined; /** * Filter deployments by effective environment */ environment?: Array | undefined; /** * Filter deployments by status */ status?: Array | undefined; /** * Search deployments by name or deployment group name */ search?: string | undefined; }; /** @internal */ export const GetDeploymentStatsEnvironment$outboundSchema: z.ZodEnum< typeof GetDeploymentStatsEnvironment > = z.enum(GetDeploymentStatsEnvironment); /** @internal */ export const GetDeploymentStatsStatus$outboundSchema: z.ZodEnum< typeof GetDeploymentStatsStatus > = z.enum(GetDeploymentStatsStatus); /** @internal */ export type GetDeploymentStatsRequest$Outbound = { project?: string | undefined; deploymentGroup?: string | undefined; managerId?: string | undefined; purpose?: string | undefined; environment?: Array | undefined; status?: Array | undefined; search?: string | undefined; }; /** @internal */ export const GetDeploymentStatsRequest$outboundSchema: z.ZodType< GetDeploymentStatsRequest$Outbound, GetDeploymentStatsRequest > = z.object({ project: z.string().optional(), deploymentGroup: z.string().optional(), managerId: z.string().optional(), purpose: models.DeploymentPurpose$outboundSchema.optional(), environment: z.array(GetDeploymentStatsEnvironment$outboundSchema).optional(), status: z.array(GetDeploymentStatsStatus$outboundSchema).optional(), search: z.string().optional(), }); export function getDeploymentStatsRequestToJSON( getDeploymentStatsRequest: GetDeploymentStatsRequest, ): string { return JSON.stringify( GetDeploymentStatsRequest$outboundSchema.parse(getDeploymentStatsRequest), ); }