@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>
298 lines • 12.3 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 UpdateSharedEnvVariableTarget: {
readonly Production: "production";
readonly Preview: "preview";
readonly Development: "development";
};
export type UpdateSharedEnvVariableTarget = ClosedEnum<typeof UpdateSharedEnvVariableTarget>;
/**
* Incrementally update project linking without specifying the full list
*/
export type ProjectIdUpdates = {
/**
* Project IDs to add to this environment variable
*/
link?: Array<string> | undefined;
/**
* Project IDs to remove from this environment variable
*/
unlink?: Array<string> | undefined;
};
/**
* The new type of the Shared Environment Variable
*/
export declare const UpdateSharedEnvVariableType: {
readonly Encrypted: "encrypted";
readonly Sensitive: "sensitive";
};
/**
* The new type of the Shared Environment Variable
*/
export type UpdateSharedEnvVariableType = ClosedEnum<typeof UpdateSharedEnvVariableType>;
export type Updates = {
/**
* The name of the Shared Environment Variable
*/
key?: string | undefined;
/**
* The value of the Shared Environment Variable
*/
value?: string | undefined;
/**
* The target environment of the Shared Environment Variable
*/
target?: Array<UpdateSharedEnvVariableTarget> | undefined;
/**
* Associate a Shared Environment Variable to projects.
*/
projectId?: Array<string> | undefined;
/**
* Incrementally update project linking without specifying the full list
*/
projectIdUpdates?: ProjectIdUpdates | undefined;
/**
* The new type of the Shared Environment Variable
*/
type?: UpdateSharedEnvVariableType | undefined;
/**
* A comment to add context on what this Shared Environment Variable is for
*/
comment?: string | undefined;
};
export type UpdateSharedEnvVariableRequestBody = {
/**
* An object where each key is an environment variable ID (not the key name) and the value is the update to apply
*/
updates: {
[k: string]: Updates;
};
};
export type UpdateSharedEnvVariableRequest = {
/**
* 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?: UpdateSharedEnvVariableRequestBody | undefined;
};
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export declare const UpdateSharedEnvVariableEnvironmentType: {
readonly Encrypted: "encrypted";
readonly Plain: "plain";
readonly Sensitive: "sensitive";
readonly System: "system";
};
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
export type UpdateSharedEnvVariableEnvironmentType = ClosedEnum<typeof UpdateSharedEnvVariableEnvironmentType>;
/**
* environments this env variable targets
*/
export declare const UpdateSharedEnvVariableEnvironmentTarget: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
/**
* environments this env variable targets
*/
export type UpdateSharedEnvVariableEnvironmentTarget = ClosedEnum<typeof UpdateSharedEnvVariableEnvironmentTarget>;
export type Updated = {
/**
* The date when the Shared Env Var was created.
*/
created?: Date | undefined;
/**
* The name of the Shared Env Var.
*/
key?: string | undefined;
/**
* The unique identifier of the owner (team) the Shared Env Var was created for.
*/
ownerId?: string | null | undefined;
/**
* The unique identifier of the Shared Env Var.
*/
id?: string | undefined;
/**
* The unique identifier of the user who created the Shared Env Var.
*/
createdBy?: string | null | undefined;
/**
* The unique identifier of the user who deleted the Shared Env Var.
*/
deletedBy?: string | null | undefined;
/**
* The unique identifier of the user who last updated the Shared Env Var.
*/
updatedBy?: string | null | undefined;
/**
* Timestamp for when the Shared Env Var was created.
*/
createdAt?: number | undefined;
/**
* Timestamp for when the Shared Env Var was (soft) deleted.
*/
deletedAt?: number | undefined;
/**
* Timestamp for when the Shared Env Var was last updated.
*/
updatedAt?: number | undefined;
/**
* The value of the Shared Env Var.
*/
value?: string | undefined;
/**
* The unique identifiers of the projects which the Shared Env Var is linked to.
*/
projectId?: Array<string> | undefined;
/**
* The type of this cosmos doc instance, if blank, assume secret.
*/
type?: UpdateSharedEnvVariableEnvironmentType | undefined;
/**
* environments this env variable targets
*/
target?: Array<UpdateSharedEnvVariableEnvironmentTarget> | undefined;
/**
* whether or not this env varible applies to custom environments
*/
applyToAllCustomEnvironments?: boolean | undefined;
/**
* The custom environment IDs that this Shared Env Var is scoped to.
*/
customEnvironmentIds?: Array<string> | undefined;
/**
* whether or not this env variable is decrypted
*/
decrypted?: boolean | undefined;
/**
* A user provided comment that describes what this Shared Env Var is for.
*/
comment?: string | undefined;
/**
* The last editor full name or username.
*/
lastEditedByDisplayName?: string | undefined;
};
export declare const UpdateSharedEnvVariableValue2: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
export type UpdateSharedEnvVariableValue2 = ClosedEnum<typeof UpdateSharedEnvVariableValue2>;
export type UpdateSharedEnvVariableValue = string | Array<UpdateSharedEnvVariableValue2>;
export declare const UpdateSharedEnvVariableTarget2: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
export type UpdateSharedEnvVariableTarget2 = ClosedEnum<typeof UpdateSharedEnvVariableTarget2>;
export declare const UpdateSharedEnvVariableTarget1: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
export type UpdateSharedEnvVariableTarget1 = ClosedEnum<typeof UpdateSharedEnvVariableTarget1>;
export type UpdateSharedEnvVariableEnvironmentResponseTarget = Array<UpdateSharedEnvVariableTarget1> | UpdateSharedEnvVariableTarget2;
export type UpdateSharedEnvVariableError = {
code: string;
message: string;
key?: string | undefined;
envVarId?: string | undefined;
envVarKey?: string | undefined;
action?: string | undefined;
link?: string | undefined;
value?: string | Array<UpdateSharedEnvVariableValue2> | undefined;
gitBranch?: string | undefined;
target?: Array<UpdateSharedEnvVariableTarget1> | UpdateSharedEnvVariableTarget2 | undefined;
project?: string | undefined;
};
export type UpdateSharedEnvVariableFailed = {
error: UpdateSharedEnvVariableError;
};
export type UpdateSharedEnvVariableResponseBody = {
updated: Array<Updated>;
failed: Array<UpdateSharedEnvVariableFailed>;
};
/** @internal */
export declare const UpdateSharedEnvVariableTarget$outboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableTarget>;
/** @internal */
export type ProjectIdUpdates$Outbound = {
link?: Array<string> | undefined;
unlink?: Array<string> | undefined;
};
/** @internal */
export declare const ProjectIdUpdates$outboundSchema: z.ZodType<ProjectIdUpdates$Outbound, z.ZodTypeDef, ProjectIdUpdates>;
export declare function projectIdUpdatesToJSON(projectIdUpdates: ProjectIdUpdates): string;
/** @internal */
export declare const UpdateSharedEnvVariableType$outboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableType>;
/** @internal */
export type Updates$Outbound = {
key?: string | undefined;
value?: string | undefined;
target?: Array<string> | undefined;
projectId?: Array<string> | undefined;
projectIdUpdates?: ProjectIdUpdates$Outbound | undefined;
type?: string | undefined;
comment?: string | undefined;
};
/** @internal */
export declare const Updates$outboundSchema: z.ZodType<Updates$Outbound, z.ZodTypeDef, Updates>;
export declare function updatesToJSON(updates: Updates): string;
/** @internal */
export type UpdateSharedEnvVariableRequestBody$Outbound = {
updates: {
[k: string]: Updates$Outbound;
};
};
/** @internal */
export declare const UpdateSharedEnvVariableRequestBody$outboundSchema: z.ZodType<UpdateSharedEnvVariableRequestBody$Outbound, z.ZodTypeDef, UpdateSharedEnvVariableRequestBody>;
export declare function updateSharedEnvVariableRequestBodyToJSON(updateSharedEnvVariableRequestBody: UpdateSharedEnvVariableRequestBody): string;
/** @internal */
export type UpdateSharedEnvVariableRequest$Outbound = {
teamId?: string | undefined;
slug?: string | undefined;
RequestBody?: UpdateSharedEnvVariableRequestBody$Outbound | undefined;
};
/** @internal */
export declare const UpdateSharedEnvVariableRequest$outboundSchema: z.ZodType<UpdateSharedEnvVariableRequest$Outbound, z.ZodTypeDef, UpdateSharedEnvVariableRequest>;
export declare function updateSharedEnvVariableRequestToJSON(updateSharedEnvVariableRequest: UpdateSharedEnvVariableRequest): string;
/** @internal */
export declare const UpdateSharedEnvVariableEnvironmentType$inboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableEnvironmentType>;
/** @internal */
export declare const UpdateSharedEnvVariableEnvironmentTarget$inboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableEnvironmentTarget>;
/** @internal */
export declare const Updated$inboundSchema: z.ZodType<Updated, z.ZodTypeDef, unknown>;
export declare function updatedFromJSON(jsonString: string): SafeParseResult<Updated, SDKValidationError>;
/** @internal */
export declare const UpdateSharedEnvVariableValue2$inboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableValue2>;
/** @internal */
export declare const UpdateSharedEnvVariableValue$inboundSchema: z.ZodType<UpdateSharedEnvVariableValue, z.ZodTypeDef, unknown>;
export declare function updateSharedEnvVariableValueFromJSON(jsonString: string): SafeParseResult<UpdateSharedEnvVariableValue, SDKValidationError>;
/** @internal */
export declare const UpdateSharedEnvVariableTarget2$inboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableTarget2>;
/** @internal */
export declare const UpdateSharedEnvVariableTarget1$inboundSchema: z.ZodNativeEnum<typeof UpdateSharedEnvVariableTarget1>;
/** @internal */
export declare const UpdateSharedEnvVariableEnvironmentResponseTarget$inboundSchema: z.ZodType<UpdateSharedEnvVariableEnvironmentResponseTarget, z.ZodTypeDef, unknown>;
export declare function updateSharedEnvVariableEnvironmentResponseTargetFromJSON(jsonString: string): SafeParseResult<UpdateSharedEnvVariableEnvironmentResponseTarget, SDKValidationError>;
/** @internal */
export declare const UpdateSharedEnvVariableError$inboundSchema: z.ZodType<UpdateSharedEnvVariableError, z.ZodTypeDef, unknown>;
export declare function updateSharedEnvVariableErrorFromJSON(jsonString: string): SafeParseResult<UpdateSharedEnvVariableError, SDKValidationError>;
/** @internal */
export declare const UpdateSharedEnvVariableFailed$inboundSchema: z.ZodType<UpdateSharedEnvVariableFailed, z.ZodTypeDef, unknown>;
export declare function updateSharedEnvVariableFailedFromJSON(jsonString: string): SafeParseResult<UpdateSharedEnvVariableFailed, SDKValidationError>;
/** @internal */
export declare const UpdateSharedEnvVariableResponseBody$inboundSchema: z.ZodType<UpdateSharedEnvVariableResponseBody, z.ZodTypeDef, unknown>;
export declare function updateSharedEnvVariableResponseBodyFromJSON(jsonString: string): SafeParseResult<UpdateSharedEnvVariableResponseBody, SDKValidationError>;
//# sourceMappingURL=updatesharedenvvariableop.d.ts.map