/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { EnvironmentVariableValueDto, EnvironmentVariableValueDto$Outbound, EnvironmentVariableValueDto$outboundSchema, } from "./environmentvariablevaluedto.js"; /** * The type of the variable */ export const CreateEnvironmentVariableRequestDtoType = { String: "string", } as const; /** * The type of the variable */ export type CreateEnvironmentVariableRequestDtoType = ClosedEnum< typeof CreateEnvironmentVariableRequestDtoType >; export type CreateEnvironmentVariableRequestDto = { /** * Unique key for the variable. Must start with a letter and contain only letters, digits, and underscores. */ key: string; /** * The type of the variable */ type?: CreateEnvironmentVariableRequestDtoType | undefined; /** * Whether this variable is a secret (encrypted at rest, masked in responses) */ isSecret?: boolean | undefined; values?: Array | undefined; }; /** @internal */ export const CreateEnvironmentVariableRequestDtoType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(CreateEnvironmentVariableRequestDtoType); /** @internal */ export type CreateEnvironmentVariableRequestDto$Outbound = { key: string; type?: string | undefined; isSecret?: boolean | undefined; values?: Array | undefined; }; /** @internal */ export const CreateEnvironmentVariableRequestDto$outboundSchema: z.ZodType< CreateEnvironmentVariableRequestDto$Outbound, z.ZodTypeDef, CreateEnvironmentVariableRequestDto > = z.object({ key: z.string(), type: CreateEnvironmentVariableRequestDtoType$outboundSchema.optional(), isSecret: z.boolean().optional(), values: z.array(EnvironmentVariableValueDto$outboundSchema).optional(), }); export function createEnvironmentVariableRequestDtoToJSON( createEnvironmentVariableRequestDto: CreateEnvironmentVariableRequestDto, ): string { return JSON.stringify( CreateEnvironmentVariableRequestDto$outboundSchema.parse( createEnvironmentVariableRequestDto, ), ); }