@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>
92 lines • 6.21 kB
TypeScript
import { GetDeploymentEventsAcceptEnum } from "../funcs/deploymentsGetDeploymentEvents.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import { CancelDeploymentResponseBody } from "../models/canceldeploymentresponsebody.js";
import { CreateDeploymentRequest } from "../models/createdeploymenthasdeploymentstype.js";
import { CreateDeploymentResponseBody } from "../models/createdeploymentresponsebody.js";
import { DeleteDeploymentRequest, DeleteDeploymentResponseBody } from "../models/deletedeploymentop.js";
import { FileTree } from "../models/filetree.js";
import { GetDeploymentEventsRequest, GetDeploymentEventsResponse } from "../models/getdeploymenteventsop.js";
import { GetDeploymentFileContentsRequest } from "../models/getdeploymentfilecontentsop.js";
import { GetDeploymentRequest } from "../models/getdeploymentgitsourcedeploymentsresponse200type.js";
import { GetDeploymentResponseBody } from "../models/getdeploymentresponsebody.js";
import { GetDeploymentsRequest, GetDeploymentsResponseBody } from "../models/getdeploymentsop.js";
import { ListDeploymentFilesRequest } from "../models/listdeploymentfilesop.js";
import { CancelDeploymentRequest } from "../models/locale.js";
import { UpdateIntegrationDeploymentActionRequest } from "../models/updateintegrationdeploymentactionop.js";
import { UploadFileRequest, UploadFileResponseBody } from "../models/uploadfileop.js";
export { GetDeploymentEventsAcceptEnum } from "../funcs/deploymentsGetDeploymentEvents.js";
export declare class Deployments extends ClientSDK {
/**
* Get deployment events
*
* @remarks
* Get the build logs of a deployment by deployment ID and build ID. It can work as an infinite stream of logs or as a JSON endpoint depending on the input parameters.
*/
getDeploymentEvents(request: GetDeploymentEventsRequest, options?: RequestOptions & {
acceptHeaderOverride?: GetDeploymentEventsAcceptEnum;
}): Promise<GetDeploymentEventsResponse>;
/**
* Update deployment integration action
*
* @remarks
* Updates the deployment integration action for the specified integration installation
*/
updateIntegrationDeploymentAction(request: UpdateIntegrationDeploymentActionRequest, options?: RequestOptions): Promise<void>;
/**
* Get a deployment by ID or URL
*
* @remarks
* Retrieves information for a deployment either by supplying its ID (`id` property) or Hostname (`url` property). Additional details will be included when the authenticated user or team is an owner of the deployment.
*/
getDeployment(request: GetDeploymentRequest, options?: RequestOptions): Promise<GetDeploymentResponseBody>;
/**
* Create a new deployment
*
* @remarks
* Creates a new deployment for the authenticated team or user. For non-git deployments, upload files first via the file upload API, then reference them here by SHA — or inline small files directly in the request body. To redeploy an existing deployment, provide its `deploymentId`; all settings are inherited unless explicitly overridden. The deployment begins building immediately and transitions through `QUEUED` → `INITIALIZING` → `BUILDING` before reaching `READY` or `ERROR`.
*/
createDeployment(request: CreateDeploymentRequest, options?: RequestOptions): Promise<CreateDeploymentResponseBody>;
/**
* Cancel a deployment
*
* @remarks
* Cancels a deployment that is currently in progress, stopping the build before it completes. Use this to recover quickly from accidental deploys, wrong-branch pushes, or builds with known errors — without waiting for them to finish. Returns 400 if the deployment is no longer cancelable (already `READY`, `ERROR`, or `CANCELED`). Returns the updated deployment object with `readyState: 'CANCELED'` on success.
*/
cancelDeployment(request: CancelDeploymentRequest, options?: RequestOptions): Promise<CancelDeploymentResponseBody>;
/**
* Upload Deployment Files
*
* @remarks
* Before you create a deployment you need to upload the required files for that deployment. To do it, you need to first upload each file to this endpoint. Once that's completed, you can create a new deployment with the uploaded files. The file content must be placed inside the body of the request. In the case of a successful response you'll receive a status code 200 with an empty body.
*/
uploadFile(request: UploadFileRequest, options?: RequestOptions): Promise<UploadFileResponseBody>;
/**
* List Deployment Files
*
* @remarks
* Allows to retrieve the file structure of the source code of a deployment by supplying the deployment unique identifier. If the deployment was created with the Vercel CLI or the API directly with the `files` key, it will have a file tree that can be retrievable.
*/
listDeploymentFiles(request: ListDeploymentFilesRequest, options?: RequestOptions): Promise<Array<FileTree>>;
/**
* Get Deployment File Contents
*
* @remarks
* Allows to retrieve the content of a file by supplying the file identifier and the deployment unique identifier. The response body will contain a JSON response containing the contents of the file encoded as base64.
*/
getDeploymentFileContents(request: GetDeploymentFileContentsRequest, options?: RequestOptions): Promise<void>;
/**
* List deployments
*
* @remarks
* List deployments under the authenticated user or team. If a deployment hasn't finished uploading (is incomplete), the `url` property will have a value of `null`.
*/
getDeployments(request: GetDeploymentsRequest, options?: RequestOptions): Promise<GetDeploymentsResponseBody>;
/**
* Delete a Deployment
*
* @remarks
* This API allows you to delete a deployment, either by supplying its `id` in the URL or the `url` of the deployment as a query parameter. You can obtain the ID, for example, by listing all deployments.
*/
deleteDeployment(request: DeleteDeploymentRequest, options?: RequestOptions): Promise<DeleteDeploymentResponseBody>;
}
//# sourceMappingURL=deployments.d.ts.map