/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { blobLikeSchema } from "../../types/blobs.js"; export type RunBuildV2DeprecatedGlobals = { appId?: string | undefined; }; export type RunBuildV2DeprecatedFile = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; export type RunBuildV2DeprecatedRequestBody = { file?: RunBuildV2DeprecatedFile | Blob | undefined; }; export type RunBuildV2DeprecatedRequest = { appId?: string | undefined; buildId: number; requestBody: RunBuildV2DeprecatedRequestBody; }; /** @internal */ export type RunBuildV2DeprecatedFile$Outbound = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; /** @internal */ export const RunBuildV2DeprecatedFile$outboundSchema: z.ZodType< RunBuildV2DeprecatedFile$Outbound, z.ZodTypeDef, RunBuildV2DeprecatedFile > = z.object({ fileName: z.string(), content: z.union([ z.instanceof(ReadableStream), z.instanceof(Blob), z.instanceof(ArrayBuffer), z.instanceof(Uint8Array), ]), }); export function runBuildV2DeprecatedFileToJSON( runBuildV2DeprecatedFile: RunBuildV2DeprecatedFile, ): string { return JSON.stringify( RunBuildV2DeprecatedFile$outboundSchema.parse(runBuildV2DeprecatedFile), ); } /** @internal */ export type RunBuildV2DeprecatedRequestBody$Outbound = { file?: RunBuildV2DeprecatedFile$Outbound | Blob | undefined; }; /** @internal */ export const RunBuildV2DeprecatedRequestBody$outboundSchema: z.ZodType< RunBuildV2DeprecatedRequestBody$Outbound, z.ZodTypeDef, RunBuildV2DeprecatedRequestBody > = z.object({ file: z.lazy(() => RunBuildV2DeprecatedFile$outboundSchema).or(blobLikeSchema) .optional(), }); export function runBuildV2DeprecatedRequestBodyToJSON( runBuildV2DeprecatedRequestBody: RunBuildV2DeprecatedRequestBody, ): string { return JSON.stringify( RunBuildV2DeprecatedRequestBody$outboundSchema.parse( runBuildV2DeprecatedRequestBody, ), ); } /** @internal */ export type RunBuildV2DeprecatedRequest$Outbound = { appId?: string | undefined; buildId: number; RequestBody: RunBuildV2DeprecatedRequestBody$Outbound; }; /** @internal */ export const RunBuildV2DeprecatedRequest$outboundSchema: z.ZodType< RunBuildV2DeprecatedRequest$Outbound, z.ZodTypeDef, RunBuildV2DeprecatedRequest > = z.object({ appId: z.string().optional(), buildId: z.number().int(), requestBody: z.lazy(() => RunBuildV2DeprecatedRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function runBuildV2DeprecatedRequestToJSON( runBuildV2DeprecatedRequest: RunBuildV2DeprecatedRequest, ): string { return JSON.stringify( RunBuildV2DeprecatedRequest$outboundSchema.parse( runBuildV2DeprecatedRequest, ), ); }