/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: c0bffeeeeee8 */ import * as z from "zod/v4"; import { UpdateDeploymentSetupPolicy, UpdateDeploymentSetupPolicy$Outbound, UpdateDeploymentSetupPolicy$outboundSchema, } from "./updatedeploymentsetuppolicy.js"; /** * Request schema for updating an API key */ export type UpdateAPIKeyRequest = { enabled?: boolean | undefined; description?: string | null | undefined; /** * Editable part of a deployment link's setup config. Locked env vars and input values are preserved. */ deploymentSetupConfig?: UpdateDeploymentSetupPolicy | undefined; /** * Optional expiration date for the API key */ expiresAt?: Date | null | undefined; }; /** @internal */ export type UpdateAPIKeyRequest$Outbound = { enabled?: boolean | undefined; description?: string | null | undefined; deploymentSetupConfig?: UpdateDeploymentSetupPolicy$Outbound | undefined; expiresAt?: string | null | undefined; }; /** @internal */ export const UpdateAPIKeyRequest$outboundSchema: z.ZodType< UpdateAPIKeyRequest$Outbound, UpdateAPIKeyRequest > = z.object({ enabled: z.boolean().optional(), description: z.nullable(z.string()).optional(), deploymentSetupConfig: UpdateDeploymentSetupPolicy$outboundSchema.optional(), expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }); export function updateAPIKeyRequestToJSON( updateAPIKeyRequest: UpdateAPIKeyRequest, ): string { return JSON.stringify( UpdateAPIKeyRequest$outboundSchema.parse(updateAPIKeyRequest), ); }