@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>
266 lines • 16.1 kB
TypeScript
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import { AcceptProjectTransferRequestRequest, AcceptProjectTransferRequestResponseBody } from "../models/acceptprojecttransferrequestop.js";
import { AddProjectDomainRequest, AddProjectDomainResponseBody } from "../models/addprojectdomainop.js";
import { BatchRemoveProjectEnvRequest, BatchRemoveProjectEnvResponseBody } from "../models/batchremoveprojectenvop.js";
import { CreateProjectEnvRequest, CreateProjectEnvResponseBody } from "../models/createprojectenvop.js";
import { CreateProjectRequest } from "../models/createprojectpasswordprotection.js";
import { CreateProjectResponseBody } from "../models/createprojectresponsebody.js";
import { CreateProjectTransferRequestRequest, CreateProjectTransferRequestResponseBody } from "../models/createprojecttransferrequestop.js";
import { CreateTraceSessionRequest, CreateTraceSessionResponseBody } from "../models/createtracesessionop.js";
import { DeleteProjectRequest } from "../models/deleteprojectop.js";
import { EditProjectEnvRequest, EditProjectEnvResponseBody } from "../models/editprojectenvop.js";
import { FilterProjectEnvsRequest, FilterProjectEnvsResponseBody } from "../models/filterprojectenvsop.js";
import { GetProjectDomainRequest, GetProjectDomainResponseBody } from "../models/getprojectdomainop.js";
import { GetProjectDomainsRequest, GetProjectDomainsResponseBody } from "../models/getprojectdomainsop.js";
import { GetProjectEnvRequest, GetProjectEnvResponseBody } from "../models/getprojectenvop.js";
import { GetProjectResponseBody } from "../models/getprojectresponsebody.js";
import { GetProjectRequest } from "../models/getprojectrollingrelease.js";
import { GetProjectsResponseBody } from "../models/getprojectsresponsebody.js";
import { GetProjectsRequest } from "../models/getprojectsresponsebodyprojectsresponse200applicationjson3action.js";
import { GetProjectTokenRequest, GetProjectTokenResponseBody } from "../models/getprojecttokenop.js";
import { GetProjectTraceRequest, GetProjectTraceResponseBody } from "../models/getprojecttraceop.js";
import { ListPromoteAliasesRequest, ListPromoteAliasesResponseBody } from "../models/listpromotealiasesop.js";
import { MoveProjectDomainRequest, MoveProjectDomainResponseBody } from "../models/moveprojectdomainop.js";
import { PauseProjectRequest } from "../models/pauseprojectop.js";
import { RemoveProjectDomainRequest, RemoveProjectDomainResponseBody } from "../models/removeprojectdomainop.js";
import { RemoveProjectEnvRequest, RemoveProjectEnvResponseBody } from "../models/removeprojectenvop.js";
import { RequestPromoteRequest } from "../models/requestpromoteop.js";
import { RequestRollbackRequest } from "../models/requestrollbackop.js";
import { UnpauseProjectRequest } from "../models/unpauseprojectop.js";
import { UpdateMicrofrontendsRequest } from "../models/updatemicrofrontendsprojectsfunctiondefaultmemorytype.js";
import { UpdateMicrofrontendsResponseBody } from "../models/updatemicrofrontendsresponsebody.js";
import { UpdateProjectDomainRequest, UpdateProjectDomainResponseBody } from "../models/updateprojectdomainop.js";
import { UpdateProjectRequest } from "../models/updateprojectprojectsresponse200applicationjsonresponsebodycustomenvironmentstype.js";
import { UpdateProjectProtectionBypassRequest, UpdateProjectProtectionBypassResponseBody } from "../models/updateprojectprotectionbypassop.js";
import { UpdateProjectResponseBody } from "../models/updateprojectresponsebody.js";
import { UpdateProjectsByProjectIdRollbackByDeploymentIdUpdateDescriptionRequest } from "../models/updateprojectsbyprojectidrollbackbydeploymentidupdatedescriptionop.js";
import { UploadProjectAvatarRequest } from "../models/uploadprojectavatarprojectsbuildmachinetype.js";
import { UploadProjectAvatarResponseBody } from "../models/uploadprojectavatarresponsebody.js";
import { VerifyProjectDomainRequest, VerifyProjectDomainResponseBody } from "../models/verifyprojectdomainop.js";
export declare class Projects extends ClientSDK {
/**
* Retrieve a list of projects
*
* @remarks
* Allows to retrieve the list of projects of the authenticated user or team. The list will be paginated and the provided query parameters allow filtering the returned projects.
*/
getProjects(request: GetProjectsRequest, options?: RequestOptions): Promise<GetProjectsResponseBody>;
/**
* Get a project trace by request ID
*
* @remarks
* Returns the OTEL trace for a given Vercel CLI request.
*/
getProjectTrace(request: GetProjectTraceRequest, options?: RequestOptions): Promise<GetProjectTraceResponseBody>;
/**
* Create a new project
*
* @remarks
* Allows to create a new project with the provided configuration. It only requires the project `name` but more configuration can be provided to override the defaults.
*/
createProject(request: CreateProjectRequest, options?: RequestOptions): Promise<CreateProjectResponseBody>;
/**
* Generate a project OIDC token
*
* @remarks
* Generates an OIDC token for the project and returns it.
*/
getProjectToken(request: GetProjectTokenRequest, options?: RequestOptions): Promise<GetProjectTokenResponseBody>;
/**
* Create a trace session token for a deployment
*
* @remarks
* Mints a short-lived HS256 JWT scoped to a deployment hostname. The Vercel CLI presents this JWT to the Vercel proxy on requests it wants traced.
*/
createTraceSession(request: CreateTraceSessionRequest, options?: RequestOptions): Promise<CreateTraceSessionResponseBody>;
/**
* Find a project by id or name
*
* @remarks
* Get the information for a specific project by passing either the project `id` or `name` in the URL.
*/
getProject(request: GetProjectRequest, options?: RequestOptions): Promise<GetProjectResponseBody>;
/**
* Update an existing project
*
* @remarks
* Update the fields of a project using either its `name` or `id`.
*/
updateProject(request: UpdateProjectRequest, options?: RequestOptions): Promise<UpdateProjectResponseBody>;
/**
* Delete a Project
*
* @remarks
* Delete a specific project by passing either the project `id` or `name` in the URL.
*/
deleteProject(request: DeleteProjectRequest, options?: RequestOptions): Promise<void>;
/**
* Upload a project avatar
*
* @remarks
* Upload an image as the avatar of the project identified by `idOrName`. The request body is the raw bytes of a JPG, PNG, or SVG image; the `Content-Type` header must declare which. SVG payloads are sanitized and optimized server-side before storage. The final SHA-1 of the stored bytes becomes the project's `avatar` value. The actual upload pipeline (validation, sanitization, S3 write, conditional `updateProject`, and event emission) lives in the shared `@api/project-avatar-upload` helper so it can be reused by background workers.
*/
uploadProjectAvatar(request: UploadProjectAvatarRequest, options?: RequestOptions): Promise<UploadProjectAvatarResponseBody>;
/**
* Retrieve project domains by project by id or name
*
* @remarks
* Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.
*/
getProjectDomains(request: GetProjectDomainsRequest, options?: RequestOptions): Promise<GetProjectDomainsResponseBody>;
/**
* Get a project domain
*
* @remarks
* Get project domain by project id/name and domain name.
*/
getProjectDomain(request: GetProjectDomainRequest, options?: RequestOptions): Promise<GetProjectDomainResponseBody>;
/**
* Update a project domain
*
* @remarks
* Update a project domain's configuration, including the name, git branch and redirect of the domain.
*/
updateProjectDomain(request: UpdateProjectDomainRequest, options?: RequestOptions): Promise<UpdateProjectDomainResponseBody>;
/**
* Remove a domain from a project
*
* @remarks
* Remove a domain from a project by passing the domain name and by specifying the project by either passing the project `id` or `name` in the URL.
*/
removeProjectDomain(request: RemoveProjectDomainRequest, options?: RequestOptions): Promise<RemoveProjectDomainResponseBody>;
/**
* Add a domain to a project
*
* @remarks
* Add a domain to the project by passing its domain name and by specifying the project by either passing the project `id` or `name` in the URL. If the domain is not yet verified to be used on this project, the request will return `verified = false`, and the domain will need to be verified according to the `verification` challenge via `POST /projects/:idOrName/domains/:domain/verify`. If the domain already exists on the project, the request will fail with a `400` status code.
*/
addProjectDomain(request: AddProjectDomainRequest, options?: RequestOptions): Promise<AddProjectDomainResponseBody>;
/**
* Move a project domain
*
* @remarks
* Move one project's domain to another project. Also allows the move of all redirects pointed to that domain in the same project.
*/
moveProjectDomain(request: MoveProjectDomainRequest, options?: RequestOptions): Promise<MoveProjectDomainResponseBody>;
/**
* Verify project domain
*
* @remarks
* Attempts to verify a project domain with `verified = false` by checking the correctness of the project domain's `verification` challenge.
*/
verifyProjectDomain(request: VerifyProjectDomainRequest, options?: RequestOptions): Promise<VerifyProjectDomainResponseBody>;
/**
* Retrieve the environment variables of a project by id or name
*
* @remarks
* Retrieve the environment variables for a given project by passing either the project `id` or `name` in the URL.
*/
filterProjectEnvs(request: FilterProjectEnvsRequest, options?: RequestOptions): Promise<FilterProjectEnvsResponseBody>;
/**
* Create one or more environment variables
*
* @remarks
* Create one or more environment variables for a project by passing its `key`, `value`, `type` and `target` and by specifying the project by either passing the project `id` or `name` in the URL. If you include `upsert=true` as a query parameter, a new environment variable will not be created if it already exists but, the existing variable's value will be updated.
*/
createProjectEnv(request: CreateProjectEnvRequest, options?: RequestOptions): Promise<CreateProjectEnvResponseBody>;
/**
* Retrieve the decrypted value of an environment variable of a project by id
*
* @remarks
* Retrieve the environment variable for a given project.
*/
getProjectEnv(request: GetProjectEnvRequest, options?: RequestOptions): Promise<GetProjectEnvResponseBody>;
/**
* Remove an environment variable
*
* @remarks
* Delete a specific environment variable for a given project by passing the environment variable identifier and either passing the project `id` or `name` in the URL.
*/
removeProjectEnv(request: RemoveProjectEnvRequest, options?: RequestOptions): Promise<RemoveProjectEnvResponseBody>;
/**
* Edit an environment variable
*
* @remarks
* Edit a specific environment variable for a given project by passing the environment variable identifier and either passing the project `id` or `name` in the URL.
*/
editProjectEnv(request: EditProjectEnvRequest, options?: RequestOptions): Promise<EditProjectEnvResponseBody>;
/**
* Batch remove environment variables
*
* @remarks
* Delete multiple environment variables for a given project in a single batch operation.
*/
batchRemoveProjectEnv(request: BatchRemoveProjectEnvRequest, options?: RequestOptions): Promise<BatchRemoveProjectEnvResponseBody>;
/**
* Create project transfer request
*
* @remarks
* Initiates a project transfer request from one team to another. <br/> Returns a `code` that remains valid for 24 hours and can be used to accept the transfer request by another team using the `PUT /projects/transfer-request/:code` endpoint. <br/> Users can also accept the project transfer request using the claim URL: `https://vercel.com/claim-deployment?code=<code>&returnUrl=<returnUrl>`. <br/> The `code` parameter specifies the project transfer request code generated using this endpoint. <br/> The `returnUrl` parameter redirects users to a specific page of the application if the claim URL is invalid or expired.
*/
createProjectTransferRequest(request: CreateProjectTransferRequestRequest, options?: RequestOptions): Promise<CreateProjectTransferRequestResponseBody>;
/**
* Accept project transfer request
*
* @remarks
* Accept a project transfer request initated by another team. <br/> The `code` is generated using the `POST /projects/:idOrName/transfer-request` endpoint.
*/
acceptProjectTransferRequest(request: AcceptProjectTransferRequestRequest, options?: RequestOptions): Promise<AcceptProjectTransferRequestResponseBody>;
/**
* Update Protection Bypass for Automation
*
* @remarks
* Update the deployment protection automation bypass for a project
*/
updateProjectProtectionBypass(request: UpdateProjectProtectionBypassRequest, options?: RequestOptions): Promise<UpdateProjectProtectionBypassResponseBody>;
/**
* Point production traffic to a previous production deployment by ID
*
* @remarks
* Allows users to rollback to a deployment.
*/
requestRollback(request: RequestRollbackRequest, options?: RequestOptions): Promise<void>;
/**
* Updates the description for a rollback
*
* @remarks
* Updates the reason for a rollback, without changing the rollback status itself.
*/
updateProjectsByProjectIdRollbackByDeploymentIdUpdateDescription(request: UpdateProjectsByProjectIdRollbackByDeploymentIdUpdateDescriptionRequest, options?: RequestOptions): Promise<void>;
/**
* Update the microfrontends settings
*
* @remarks
* Update the microfrontends settings for a project.
*/
updateMicrofrontends(request: UpdateMicrofrontendsRequest, options?: RequestOptions): Promise<UpdateMicrofrontendsResponseBody>;
/**
* Point production traffic to a given deployment
*
* @remarks
* Allows users to promote a deployment to production. Note: This does NOT rebuild the deployment. If you need that, then call create-deployments endpoint.
*/
requestPromote(request: RequestPromoteRequest, options?: RequestOptions): Promise<void>;
/**
* Gets a list of aliases with status for the current promote
*
* @remarks
* Get a list of aliases related to the last promote request with their mapping status
*/
listPromoteAliases(request: ListPromoteAliasesRequest, options?: RequestOptions): Promise<ListPromoteAliasesResponseBody>;
/**
* Pause a project
*
* @remarks
* Pause a project by passing its project `id` in the URL. If the project does not exist given the id then the request will fail with 400 status code. If the project disables auto assigning custom production domains and blocks the active Production Deployment then the request will return with 200 status code.
*/
pauseProject(request: PauseProjectRequest, options?: RequestOptions): Promise<void>;
/**
* Unpause a project
*
* @remarks
* Unpause a project by passing its project `id` in the URL. If the project does not exist given the id then the request will fail with 400 status code. If the project enables auto assigning custom production domains and unblocks the active Production Deployment then the request will return with 200 status code.
*/
unpauseProject(request: UnpauseProjectRequest, options?: RequestOptions): Promise<void>;
}
//# sourceMappingURL=projects.d.ts.map