@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>
313 lines • 13.8 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export declare const EditProjectEnvTarget: {
readonly Production: "production";
readonly Preview: "preview";
readonly Development: "development";
};
export type EditProjectEnvTarget = ClosedEnum<typeof EditProjectEnvTarget>;
/**
* The type of environment variable
*/
export declare const EditProjectEnvType: {
readonly System: "system";
readonly Encrypted: "encrypted";
readonly Plain: "plain";
readonly Sensitive: "sensitive";
};
/**
* The type of environment variable
*/
export type EditProjectEnvType = ClosedEnum<typeof EditProjectEnvType>;
export type EditProjectEnvRequestBody = {
/**
* The name of the environment variable
*/
key?: string | undefined;
/**
* The target environment of the environment variable
*/
target?: Array<EditProjectEnvTarget> | undefined;
/**
* If defined, the git branch of the environment variable (must have target=preview)
*/
gitBranch?: string | null | undefined;
/**
* The type of environment variable
*/
type?: EditProjectEnvType | undefined;
/**
* The value of the environment variable
*/
value?: string | undefined;
/**
* The custom environments that the environment variable should be synced to
*/
customEnvironmentIds?: Array<string> | undefined;
/**
* A comment to add context on what this env var is for
*/
comment?: string | undefined;
};
export type EditProjectEnvRequest = {
/**
* The unique project identifier or the project name
*/
idOrName: string;
/**
* The unique environment variable identifier
*/
id: string;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
requestBody: EditProjectEnvRequestBody;
};
export declare const EditProjectEnvProjectsType: {
readonly Encrypted: "encrypted";
readonly Plain: "plain";
readonly Secret: "secret";
readonly Sensitive: "sensitive";
readonly System: "system";
};
export type EditProjectEnvProjectsType = ClosedEnum<typeof EditProjectEnvProjectsType>;
export declare const EditProjectEnvTarget2: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
export type EditProjectEnvTarget2 = ClosedEnum<typeof EditProjectEnvTarget2>;
export declare const EditProjectEnvTarget1: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
export type EditProjectEnvTarget1 = ClosedEnum<typeof EditProjectEnvTarget1>;
export type EditProjectEnvProjectsTarget = Array<EditProjectEnvTarget1> | EditProjectEnvTarget2;
export type ContentHint17 = {
type: "flags-connection-string";
projectId: string;
};
export type ContentHint16 = {
type: "integration-store-secret";
storeId: string;
integrationId: string;
integrationProductId: string;
integrationConfigurationId: string;
};
export type ContentHint15 = {
type: "postgres-url-no-ssl";
storeId: string;
};
export type ContentHint14 = {
type: "postgres-database";
storeId: string;
};
export type ContentHint13 = {
type: "postgres-password";
storeId: string;
};
export type ContentHint12 = {
type: "postgres-host";
storeId: string;
};
export type ContentHint11 = {
type: "postgres-user";
storeId: string;
};
export type ContentHint10 = {
type: "postgres-prisma-url";
storeId: string;
};
export type ContentHint9 = {
type: "postgres-url-non-pooling";
storeId: string;
};
export type ContentHint8 = {
type: "postgres-url";
storeId: string;
};
export type ContentHint7 = {
type: "blob-webhook-public-key";
storeId: string;
};
export type ContentHint6 = {
type: "blob-store-id";
storeId: string;
};
export type ContentHint5 = {
type: "blob-read-write-token";
storeId: string;
};
export type ContentHint4 = {
type: "redis-rest-api-read-only-token";
storeId: string;
};
export type ContentHint3 = {
type: "redis-rest-api-token";
storeId: string;
};
export type ContentHint2 = {
type: "redis-rest-api-url";
storeId: string;
};
export type ContentHint1 = {
type: "redis-url";
storeId: string;
};
export type ContentHint = ContentHint1 | ContentHint2 | ContentHint3 | ContentHint4 | ContentHint5 | ContentHint6 | ContentHint7 | ContentHint8 | ContentHint9 | ContentHint10 | ContentHint11 | ContentHint12 | ContentHint13 | ContentHint14 | ContentHint15 | ContentHint16 | ContentHint17;
export declare const EditProjectEnvProjectsResponseType: {
readonly FlagsSecret: "flags-secret";
};
export type EditProjectEnvProjectsResponseType = ClosedEnum<typeof EditProjectEnvProjectsResponseType>;
/**
* Similar to `contentHints`, but should not be exposed to the user.
*/
export type InternalContentHint = {
type: EditProjectEnvProjectsResponseType;
/**
* Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda.
*/
encryptedValue: string;
};
/**
* The environment variable was successfully edited
*/
export type EditProjectEnvResponseBody = {
type: EditProjectEnvProjectsType;
value: string;
edgeConfigId?: string | null | undefined;
edgeConfigTokenId?: string | null | undefined;
createdAt?: number | undefined;
updatedAt?: number | undefined;
id?: string | undefined;
key: string;
target?: Array<EditProjectEnvTarget1> | EditProjectEnvTarget2 | undefined;
gitBranch?: string | undefined;
createdBy?: string | null | undefined;
updatedBy?: string | null | undefined;
/**
* This is used to identify variables that have been migrated from type secret to sensitive.
*/
sunsetSecretId?: string | undefined;
/**
* Legacy now-encryption ciphertext, present after migration swaps value/vsmValue
*/
legacyValue?: string | undefined;
decrypted?: boolean | undefined;
configurationId?: string | null | undefined;
contentHint?: ContentHint1 | ContentHint2 | ContentHint3 | ContentHint4 | ContentHint5 | ContentHint6 | ContentHint7 | ContentHint8 | ContentHint9 | ContentHint10 | ContentHint11 | ContentHint12 | ContentHint13 | ContentHint14 | ContentHint15 | ContentHint16 | ContentHint17 | null | undefined;
/**
* Similar to `contentHints`, but should not be exposed to the user.
*/
internalContentHint?: InternalContentHint | null | undefined;
comment?: string | undefined;
customEnvironmentIds?: Array<string> | undefined;
};
/** @internal */
export declare const EditProjectEnvTarget$outboundSchema: z.ZodNativeEnum<typeof EditProjectEnvTarget>;
/** @internal */
export declare const EditProjectEnvType$outboundSchema: z.ZodNativeEnum<typeof EditProjectEnvType>;
/** @internal */
export type EditProjectEnvRequestBody$Outbound = {
key?: string | undefined;
target?: Array<string> | undefined;
gitBranch?: string | null | undefined;
type?: string | undefined;
value?: string | undefined;
customEnvironmentIds?: Array<string> | undefined;
comment?: string | undefined;
};
/** @internal */
export declare const EditProjectEnvRequestBody$outboundSchema: z.ZodType<EditProjectEnvRequestBody$Outbound, z.ZodTypeDef, EditProjectEnvRequestBody>;
export declare function editProjectEnvRequestBodyToJSON(editProjectEnvRequestBody: EditProjectEnvRequestBody): string;
/** @internal */
export type EditProjectEnvRequest$Outbound = {
idOrName: string;
id: string;
teamId?: string | undefined;
slug?: string | undefined;
RequestBody: EditProjectEnvRequestBody$Outbound;
};
/** @internal */
export declare const EditProjectEnvRequest$outboundSchema: z.ZodType<EditProjectEnvRequest$Outbound, z.ZodTypeDef, EditProjectEnvRequest>;
export declare function editProjectEnvRequestToJSON(editProjectEnvRequest: EditProjectEnvRequest): string;
/** @internal */
export declare const EditProjectEnvProjectsType$inboundSchema: z.ZodNativeEnum<typeof EditProjectEnvProjectsType>;
/** @internal */
export declare const EditProjectEnvTarget2$inboundSchema: z.ZodNativeEnum<typeof EditProjectEnvTarget2>;
/** @internal */
export declare const EditProjectEnvTarget1$inboundSchema: z.ZodNativeEnum<typeof EditProjectEnvTarget1>;
/** @internal */
export declare const EditProjectEnvProjectsTarget$inboundSchema: z.ZodType<EditProjectEnvProjectsTarget, z.ZodTypeDef, unknown>;
export declare function editProjectEnvProjectsTargetFromJSON(jsonString: string): SafeParseResult<EditProjectEnvProjectsTarget, SDKValidationError>;
/** @internal */
export declare const ContentHint17$inboundSchema: z.ZodType<ContentHint17, z.ZodTypeDef, unknown>;
export declare function contentHint17FromJSON(jsonString: string): SafeParseResult<ContentHint17, SDKValidationError>;
/** @internal */
export declare const ContentHint16$inboundSchema: z.ZodType<ContentHint16, z.ZodTypeDef, unknown>;
export declare function contentHint16FromJSON(jsonString: string): SafeParseResult<ContentHint16, SDKValidationError>;
/** @internal */
export declare const ContentHint15$inboundSchema: z.ZodType<ContentHint15, z.ZodTypeDef, unknown>;
export declare function contentHint15FromJSON(jsonString: string): SafeParseResult<ContentHint15, SDKValidationError>;
/** @internal */
export declare const ContentHint14$inboundSchema: z.ZodType<ContentHint14, z.ZodTypeDef, unknown>;
export declare function contentHint14FromJSON(jsonString: string): SafeParseResult<ContentHint14, SDKValidationError>;
/** @internal */
export declare const ContentHint13$inboundSchema: z.ZodType<ContentHint13, z.ZodTypeDef, unknown>;
export declare function contentHint13FromJSON(jsonString: string): SafeParseResult<ContentHint13, SDKValidationError>;
/** @internal */
export declare const ContentHint12$inboundSchema: z.ZodType<ContentHint12, z.ZodTypeDef, unknown>;
export declare function contentHint12FromJSON(jsonString: string): SafeParseResult<ContentHint12, SDKValidationError>;
/** @internal */
export declare const ContentHint11$inboundSchema: z.ZodType<ContentHint11, z.ZodTypeDef, unknown>;
export declare function contentHint11FromJSON(jsonString: string): SafeParseResult<ContentHint11, SDKValidationError>;
/** @internal */
export declare const ContentHint10$inboundSchema: z.ZodType<ContentHint10, z.ZodTypeDef, unknown>;
export declare function contentHint10FromJSON(jsonString: string): SafeParseResult<ContentHint10, SDKValidationError>;
/** @internal */
export declare const ContentHint9$inboundSchema: z.ZodType<ContentHint9, z.ZodTypeDef, unknown>;
export declare function contentHint9FromJSON(jsonString: string): SafeParseResult<ContentHint9, SDKValidationError>;
/** @internal */
export declare const ContentHint8$inboundSchema: z.ZodType<ContentHint8, z.ZodTypeDef, unknown>;
export declare function contentHint8FromJSON(jsonString: string): SafeParseResult<ContentHint8, SDKValidationError>;
/** @internal */
export declare const ContentHint7$inboundSchema: z.ZodType<ContentHint7, z.ZodTypeDef, unknown>;
export declare function contentHint7FromJSON(jsonString: string): SafeParseResult<ContentHint7, SDKValidationError>;
/** @internal */
export declare const ContentHint6$inboundSchema: z.ZodType<ContentHint6, z.ZodTypeDef, unknown>;
export declare function contentHint6FromJSON(jsonString: string): SafeParseResult<ContentHint6, SDKValidationError>;
/** @internal */
export declare const ContentHint5$inboundSchema: z.ZodType<ContentHint5, z.ZodTypeDef, unknown>;
export declare function contentHint5FromJSON(jsonString: string): SafeParseResult<ContentHint5, SDKValidationError>;
/** @internal */
export declare const ContentHint4$inboundSchema: z.ZodType<ContentHint4, z.ZodTypeDef, unknown>;
export declare function contentHint4FromJSON(jsonString: string): SafeParseResult<ContentHint4, SDKValidationError>;
/** @internal */
export declare const ContentHint3$inboundSchema: z.ZodType<ContentHint3, z.ZodTypeDef, unknown>;
export declare function contentHint3FromJSON(jsonString: string): SafeParseResult<ContentHint3, SDKValidationError>;
/** @internal */
export declare const ContentHint2$inboundSchema: z.ZodType<ContentHint2, z.ZodTypeDef, unknown>;
export declare function contentHint2FromJSON(jsonString: string): SafeParseResult<ContentHint2, SDKValidationError>;
/** @internal */
export declare const ContentHint1$inboundSchema: z.ZodType<ContentHint1, z.ZodTypeDef, unknown>;
export declare function contentHint1FromJSON(jsonString: string): SafeParseResult<ContentHint1, SDKValidationError>;
/** @internal */
export declare const ContentHint$inboundSchema: z.ZodType<ContentHint, z.ZodTypeDef, unknown>;
export declare function contentHintFromJSON(jsonString: string): SafeParseResult<ContentHint, SDKValidationError>;
/** @internal */
export declare const EditProjectEnvProjectsResponseType$inboundSchema: z.ZodNativeEnum<typeof EditProjectEnvProjectsResponseType>;
/** @internal */
export declare const InternalContentHint$inboundSchema: z.ZodType<InternalContentHint, z.ZodTypeDef, unknown>;
export declare function internalContentHintFromJSON(jsonString: string): SafeParseResult<InternalContentHint, SDKValidationError>;
/** @internal */
export declare const EditProjectEnvResponseBody$inboundSchema: z.ZodType<EditProjectEnvResponseBody, z.ZodTypeDef, unknown>;
export declare function editProjectEnvResponseBodyFromJSON(jsonString: string): SafeParseResult<EditProjectEnvResponseBody, SDKValidationError>;
//# sourceMappingURL=editprojectenvop.d.ts.map