@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>
4,862 lines • 155 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import {
GetDeploymentGitSource10,
GetDeploymentGitSource10$inboundSchema,
GetDeploymentGitSource11,
GetDeploymentGitSource11$inboundSchema,
GetDeploymentGitSource12,
GetDeploymentGitSource12$inboundSchema,
GetDeploymentGitSource13,
GetDeploymentGitSource13$inboundSchema,
GetDeploymentGitSource14,
GetDeploymentGitSource14$inboundSchema,
GetDeploymentGitSource15,
GetDeploymentGitSource15$inboundSchema,
GetDeploymentGitSource16,
GetDeploymentGitSource16$inboundSchema,
GetDeploymentGitSource17,
GetDeploymentGitSource17$inboundSchema,
GetDeploymentGitSource18,
GetDeploymentGitSource18$inboundSchema,
GetDeploymentGitSource19,
GetDeploymentGitSource19$inboundSchema,
GetDeploymentGitSource6,
GetDeploymentGitSource6$inboundSchema,
GetDeploymentGitSource7,
GetDeploymentGitSource7$inboundSchema,
GetDeploymentGitSource8,
GetDeploymentGitSource8$inboundSchema,
GetDeploymentGitSource9,
GetDeploymentGitSource9$inboundSchema,
GetDeploymentGitSourceDeploymentsResponse200Type,
GetDeploymentGitSourceDeploymentsResponse200Type$inboundSchema,
} from "./getdeploymentgitsourcedeploymentsresponse200type.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetDeploymentGitSourceRepoId = string | number;
export type GetDeploymentGitSource5 = {
type: GetDeploymentGitSourceDeploymentsResponse200Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponseType = {
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsResponseType = ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponseType
>;
export type GetDeploymentGitSourceDeployments4 = {
type: GetDeploymentGitSourceDeploymentsResponseType;
host: string;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsType = {
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsType = ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsType
>;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId =
| string
| number;
export type GetDeploymentGitSourceDeployments3 = {
type: GetDeploymentGitSourceDeploymentsType;
host: string;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceType = {
Github: "github",
} as const;
export type GetDeploymentGitSourceType = ClosedEnum<
typeof GetDeploymentGitSourceType
>;
export type GetDeploymentGitSourceDeployments2 = {
type: GetDeploymentGitSourceType;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type =
{
Github: "github",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type
>;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId =
| string
| number;
export type GetDeploymentGitSourceDeployments1 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export type GetDeploymentResponseBodyGitSource =
| GetDeploymentGitSource19
| GetDeploymentGitSource14
| GetDeploymentGitSource17
| GetDeploymentGitSource18
| GetDeploymentGitSourceDeployments4
| GetDeploymentGitSource12
| GetDeploymentGitSource13
| GetDeploymentGitSource15
| GetDeploymentGitSource16
| GetDeploymentGitSourceDeployments2
| GetDeploymentGitSourceDeployments3
| GetDeploymentGitSource6
| GetDeploymentGitSource9
| GetDeploymentGitSourceDeployments1
| GetDeploymentGitSource5
| GetDeploymentGitSource7
| GetDeploymentGitSource8
| GetDeploymentGitSource10
| GetDeploymentGitSource11;
/**
* Current provisioning state
*/
export const GetDeploymentResponseBodyState = {
Complete: "COMPLETE",
Pending: "PENDING",
Timeout: "TIMEOUT",
} as const;
/**
* Current provisioning state
*/
export type GetDeploymentResponseBodyState = ClosedEnum<
typeof GetDeploymentResponseBodyState
>;
/**
* Present when deployment was created with manual provisioning enabled, either explicitly or via the experimental BYOC git flow. The deployment stays in INITIALIZING until /continue is called.
*/
export type GetDeploymentResponseBodyManualProvisioning = {
/**
* Current provisioning state
*/
state: GetDeploymentResponseBodyState;
/**
* Timestamp when manual provisioning completed
*/
completedAt?: number | undefined;
};
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export const GetDeploymentResponseBodyNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export type GetDeploymentResponseBodyNodeVersion = ClosedEnum<
typeof GetDeploymentResponseBodyNodeVersion
>;
/**
* The public project information associated with the deployment.
*/
export type ResponseBodyProject = {
id: string;
name: string;
framework?: string | null | undefined;
};
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
export const GetDeploymentResponseBodyReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
} as const;
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
export type GetDeploymentResponseBodyReadySubstate = ClosedEnum<
typeof GetDeploymentResponseBodyReadySubstate
>;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export const GetDeploymentResponseBodySource = {
ApiTriggerGitDeploy: "api-trigger-git-deploy",
Cli: "cli",
CloneRepo: "clone/repo",
Drop: "drop",
Git: "git",
GitDeployHook: "git-deploy-hook",
Import: "import",
ImportRepo: "import/repo",
Redeploy: "redeploy",
V0Web: "v0-web",
} as const;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export type GetDeploymentResponseBodySource = ClosedEnum<
typeof GetDeploymentResponseBodySource
>;
export type GetDeploymentResponseBodyOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
mfeGroupIds?: Array<string> | undefined;
plan?: string | undefined;
};
export const GetDeploymentResponseBodyPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type GetDeploymentResponseBodyPlan = ClosedEnum<
typeof GetDeploymentResponseBodyPlan
>;
export type GetDeploymentResponseBodyCrons = {
schedule: string;
path: string;
};
export const GetDeploymentAtprotoKinds = {
Account: "account",
Commit: "commit",
Identity: "identity",
Sync: "sync",
} as const;
export type GetDeploymentAtprotoKinds = ClosedEnum<
typeof GetDeploymentAtprotoKinds
>;
export type GetDeploymentAtprotoSubscription = {
collections: Array<string>;
dids?: Array<string> | undefined;
kinds?: Array<GetDeploymentAtprotoKinds> | undefined;
path: string;
};
export type GetDeploymentAtproto2 = {
enabled: true;
subscription: GetDeploymentAtprotoSubscription;
};
export type GetDeploymentAtproto1 = {
enabled: false;
};
export type GetDeploymentResponseBodyAtproto =
| GetDeploymentAtproto2
| GetDeploymentAtproto1;
export const GetDeploymentResponseBodyArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
} as const;
export type GetDeploymentResponseBodyArchitecture = ClosedEnum<
typeof GetDeploymentResponseBodyArchitecture
>;
export const GetDeploymentMaxDuration2 = {
Max: "max",
} as const;
export type GetDeploymentMaxDuration2 = ClosedEnum<
typeof GetDeploymentMaxDuration2
>;
export type GetDeploymentResponseBodyMaxDuration =
| number
| GetDeploymentMaxDuration2;
export const GetDeploymentResponseBodyMode = {
Strict: "strict",
} as const;
export type GetDeploymentResponseBodyMode = ClosedEnum<
typeof GetDeploymentResponseBodyMode
>;
export type GetDeploymentResponseBodyAffinity = {
mode: GetDeploymentResponseBodyMode;
};
export type GetDeploymentExperimentalTriggers3 = {
/**
* Event type - must be "schedule/v1beta" (REQUIRED)
*/
type: "schedule/v1beta";
};
/**
* Queue trigger input event for v2beta (from vercel.json config). Consumer name is implicitly derived from the function path. Only one trigger per function is allowed.
*/
export type GetDeploymentExperimentalTriggers2 = {
/**
* Event type - must be "queue/v2beta" (REQUIRED)
*/
type: "queue/v2beta";
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
/**
* Queue trigger input event for v1beta (from vercel.json config). Requires explicit consumer name.
*/
export type GetDeploymentExperimentalTriggers1 = {
/**
* Event type - must be "queue/v1beta" (REQUIRED)
*/
type: "queue/v1beta";
/**
* Name of the consumer group for this trigger (REQUIRED)
*/
consumer: string;
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
export type GetDeploymentResponseBodyExperimentalTriggers =
| GetDeploymentExperimentalTriggers1
| GetDeploymentExperimentalTriggers2
| GetDeploymentExperimentalTriggers3;
export type GetDeploymentResponseBodyFunctions = {
architecture?: GetDeploymentResponseBodyArchitecture | undefined;
memory?: number | undefined;
maxDuration?: number | GetDeploymentMaxDuration2 | undefined;
affinity?: GetDeploymentResponseBodyAffinity | undefined;
maxConcurrency?: number | undefined;
regions?: Array<string> | undefined;
functionFailoverRegions?: Array<string> | undefined;
runtime?: string | undefined;
includeFiles?: string | undefined;
excludeFiles?: string | undefined;
experimentalTriggers?:
| Array<
| GetDeploymentExperimentalTriggers1
| GetDeploymentExperimentalTriggers2
| GetDeploymentExperimentalTriggers3
>
| undefined;
supportsCancellation?: boolean | undefined;
};
export type GetDeploymentRoutes3 = {
src: string;
continue: boolean;
middleware: number;
};
export const GetDeploymentRoutesHandle = {
Error: "error",
Filesystem: "filesystem",
Hit: "hit",
Miss: "miss",
Resource: "resource",
Rewrite: "rewrite",
} as const;
export type GetDeploymentRoutesHandle = ClosedEnum<
typeof GetDeploymentRoutesHandle
>;
export type GetDeploymentRoutes2 = {
handle: GetDeploymentRoutesHandle;
src?: string | undefined;
dest?: string | undefined;
status?: number | undefined;
};
export const GetDeploymentHasType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type GetDeploymentHasType = ClosedEnum<typeof GetDeploymentHasType>;
export type GetDeploymentValueDeploymentsResponse200Eq = string | number;
export type GetDeploymentValue2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentHasDeploymentsValue = string | GetDeploymentValue2;
export type GetDeploymentHas2 = {
type: GetDeploymentHasType;
key: string;
value?: string | GetDeploymentValue2 | undefined;
};
export type GetDeploymentValueDeploymentsResponseEq = string | number;
export type GetDeploymentValueDeploymentsResponse2002 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentHasValue =
| string
| GetDeploymentValueDeploymentsResponse2002;
export type GetDeploymentHas1 = {
type: "host";
value: string | GetDeploymentValueDeploymentsResponse2002;
};
export type GetDeploymentRoutesHas =
| GetDeploymentHas1
| (GetDeploymentHas2 & { type: "cookie" })
| (GetDeploymentHas2 & { type: "header" })
| (GetDeploymentHas2 & { type: "query" });
export const GetDeploymentMissingType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type GetDeploymentMissingType = ClosedEnum<
typeof GetDeploymentMissingType
>;
export type GetDeploymentValueDeploymentsEq = string | number;
export type GetDeploymentValueDeploymentsResponse2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentMissingValue =
| string
| GetDeploymentValueDeploymentsResponse2;
export type GetDeploymentMissing2 = {
type: GetDeploymentMissingType;
key: string;
value?: string | GetDeploymentValueDeploymentsResponse2 | undefined;
};
export type GetDeploymentValueEq = string | number;
export type GetDeploymentValueDeployments2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentMissingDeploymentsValue =
| string
| GetDeploymentValueDeployments2;
export type GetDeploymentMissing1 = {
type: "host";
value: string | GetDeploymentValueDeployments2;
};
export type GetDeploymentRoutesMissing =
| GetDeploymentMissing1
| (GetDeploymentMissing2 & { type: "cookie" })
| (GetDeploymentMissing2 & { type: "header" })
| (GetDeploymentMissing2 & { type: "query" });
export const GetDeploymentRoutesAction = {
Challenge: "challenge",
Deny: "deny",
} as const;
export type GetDeploymentRoutesAction = ClosedEnum<
typeof GetDeploymentRoutesAction
>;
export type GetDeploymentRoutesMitigate = {
action: GetDeploymentRoutesAction;
};
export const GetDeploymentTransformsDeploymentsOp = {
Set: "set",
} as const;
export type GetDeploymentTransformsDeploymentsOp = ClosedEnum<
typeof GetDeploymentTransformsDeploymentsOp
>;
export type GetDeploymentTransforms2 = {
type: "request.path";
op: GetDeploymentTransformsDeploymentsOp;
args: string;
env?: Array<string> | undefined;
};
export const GetDeploymentTransformsDeploymentsType = {
RequestHeaders: "request.headers",
RequestQuery: "request.query",
ResponseHeaders: "response.headers",
} as const;
export type GetDeploymentTransformsDeploymentsType = ClosedEnum<
typeof GetDeploymentTransformsDeploymentsType
>;
export const GetDeploymentTransformsOp = {
Append: "append",
Delete: "delete",
Set: "set",
} as const;
export type GetDeploymentTransformsOp = ClosedEnum<
typeof GetDeploymentTransformsOp
>;
export type GetDeploymentKeyEq = string | number;
export type GetDeploymentKey2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentTransformsKey = string | GetDeploymentKey2;
export type GetDeploymentTransformsTarget = {
key: string | GetDeploymentKey2;
};
export type GetDeploymentTransformsArgs = string | Array<string>;
export type GetDeploymentTransforms1 = {
type: GetDeploymentTransformsDeploymentsType;
op: GetDeploymentTransformsOp;
target: GetDeploymentTransformsTarget;
args?: string | Array<string> | undefined;
env?: Array<string> | undefined;
};
export type GetDeploymentRoutesTransforms =
| (GetDeploymentTransforms1 & { type: "request.headers" })
| (GetDeploymentTransforms1 & { type: "request.query" })
| (GetDeploymentTransforms1 & { type: "response.headers" })
| GetDeploymentTransforms2;
export type GetDeploymentRoutesLocale = {
redirect?: { [k: string]: string } | undefined;
cookie?: string | undefined;
};
/**
* Optional explicit format marker. The destination is identified by the presence of `service`, so `type` is no longer required.
*/
export const GetDeploymentDestinationType = {
Service: "service",
} as const;
/**
* Optional explicit format marker. The destination is identified by the presence of `service`, so `type` is no longer required.
*/
export type GetDeploymentDestinationType = ClosedEnum<
typeof GetDeploymentDestinationType
>;
export type GetDeploymentDestination2 = {
/**
* Optional explicit format marker. The destination is identified by the presence of `service`, so `type` is no longer required.
*/
type?: GetDeploymentDestinationType | undefined;
service: string;
/**
* Routing-only path used to select a route inside the target service.
*/
path?: string | undefined;
};
export type GetDeploymentRoutesDestination = GetDeploymentDestination2 | string;
export type GetDeploymentRoutes1 = {
src: string;
dest?: string | undefined;
headers?: { [k: string]: string } | undefined;
methods?: Array<string> | undefined;
continue?: boolean | undefined;
override?: boolean | undefined;
caseSensitive?: boolean | undefined;
check?: boolean | undefined;
important?: boolean | undefined;
status?: number | undefined;
has?:
| Array<
| GetDeploymentHas1
| (GetDeploymentHas2 & { type: "cookie" })
| (GetDeploymentHas2 & { type: "header" })
| (GetDeploymentHas2 & { type: "query" })
>
| undefined;
missing?:
| Array<
| GetDeploymentMissing1
| (GetDeploymentMissing2 & { type: "cookie" })
| (GetDeploymentMissing2 & { type: "header" })
| (GetDeploymentMissing2 & { type: "query" })
>
| undefined;
mitigate?: GetDeploymentRoutesMitigate | undefined;
transforms?:
| Array<
| (GetDeploymentTransforms1 & { type: "request.headers" })
| (GetDeploymentTransforms1 & { type: "request.query" })
| (GetDeploymentTransforms1 & { type: "response.headers" })
| GetDeploymentTransforms2
>
| undefined;
env?: Array<string> | undefined;
locale?: GetDeploymentRoutesLocale | undefined;
/**
* Aliases for `src`, `dest`, and `status`. These provide consistency with the `rewrites`, `redirects`, and `headers` fields which use `source`, `destination`, and `statusCode`. During normalization, the string forms are converted to their canonical forms (`src`, `dest`, `status`) and stripped from the route object. `destination` may also be a service-targeted object, in which case routing is delegated into the named service's internal route table and the object is preserved as-is (not folded into `dest`).
*/
source?: string | undefined;
destination?: GetDeploymentDestination2 | string | undefined;
statusCode?: number | undefined;
/**
* A middleware key within the `output` key under the build result. Overrides a `middleware` definition.
*/
middlewarePath?: string | undefined;
/**
* The original middleware matchers.
*/
middlewareRawSrc?: Array<string> | undefined;
/**
* A middleware index in the `middleware` key under the build result
*/
middleware?: number | undefined;
respectOriginCacheControl?: boolean | undefined;
};
export type GetDeploymentResponseBodyRoutes =
| GetDeploymentRoutes3
| GetDeploymentRoutes1
| GetDeploymentRoutes2;
export type GetDeploymentServicesDeploymentsIncludeFiles =
| string
| Array<string>;
export type GetDeploymentServicesDeploymentsExcludeFiles =
| string
| Array<string>;
export const GetDeploymentServicesDeploymentsResponseArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
} as const;
export type GetDeploymentServicesDeploymentsResponseArchitecture = ClosedEnum<
typeof GetDeploymentServicesDeploymentsResponseArchitecture
>;
export const GetDeploymentMaxDurationDeploymentsResponse2002 = {
Max: "max",
} as const;
export type GetDeploymentMaxDurationDeploymentsResponse2002 = ClosedEnum<
typeof GetDeploymentMaxDurationDeploymentsResponse2002
>;
export type GetDeploymentServicesDeploymentsResponseMaxDuration =
| number
| GetDeploymentMaxDurationDeploymentsResponse2002;
export const GetDeploymentServicesDeploymentsResponseMode = {
Strict: "strict",
} as const;
export type GetDeploymentServicesDeploymentsResponseMode = ClosedEnum<
typeof GetDeploymentServicesDeploymentsResponseMode
>;
export type GetDeploymentServicesDeploymentsResponseAffinity = {
mode: GetDeploymentServicesDeploymentsResponseMode;
};
export type GetDeploymentExperimentalTriggersDeploymentsResponse2003 = {
/**
* Event type - must be "schedule/v1beta" (REQUIRED)
*/
type: "schedule/v1beta";
};
/**
* Queue trigger input event for v2beta (from vercel.json config). Consumer name is implicitly derived from the function path. Only one trigger per function is allowed.
*/
export type GetDeploymentExperimentalTriggersDeploymentsResponse2002 = {
/**
* Event type - must be "queue/v2beta" (REQUIRED)
*/
type: "queue/v2beta";
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
/**
* Queue trigger input event for v1beta (from vercel.json config). Requires explicit consumer name.
*/
export type GetDeploymentExperimentalTriggersDeploymentsResponse2001 = {
/**
* Event type - must be "queue/v1beta" (REQUIRED)
*/
type: "queue/v1beta";
/**
* Name of the consumer group for this trigger (REQUIRED)
*/
consumer: string;
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
export type GetDeploymentServicesDeploymentsResponseExperimentalTriggers =
| GetDeploymentExperimentalTriggersDeploymentsResponse2001
| GetDeploymentExperimentalTriggersDeploymentsResponse2002
| GetDeploymentExperimentalTriggersDeploymentsResponse2003;
export type GetDeploymentServicesDeploymentsResponseFunctions = {
architecture?:
| GetDeploymentServicesDeploymentsResponseArchitecture
| undefined;
memory?: number | undefined;
maxDuration?:
| number
| GetDeploymentMaxDurationDeploymentsResponse2002
| undefined;
affinity?: GetDeploymentServicesDeploymentsResponseAffinity | undefined;
maxConcurrency?: number | undefined;
regions?: Array<string> | undefined;
functionFailoverRegions?: Array<string> | undefined;
runtime?: string | undefined;
includeFiles?: string | undefined;
excludeFiles?: string | undefined;
experimentalTriggers?:
| Array<
| GetDeploymentExperimentalTriggersDeploymentsResponse2001
| GetDeploymentExperimentalTriggersDeploymentsResponse2002
| GetDeploymentExperimentalTriggersDeploymentsResponse2003
>
| undefined;
supportsCancellation?: boolean | undefined;
};
export type GetDeploymentServicesProjectSettings = {
framework?: string | null | undefined;
devCommand?: string | null | undefined;
installCommand?: string | null | undefined;
buildCommand?: string | null | undefined;
outputDirectory?: string | null | undefined;
rootDirectory?: string | null | undefined;
nodeVersion?: string | undefined;
monorepoManager?: string | null | undefined;
createdAt?: number | undefined;
autoExposeSystemEnvs?: boolean | undefined;
sourceFilesOutsideRootDirectory?: boolean | undefined;
directoryListing?: boolean | undefined;
gitForkProtection?: boolean | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
};
/**
* Enforced runtime for explicitly configured Routing Middleware.
*/
export const GetDeploymentServicesDeploymentsMiddlewareRuntime = {
Nodejs: "nodejs",
} as const;
/**
* Enforced runtime for explicitly configured Routing Middleware.
*/
export type GetDeploymentServicesDeploymentsMiddlewareRuntime = ClosedEnum<
typeof GetDeploymentServicesDeploymentsMiddlewareRuntime
>;
export type GetDeploymentServicesDeploymentsMiddlewareMatcher =
| string
| Array<string>;
export type GetDeploymentServicesDeploymentsConfig = {
bunVersion?: string | undefined;
maxLambdaSize?: string | undefined;
includeFiles?: string | Array<string> | undefined;
excludeFiles?: string | Array<string> | undefined;
bundle?: boolean | undefined;
ldsflags?: string | undefined;
helpers?: boolean | undefined;
rust?: string | undefined;
debug?: boolean | undefined;
zeroConfig?: boolean | undefined;
import?: { [k: string]: string } | undefined;
functions?:
| { [k: string]: GetDeploymentServicesDeploymentsResponseFunctions }
| undefined;
projectSettings?: GetDeploymentServicesProjectSettings | undefined;
outputDirectory?: string | undefined;
installCommand?: string | undefined;
buildCommand?: string | undefined;
devCommand?: string | undefined;
framework?: string | null | undefined;
nodeVersion?: string | undefined;
middleware?: boolean | undefined;
/**
* Enforced runtime for explicitly configured Routing Middleware.
*/
middlewareRuntime?:
| GetDeploymentServicesDeploymentsMiddlewareRuntime
| undefined;
middlewareMatcher?: string | Array<string> | undefined;
/**
* Owning service name; scopes per-function config such as the v2beta consumer.
*/
serviceName?: string | undefined;
/**
* Buildpack runtime slug (e.g. "ruby").
*/
buildpack?: string | undefined;
};
/**
* Builder selected by the resolver.
*/
export type GetDeploymentServicesDeploymentsBuilder = {
use: string;
src?: string | undefined;
config?: GetDeploymentServicesDeploymentsConfig | undefined;
};
/**
* If present, must be `"service"` for Service-to-Service HTTP bindings.
*/
export const GetDeploymentServicesDeploymentsType = {
Service: "service",
} as const;
/**
* If present, must be `"service"` for Service-to-Service HTTP bindings.
*/
export type GetDeploymentServicesDeploymentsType = ClosedEnum<
typeof GetDeploymentServicesDeploymentsType
>;
/**
* Generated value shape, must be `"url"`.
*/
export const GetDeploymentServicesFormat = {
Url: "url",
} as const;
/**
* Generated value shape, must be `"url"`.
*/
export type GetDeploymentServicesFormat = ClosedEnum<
typeof GetDeploymentServicesFormat
>;
/**
* Caller-side bindings to other services.
*/
export type GetDeploymentServicesBindings = {
/**
* If present, must be `"service"` for Service-to-Service HTTP bindings.
*/
type?: GetDeploymentServicesDeploymentsType | undefined;
/**
* Target service name from `services`.
*/
service: string;
/**
* Generated value shape, must be `"url"`.
*/
format: GetDeploymentServicesFormat;
/**
* Environment variable name that will store the generated value
*/
env: string;
};
export const GetDeploymentServicesArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
} as const;
export type GetDeploymentServicesArchitecture = ClosedEnum<
typeof GetDeploymentServicesArchitecture
>;
export const GetDeploymentMaxDurationDeployments2 = {
Max: "max",
} as const;
export type GetDeploymentMaxDurationDeployments2 = ClosedEnum<
typeof GetDeploymentMaxDurationDeployments2
>;
export type GetDeploymentServicesMaxDuration =
| number
| GetDeploymentMaxDurationDeployments2;
export const GetDeploymentServicesMode = {
Strict: "strict",
} as const;
export type GetDeploymentServicesMode = ClosedEnum<
typeof GetDeploymentServicesMode
>;
export type GetDeploymentServicesAffinity = {
mode: GetDeploymentServicesMode;
};
export type GetDeploymentExperimentalTriggersDeployments3 = {
/**
* Event type - must be "schedule/v1beta" (REQUIRED)
*/
type: "schedule/v1beta";
};
/**
* Queue trigger input event for v2beta (from vercel.json config). Consumer name is implicitly derived from the function path. Only one trigger per function is allowed.
*/
export type GetDeploymentExperimentalTriggersDeployments2 = {
/**
* Event type - must be "queue/v2beta" (REQUIRED)
*/
type: "queue/v2beta";
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
/**
* Queue trigger input event for v1beta (from vercel.json config). Requires explicit consumer name.
*/
export type GetDeploymentExperimentalTriggersDeployments1 = {
/**
* Event type - must be "queue/v1beta" (REQUIRED)
*/
type: "queue/v1beta";
/**
* Name of the consumer group for this trigger (REQUIRED)
*/
consumer: string;
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
export type GetDeploymentServicesExperimentalTriggers =
| GetDeploymentExperimentalTriggersDeployments1
| GetDeploymentExperimentalTriggersDeployments2
| GetDeploymentExperimentalTriggersDeployments3;
/**
* Function configuration scoped to this service.
*/
export type GetDeploymentServicesFunctions = {
architecture?: GetDeploymentServicesArchitecture | undefined;
memory?: number | undefined;
maxDuration?: number | GetDeploymentMaxDurationDeployments2 | undefined;
affinity?: GetDeploymentServicesAffinity | undefined;
maxConcurrency?: number | undefined;
regions?: Array<string> | undefined;
functionFailoverRegions?: Array<string> | undefined;
runtime?: string | undefined;
includeFiles?: string | undefined;
excludeFiles?: string | undefined;
experimentalTriggers?:
| Array<
| GetDeploymentExperimentalTriggersDeployments1
| GetDeploymentExperimentalTriggersDeployments2
| GetDeploymentExperimentalTriggersDeployments3
>
| undefined;
supportsCancellation?: boolean | undefined;
};
export type GetDeploymentServicesDeploymentsHeaders = {
key: string;
value: string;
};
export const GetDeploymentHasDeploymentsResponseType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type GetDeploymentHasDeploymentsResponseType = ClosedEnum<
typeof GetDeploymentHasDeploymentsResponseType
>;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJson2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJson2;
export type GetDeploymentHasDeploymentsResponse2002 = {
type: GetDeploymentHasDeploymentsResponseType;
key: string;
value?:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJson2
| undefined;
};
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2;
export type GetDeploymentHasDeploymentsResponse2001 = {
type: "host";
value:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2;
};
export type GetDeploymentServicesDeploymentsResponseHas =
| GetDeploymentHasDeploymentsResponse2001
| (GetDeploymentHasDeploymentsResponse2002 & { type: "cookie" })
| (GetDeploymentHasDeploymentsResponse2002 & { type: "header" })
| (GetDeploymentHasDeploymentsResponse2002 & { type: "query" });
export const GetDeploymentMissingDeploymentsResponseType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type GetDeploymentMissingDeploymentsResponseType = ClosedEnum<
typeof GetDeploymentMissingDeploymentsResponseType
>;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentMissingDeploymentsResponseValue =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22;
export type GetDeploymentMissingDeploymentsResponse2002 = {
type: GetDeploymentMissingDeploymentsResponseType;
key: string;
value?:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22
| undefined;
};
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONEq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2;
export type GetDeploymentMissingDeploymentsResponse2001 = {
type: "host";
value:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2;
};
export type GetDeploymentServicesDeploymentsResponseMissing =
| GetDeploymentMissingDeploymentsResponse2001
| (GetDeploymentMissingDeploymentsResponse2002 & { type: "cookie" })
| (GetDeploymentMissingDeploymentsResponse2002 & { type: "header" })
| (GetDeploymentMissingDeploymentsResponse2002 & { type: "query" });
export type GetDeploymentServicesHeaders = {
source: string;
headers: Array<GetDeploymentServicesDeploymentsHeaders>;
has?:
| Array<
| GetDeploymentHasDeploymentsResponse2001
| (GetDeploymentHasDeploymentsResponse2002 & { type: "cookie" })
| (GetDeploymentHasDeploymentsResponse2002 & { type: "header" })
| (GetDeploymentHasDeploymentsResponse2002 & { type: "query" })
>
| undefined;
missing?:
| Array<
| GetDeploymentMissingDeploymentsResponse2001
| (GetDeploymentMissingDeploymentsResponse2002 & { type: "cookie" })
| (GetDeploymentMissingDeploymentsResponse2002 & { type: "header" })
| (GetDeploymentMissingDeploymentsResponse2002 & { type: "query" })
>
| undefined;
};
export const GetDeploymentHasDeploymentsResponse200ApplicationJSONType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type GetDeploymentHasDeploymentsResponse200ApplicationJSONType =
ClosedEnum<typeof GetDeploymentHasDeploymentsResponse200ApplicationJSONType>;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentHasDeploymentsResponse200Value =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22;
export type GetDeploymentHasDeployments2 = {
type: GetDeploymentHasDeploymentsResponse200ApplicationJSONType;
key: string;
value?:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22
| undefined;
};
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentHasDeploymentsResponseValue =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2;
export type GetDeploymentHasDeployments1 = {
type: "host";
value:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2;
};
export type GetDeploymentServicesHas =
| GetDeploymentHasDeployments1
| (GetDeploymentHasDeployments2 & { type: "cookie" })
| (GetDeploymentHasDeployments2 & { type: "header" })
| (GetDeploymentHasDeployments2 & { type: "query" });
export const GetDeploymentMissingDeploymentsResponse200ApplicationJSONType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type GetDeploymentMissingDeploymentsResponse200ApplicationJSONType =
ClosedEnum<
typeof GetDeploymentMissingDeploymentsResponse200ApplicationJSONType
>;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentMissingDeploymentsResponse200ApplicationJSONValue =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2;
export type GetDeploymentMissingDeployments2 = {
type: GetDeploymentMissingDeploymentsResponse200ApplicationJSONType;
key: string;
value?:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2
| undefined;
};
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq =
| string
| number;
export type GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2 =
{
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type GetDeploymentMissingDeploymentsResponse200Value =
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2;
export type GetDeploymentMissingDeployments1 = {
type: "host";
value:
| string
| GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2;
};
/** @internal */
export const GetDeploymentGitSourceRepoId$inboundSchema: z.ZodType<
GetDeploymentGitSourceRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceRepoIdFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceRepoId, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSourceRepoId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSource5$inboundSchema: z.ZodType<
GetDeploymentGitSource5,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceDeploymentsResponse200Type$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource5FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource5, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource5' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentGitSourceDeploymentsResponseType> = z
.nativeEnum(GetDeploymentGitSourceDeploymentsResponseType);
/** @internal */
export const GetDeploymentGitSourceDeployments4$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments4,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceDeploymentsResponseType$inboundSchema,
host: types.string(),
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments4FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments4, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments4' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentGitSourceDeploymentsType> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsType,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId$inboundSchema:
z.ZodType<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeployments3$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments3,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceDeploymentsType$inboundSchema,
host: types.string(),
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments3FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments3, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments3' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentGitSourceType
> = z.nativeEnum(GetDeploymentGitSourceType);
/** @internal */
export const GetDeploymentGitSourceDeployments2$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments2,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceType$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId$inboundSchema:
z.ZodType<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeployments1$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments1,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody21Type$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments1' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyGitSource$inboundSchema: z.ZodType<
GetDeploymentResponseBodyGitSource,
z.ZodTypeDef,
unknown
> = smartUnion([
GetDeploymentGitSource19$inboundSchema,
GetDeploymentGitSource14$inboundSchema,
GetDeploymentGitSource17$inboundSchema,
GetDeploymentGitSource18$inboundSchema,
z.lazy(() => GetDeploymentGitSourceDeployments4$inboundSchema),
GetDeploymentGitSource12$inboundSchema,
GetDeploymentGitSource13$inboundSchema,
GetDeploymentGitSource15$inboundSchema,
GetDeploymentGitSource16$inboundSchema,
z.lazy(() => GetDeploymentGitSourceDeployments2$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments3$inboundSchema),
GetDeploymentGitSource6$inboundSchema,
GetDeploymentGitSource9$inboundSchema,
z.lazy(() => GetDeploymentGitSourceDeployments1$inboundSchema),
z.lazy(() => GetDeploymentGitSource5$inboundSchema),
GetDeploymentGitSource7$inboundSchema,
GetDeploymentGitSource8$inboundSchema,
GetDeploymentGitSource10$inboundSchema,
GetDeploymentGitSource11$inboundSchema,
]);
export function getDeploymentResponseBodyGitSourceFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyGitSource, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyGitSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyGitSource' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyState$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyState
> = z.nativeEnum(GetDeploymentResponseBodyState);
/** @internal */
export const GetDeploymentResponseBodyManualProvisioning$inboundSchema:
z.ZodType<
GetDeploymentResponseBodyManualProvisioning,
z.ZodTypeDef,
unknown
> = z.object({
state: GetDeploymentResponseBodyState$inboundSchema,
completedAt: types.optional(types.number()),
});
export function getDeploymentResponseBodyManualProvisioningFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentResponseBodyManualProvisioning,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyManualProvisioning$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentResponseBodyManualProvisioning' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyNodeVersion$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyNodeVersion> = z.nativeEnum(
GetDeploymentResponseBodyNodeVersion,
);
/** @internal */
export const ResponseBodyProject$inboundSchema: z.ZodType<
ResponseBodyProject,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(types.string()).optional(),
});
export function responseBodyProjectFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyProject, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyProject' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyReadySubstate$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyReadySubstate> = z.nativeEnum(
GetDeploymentResponseBodyReadySubstate,
);
/** @internal */
export const GetDeploymentResponseBodySource$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodySource
> = z.nativeEnum(GetDeploymentResponseBodySource);
/** @internal */
export const GetDeploymentResponseBodyOidcTokenClaims$inboundSchema: z.ZodType<
GetDeploymentResponseBodyOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
mfe_group_ids: types.optional(z.array(types.string())),
plan: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"owner_id": "ownerId",
"project_id": "projectId",
"custom_environment_id": "customEnvironmentId",
"mfe_group_ids": "mfeGroupIds",
});
});
export function getDeploymentResponseBodyOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentResponseBodyOidcTokenClaims,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyOidcTokenClaims$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentResponseBodyOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyPlan$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyPlan
> = z.nativeEnum(GetDeploymentResponseBodyPlan);
/** @internal */
export const GetDeploymentResponseBodyCrons$inboundSchema: z.ZodType<
GetDeploymentResponseBodyCrons,
z.ZodTypeDef,
unknown
> = z.object({
schedule: types.string(),
path: types.string(),
});
export function getDeploymentResponseBodyCronsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyCrons, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyCrons$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyCrons' from JSON`,
);
}
/** @internal */
export const GetDeploymentAtprotoKinds$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentAtprotoKinds
> = z.nativeEnum(GetDeploymentAtprotoKinds);
/** @internal */
export const GetDeploymentAtprotoSubscription$inboundSchema: z.ZodType<
GetDeploymentAtprotoSubscription,
z.ZodTypeDef,
unknown
> = z.object({
collections: z.array(types.string()),
dids: types.optional(z.array(types.string())),
kinds: types.optional(z.array(GetDeploymentAtprotoKinds$inboundSchema)),
path: types.string(),
});
export function getDeploymentAtprotoSubscriptionFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentAtprotoSubscription, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentAtprotoSubscription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentAtprotoSubscription' from JSON`,
);
}
/** @internal */
export const GetDeploymentAtproto2$inboundSchema: z.ZodType<
GetDeploymentAtproto2,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.literal(true),
subscription: z.lazy(() => GetDeploymentAtprotoSubscription$inboundSchema),
});
export function getDeploymentAtproto2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentAtproto2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentAtproto2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentAtproto2' from JSON`,
);
}
/** @internal */
export const GetDeploymentAtproto1$inboundSchema: z.ZodType<
GetDeploymentAtproto1,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.literal(false),
});
export function getDeploymentAtproto1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentAtproto1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentAtproto1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentAtproto1' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyAtproto$inboundSchema: z.ZodType<
GetDeploymentResponseBodyAtproto,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetDeploymentAtproto2$inboundSchema),
z.lazy(() => GetDeploymentAtproto1$inboundSchema),
]);
export function getDeploymentResponseBodyAtprotoFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyAtproto, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyAtproto$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyAtproto' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyArchitecture$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyArchitecture> = z.nativeEnum(
GetDeploymentResponseBodyArchitecture,
);
/** @internal */
export const GetDeploymentMaxDuration2$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentMaxDuration2
> = z.nativeEnum(GetDeploymentMaxDuration2);
/** @internal */
export const GetDeploymentResponseBodyMaxDuration$inboundSchema: z.ZodType<
GetDeploymentResponseBodyMaxDuration,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), GetDeploymentMaxDuration2$inboundSchema]);
export function getDeploymentResponseBodyMaxDurationFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyMaxDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyMaxDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyMaxDuration' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyMode$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyMode
> = z.nativeEnum(GetDeploymentResponseBodyMode);
/** @internal */
export const GetDeploymentResponseBodyAffinity$inboundSchema: z.ZodType<
GetDeploymentResponseBodyAffinity,
z.ZodTypeDef,
unknown
> = z.object({
mode: GetDeploymentResponseBodyMode$inboundSchema,
});
export function getDeploymentResponseBodyAffinityFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyAffinity, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyAffinity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyAffinity' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggers3$inboundSchema: z.ZodType<
GetDeploymentExperimentalTriggers3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("schedule/v1beta"),
});
export function getDeploymentExperimentalTriggers3FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentExperimentalTriggers3, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggers3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentExperimentalTriggers3' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggers2$inboundSchema: z.ZodType<
GetDeploymentExperimentalTriggers2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentExperimentalTriggers2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentExperimentalTriggers2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggers2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentExperimentalTriggers2' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggers1$inboundSchema: z.ZodType<
GetDeploymentExperimentalTriggers1,
z.ZodTypeDef,
unknown
> = 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 getDeploymentExperimentalTriggers1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentExperimentalTriggers1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggers1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentExperimentalTriggers1' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyExperimentalTriggers$inboundSchema:
z.ZodType<
GetDeploymentResponseBodyExperimentalTriggers,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentExperimentalTriggers1$inboundSchema),
z.lazy(() => GetDeploymentExperimentalTriggers2$inboundSchema),
z.lazy(() => GetDeploymentExperimentalTriggers3$inboundSchema),
]);
export function getDeploymentResponseBodyExperimentalTriggersFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentResponseBodyExperimentalTriggers,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyExperimentalTriggers$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentResponseBodyExperimentalTriggers' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyFunctions$inboundSchema: z.ZodType<
GetDeploymentResponseBodyFunctions,
z.ZodTypeDef,
unknown
> = z.object({
architecture: types.optional(
GetDeploymentResponseBodyArchitecture$inboundSchema,
),
memory: types.optional(types.number()),
maxDuration: types.optional(
smartUnion([types.number(), GetDeploymentMaxDuration2$inboundSchema]),
),
affinity: types.optional(
z.lazy(() => GetDeploymentResponseBodyAffinity$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(() => GetDeploymentExperimentalTriggers1$inboundSchema),
z.lazy(() =>
GetDeploymentExperimentalTriggers2$inboundSchema
),
z.lazy(() => GetDeploymentExperimentalTriggers3$inboundSchema),
])),
),
supportsCancellation: types.optional(types.boolean()),
});
export function getDeploymentResponseBodyFunctionsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyFunctions, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyFunctions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyFunctions' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutes3$inboundSchema: z.ZodType<
GetDeploymentRoutes3,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
continue: types.boolean(),
middleware: types.number(),
});
export function getDeploymentRoutes3FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutes3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutes3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutes3' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesHandle$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentRoutesHandle
> = z.nativeEnum(GetDeploymentRoutesHandle);
/** @internal */
export const GetDeploymentRoutes2$inboundSchema: z.ZodType<
GetDeploymentRoutes2,
z.ZodTypeDef,
unknown
> = z.object({
handle: GetDeploymentRoutesHandle$inboundSchema,
src: types.optional(types.string()),
dest: types.optional(types.string()),
status: types.optional(types.number()),
});
export function getDeploymentRoutes2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutes2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutes2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutes2' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentHasType
> = z.nativeEnum(GetDeploymentHasType);
/** @internal */
export const GetDeploymentValueDeploymentsResponse200Eq$inboundSchema:
z.ZodType<GetDeploymentValueDeploymentsResponse200Eq, z.ZodTypeDef, unknown> =
smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200EqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200Eq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200Eq$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200Eq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValue2$inboundSchema: z.ZodType<
GetDeploymentValue2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValue2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentValue2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentValue2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValue2' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsValue$inboundSchema: z.ZodType<
GetDeploymentHasDeploymentsValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => GetDeploymentValue2$inboundSchema),
]);
export function getDeploymentHasDeploymentsValueFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentHasDeploymentsValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentHasDeploymentsValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHasDeploymentsValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentHas2$inboundSchema: z.ZodType<
GetDeploymentHas2,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentHasType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() => GetDeploymentValue2$inboundSchema),
]),
),
});
export function getDeploymentHas2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentHas2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentHas2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHas2' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponseEq$inboundSchema: z.ZodType<
GetDeploymentValueDeploymentsResponseEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponseEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponseEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponseEq$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentValueDeploymentsResponseEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse2002$inboundSchema: z.ZodType<
GetDeploymentValueDeploymentsResponse2002,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse2002$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentValueDeploymentsResponse2002' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasValue$inboundSchema: z.ZodType<
GetDeploymentHasValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => GetDeploymentValueDeploymentsResponse2002$inboundSchema),
]);
export function getDeploymentHasValueFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentHasValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentHasValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHasValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentHas1$inboundSchema: z.ZodType<
GetDeploymentHas1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => GetDeploymentValueDeploymentsResponse2002$inboundSchema),
]),
});
export function getDeploymentHas1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentHas1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentHas1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHas1' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesHas$inboundSchema: z.ZodType<
GetDeploymentRoutesHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentHas1$inboundSchema),
z.lazy(() => GetDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => GetDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function getDeploymentRoutesHasFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutesHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutesHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutesHas' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentMissingType
> = z.nativeEnum(GetDeploymentMissingType);
/** @internal */
export const GetDeploymentValueDeploymentsEq$inboundSchema: z.ZodType<
GetDeploymentValueDeploymentsEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsEqFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentValueDeploymentsEq, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentValueDeploymentsEq$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse2$inboundSchema: z.ZodType<
GetDeploymentValueDeploymentsResponse2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentValueDeploymentsResponse2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse2' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingValue$inboundSchema: z.ZodType<
GetDeploymentMissingValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => GetDeploymentValueDeploymentsResponse2$inboundSchema),
]);
export function getDeploymentMissingValueFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentMissingValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentMissingValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissingValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissing2$inboundSchema: z.ZodType<
GetDeploymentMissing2,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentMissingType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() => GetDeploymentValueDeploymentsResponse2$inboundSchema),
]),
),
});
export function getDeploymentMissing2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentMissing2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentMissing2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissing2' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueEq$inboundSchema: z.ZodType<
GetDeploymentValueEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueEqFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentValueEq, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentValueEq$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeployments2$inboundSchema: z.ZodType<
GetDeploymentValueDeployments2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeployments2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentValueDeployments2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentValueDeployments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsValue$inboundSchema: z.ZodType<
GetDeploymentMissingDeploymentsValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => GetDeploymentValueDeployments2$inboundSchema),
]);
export function getDeploymentMissingDeploymentsValueFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentMissingDeploymentsValue, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissingDeploymentsValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissing1$inboundSchema: z.ZodType<
GetDeploymentMissing1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => GetDeploymentValueDeployments2$inboundSchema),
]),
});
export function getDeploymentMissing1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentMissing1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentMissing1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissing1' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesMissing$inboundSchema: z.ZodType<
GetDeploymentRoutesMissing,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentMissing1$inboundSchema),
z.lazy(() => GetDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => GetDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function getDeploymentRoutesMissingFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutesMissing, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutesMissing$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutesMissing' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesAction$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentRoutesAction
> = z.nativeEnum(GetDeploymentRoutesAction);
/** @internal */
export const GetDeploymentRoutesMitigate$inboundSchema: z.ZodType<
GetDeploymentRoutesMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: GetDeploymentRoutesAction$inboundSchema,
});
export function getDeploymentRoutesMitigateFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutesMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutesMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutesMitigate' from JSON`,
);
}
/** @internal */
export const GetDeploymentTransformsDeploymentsOp$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentTransformsDeploymentsOp> = z.nativeEnum(
GetDeploymentTransformsDeploymentsOp,
);
/** @internal */
export const GetDeploymentTransforms2$inboundSchema: z.ZodType<
GetDeploymentTransforms2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("request.path"),
op: GetDeploymentTransformsDeploymentsOp$inboundSchema,
args: types.string(),
env: types.optional(z.array(types.string())),
});
export function getDeploymentTransforms2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentTransforms2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentTransforms2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentTransforms2' from JSON`,
);
}
/** @internal */
export const GetDeploymentTransformsDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentTransformsDeploymentsType> = z.nativeEnum(
GetDeploymentTransformsDeploymentsType,
);
/** @internal */
export const GetDeploymentTransformsOp$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentTransformsOp
> = z.nativeEnum(GetDeploymentTransformsOp);
/** @internal */
export const GetDeploymentKeyEq$inboundSchema: z.ZodType<
GetDeploymentKeyEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentKeyEqFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentKeyEq, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentKeyEq$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentKeyEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentKey2$inboundSchema: z.ZodType<
GetDeploymentKey2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentKey2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentKey2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentKey2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentKey2' from JSON`,
);
}
/** @internal */
export const GetDeploymentTransformsKey$inboundSchema: z.ZodType<
GetDeploymentTransformsKey,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), z.lazy(() => GetDeploymentKey2$inboundSchema)]);
export function getDeploymentTransformsKeyFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentTransformsKey, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentTransformsKey$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentTransformsKey' from JSON`,
);
}
/** @internal */
export const GetDeploymentTransformsTarget$inboundSchema: z.ZodType<
GetDeploymentTransformsTarget,
z.ZodTypeDef,
unknown
> = z.object({
key: smartUnion([
types.string(),
z.lazy(() => GetDeploymentKey2$inboundSchema),
]),
});
export function getDeploymentTransformsTargetFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentTransformsTarget, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentTransformsTarget$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentTransformsTarget' from JSON`,
);
}
/** @internal */
export const GetDeploymentTransformsArgs$inboundSchema: z.ZodType<
GetDeploymentTransformsArgs,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), z.array(types.string())]);
export function getDeploymentTransformsArgsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentTransformsArgs, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentTransformsArgs$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentTransformsArgs' from JSON`,
);
}
/** @internal */
export const GetDeploymentTransforms1$inboundSchema: z.ZodType<
GetDeploymentTransforms1,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentTransformsDeploymentsType$inboundSchema,
op: GetDeploymentTransformsOp$inboundSchema,
target: z.lazy(() => GetDeploymentTransformsTarget$inboundSchema),
args: types.optional(smartUnion([types.string(), z.array(types.string())])),
env: types.optional(z.array(types.string())),
});
export function getDeploymentTransforms1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentTransforms1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentTransforms1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentTransforms1' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesTransforms$inboundSchema: z.ZodType<
GetDeploymentRoutesTransforms,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentTransforms1$inboundSchema).and(
z.object({ type: z.literal("request.headers") }),
),
z.lazy(() => GetDeploymentTransforms1$inboundSchema).and(
z.object({ type: z.literal("request.query") }),
),
z.lazy(() => GetDeploymentTransforms1$inboundSchema).and(
z.object({ type: z.literal("response.headers") }),
),
z.lazy(() => GetDeploymentTransforms2$inboundSchema),
]);
export function getDeploymentRoutesTransformsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutesTransforms, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutesTransforms$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutesTransforms' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesLocale$inboundSchema: z.ZodType<
GetDeploymentRoutesLocale,
z.ZodTypeDef,
unknown
> = z.object({
redirect: types.optional(z.record(types.string())),
cookie: types.optional(types.string()),
});
export function getDeploymentRoutesLocaleFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutesLocale, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutesLocale$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutesLocale' from JSON`,
);
}
/** @internal */
export const GetDeploymentDestinationType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentDestinationType
> = z.nativeEnum(GetDeploymentDestinationType);
/** @internal */
export const GetDeploymentDestination2$inboundSchema: z.ZodType<
GetDeploymentDestination2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.optional(GetDeploymentDestinationType$inboundSchema),
service: types.string(),
path: types.optional(types.string()),
});
export function getDeploymentDestination2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentDestination2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentDestination2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentDestination2' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutesDestination$inboundSchema: z.ZodType<
GetDeploymentRoutesDestination,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetDeploymentDestination2$inboundSchema),
types.string(),
]);
export function getDeploymentRoutesDestinationFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutesDestination, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutesDestination$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutesDestination' from JSON`,
);
}
/** @internal */
export const GetDeploymentRoutes1$inboundSchema: z.ZodType<
GetDeploymentRoutes1,
z.ZodTypeDef,
unknown
> = 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(() => GetDeploymentHas1$inboundSchema),
z.lazy(() =>
GetDeploymentHas2$inboundSchema
).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => GetDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
])),
),
missing: types.optional(
z.array(z.union([
z.lazy(() => GetDeploymentMissing1$inboundSchema),
z.lazy(() =>
GetDeploymentMissing2$inboundSchema
).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => GetDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
])),
),
mitigate: types.optional(
z.lazy(() => GetDeploymentRoutesMitigate$inboundSchema),
),
transforms: types.optional(
z.array(z.union([
z.lazy(() => GetDeploymentTransforms1$inboundSchema).and(
z.object({ type: z.literal("request.headers") }),
),
z.lazy(() => GetDeploymentTransforms1$inboundSchema).and(
z.object({ type: z.literal("request.query") }),
),
z.lazy(() => GetDeploymentTransforms1$inboundSchema).and(
z.object({ type: z.literal("response.headers") }),
),
z.lazy(() => GetDeploymentTransforms2$inboundSchema),
])),
),
env: types.optional(z.array(types.string())),
locale: types.optional(z.lazy(() => GetDeploymentRoutesLocale$inboundSchema)),
source: types.optional(types.string()),
destination: types.optional(
smartUnion([
z.lazy(() => GetDeploymentDestination2$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 getDeploymentRoutes1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentRoutes1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentRoutes1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentRoutes1' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyRoutes$inboundSchema: z.ZodType<
GetDeploymentResponseBodyRoutes,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetDeploymentRoutes3$inboundSchema),
z.lazy(() => GetDeploymentRoutes1$inboundSchema),
z.lazy(() => GetDeploymentRoutes2$inboundSchema),
]);
export function getDeploymentResponseBodyRoutesFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyRoutes, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyRoutes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyRoutes' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsIncludeFiles$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsIncludeFiles,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), z.array(types.string())]);
export function getDeploymentServicesDeploymentsIncludeFilesFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsIncludeFiles,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsIncludeFiles$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsIncludeFiles' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsExcludeFiles$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsExcludeFiles,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), z.array(types.string())]);
export function getDeploymentServicesDeploymentsExcludeFilesFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsExcludeFiles,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsExcludeFiles$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsExcludeFiles' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsResponseArchitecture$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentServicesDeploymentsResponseArchitecture> =
z.nativeEnum(GetDeploymentServicesDeploymentsResponseArchitecture);
/** @internal */
export const GetDeploymentMaxDurationDeploymentsResponse2002$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentMaxDurationDeploymentsResponse2002> = z
.nativeEnum(GetDeploymentMaxDurationDeploymentsResponse2002);
/** @internal */
export const GetDeploymentServicesDeploymentsResponseMaxDuration$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsResponseMaxDuration,
z.ZodTypeDef,
unknown
> = smartUnion([
types.number(),
GetDeploymentMaxDurationDeploymentsResponse2002$inboundSchema,
]);
export function getDeploymentServicesDeploymentsResponseMaxDurationFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsResponseMaxDuration,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsResponseMaxDuration$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsResponseMaxDuration' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsResponseMode$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentServicesDeploymentsResponseMode> = z
.nativeEnum(GetDeploymentServicesDeploymentsResponseMode);
/** @internal */
export const GetDeploymentServicesDeploymentsResponseAffinity$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsResponseAffinity,
z.ZodTypeDef,
unknown
> = z.object({
mode: GetDeploymentServicesDeploymentsResponseMode$inboundSchema,
});
export function getDeploymentServicesDeploymentsResponseAffinityFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsResponseAffinity,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsResponseAffinity$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsResponseAffinity' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggersDeploymentsResponse2003$inboundSchema:
z.ZodType<
GetDeploymentExperimentalTriggersDeploymentsResponse2003,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("schedule/v1beta"),
});
export function getDeploymentExperimentalTriggersDeploymentsResponse2003FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentExperimentalTriggersDeploymentsResponse2003,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggersDeploymentsResponse2003$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentExperimentalTriggersDeploymentsResponse2003' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggersDeploymentsResponse2002$inboundSchema:
z.ZodType<
GetDeploymentExperimentalTriggersDeploymentsResponse2002,
z.ZodTypeDef,
unknown
> = 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 getDeploymentExperimentalTriggersDeploymentsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentExperimentalTriggersDeploymentsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggersDeploymentsResponse2002$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentExperimentalTriggersDeploymentsResponse2002' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggersDeploymentsResponse2001$inboundSchema:
z.ZodType<
GetDeploymentExperimentalTriggersDeploymentsResponse2001,
z.ZodTypeDef,
unknown
> = 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 getDeploymentExperimentalTriggersDeploymentsResponse2001FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentExperimentalTriggersDeploymentsResponse2001,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggersDeploymentsResponse2001$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentExperimentalTriggersDeploymentsResponse2001' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsResponseExperimentalTriggers$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsResponseExperimentalTriggers,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() =>
GetDeploymentExperimentalTriggersDeploymentsResponse2001$inboundSchema
),
z.lazy(() =>
GetDeploymentExperimentalTriggersDeploymentsResponse2002$inboundSchema
),
z.lazy(() =>
GetDeploymentExperimentalTriggersDeploymentsResponse2003$inboundSchema
),
]);
export function getDeploymentServicesDeploymentsResponseExperimentalTriggersFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsResponseExperimentalTriggers,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsResponseExperimentalTriggers$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesDeploymentsResponseExperimentalTriggers' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsResponseFunctions$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsResponseFunctions,
z.ZodTypeDef,
unknown
> = z.object({
architecture: types.optional(
GetDeploymentServicesDeploymentsResponseArchitecture$inboundSchema,
),
memory: types.optional(types.number()),
maxDuration: types.optional(
smartUnion([
types.number(),
GetDeploymentMaxDurationDeploymentsResponse2002$inboundSchema,
]),
),
affinity: types.optional(
z.lazy(() =>
GetDeploymentServicesDeploymentsResponseAffinity$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(() =>
GetDeploymentExperimentalTriggersDeploymentsResponse2001$inboundSchema
),
z.lazy(() =>
GetDeploymentExperimentalTriggersDeploymentsResponse2002$inboundSchema
),
z.lazy(() =>
GetDeploymentExperimentalTriggersDeploymentsResponse2003$inboundSchema
),
])),
),
supportsCancellation: types.optional(types.boolean()),
});
export function getDeploymentServicesDeploymentsResponseFunctionsFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsResponseFunctions,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsResponseFunctions$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsResponseFunctions' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesProjectSettings$inboundSchema: z.ZodType<
GetDeploymentServicesProjectSettings,
z.ZodTypeDef,
unknown
> = 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 getDeploymentServicesProjectSettingsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesProjectSettings, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesProjectSettings$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesProjectSettings' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsMiddlewareRuntime$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentServicesDeploymentsMiddlewareRuntime> = z
.nativeEnum(GetDeploymentServicesDeploymentsMiddlewareRuntime);
/** @internal */
export const GetDeploymentServicesDeploymentsMiddlewareMatcher$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsMiddlewareMatcher,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), z.array(types.string())]);
export function getDeploymentServicesDeploymentsMiddlewareMatcherFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsMiddlewareMatcher,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsMiddlewareMatcher$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsMiddlewareMatcher' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsConfig$inboundSchema: z.ZodType<
GetDeploymentServicesDeploymentsConfig,
z.ZodTypeDef,
unknown
> = 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(() =>
GetDeploymentServicesDeploymentsResponseFunctions$inboundSchema
)),
),
projectSettings: types.optional(
z.lazy(() => GetDeploymentServicesProjectSettings$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(
GetDeploymentServicesDeploymentsMiddlewareRuntime$inboundSchema,
),
middlewareMatcher: types.optional(
smartUnion([types.string(), z.array(types.string())]),
),
serviceName: types.optional(types.string()),
buildpack: types.optional(types.string()),
});
export function getDeploymentServicesDeploymentsConfigFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesDeploymentsConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesDeploymentsConfig' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsBuilder$inboundSchema: z.ZodType<
GetDeploymentServicesDeploymentsBuilder,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
config: types.optional(
z.lazy(() => GetDeploymentServicesDeploymentsConfig$inboundSchema),
),
});
export function getDeploymentServicesDeploymentsBuilderFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsBuilder,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsBuilder$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsBuilder' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentServicesDeploymentsType> = z.nativeEnum(
GetDeploymentServicesDeploymentsType,
);
/** @internal */
export const GetDeploymentServicesFormat$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentServicesFormat
> = z.nativeEnum(GetDeploymentServicesFormat);
/** @internal */
export const GetDeploymentServicesBindings$inboundSchema: z.ZodType<
GetDeploymentServicesBindings,
z.ZodTypeDef,
unknown
> = z.object({
type: types.optional(GetDeploymentServicesDeploymentsType$inboundSchema),
service: types.string(),
format: GetDeploymentServicesFormat$inboundSchema,
env: types.string(),
});
export function getDeploymentServicesBindingsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesBindings, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentServicesBindings$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesBindings' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesArchitecture$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentServicesArchitecture
> = z.nativeEnum(GetDeploymentServicesArchitecture);
/** @internal */
export const GetDeploymentMaxDurationDeployments2$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentMaxDurationDeployments2> = z.nativeEnum(
GetDeploymentMaxDurationDeployments2,
);
/** @internal */
export const GetDeploymentServicesMaxDuration$inboundSchema: z.ZodType<
GetDeploymentServicesMaxDuration,
z.ZodTypeDef,
unknown
> = smartUnion([
types.number(),
GetDeploymentMaxDurationDeployments2$inboundSchema,
]);
export function getDeploymentServicesMaxDurationFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesMaxDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentServicesMaxDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesMaxDuration' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesMode$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentServicesMode
> = z.nativeEnum(GetDeploymentServicesMode);
/** @internal */
export const GetDeploymentServicesAffinity$inboundSchema: z.ZodType<
GetDeploymentServicesAffinity,
z.ZodTypeDef,
unknown
> = z.object({
mode: GetDeploymentServicesMode$inboundSchema,
});
export function getDeploymentServicesAffinityFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesAffinity, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentServicesAffinity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesAffinity' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggersDeployments3$inboundSchema:
z.ZodType<
GetDeploymentExperimentalTriggersDeployments3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("schedule/v1beta"),
});
export function getDeploymentExperimentalTriggersDeployments3FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentExperimentalTriggersDeployments3,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggersDeployments3$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentExperimentalTriggersDeployments3' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggersDeployments2$inboundSchema:
z.ZodType<
GetDeploymentExperimentalTriggersDeployments2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentExperimentalTriggersDeployments2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentExperimentalTriggersDeployments2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggersDeployments2$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentExperimentalTriggersDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentExperimentalTriggersDeployments1$inboundSchema:
z.ZodType<
GetDeploymentExperimentalTriggersDeployments1,
z.ZodTypeDef,
unknown
> = 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 getDeploymentExperimentalTriggersDeployments1FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentExperimentalTriggersDeployments1,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentExperimentalTriggersDeployments1$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentExperimentalTriggersDeployments1' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesExperimentalTriggers$inboundSchema: z.ZodType<
GetDeploymentServicesExperimentalTriggers,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentExperimentalTriggersDeployments1$inboundSchema),
z.lazy(() => GetDeploymentExperimentalTriggersDeployments2$inboundSchema),
z.lazy(() => GetDeploymentExperimentalTriggersDeployments3$inboundSchema),
]);
export function getDeploymentServicesExperimentalTriggersFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesExperimentalTriggers,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesExperimentalTriggers$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesExperimentalTriggers' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesFunctions$inboundSchema: z.ZodType<
GetDeploymentServicesFunctions,
z.ZodTypeDef,
unknown
> = z.object({
architecture: types.optional(GetDeploymentServicesArchitecture$inboundSchema),
memory: types.optional(types.number()),
maxDuration: types.optional(
smartUnion([
types.number(),
GetDeploymentMaxDurationDeployments2$inboundSchema,
]),
),
affinity: types.optional(
z.lazy(() => GetDeploymentServicesAffinity$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(() => GetDeploymentExperimentalTriggersDeployments1$inboundSchema),
z.lazy(() =>
GetDeploymentExperimentalTriggersDeployments2$inboundSchema
),
z.lazy(() => GetDeploymentExperimentalTriggersDeployments3$inboundSchema),
])),
),
supportsCancellation: types.optional(types.boolean()),
});
export function getDeploymentServicesFunctionsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesFunctions, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentServicesFunctions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesFunctions' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsHeaders$inboundSchema: z.ZodType<
GetDeploymentServicesDeploymentsHeaders,
z.ZodTypeDef,
unknown
> = z.object({
key: types.string(),
value: types.string(),
});
export function getDeploymentServicesDeploymentsHeadersFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsHeaders,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsHeaders$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsHeaders' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentHasDeploymentsResponseType> = z
.nativeEnum(GetDeploymentHasDeploymentsResponseType);
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersHasEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJson2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSON2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJson2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJson2' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema:
z.ZodType<
GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema
),
]);
export function getDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponse2002$inboundSchema: z.ZodType<
GetDeploymentHasDeploymentsResponse2002,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentHasDeploymentsResponseType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJson2$inboundSchema
),
]),
),
});
export function getDeploymentHasDeploymentsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentHasDeploymentsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentHasDeploymentsResponse2002$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentHasDeploymentsResponse2002' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2HeadersEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value$inboundSchema:
z.ZodType<
GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2$inboundSchema
),
]);
export function getDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2ValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHasDeploymentsResponse200ApplicationJSONResponseBody2Value' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponse2001$inboundSchema: z.ZodType<
GetDeploymentHasDeploymentsResponse2001,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Headers2$inboundSchema
),
]),
});
export function getDeploymentHasDeploymentsResponse2001FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentHasDeploymentsResponse2001,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentHasDeploymentsResponse2001$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentHasDeploymentsResponse2001' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsResponseHas$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsResponseHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentHasDeploymentsResponse2001$inboundSchema),
z.lazy(() => GetDeploymentHasDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => GetDeploymentHasDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentHasDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function getDeploymentServicesDeploymentsResponseHasFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsResponseHas,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsResponseHas$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsResponseHas' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentMissingDeploymentsResponseType> = z
.nativeEnum(GetDeploymentMissingDeploymentsResponseType);
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBodyEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponseValue$inboundSchema:
z.ZodType<
GetDeploymentMissingDeploymentsResponseValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema
),
]);
export function getDeploymentMissingDeploymentsResponseValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentMissingDeploymentsResponseValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsResponseValue$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentMissingDeploymentsResponseValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponse2002$inboundSchema:
z.ZodType<
GetDeploymentMissingDeploymentsResponse2002,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentMissingDeploymentsResponseType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody22$inboundSchema
),
]),
),
});
export function getDeploymentMissingDeploymentsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentMissingDeploymentsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsResponse2002$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentMissingDeploymentsResponse2002' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONEq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONEq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema:
z.ZodType<
GetDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema
),
]);
export function getDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissingDeploymentsResponse200ApplicationJSONResponseBody2ServicesValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponse2001$inboundSchema:
z.ZodType<
GetDeploymentMissingDeploymentsResponse2001,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2$inboundSchema
),
]),
});
export function getDeploymentMissingDeploymentsResponse2001FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentMissingDeploymentsResponse2001,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsResponse2001$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentMissingDeploymentsResponse2001' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesDeploymentsResponseMissing$inboundSchema:
z.ZodType<
GetDeploymentServicesDeploymentsResponseMissing,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentMissingDeploymentsResponse2001$inboundSchema),
z.lazy(() => GetDeploymentMissingDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => GetDeploymentMissingDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentMissingDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function getDeploymentServicesDeploymentsResponseMissingFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentServicesDeploymentsResponseMissing,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentServicesDeploymentsResponseMissing$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentServicesDeploymentsResponseMissing' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesHeaders$inboundSchema: z.ZodType<
GetDeploymentServicesHeaders,
z.ZodTypeDef,
unknown
> = z.object({
source: types.string(),
headers: z.array(
z.lazy(() => GetDeploymentServicesDeploymentsHeaders$inboundSchema),
),
has: types.optional(
z.array(z.union([
z.lazy(() => GetDeploymentHasDeploymentsResponse2001$inboundSchema),
z.lazy(() =>
GetDeploymentHasDeploymentsResponse2002$inboundSchema
).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => GetDeploymentHasDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentHasDeploymentsResponse2002$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
])),
),
missing: types.optional(
z.array(z.union([
z.lazy(() => GetDeploymentMissingDeploymentsResponse2001$inboundSchema),
z.lazy(() =>
GetDeploymentMissingDeploymentsResponse2002$inboundSchema
).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => GetDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("header") })),
z.lazy(() => GetDeploymentMissingDeploymentsResponse2002$inboundSchema)
.and(z.object({ type: z.literal("query") })),
])),
),
});
export function getDeploymentServicesHeadersFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesHeaders, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentServicesHeaders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesHeaders' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponse200ApplicationJSONType$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentHasDeploymentsResponse200ApplicationJSONType
> = z.nativeEnum(GetDeploymentHasDeploymentsResponse200ApplicationJSONType);
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2ServicesEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponse200Value$inboundSchema:
z.ZodType<
GetDeploymentHasDeploymentsResponse200Value,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema
),
]);
export function getDeploymentHasDeploymentsResponse200ValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentHasDeploymentsResponse200Value,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentHasDeploymentsResponse200Value$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentHasDeploymentsResponse200Value' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeployments2$inboundSchema: z.ZodType<
GetDeploymentHasDeployments2,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentHasDeploymentsResponse200ApplicationJSONType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services22$inboundSchema
),
]),
),
});
export function getDeploymentHasDeployments2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentHasDeployments2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentHasDeployments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHasDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2EqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Eq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeploymentsResponseValue$inboundSchema: z.ZodType<
GetDeploymentHasDeploymentsResponseValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema
),
]);
export function getDeploymentHasDeploymentsResponseValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentHasDeploymentsResponseValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentHasDeploymentsResponseValue$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentHasDeploymentsResponseValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentHasDeployments1$inboundSchema: z.ZodType<
GetDeploymentHasDeployments1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2$inboundSchema
),
]),
});
export function getDeploymentHasDeployments1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentHasDeployments1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentHasDeployments1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentHasDeployments1' from JSON`,
);
}
/** @internal */
export const GetDeploymentServicesHas$inboundSchema: z.ZodType<
GetDeploymentServicesHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetDeploymentHasDeployments1$inboundSchema),
z.lazy(() => GetDeploymentHasDeployments2$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => GetDeploymentHasDeployments2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => GetDeploymentHasDeployments2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function getDeploymentServicesHasFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentServicesHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentServicesHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentServicesHas' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponse200ApplicationJSONType$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentMissingDeploymentsResponse200ApplicationJSONType
> = z.nativeEnum(
GetDeploymentMissingDeploymentsResponse200ApplicationJSONType,
);
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsEq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponse200ApplicationJSONValue$inboundSchema:
z.ZodType<
GetDeploymentMissingDeploymentsResponse200ApplicationJSONValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema
),
]);
export function getDeploymentMissingDeploymentsResponse200ApplicationJSONValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentMissingDeploymentsResponse200ApplicationJSONValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissingDeploymentsResponse200ApplicationJSONValue' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeployments2$inboundSchema: z.ZodType<
GetDeploymentMissingDeployments2,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentMissingDeploymentsResponse200ApplicationJSONType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2RedirectsMissing2$inboundSchema
),
]),
),
});
export function getDeploymentMissingDeployments2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentMissingDeployments2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentMissingDeployments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissingDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2EqFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Eq' from JSON`,
);
}
/** @internal */
export const GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema:
z.ZodType<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2,
z.ZodTypeDef,
unknown
> = 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 getDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeploymentsResponse200Value$inboundSchema:
z.ZodType<
GetDeploymentMissingDeploymentsResponse200Value,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema
),
]);
export function getDeploymentMissingDeploymentsResponse200ValueFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentMissingDeploymentsResponse200Value,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentMissingDeploymentsResponse200Value$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentMissingDeploymentsResponse200Value' from JSON`,
);
}
/** @internal */
export const GetDeploymentMissingDeployments1$inboundSchema: z.ZodType<
GetDeploymentMissingDeployments1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() =>
GetDeploymentValueDeploymentsResponse200ApplicationJSONResponseBody2Services2Redirects2$inboundSchema
),
]),
});
export function getDeploymentMissingDeployments1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentMissingDeployments1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentMissingDeployments1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentMissingDeployments1' from JSON`,
);
}