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>

184 lines 12.7 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import * as types from "../types/primitives.js"; import { smartUnion } from "../types/smartUnion.js"; import { UpdateProjectAbuse$inboundSchema, UpdateProjectDefaultResourceConfig$inboundSchema, UpdateProjectFeatures$inboundSchema, UpdateProjectFlatRateTier$inboundSchema, UpdateProjectGitComments$inboundSchema, UpdateProjectGitProviderOptions$inboundSchema, UpdateProjectInternalRoutes$inboundSchema, UpdateProjectLastAliasRequest$inboundSchema, UpdateProjectLastRollbackTarget$inboundSchema, UpdateProjectPermissions$inboundSchema, UpdateProjectProjectsAction$inboundSchema, UpdateProjectProjectsDeploymentPolicy$inboundSchema, UpdateProjectProjectsOidcTokenConfig$inboundSchema, UpdateProjectProjectsPassport$inboundSchema, UpdateProjectProjectsPasswordProtection$inboundSchema, UpdateProjectProjectsResourceConfig$inboundSchema, UpdateProjectProjectsSsoProtection$inboundSchema, UpdateProjectProjectsStaticIps$inboundSchema, UpdateProjectProjectsTrustedIps$inboundSchema, UpdateProjectProtectionBypass$inboundSchema, UpdateProjectProtectionConfig$inboundSchema, UpdateProjectRollbackDescription$inboundSchema, UpdateProjectRollingRelease$inboundSchema, UpdateProjectSecurity$inboundSchema, UpdateProjectTargets$inboundSchema, UpdateProjectTrustedSources$inboundSchema, UpdateProjectUsageStatus$inboundSchema, UpdateProjectWebAnalytics$inboundSchema, } from "./updateprojectprojectsaction.js"; import { UpdateProjectAnalytics$inboundSchema, UpdateProjectConnectConfigurations$inboundSchema, UpdateProjectCrons$inboundSchema, UpdateProjectCustomEnvironments$inboundSchema, UpdateProjectDataCache$inboundSchema, UpdateProjectDeploymentExpiration$inboundSchema, UpdateProjectExpiration$inboundSchema, UpdateProjectIpBuckets$inboundSchema, UpdateProjectJobs$inboundSchema, UpdateProjectLatestDeployments$inboundSchema, UpdateProjectLink$inboundSchema, UpdateProjectMicrofrontends$inboundSchema, UpdateProjectProjectsEnv$inboundSchema, UpdateProjectProjectsFramework$inboundSchema, UpdateProjectProjectsNodeVersion$inboundSchema, UpdateProjectProjectsOptionsAllowlist$inboundSchema, UpdateProjectServices$inboundSchema, UpdateProjectSpeedInsights$inboundSchema, } from "./updateprojectprojectsoptionsallowlist.js"; export const UpdateProjectProjectsResponseEnv = { Preview: "preview", Production: "production", }; /** @internal */ export const UpdateProjectValuePreviousValue$inboundSchema = smartUnion([types.string(), types.number(), types.boolean()]); export function updateProjectValuePreviousValueFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectValuePreviousValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectValuePreviousValue' from JSON`); } /** @internal */ export const UpdateProjectValueCurrentValue$inboundSchema = smartUnion([types.string(), types.number(), types.boolean()]); export function updateProjectValueCurrentValueFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectValueCurrentValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectValueCurrentValue' from JSON`); } /** @internal */ export const UpdateProjectValue3$inboundSchema = z.object({ previousValue: smartUnion([types.string(), types.number(), types.boolean()]), currentValue: smartUnion([types.string(), types.number(), types.boolean()]), }); export function updateProjectValue3FromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectValue3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectValue3' from JSON`); } /** @internal */ export const UpdateProjectValue$inboundSchema = smartUnion([ z.lazy(() => UpdateProjectValue3$inboundSchema), types.string(), types.number(), types.boolean(), ]); export function updateProjectValueFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectValue' from JSON`); } /** @internal */ export const UpdateProjectProjectsDismissedToasts$inboundSchema = z.object({ key: types.string(), dismissedAt: types.number(), action: UpdateProjectProjectsAction$inboundSchema, value: types.nullable(smartUnion([ z.lazy(() => UpdateProjectValue3$inboundSchema), types.string(), types.number(), types.boolean(), ])), }); export function updateProjectProjectsDismissedToastsFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectProjectsDismissedToasts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsDismissedToasts' from JSON`); } /** @internal */ export const UpdateProjectProjectsResponseEnv$inboundSchema = z.nativeEnum(UpdateProjectProjectsResponseEnv); /** @internal */ export const UpdateProjectSamplingRules$inboundSchema = z.object({ rate: types.number(), env: types.optional(UpdateProjectProjectsResponseEnv$inboundSchema), requestPath: types.optional(types.string()), }); export function updateProjectSamplingRulesFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectSamplingRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectSamplingRules' from JSON`); } /** @internal */ export const UpdateProjectTracing$inboundSchema = z.object({ domains: types.optional(types.string()), ignorePaths: types.optional(z.array(types.string())), samplingRules: types.optional(z.array(z.lazy(() => UpdateProjectSamplingRules$inboundSchema))), }); export function updateProjectTracingFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectTracing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectTracing' from JSON`); } /** @internal */ export const UpdateProjectResponseBody$inboundSchema = z.object({ accountId: types.string(), analytics: types.optional(UpdateProjectAnalytics$inboundSchema), appliedCve55182Migration: types.optional(types.boolean()), speedInsights: types.optional(UpdateProjectSpeedInsights$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(UpdateProjectConnectConfigurations$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(UpdateProjectCrons$inboundSchema), dataCache: types.optional(UpdateProjectDataCache$inboundSchema), deploymentExpiration: UpdateProjectDeploymentExpiration$inboundSchema, expiration: types.optional(UpdateProjectExpiration$inboundSchema), devCommand: z.nullable(types.string()).optional(), directoryListing: types.boolean(), installCommand: z.nullable(types.string()).optional(), env: types.optional(z.array(UpdateProjectProjectsEnv$inboundSchema)), customEnvironments: types.optional(z.array(UpdateProjectCustomEnvironments$inboundSchema)), framework: z.nullable(UpdateProjectProjectsFramework$inboundSchema) .optional(), services: types.optional(z.array(UpdateProjectServices$inboundSchema)), gitForkProtection: types.optional(types.boolean()), gitLFS: types.optional(types.boolean()), id: types.string(), ipBuckets: types.optional(z.array(UpdateProjectIpBuckets$inboundSchema)), jobs: types.optional(UpdateProjectJobs$inboundSchema), latestDeployments: types.optional(z.array(UpdateProjectLatestDeployments$inboundSchema)), link: types.optional(UpdateProjectLink$inboundSchema), microfrontends: types.optional(UpdateProjectMicrofrontends$inboundSchema), name: types.string(), nodeVersion: UpdateProjectProjectsNodeVersion$inboundSchema, optionsAllowlist: z.nullable(UpdateProjectProjectsOptionsAllowlist$inboundSchema).optional(), outputDirectory: z.nullable(types.string()).optional(), passwordProtection: z.nullable(UpdateProjectProjectsPasswordProtection$inboundSchema).optional(), passport: z.nullable(UpdateProjectProjectsPassport$inboundSchema).optional(), protectionConfig: types.optional(UpdateProjectProtectionConfig$inboundSchema), productionDeploymentsFastLane: types.optional(types.boolean()), resourceConfig: UpdateProjectProjectsResourceConfig$inboundSchema, rollbackDescription: types.optional(UpdateProjectRollbackDescription$inboundSchema), rollingRelease: z.nullable(UpdateProjectRollingRelease$inboundSchema) .optional(), defaultResourceConfig: UpdateProjectDefaultResourceConfig$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(UpdateProjectProjectsStaticIps$inboundSchema), sourceFilesOutsideRootDirectory: types.optional(types.boolean()), enableAffectedProjectsDeployments: types.optional(types.boolean()), enableExternalRewriteCaching: types.optional(types.boolean()), ssoProtection: z.nullable(UpdateProjectProjectsSsoProtection$inboundSchema) .optional(), targets: types.optional(z.record(types.nullable(UpdateProjectTargets$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(UpdateProjectPermissions$inboundSchema), lastRollbackTarget: z.nullable(UpdateProjectLastRollbackTarget$inboundSchema) .optional(), lastAliasRequest: z.nullable(UpdateProjectLastAliasRequest$inboundSchema) .optional(), protectionBypass: types.optional(z.record(UpdateProjectProtectionBypass$inboundSchema)), hasActiveBranches: types.optional(types.boolean()), trustedIps: z.nullable(UpdateProjectProjectsTrustedIps$inboundSchema) .optional(), trustedSources: z.nullable(UpdateProjectTrustedSources$inboundSchema) .optional(), gitComments: types.optional(UpdateProjectGitComments$inboundSchema), gitProviderOptions: types.optional(UpdateProjectGitProviderOptions$inboundSchema), paused: types.optional(types.boolean()), concurrencyBucketName: types.optional(types.string()), webAnalytics: types.optional(UpdateProjectWebAnalytics$inboundSchema), security: types.optional(UpdateProjectSecurity$inboundSchema), oidcTokenConfig: types.optional(UpdateProjectProjectsOidcTokenConfig$inboundSchema), deploymentPolicy: z.nullable(UpdateProjectProjectsDeploymentPolicy$inboundSchema).optional(), tier: types.optional(types.string()), flatRateTier: types.optional(UpdateProjectFlatRateTier$inboundSchema), usageStatus: types.optional(UpdateProjectUsageStatus$inboundSchema), features: types.optional(UpdateProjectFeatures$inboundSchema), v0: types.optional(types.boolean()), v0Created: types.optional(types.boolean()), abuse: types.optional(UpdateProjectAbuse$inboundSchema), internalRoutes: types.optional(z.array(UpdateProjectInternalRoutes$inboundSchema)), hasDeployments: types.optional(types.boolean()), dismissedToasts: types.optional(z.array(z.lazy(() => UpdateProjectProjectsDismissedToasts$inboundSchema))), protectedSourcemaps: types.optional(types.boolean()), tracing: types.optional(z.lazy(() => UpdateProjectTracing$inboundSchema)), avatar: z.nullable(types.string()).optional(), }); export function updateProjectResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateProjectResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectResponseBody' from JSON`); } //# sourceMappingURL=updateprojectresponsebody.js.map