UNPKG

@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>

685 lines (644 loc) 25.8 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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 { GetProjectAbuse, GetProjectAbuse$inboundSchema, GetProjectDefaultResourceConfig, GetProjectDefaultResourceConfig$inboundSchema, GetProjectDeploymentPolicy, GetProjectDeploymentPolicy$inboundSchema, GetProjectFeatures, GetProjectFeatures$inboundSchema, GetProjectGitComments, GetProjectGitComments$inboundSchema, GetProjectGitProviderOptions, GetProjectGitProviderOptions$inboundSchema, GetProjectInternalRoutesHas, GetProjectInternalRoutesHas$inboundSchema, GetProjectInternalRoutesMitigate, GetProjectInternalRoutesMitigate$inboundSchema, GetProjectLastAliasRequest, GetProjectLastAliasRequest$inboundSchema, GetProjectLastRollbackTarget, GetProjectLastRollbackTarget$inboundSchema, GetProjectOidcTokenConfig, GetProjectOidcTokenConfig$inboundSchema, GetProjectPermissions, GetProjectPermissions$inboundSchema, GetProjectProtectionBypass, GetProjectProtectionBypass$inboundSchema, GetProjectSecurity, GetProjectSecurity$inboundSchema, GetProjectSsoProtection, GetProjectSsoProtection$inboundSchema, GetProjectStaticIps, GetProjectStaticIps$inboundSchema, GetProjectTargets, GetProjectTargets$inboundSchema, GetProjectTier, GetProjectTier$inboundSchema, GetProjectTrustedIps, GetProjectTrustedIps$inboundSchema, GetProjectTrustedSources, GetProjectTrustedSources$inboundSchema, GetProjectUsageStatus, GetProjectUsageStatus$inboundSchema, GetProjectWebAnalytics, GetProjectWebAnalytics$inboundSchema, } from "./getprojectinternalroutesmitigate.js"; import { GetProjectAlias, GetProjectAlias$inboundSchema, GetProjectAnalytics, GetProjectAnalytics$inboundSchema, GetProjectBlobs, GetProjectBlobs$inboundSchema, GetProjectConnectConfigurations, GetProjectConnectConfigurations$inboundSchema, GetProjectCreator, GetProjectCreator$inboundSchema, GetProjectCrons, GetProjectCrons$inboundSchema, GetProjectCustomEnvironments, GetProjectCustomEnvironments$inboundSchema, GetProjectDataCache, GetProjectDataCache$inboundSchema, GetProjectDeploymentExpiration, GetProjectDeploymentExpiration$inboundSchema, GetProjectEnv, GetProjectEnv$inboundSchema, GetProjectExpiration, GetProjectExpiration$inboundSchema, GetProjectFramework, GetProjectFramework$inboundSchema, GetProjectIntegrations, GetProjectIntegrations$inboundSchema, GetProjectIpBuckets, GetProjectIpBuckets$inboundSchema, GetProjectJobs, GetProjectJobs$inboundSchema, GetProjectLatestDeployments, GetProjectLatestDeployments$inboundSchema, GetProjectLink, GetProjectLink$inboundSchema, GetProjectMicrofrontends, GetProjectMicrofrontends$inboundSchema, GetProjectNodeVersion, GetProjectNodeVersion$inboundSchema, GetProjectOptionsAllowlist, GetProjectOptionsAllowlist$inboundSchema, GetProjectPassport, GetProjectPassport$inboundSchema, GetProjectPasswordProtection, GetProjectPasswordProtection$inboundSchema, GetProjectProtectionConfig, GetProjectProtectionConfig$inboundSchema, GetProjectResourceConfig, GetProjectResourceConfig$inboundSchema, GetProjectRollbackDescription, GetProjectRollbackDescription$inboundSchema, GetProjectRollingRelease, GetProjectRollingRelease$inboundSchema, GetProjectSandbox, GetProjectSandbox$inboundSchema, GetProjectServices, GetProjectServices$inboundSchema, GetProjectSpeedInsights, GetProjectSpeedInsights$inboundSchema, } from "./getprojectrollingrelease.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; export type GetProjectInternalRoutes2 = { has: Array<GetProjectInternalRoutesHas>; mitigate: GetProjectInternalRoutesMitigate; src?: string | undefined; }; export type GetProjectInternalRoutes1 = { src: string; status: number; expiry?: number | undefined; }; export type GetProjectInternalRoutes = | GetProjectInternalRoutes1 | GetProjectInternalRoutes2; export const GetProjectAction = { Accept: "accept", Cancel: "cancel", Delete: "delete", } as const; export type GetProjectAction = ClosedEnum<typeof GetProjectAction>; export type ValuePreviousValue = string | number | boolean; export type ValueCurrentValue = string | number | boolean; export type GetProjectValue3 = { previousValue: string | number | boolean; currentValue: string | number | boolean; }; export type GetProjectValue = GetProjectValue3 | string | number | boolean; export type GetProjectDismissedToasts = { key: string; dismissedAt: number; action: GetProjectAction; value: GetProjectValue3 | string | number | boolean | null; }; export const GetProjectProjectsEnv = { Preview: "preview", Production: "production", } as const; export type GetProjectProjectsEnv = ClosedEnum<typeof GetProjectProjectsEnv>; /** * Which tracing destination this rule applies to. `internal` is the hidden Vercel production-tracing drain (internal delivery); `external` is any customer-configured drain. Derived from the owning drain's delivery type when project tracing is computed; absent on configs persisted before this field existed. */ export const GetProjectDestination = { External: "external", Internal: "internal", } as const; /** * Which tracing destination this rule applies to. `internal` is the hidden Vercel production-tracing drain (internal delivery); `external` is any customer-configured drain. Derived from the owning drain's delivery type when project tracing is computed; absent on configs persisted before this field existed. */ export type GetProjectDestination = ClosedEnum<typeof GetProjectDestination>; export type GetProjectSamplingRules = { rate: number; env?: GetProjectProjectsEnv | undefined; requestPath?: string | undefined; /** * Which tracing destination this rule applies to. `internal` is the hidden Vercel production-tracing drain (internal delivery); `external` is any customer-configured drain. Derived from the owning drain's delivery type when project tracing is computed; absent on configs persisted before this field existed. */ destination?: GetProjectDestination | undefined; }; export type GetProjectTracing = { domains?: string | undefined; ignorePaths?: Array<string> | undefined; samplingRules?: Array<GetProjectSamplingRules> | undefined; }; /** * The project information */ export type GetProjectResponseBody = { integrations?: Array<GetProjectIntegrations> | undefined; accountId: string; creator?: GetProjectCreator | undefined; alias: Array<GetProjectAlias>; analytics?: GetProjectAnalytics | undefined; appliedCve55182Migration?: boolean | undefined; speedInsights?: GetProjectSpeedInsights | undefined; autoExposeSystemEnvs?: boolean | undefined; autoAssignCustomDomains?: boolean | undefined; autoAssignCustomDomainsUpdatedBy?: string | undefined; buildCommand?: string | null | undefined; commandForIgnoringBuildStep?: string | null | undefined; connectConfigurations?: | Array<GetProjectConnectConfigurations> | null | undefined; connectConfigurationId?: string | null | undefined; connectBuildsEnabled?: boolean | undefined; passiveConnectConfigurationId?: string | null | undefined; createdAt?: number | undefined; customerSupportCodeVisibility?: boolean | undefined; crons?: GetProjectCrons | undefined; dataCache?: GetProjectDataCache | undefined; /** * Retention policies for deployments. These are enforced at the project level, but we also maintain an instance of this at the team level as a default policy that gets applied to new projects. */ deploymentExpiration: GetProjectDeploymentExpiration; expiration?: GetProjectExpiration | undefined; devCommand?: string | null | undefined; directoryListing: boolean; installCommand?: string | null | undefined; env?: Array<GetProjectEnv> | undefined; customEnvironments?: Array<GetProjectCustomEnvironments> | undefined; framework?: GetProjectFramework | null | undefined; services?: Array<GetProjectServices> | undefined; gitForkProtection?: boolean | undefined; gitLFS?: boolean | undefined; id: string; ipBuckets?: Array<GetProjectIpBuckets> | undefined; jobs?: GetProjectJobs | undefined; latestDeployments?: Array<GetProjectLatestDeployments> | undefined; link?: GetProjectLink | undefined; blobs?: GetProjectBlobs | undefined; microfrontends?: GetProjectMicrofrontends | undefined; name: string; nodeVersion: GetProjectNodeVersion; optionsAllowlist?: GetProjectOptionsAllowlist | null | undefined; outputDirectory?: string | null | undefined; passwordProtection?: GetProjectPasswordProtection | null | undefined; passport?: GetProjectPassport | null | undefined; protectionConfig?: GetProjectProtectionConfig | undefined; sandbox?: GetProjectSandbox | undefined; productionDeploymentsFastLane?: boolean | undefined; resourceConfig: GetProjectResourceConfig; /** * Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback. */ rollbackDescription?: GetProjectRollbackDescription | undefined; /** * Project-level rolling release configuration that defines how deployments should be gradually rolled out */ rollingRelease?: GetProjectRollingRelease | null | undefined; defaultResourceConfig: GetProjectDefaultResourceConfig; rootDirectory?: string | null | undefined; serverlessFunctionZeroConfigFailover?: boolean | undefined; skewProtectionBoundaryAt?: number | undefined; skewProtectionMaxAge?: number | undefined; skewProtectionAllowedDomains?: Array<string> | undefined; skipGitConnectDuringLink?: boolean | undefined; staticIps?: GetProjectStaticIps | undefined; sourceFilesOutsideRootDirectory?: boolean | undefined; enableAffectedProjectsDeployments?: boolean | undefined; enableExternalRewriteCaching?: boolean | undefined; ssoProtection?: GetProjectSsoProtection | null | undefined; targets?: { [k: string]: GetProjectTargets | null } | undefined; transferCompletedAt?: number | undefined; transferStartedAt?: number | undefined; transferToAccountId?: string | undefined; transferredFromAccountId?: string | undefined; updatedAt?: number | undefined; live?: boolean | undefined; enablePreviewFeedback?: boolean | null | undefined; enableProductionFeedback?: boolean | null | undefined; permissions?: GetProjectPermissions | undefined; lastRollbackTarget?: GetProjectLastRollbackTarget | null | undefined; lastAliasRequest?: GetProjectLastAliasRequest | null | undefined; protectionBypass?: { [k: string]: GetProjectProtectionBypass } | undefined; hasActiveBranches?: boolean | undefined; trustedIps?: GetProjectTrustedIps | null | undefined; trustedSources?: GetProjectTrustedSources | null | undefined; gitComments?: GetProjectGitComments | undefined; gitProviderOptions?: GetProjectGitProviderOptions | undefined; paused?: boolean | undefined; concurrencyBucketName?: string | undefined; webAnalytics?: GetProjectWebAnalytics | undefined; security?: GetProjectSecurity | undefined; oidcTokenConfig?: GetProjectOidcTokenConfig | undefined; /** * Project shape. `null` on a rule list clears the project's override for that rule type (fall back to team for every env); omitting is equivalent. Setting `deploymentPolicy` itself to `null` clears every override at once. Kept structurally distinct from {@link TeamDeploymentPolicy} so the two storage locations don't share a type by accident. */ deploymentPolicy?: GetProjectDeploymentPolicy | null | undefined; tier?: GetProjectTier | undefined; usageStatus?: GetProjectUsageStatus | undefined; features?: GetProjectFeatures | undefined; v0?: boolean | undefined; v0Created?: boolean | undefined; abuse?: GetProjectAbuse | undefined; internalRoutes?: | Array<GetProjectInternalRoutes1 | GetProjectInternalRoutes2> | undefined; hasDeployments?: boolean | undefined; dismissedToasts?: Array<GetProjectDismissedToasts> | undefined; protectedSourcemaps?: boolean | undefined; tracing?: GetProjectTracing | undefined; avatar?: string | null | undefined; }; /** @internal */ export const GetProjectInternalRoutes2$inboundSchema: z.ZodType< GetProjectInternalRoutes2, z.ZodTypeDef, unknown > = z.object({ has: z.array(GetProjectInternalRoutesHas$inboundSchema), mitigate: GetProjectInternalRoutesMitigate$inboundSchema, src: types.optional(types.string()), }); export function getProjectInternalRoutes2FromJSON( jsonString: string, ): SafeParseResult<GetProjectInternalRoutes2, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectInternalRoutes2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectInternalRoutes2' from JSON`, ); } /** @internal */ export const GetProjectInternalRoutes1$inboundSchema: z.ZodType< GetProjectInternalRoutes1, z.ZodTypeDef, unknown > = z.object({ src: types.string(), status: types.number(), expiry: types.optional(types.number()), }); export function getProjectInternalRoutes1FromJSON( jsonString: string, ): SafeParseResult<GetProjectInternalRoutes1, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectInternalRoutes1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectInternalRoutes1' from JSON`, ); } /** @internal */ export const GetProjectInternalRoutes$inboundSchema: z.ZodType< GetProjectInternalRoutes, z.ZodTypeDef, unknown > = smartUnion([ z.lazy(() => GetProjectInternalRoutes1$inboundSchema), z.lazy(() => GetProjectInternalRoutes2$inboundSchema), ]); export function getProjectInternalRoutesFromJSON( jsonString: string, ): SafeParseResult<GetProjectInternalRoutes, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectInternalRoutes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectInternalRoutes' from JSON`, ); } /** @internal */ export const GetProjectAction$inboundSchema: z.ZodNativeEnum< typeof GetProjectAction > = z.nativeEnum(GetProjectAction); /** @internal */ export const ValuePreviousValue$inboundSchema: z.ZodType< ValuePreviousValue, z.ZodTypeDef, unknown > = smartUnion([types.string(), types.number(), types.boolean()]); export function valuePreviousValueFromJSON( jsonString: string, ): SafeParseResult<ValuePreviousValue, SDKValidationError> { return safeParse( jsonString, (x) => ValuePreviousValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ValuePreviousValue' from JSON`, ); } /** @internal */ export const ValueCurrentValue$inboundSchema: z.ZodType< ValueCurrentValue, z.ZodTypeDef, unknown > = smartUnion([types.string(), types.number(), types.boolean()]); export function valueCurrentValueFromJSON( jsonString: string, ): SafeParseResult<ValueCurrentValue, SDKValidationError> { return safeParse( jsonString, (x) => ValueCurrentValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ValueCurrentValue' from JSON`, ); } /** @internal */ export const GetProjectValue3$inboundSchema: z.ZodType< GetProjectValue3, z.ZodTypeDef, unknown > = z.object({ previousValue: smartUnion([types.string(), types.number(), types.boolean()]), currentValue: smartUnion([types.string(), types.number(), types.boolean()]), }); export function getProjectValue3FromJSON( jsonString: string, ): SafeParseResult<GetProjectValue3, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectValue3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectValue3' from JSON`, ); } /** @internal */ export const GetProjectValue$inboundSchema: z.ZodType< GetProjectValue, z.ZodTypeDef, unknown > = smartUnion([ z.lazy(() => GetProjectValue3$inboundSchema), types.string(), types.number(), types.boolean(), ]); export function getProjectValueFromJSON( jsonString: string, ): SafeParseResult<GetProjectValue, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectValue' from JSON`, ); } /** @internal */ export const GetProjectDismissedToasts$inboundSchema: z.ZodType< GetProjectDismissedToasts, z.ZodTypeDef, unknown > = z.object({ key: types.string(), dismissedAt: types.number(), action: GetProjectAction$inboundSchema, value: types.nullable( smartUnion([ z.lazy(() => GetProjectValue3$inboundSchema), types.string(), types.number(), types.boolean(), ]), ), }); export function getProjectDismissedToastsFromJSON( jsonString: string, ): SafeParseResult<GetProjectDismissedToasts, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectDismissedToasts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectDismissedToasts' from JSON`, ); } /** @internal */ export const GetProjectProjectsEnv$inboundSchema: z.ZodNativeEnum< typeof GetProjectProjectsEnv > = z.nativeEnum(GetProjectProjectsEnv); /** @internal */ export const GetProjectDestination$inboundSchema: z.ZodNativeEnum< typeof GetProjectDestination > = z.nativeEnum(GetProjectDestination); /** @internal */ export const GetProjectSamplingRules$inboundSchema: z.ZodType< GetProjectSamplingRules, z.ZodTypeDef, unknown > = z.object({ rate: types.number(), env: types.optional(GetProjectProjectsEnv$inboundSchema), requestPath: types.optional(types.string()), destination: types.optional(GetProjectDestination$inboundSchema), }); export function getProjectSamplingRulesFromJSON( jsonString: string, ): SafeParseResult<GetProjectSamplingRules, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectSamplingRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectSamplingRules' from JSON`, ); } /** @internal */ export const GetProjectTracing$inboundSchema: z.ZodType< GetProjectTracing, z.ZodTypeDef, unknown > = z.object({ domains: types.optional(types.string()), ignorePaths: types.optional(z.array(types.string())), samplingRules: types.optional( z.array(z.lazy(() => GetProjectSamplingRules$inboundSchema)), ), }); export function getProjectTracingFromJSON( jsonString: string, ): SafeParseResult<GetProjectTracing, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectTracing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectTracing' from JSON`, ); } /** @internal */ export const GetProjectResponseBody$inboundSchema: z.ZodType< GetProjectResponseBody, z.ZodTypeDef, unknown > = z.object({ integrations: types.optional(z.array(GetProjectIntegrations$inboundSchema)), accountId: types.string(), creator: types.optional(GetProjectCreator$inboundSchema), alias: z.array(GetProjectAlias$inboundSchema), analytics: types.optional(GetProjectAnalytics$inboundSchema), appliedCve55182Migration: types.optional(types.boolean()), speedInsights: types.optional(GetProjectSpeedInsights$inboundSchema), autoExposeSystemEnvs: types.optional(types.boolean()), autoAssignCustomDomains: types.optional(types.boolean()), autoAssignCustomDomainsUpdatedBy: types.optional(types.string()), buildCommand: z.nullable(types.string()).optional(), commandForIgnoringBuildStep: z.nullable(types.string()).optional(), connectConfigurations: z.nullable( z.array(GetProjectConnectConfigurations$inboundSchema), ).optional(), connectConfigurationId: z.nullable(types.string()).optional(), connectBuildsEnabled: types.optional(types.boolean()), passiveConnectConfigurationId: z.nullable(types.string()).optional(), createdAt: types.optional(types.number()), customerSupportCodeVisibility: types.optional(types.boolean()), crons: types.optional(GetProjectCrons$inboundSchema), dataCache: types.optional(GetProjectDataCache$inboundSchema), deploymentExpiration: GetProjectDeploymentExpiration$inboundSchema, expiration: types.optional(GetProjectExpiration$inboundSchema), devCommand: z.nullable(types.string()).optional(), directoryListing: types.boolean(), installCommand: z.nullable(types.string()).optional(), env: types.optional(z.array(GetProjectEnv$inboundSchema)), customEnvironments: types.optional( z.array(GetProjectCustomEnvironments$inboundSchema), ), framework: z.nullable(GetProjectFramework$inboundSchema).optional(), services: types.optional(z.array(GetProjectServices$inboundSchema)), gitForkProtection: types.optional(types.boolean()), gitLFS: types.optional(types.boolean()), id: types.string(), ipBuckets: types.optional(z.array(GetProjectIpBuckets$inboundSchema)), jobs: types.optional(GetProjectJobs$inboundSchema), latestDeployments: types.optional( z.array(GetProjectLatestDeployments$inboundSchema), ), link: types.optional(GetProjectLink$inboundSchema), blobs: types.optional(GetProjectBlobs$inboundSchema), microfrontends: types.optional(GetProjectMicrofrontends$inboundSchema), name: types.string(), nodeVersion: GetProjectNodeVersion$inboundSchema, optionsAllowlist: z.nullable(GetProjectOptionsAllowlist$inboundSchema) .optional(), outputDirectory: z.nullable(types.string()).optional(), passwordProtection: z.nullable(GetProjectPasswordProtection$inboundSchema) .optional(), passport: z.nullable(GetProjectPassport$inboundSchema).optional(), protectionConfig: types.optional(GetProjectProtectionConfig$inboundSchema), sandbox: types.optional(GetProjectSandbox$inboundSchema), productionDeploymentsFastLane: types.optional(types.boolean()), resourceConfig: GetProjectResourceConfig$inboundSchema, rollbackDescription: types.optional( GetProjectRollbackDescription$inboundSchema, ), rollingRelease: z.nullable(GetProjectRollingRelease$inboundSchema).optional(), defaultResourceConfig: GetProjectDefaultResourceConfig$inboundSchema, rootDirectory: z.nullable(types.string()).optional(), serverlessFunctionZeroConfigFailover: types.optional(types.boolean()), skewProtectionBoundaryAt: types.optional(types.number()), skewProtectionMaxAge: types.optional(types.number()), skewProtectionAllowedDomains: types.optional(z.array(types.string())), skipGitConnectDuringLink: types.optional(types.boolean()), staticIps: types.optional(GetProjectStaticIps$inboundSchema), sourceFilesOutsideRootDirectory: types.optional(types.boolean()), enableAffectedProjectsDeployments: types.optional(types.boolean()), enableExternalRewriteCaching: types.optional(types.boolean()), ssoProtection: z.nullable(GetProjectSsoProtection$inboundSchema).optional(), targets: types.optional( z.record(types.nullable(GetProjectTargets$inboundSchema)), ), transferCompletedAt: types.optional(types.number()), transferStartedAt: types.optional(types.number()), transferToAccountId: types.optional(types.string()), transferredFromAccountId: types.optional(types.string()), updatedAt: types.optional(types.number()), live: types.optional(types.boolean()), enablePreviewFeedback: z.nullable(types.boolean()).optional(), enableProductionFeedback: z.nullable(types.boolean()).optional(), permissions: types.optional(GetProjectPermissions$inboundSchema), lastRollbackTarget: z.nullable(GetProjectLastRollbackTarget$inboundSchema) .optional(), lastAliasRequest: z.nullable(GetProjectLastAliasRequest$inboundSchema) .optional(), protectionBypass: types.optional( z.record(GetProjectProtectionBypass$inboundSchema), ), hasActiveBranches: types.optional(types.boolean()), trustedIps: z.nullable(GetProjectTrustedIps$inboundSchema).optional(), trustedSources: z.nullable(GetProjectTrustedSources$inboundSchema).optional(), gitComments: types.optional(GetProjectGitComments$inboundSchema), gitProviderOptions: types.optional( GetProjectGitProviderOptions$inboundSchema, ), paused: types.optional(types.boolean()), concurrencyBucketName: types.optional(types.string()), webAnalytics: types.optional(GetProjectWebAnalytics$inboundSchema), security: types.optional(GetProjectSecurity$inboundSchema), oidcTokenConfig: types.optional(GetProjectOidcTokenConfig$inboundSchema), deploymentPolicy: z.nullable(GetProjectDeploymentPolicy$inboundSchema) .optional(), tier: types.optional(GetProjectTier$inboundSchema), usageStatus: types.optional(GetProjectUsageStatus$inboundSchema), features: types.optional(GetProjectFeatures$inboundSchema), v0: types.optional(types.boolean()), v0Created: types.optional(types.boolean()), abuse: types.optional(GetProjectAbuse$inboundSchema), internalRoutes: types.optional( z.array(smartUnion([ z.lazy(() => GetProjectInternalRoutes1$inboundSchema), z.lazy(() => GetProjectInternalRoutes2$inboundSchema ), ])), ), hasDeployments: types.optional(types.boolean()), dismissedToasts: types.optional( z.array(z.lazy(() => GetProjectDismissedToasts$inboundSchema)), ), protectedSourcemaps: types.optional(types.boolean()), tracing: types.optional(z.lazy(() => GetProjectTracing$inboundSchema)), avatar: z.nullable(types.string()).optional(), }); export function getProjectResponseBodyFromJSON( jsonString: string, ): SafeParseResult<GetProjectResponseBody, SDKValidationError> { return safeParse( jsonString, (x) => GetProjectResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectResponseBody' from JSON`, ); }