@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
1,609 lines • 96.4 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { CreateDeploymentHasDeploymentsType$inboundSchema, CreateDeploymentRoutes2$inboundSchema, CreateDeploymentRoutes3$inboundSchema, } from "./createdeploymenthasdeploymentstype.js";
export const CreateDeploymentMissingDeploymentsType = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
export const CreateDeploymentRoutesAction = {
Challenge: "challenge",
Deny: "deny",
};
export const CreateDeploymentTransformsDeploymentsOp = {
Set: "set",
};
export const CreateDeploymentTransformsType = {
RequestHeaders: "request.headers",
RequestQuery: "request.query",
ResponseHeaders: "response.headers",
};
export const CreateDeploymentTransformsOp = {
Append: "append",
Delete: "delete",
Set: "set",
};
/**
* Optional explicit format marker. The destination is identified by the presence of `service`, so `type` is no longer required.
*/
export const CreateDeploymentDestinationType = {
Service: "service",
};
export const CreateDeploymentServicesDeploymentsArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
};
export const CreateDeploymentMaxDurationDeploymentsResponse2 = {
Max: "max",
};
export const CreateDeploymentServicesDeploymentsMode = {
Strict: "strict",
};
/**
* Enforced runtime for explicitly configured Routing Middleware.
*/
export const CreateDeploymentServicesDeploymentsMiddlewareRuntime = {
Nodejs: "nodejs",
};
/**
* If present, must be `"service"` for Service-to-Service HTTP bindings.
*/
export const CreateDeploymentServicesDeploymentsResponseType = {
Service: "service",
};
/**
* Generated value shape, must be `"url"`.
*/
export const ServicesFormat = {
Url: "url",
};
export const CreateDeploymentServicesArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
};
export const CreateDeploymentMaxDurationDeployments2 = {
Max: "max",
};
export const CreateDeploymentServicesMode = {
Strict: "strict",
};
export const CreateDeploymentHasDeploymentsResponse200Type = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
export const CreateDeploymentMissingDeploymentsResponse200Type = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyType = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyType = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
/**
* Optional explicit format marker. The destination is identified by the presence of `service`, so `type` is no longer required.
*/
export const CreateDeploymentDestinationDeploymentsType = {
Service: "service",
};
export const CreateDeploymentServicesDeploymentsResponse200Type = {
RequestPath: "request.path",
};
export const CreateDeploymentServicesOp = {
Set: "set",
};
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesType = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesType = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
export const CreateDeploymentRoutesHandle = {
Error: "error",
Filesystem: "filesystem",
Hit: "hit",
Miss: "miss",
Resource: "resource",
Rewrite: "rewrite",
};
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesType = {
Cookie: "cookie",
Header: "header",
Query: "query",
};
/** @internal */
export const CreateDeploymentValueDeploymentsEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeployments2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeployments2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeployments2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeployments2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeployments2$inboundSchema),
]);
export function createDeploymentHasDeploymentsValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHas2$inboundSchema = z.object({
type: CreateDeploymentHasDeploymentsType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeployments2$inboundSchema),
])),
});
export function createDeploymentHas2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHas2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHas2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValue2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValue2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValue2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValue2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValue2$inboundSchema),
]);
export function createDeploymentHasValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHas1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValue2$inboundSchema),
]),
});
export function createDeploymentHas1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHas1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHas1' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesHas$inboundSchema = z.union([
z.lazy(() => CreateDeploymentHas1$inboundSchema),
z.lazy(() => CreateDeploymentHas2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHas2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHas2$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentRoutesHasFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesHas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesHas' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsType$inboundSchema = z.nativeEnum(CreateDeploymentMissingDeploymentsType);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200Eq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200EqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200Eq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200Eq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse2002$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse2002FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse2002$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse2002' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse2002$inboundSchema),
]);
export function createDeploymentMissingDeploymentsValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsValue' from JSON`);
}
/** @internal */
export const CreateDeploymentMissing2$inboundSchema = z.object({
type: CreateDeploymentMissingDeploymentsType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse2002$inboundSchema),
])),
});
export function createDeploymentMissing2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissing2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissing2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponseEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponseEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponseEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponseEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse2' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse2$inboundSchema),
]);
export function createDeploymentMissingValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingValue' from JSON`);
}
/** @internal */
export const CreateDeploymentMissing1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse2$inboundSchema),
]),
});
export function createDeploymentMissing1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissing1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissing1' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesMissing$inboundSchema = z.union([
z.lazy(() => CreateDeploymentMissing1$inboundSchema),
z.lazy(() => CreateDeploymentMissing2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissing2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissing2$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentRoutesMissingFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesMissing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesMissing' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesAction$inboundSchema = z.nativeEnum(CreateDeploymentRoutesAction);
/** @internal */
export const CreateDeploymentRoutesMitigate$inboundSchema = z.object({
action: CreateDeploymentRoutesAction$inboundSchema,
});
export function createDeploymentRoutesMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesMitigate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesMitigate' from JSON`);
}
/** @internal */
export const CreateDeploymentTransformsDeploymentsOp$inboundSchema = z
.nativeEnum(CreateDeploymentTransformsDeploymentsOp);
/** @internal */
export const CreateDeploymentTransforms2$inboundSchema = z.object({
type: types.literal("request.path"),
op: CreateDeploymentTransformsDeploymentsOp$inboundSchema,
args: types.string(),
env: types.optional(z.array(types.string())),
});
export function createDeploymentTransforms2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentTransforms2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentTransforms2' from JSON`);
}
/** @internal */
export const CreateDeploymentTransformsType$inboundSchema = z.nativeEnum(CreateDeploymentTransformsType);
/** @internal */
export const CreateDeploymentTransformsOp$inboundSchema = z.nativeEnum(CreateDeploymentTransformsOp);
/** @internal */
export const CreateDeploymentKeyEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentKeyEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentKeyEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentKeyEq' from JSON`);
}
/** @internal */
export const CreateDeploymentKey2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentKey2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentKey2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentKey2' from JSON`);
}
/** @internal */
export const CreateDeploymentTransformsKey$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentKey2$inboundSchema),
]);
export function createDeploymentTransformsKeyFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentTransformsKey$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentTransformsKey' from JSON`);
}
/** @internal */
export const CreateDeploymentTransformsTarget$inboundSchema = z.object({
key: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentKey2$inboundSchema),
]),
});
export function createDeploymentTransformsTargetFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentTransformsTarget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentTransformsTarget' from JSON`);
}
/** @internal */
export const CreateDeploymentTransformsArgs$inboundSchema = smartUnion([types.string(), z.array(types.string())]);
export function createDeploymentTransformsArgsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentTransformsArgs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentTransformsArgs' from JSON`);
}
/** @internal */
export const CreateDeploymentTransforms1$inboundSchema = z.object({
type: CreateDeploymentTransformsType$inboundSchema,
op: CreateDeploymentTransformsOp$inboundSchema,
target: z.lazy(() => CreateDeploymentTransformsTarget$inboundSchema),
args: types.optional(smartUnion([types.string(), z.array(types.string())])),
env: types.optional(z.array(types.string())),
});
export function createDeploymentTransforms1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentTransforms1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentTransforms1' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesTransforms$inboundSchema = z.union([
z.lazy(() => CreateDeploymentTransforms1$inboundSchema).and(z.object({ type: z.literal("request.headers") })),
z.lazy(() => CreateDeploymentTransforms1$inboundSchema).and(z.object({ type: z.literal("request.query") })),
z.lazy(() => CreateDeploymentTransforms1$inboundSchema).and(z.object({ type: z.literal("response.headers") })),
z.lazy(() => CreateDeploymentTransforms2$inboundSchema),
]);
export function createDeploymentRoutesTransformsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesTransforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesTransforms' from JSON`);
}
/** @internal */
export const RoutesLocale$inboundSchema = z.object({
redirect: types.optional(z.record(types.string())),
cookie: types.optional(types.string()),
});
export function routesLocaleFromJSON(jsonString) {
return safeParse(jsonString, (x) => RoutesLocale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RoutesLocale' from JSON`);
}
/** @internal */
export const CreateDeploymentDestinationType$inboundSchema = z.nativeEnum(CreateDeploymentDestinationType);
/** @internal */
export const CreateDeploymentDestination2$inboundSchema = z.object({
type: types.optional(CreateDeploymentDestinationType$inboundSchema),
service: types.string(),
path: types.optional(types.string()),
});
export function createDeploymentDestination2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentDestination2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentDestination2' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesDestination$inboundSchema = smartUnion([
z.lazy(() => CreateDeploymentDestination2$inboundSchema),
types.string(),
]);
export function createDeploymentRoutesDestinationFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesDestination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesDestination' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutes1$inboundSchema = z.object({
src: types.string(),
dest: types.optional(types.string()),
headers: types.optional(z.record(types.string())),
methods: types.optional(z.array(types.string())),
continue: types.optional(types.boolean()),
override: types.optional(types.boolean()),
caseSensitive: types.optional(types.boolean()),
check: types.optional(types.boolean()),
important: types.optional(types.boolean()),
status: types.optional(types.number()),
has: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentHas1$inboundSchema),
z.lazy(() => CreateDeploymentHas2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHas2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHas2$inboundSchema).and(z.object({ type: z.literal("query") })),
]))),
missing: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentMissing1$inboundSchema),
z.lazy(() => CreateDeploymentMissing2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissing2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissing2$inboundSchema).and(z.object({ type: z.literal("query") })),
]))),
mitigate: types.optional(z.lazy(() => CreateDeploymentRoutesMitigate$inboundSchema)),
transforms: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentTransforms1$inboundSchema).and(z.object({ type: z.literal("request.headers") })),
z.lazy(() => CreateDeploymentTransforms1$inboundSchema).and(z.object({ type: z.literal("request.query") })),
z.lazy(() => CreateDeploymentTransforms1$inboundSchema).and(z.object({ type: z.literal("response.headers") })),
z.lazy(() => CreateDeploymentTransforms2$inboundSchema),
]))),
env: types.optional(z.array(types.string())),
locale: types.optional(z.lazy(() => RoutesLocale$inboundSchema)),
source: types.optional(types.string()),
destination: types.optional(smartUnion([
z.lazy(() => CreateDeploymentDestination2$inboundSchema),
types.string(),
])),
statusCode: types.optional(types.number()),
middlewarePath: types.optional(types.string()),
middlewareRawSrc: types.optional(z.array(types.string())),
middleware: types.optional(types.number()),
respectOriginCacheControl: types.optional(types.boolean()),
});
export function createDeploymentRoutes1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutes1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutes1' from JSON`);
}
/** @internal */
export const ResponseBodyRoutes$inboundSchema = smartUnion([
CreateDeploymentRoutes3$inboundSchema,
z.lazy(() => CreateDeploymentRoutes1$inboundSchema),
CreateDeploymentRoutes2$inboundSchema,
]);
export function responseBodyRoutesFromJSON(jsonString) {
return safeParse(jsonString, (x) => ResponseBodyRoutes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyRoutes' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsIncludeFiles$inboundSchema = smartUnion([types.string(), z.array(types.string())]);
export function createDeploymentServicesDeploymentsIncludeFilesFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsIncludeFiles$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsIncludeFiles' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsExcludeFiles$inboundSchema = smartUnion([types.string(), z.array(types.string())]);
export function createDeploymentServicesDeploymentsExcludeFilesFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsExcludeFiles$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsExcludeFiles' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsArchitecture$inboundSchema = z
.nativeEnum(CreateDeploymentServicesDeploymentsArchitecture);
/** @internal */
export const CreateDeploymentMaxDurationDeploymentsResponse2$inboundSchema = z
.nativeEnum(CreateDeploymentMaxDurationDeploymentsResponse2);
/** @internal */
export const CreateDeploymentServicesDeploymentsMaxDuration$inboundSchema = smartUnion([
types.number(),
CreateDeploymentMaxDurationDeploymentsResponse2$inboundSchema,
]);
export function createDeploymentServicesDeploymentsMaxDurationFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsMaxDuration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsMaxDuration' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsMode$inboundSchema = z
.nativeEnum(CreateDeploymentServicesDeploymentsMode);
/** @internal */
export const CreateDeploymentServicesDeploymentsAffinity$inboundSchema = z.object({
mode: CreateDeploymentServicesDeploymentsMode$inboundSchema,
});
export function createDeploymentServicesDeploymentsAffinityFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsAffinity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsAffinity' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggersDeploymentsResponse3$inboundSchema = z.object({
type: types.literal("schedule/v1beta"),
});
export function createDeploymentExperimentalTriggersDeploymentsResponse3FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggersDeploymentsResponse3$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggersDeploymentsResponse3' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggersDeploymentsResponse2$inboundSchema = z.object({
type: types.literal("queue/v2beta"),
topic: types.string(),
maxDeliveries: types.optional(types.number()),
retryAfterSeconds: types.optional(types.number()),
initialDelaySeconds: types.optional(types.number()),
maxConcurrency: types.optional(types.number()),
});
export function createDeploymentExperimentalTriggersDeploymentsResponse2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggersDeploymentsResponse2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggersDeploymentsResponse2' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggersDeploymentsResponse1$inboundSchema = z.object({
type: types.literal("queue/v1beta"),
consumer: types.string(),
topic: types.string(),
maxDeliveries: types.optional(types.number()),
retryAfterSeconds: types.optional(types.number()),
initialDelaySeconds: types.optional(types.number()),
maxConcurrency: types.optional(types.number()),
});
export function createDeploymentExperimentalTriggersDeploymentsResponse1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggersDeploymentsResponse1$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggersDeploymentsResponse1' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsExperimentalTriggers$inboundSchema = z.union([
z.lazy(() => CreateDeploymentExperimentalTriggersDeploymentsResponse1$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeploymentsResponse2$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeploymentsResponse3$inboundSchema),
]);
export function createDeploymentServicesDeploymentsExperimentalTriggersFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsExperimentalTriggers$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsExperimentalTriggers' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsFunctions$inboundSchema = z.object({
architecture: types.optional(CreateDeploymentServicesDeploymentsArchitecture$inboundSchema),
memory: types.optional(types.number()),
maxDuration: types.optional(smartUnion([
types.number(),
CreateDeploymentMaxDurationDeploymentsResponse2$inboundSchema,
])),
affinity: types.optional(z.lazy(() => CreateDeploymentServicesDeploymentsAffinity$inboundSchema)),
maxConcurrency: types.optional(types.number()),
regions: types.optional(z.array(types.string())),
functionFailoverRegions: types.optional(z.array(types.string())),
runtime: types.optional(types.string()),
includeFiles: types.optional(types.string()),
excludeFiles: types.optional(types.string()),
experimentalTriggers: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentExperimentalTriggersDeploymentsResponse1$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeploymentsResponse2$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeploymentsResponse3$inboundSchema),
]))),
supportsCancellation: types.optional(types.boolean()),
});
export function createDeploymentServicesDeploymentsFunctionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsFunctions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsFunctions' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsProjectSettings$inboundSchema = z.object({
framework: z.nullable(types.string()).optional(),
devCommand: z.nullable(types.string()).optional(),
installCommand: z.nullable(types.string()).optional(),
buildCommand: z.nullable(types.string()).optional(),
outputDirectory: z.nullable(types.string()).optional(),
rootDirectory: z.nullable(types.string()).optional(),
nodeVersion: types.optional(types.string()),
monorepoManager: z.nullable(types.string()).optional(),
createdAt: types.optional(types.number()),
autoExposeSystemEnvs: types.optional(types.boolean()),
sourceFilesOutsideRootDirectory: types.optional(types.boolean()),
directoryListing: types.optional(types.boolean()),
gitForkProtection: types.optional(types.boolean()),
commandForIgnoringBuildStep: z.nullable(types.string()).optional(),
});
export function createDeploymentServicesDeploymentsProjectSettingsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsProjectSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsProjectSettings' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsMiddlewareRuntime$inboundSchema = z.nativeEnum(CreateDeploymentServicesDeploymentsMiddlewareRuntime);
/** @internal */
export const CreateDeploymentServicesDeploymentsMiddlewareMatcher$inboundSchema = smartUnion([types.string(), z.array(types.string())]);
export function createDeploymentServicesDeploymentsMiddlewareMatcherFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsMiddlewareMatcher$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsMiddlewareMatcher' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsConfig$inboundSchema = z.object({
bunVersion: types.optional(types.string()),
maxLambdaSize: types.optional(types.string()),
includeFiles: types.optional(smartUnion([types.string(), z.array(types.string())])),
excludeFiles: types.optional(smartUnion([types.string(), z.array(types.string())])),
bundle: types.optional(types.boolean()),
ldsflags: types.optional(types.string()),
helpers: types.optional(types.boolean()),
rust: types.optional(types.string()),
debug: types.optional(types.boolean()),
zeroConfig: types.optional(types.boolean()),
import: types.optional(z.record(types.string())),
functions: types.optional(z.record(z.lazy(() => CreateDeploymentServicesDeploymentsFunctions$inboundSchema))),
projectSettings: types.optional(z.lazy(() => CreateDeploymentServicesDeploymentsProjectSettings$inboundSchema)),
outputDirectory: types.optional(types.string()),
installCommand: types.optional(types.string()),
buildCommand: types.optional(types.string()),
devCommand: types.optional(types.string()),
framework: z.nullable(types.string()).optional(),
nodeVersion: types.optional(types.string()),
middleware: types.optional(types.boolean()),
middlewareRuntime: types.optional(CreateDeploymentServicesDeploymentsMiddlewareRuntime$inboundSchema),
middlewareMatcher: types.optional(smartUnion([types.string(), z.array(types.string())])),
serviceName: types.optional(types.string()),
});
export function createDeploymentServicesDeploymentsConfigFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsConfig' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsBuilder$inboundSchema = z.object({
use: types.string(),
src: types.optional(types.string()),
config: types.optional(z.lazy(() => CreateDeploymentServicesDeploymentsConfig$inboundSchema)),
});
export function createDeploymentServicesDeploymentsBuilderFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsBuilder$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsBuilder' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsResponseType$inboundSchema = z
.nativeEnum(CreateDeploymentServicesDeploymentsResponseType);
/** @internal */
export const ServicesFormat$inboundSchema = z.nativeEnum(ServicesFormat);
/** @internal */
export const ServicesBindings$inboundSchema = z.object({
type: types.optional(CreateDeploymentServicesDeploymentsResponseType$inboundSchema),
service: types.string(),
format: ServicesFormat$inboundSchema,
env: types.string(),
});
export function servicesBindingsFromJSON(jsonString) {
return safeParse(jsonString, (x) => ServicesBindings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServicesBindings' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesArchitecture$inboundSchema = z.nativeEnum(CreateDeploymentServicesArchitecture);
/** @internal */
export const CreateDeploymentMaxDurationDeployments2$inboundSchema = z
.nativeEnum(CreateDeploymentMaxDurationDeployments2);
/** @internal */
export const CreateDeploymentServicesMaxDuration$inboundSchema = smartUnion([
types.number(),
CreateDeploymentMaxDurationDeployments2$inboundSchema,
]);
export function createDeploymentServicesMaxDurationFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesMaxDuration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesMaxDuration' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesMode$inboundSchema = z.nativeEnum(CreateDeploymentServicesMode);
/** @internal */
export const CreateDeploymentServicesAffinity$inboundSchema = z.object({
mode: CreateDeploymentServicesMode$inboundSchema,
});
export function createDeploymentServicesAffinityFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesAffinity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesAffinity' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggersDeployments3$inboundSchema = z.object({
type: types.literal("schedule/v1beta"),
});
export function createDeploymentExperimentalTriggersDeployments3FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggersDeployments3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggersDeployments3' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggersDeployments2$inboundSchema = z.object({
type: types.literal("queue/v2beta"),
topic: types.string(),
maxDeliveries: types.optional(types.number()),
retryAfterSeconds: types.optional(types.number()),
initialDelaySeconds: types.optional(types.number()),
maxConcurrency: types.optional(types.number()),
});
export function createDeploymentExperimentalTriggersDeployments2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggersDeployments2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggersDeployments2' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggersDeployments1$inboundSchema = z.object({
type: types.literal("queue/v1beta"),
consumer: types.string(),
topic: types.string(),
maxDeliveries: types.optional(types.number()),
retryAfterSeconds: types.optional(types.number()),
initialDelaySeconds: types.optional(types.number()),
maxConcurrency: types.optional(types.number()),
});
export function createDeploymentExperimentalTriggersDeployments1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggersDeployments1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggersDeployments1' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesExperimentalTriggers$inboundSchema = z.union([
z.lazy(() => CreateDeploymentExperimentalTriggersDeployments1$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeployments2$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeployments3$inboundSchema),
]);
export function createDeploymentServicesExperimentalTriggersFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesExperimentalTriggers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesExperimentalTriggers' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesFunctions$inboundSchema = z.object({
architecture: types.optional(CreateDeploymentServicesArchitecture$inboundSchema),
memory: types.optional(types.number()),
maxDuration: types.optional(smartUnion([
types.number(),
CreateDeploymentMaxDurationDeployments2$inboundSchema,
])),
affinity: types.optional(z.lazy(() => CreateDeploymentServicesAffinity$inboundSchema)),
maxConcurrency: types.optional(types.number()),
regions: types.optional(z.array(types.string())),
functionFailoverRegions: types.optional(z.array(types.string())),
runtime: types.optional(types.string()),
includeFiles: types.optional(types.string()),
excludeFiles: types.optional(types.string()),
experimentalTriggers: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentExperimentalTriggersDeployments1$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeployments2$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggersDeployments3$inboundSchema),
]))),
supportsCancellation: types.optional(types.boolean()),
});
export function createDeploymentServicesFunctionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesFunctions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesFunctions' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsHeaders$inboundSchema = z.object({
key: types.string(),
value: types.string(),
});
export function createDeploymentServicesDeploymentsHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsHeaders' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200Type$inboundSchema = z
.nativeEnum(CreateDeploymentHasDeploymentsResponse200Type);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200Value$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200Value' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeployments2$inboundSchema = z.object({
type: CreateDeploymentHasDeploymentsResponse200Type$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema),
])),
});
export function createDeploymentHasDeployments2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeployments2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeployments2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSON2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJson2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponseValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponseValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponseValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponseValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeployments1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema),
]),
});
export function createDeploymentHasDeployments1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeployments1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeployments1' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesHas$inboundSchema = z.union([
z.lazy(() => CreateDeploymentHasDeployments1$inboundSchema),
z.lazy(() => CreateDeploymentHasDeployments2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeployments2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeployments2$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentServicesHasFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesHas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesHas' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200Type$inboundSchema = z
.nativeEnum(CreateDeploymentMissingDeploymentsResponse200Type);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200Value$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema),
]);
export function createDeploymentMissingDeploymentsResponse200ValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse200Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse200Value' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeployments2$inboundSchema = z.object({
type: CreateDeploymentMissingDeploymentsResponse200Type$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema),
])),
});
export function createDeploymentMissingDeployments2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeployments2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeployments2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2EqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponseValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema),
]);
export function createDeploymentMissingDeploymentsResponseValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponseValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponseValue' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeployments1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema),
]),
});
export function createDeploymentMissingDeployments1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeployments1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeployments1' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesMissing$inboundSchema = z.union([
z.lazy(() => CreateDeploymentMissingDeployments1$inboundSchema),
z.lazy(() => CreateDeploymentMissingDeployments2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissingDeployments2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissingDeployments2$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentServicesMissingFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesMissing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesMissing' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesHeaders$inboundSchema = z.object({
source: types.string(),
headers: z.array(z.lazy(() => CreateDeploymentServicesDeploymentsHeaders$inboundSchema)),
has: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentHasDeployments1$inboundSchema),
z.lazy(() => CreateDeploymentHasDeployments2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeployments2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeployments2$inboundSchema).and(z.object({ type: z.literal("query") })),
]))),
missing: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentMissingDeployments1$inboundSchema),
z.lazy(() => CreateDeploymentMissingDeployments2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissingDeployments2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissingDeployments2$inboundSchema).and(z.object({ type: z.literal("query") })),
]))),
});
export function createDeploymentServicesHeadersFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesHeaders' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyType);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse2$inboundSchema = z.object({
type: CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema),
])),
});
export function createDeploymentHasDeploymentsResponse2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2EqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ApplicationJSONValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJSONValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema),
]),
});
export function createDeploymentHasDeploymentsResponse1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse1' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsHas$inboundSchema = z.union([
z.lazy(() => CreateDeploymentHasDeploymentsResponse1$inboundSchema),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentServicesDeploymentsHasFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsHas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsHas' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyType);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2Eq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2EqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2Eq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2Eq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing22$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing22FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing22$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing22' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing22$inboundSchema),
]);
export function createDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyValue' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse2$inboundSchema = z.object({
type: CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing22$inboundSchema),
])),
});
export function createDeploymentMissingDeploymentsResponse2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissingEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissingEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissingEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissingEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema),
]);
export function createDeploymentMissingDeploymentsResponse200ApplicationJSONValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse200ApplicationJSONValue' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema),
]),
});
export function createDeploymentMissingDeploymentsResponse1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse1' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsMissing$inboundSchema = z.union([
z.lazy(() => CreateDeploymentMissingDeploymentsResponse1$inboundSchema),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2$inboundSchema)
.and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2$inboundSchema)
.and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2$inboundSchema)
.and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentServicesDeploymentsMissingFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsMissing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsMissing' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesRedirects$inboundSchema = z.object({
source: types.string(),
destination: types.string(),
permanent: types.optional(types.boolean()),
statusCode: types.optional(types.number()),
has: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentHasDeploymentsResponse1$inboundSchema),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("query") })),
]))),
missing: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentMissingDeploymentsResponse1$inboundSchema),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2$inboundSchema)
.and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2$inboundSchema)
.and(z.object({ type: z.literal("query") })),
]))),
env: types.optional(z.array(types.string())),
});
export function createDeploymentServicesRedirectsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesRedirects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesRedirects' from JSON`);
}
/** @internal */
export const CreateDeploymentDestinationDeploymentsType$inboundSchema = z
.nativeEnum(CreateDeploymentDestinationDeploymentsType);
/** @internal */
export const CreateDeploymentDestinationDeployments2$inboundSchema = z.object({
type: types.optional(CreateDeploymentDestinationDeploymentsType$inboundSchema),
service: types.string(),
path: types.optional(types.string()),
});
export function createDeploymentDestinationDeployments2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentDestinationDeployments2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentDestinationDeployments2' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDestination$inboundSchema = smartUnion([
z.lazy(() => CreateDeploymentDestinationDeployments2$inboundSchema),
types.string(),
]);
export function createDeploymentServicesDestinationFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDestination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDestination' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsResponse200Type$inboundSchema = z
.nativeEnum(CreateDeploymentServicesDeploymentsResponse200Type);
/** @internal */
export const CreateDeploymentServicesOp$inboundSchema = z.nativeEnum(CreateDeploymentServicesOp);
/** @internal */
export const CreateDeploymentServicesTransforms$inboundSchema = z.object({
type: CreateDeploymentServicesDeploymentsResponse200Type$inboundSchema,
op: CreateDeploymentServicesOp$inboundSchema,
args: types.string(),
env: types.optional(z.array(types.string())),
});
export function createDeploymentServicesTransformsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesTransforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesTransforms' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesType$inboundSchema = z.nativeEnum(CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesType);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHasEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHasEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHasEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHasEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHas2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHas2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHas2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHas2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHas2$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse2002$inboundSchema = z.object({
type: CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesHas2$inboundSchema),
])),
});
export function createDeploymentHasDeploymentsResponse2002FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse2002$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse2002' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Rewrites2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Rewrites2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Rewrites2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Rewrites2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Rewrites2$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse2001$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Rewrites2$inboundSchema),
]),
});
export function createDeploymentHasDeploymentsResponse2001FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse2001$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse2001' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsResponseHas$inboundSchema = z.union([
z.lazy(() => CreateDeploymentHasDeploymentsResponse2001$inboundSchema),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2002$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2002$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2002$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentServicesDeploymentsResponseHasFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsResponseHas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsResponseHas' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesType$inboundSchema = z.nativeEnum(CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesType);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2Eq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2EqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2Eq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2Eq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing22$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing22FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing22$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing22' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing22$inboundSchema),
]);
export function createDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse2002$inboundSchema = z.object({
type: CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing22$inboundSchema),
])),
});
export function createDeploymentMissingDeploymentsResponse2002FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse2002' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissingEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissingEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissingEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissingEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2Value$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2$inboundSchema),
]);
export function createDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2Value$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2Value' from JSON`);
}
/** @internal */
export const CreateDeploymentMissingDeploymentsResponse2001$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RewritesMissing2$inboundSchema),
]),
});
export function createDeploymentMissingDeploymentsResponse2001FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMissingDeploymentsResponse2001$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMissingDeploymentsResponse2001' from JSON`);
}
/** @internal */
export const CreateDeploymentServicesDeploymentsResponseMissing$inboundSchema = z.union([
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2001$inboundSchema),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentServicesDeploymentsResponseMissingFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentServicesDeploymentsResponseMissing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentServicesDeploymentsResponseMissing' from JSON`);
}
/** @internal */
export const ServicesRewrites$inboundSchema = z.object({
source: types.string(),
destination: smartUnion([
z.lazy(() => CreateDeploymentDestinationDeployments2$inboundSchema),
types.string(),
]),
transforms: types.optional(z.array(z.lazy(() => CreateDeploymentServicesTransforms$inboundSchema))),
has: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentHasDeploymentsResponse2001$inboundSchema),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2002$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("query") })),
]))),
missing: types.optional(z.array(z.union([
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2001$inboundSchema),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("query") })),
]))),
statusCode: types.optional(types.number()),
env: types.optional(z.array(types.string())),
respectOriginCacheControl: types.optional(types.boolean()),
});
export function servicesRewritesFromJSON(jsonString) {
return safeParse(jsonString, (x) => ServicesRewrites$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServicesRewrites' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesHandle$inboundSchema = z.nativeEnum(CreateDeploymentRoutesHandle);
/** @internal */
export const CreateDeploymentRoutesDeployments2$inboundSchema = z.object({
handle: CreateDeploymentRoutesHandle$inboundSchema,
src: types.optional(types.string()),
dest: types.optional(types.string()),
status: types.optional(types.number()),
});
export function createDeploymentRoutesDeployments2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesDeployments2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesDeployments2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesType$inboundSchema = z.nativeEnum(CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesType);
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes1Eq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes1EqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes1Eq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes1Eq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes12$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes12FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes12$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes12' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesValue$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes12$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesValue$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesValue' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJson2$inboundSchema = z.object({
type: CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesType$inboundSchema,
key: types.string(),
value: types.optional(smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes12$inboundSchema),
])),
});
export function createDeploymentHasDeploymentsResponse200ApplicationJSON2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJson2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJson2' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesEq$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RoutesEq' from JSON`);
}
/** @internal */
export const CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes2$inboundSchema = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function createDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes2$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2Value$inboundSchema = smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes2$inboundSchema),
]);
export function createDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2ValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2Value$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Services2Value' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsResponse200ApplicationJson1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CreateDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Routes2$inboundSchema),
]),
});
export function createDeploymentHasDeploymentsResponse200ApplicationJSON1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentHasDeploymentsResponse200ApplicationJson1$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentHasDeploymentsResponse200ApplicationJson1' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesDeploymentsHas$inboundSchema = z.union([
z.lazy(() => CreateDeploymentHasDeploymentsResponse200ApplicationJson1$inboundSchema),
z.lazy(() => CreateDeploymentHasDeploymentsResponse200ApplicationJson2$inboundSchema).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse200ApplicationJson2$inboundSchema).and(z.object({ type: z.literal("header") })),
z.lazy(() => CreateDeploymentHasDeploymentsResponse200ApplicationJson2$inboundSchema).and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentRoutesDeploymentsHasFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesDeploymentsHas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesDeploymentsHas' from JSON`);
}
//# sourceMappingURL=createdeploymentroutesdeploymentshas.js.map