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>

109 lines 5.48 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { deploymentsCancelDeployment } from "../funcs/deploymentsCancelDeployment.js"; import { deploymentsCreateDeployment } from "../funcs/deploymentsCreateDeployment.js"; import { deploymentsDeleteDeployment } from "../funcs/deploymentsDeleteDeployment.js"; import { deploymentsGetDeployment } from "../funcs/deploymentsGetDeployment.js"; import { deploymentsGetDeploymentEvents, } from "../funcs/deploymentsGetDeploymentEvents.js"; import { deploymentsGetDeploymentFileContents } from "../funcs/deploymentsGetDeploymentFileContents.js"; import { deploymentsGetDeployments } from "../funcs/deploymentsGetDeployments.js"; import { deploymentsListDeploymentFiles } from "../funcs/deploymentsListDeploymentFiles.js"; import { deploymentsUpdateIntegrationDeploymentAction } from "../funcs/deploymentsUpdateIntegrationDeploymentAction.js"; import { deploymentsUploadFile } from "../funcs/deploymentsUploadFile.js"; import { ClientSDK } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; export { GetDeploymentEventsAcceptEnum } from "../funcs/deploymentsGetDeploymentEvents.js"; export 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. */ async getDeploymentEvents(request, options) { return unwrapAsync(deploymentsGetDeploymentEvents(this, request, options)); } /** * Update deployment integration action * * @remarks * Updates the deployment integration action for the specified integration installation */ async updateIntegrationDeploymentAction(request, options) { return unwrapAsync(deploymentsUpdateIntegrationDeploymentAction(this, request, options)); } /** * 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. */ async getDeployment(request, options) { return unwrapAsync(deploymentsGetDeployment(this, request, options)); } /** * Create a new deployment * * @remarks * Create a new deployment with all the required and intended data. If the deployment is not a git deployment, all files must be provided with the request, either referenced or inlined. Additionally, a deployment id can be specified to redeploy a previous deployment. */ async createDeployment(request, options) { return unwrapAsync(deploymentsCreateDeployment(this, request, options)); } /** * Cancel a deployment * * @remarks * This endpoint allows you to cancel a deployment which is currently building, by supplying its `id` in the URL. */ async cancelDeployment(request, options) { return unwrapAsync(deploymentsCancelDeployment(this, request, options)); } /** * 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. */ async uploadFile(request, options) { return unwrapAsync(deploymentsUploadFile(this, request, options)); } /** * 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. */ async listDeploymentFiles(request, options) { return unwrapAsync(deploymentsListDeploymentFiles(this, request, options)); } /** * 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. */ async getDeploymentFileContents(request, options) { return unwrapAsync(deploymentsGetDeploymentFileContents(this, request, options)); } /** * 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`. */ async getDeployments(request, options) { return unwrapAsync(deploymentsGetDeployments(this, request, options)); } /** * 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. */ async deleteDeployment(request, options) { return unwrapAsync(deploymentsDeleteDeployment(this, request, options)); } } //# sourceMappingURL=deployments.js.map