@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>
78 lines • 3.25 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { bulkRedirectsDeleteRedirects } from "../funcs/bulkRedirectsDeleteRedirects.js";
import { bulkRedirectsEditRedirect } from "../funcs/bulkRedirectsEditRedirect.js";
import { bulkRedirectsGetRedirects } from "../funcs/bulkRedirectsGetRedirects.js";
import { bulkRedirectsGetVersions } from "../funcs/bulkRedirectsGetVersions.js";
import { bulkRedirectsRestoreRedirects } from "../funcs/bulkRedirectsRestoreRedirects.js";
import { bulkRedirectsStageRedirects } from "../funcs/bulkRedirectsStageRedirects.js";
import { bulkRedirectsUpdateVersion } from "../funcs/bulkRedirectsUpdateVersion.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class BulkRedirects extends ClientSDK {
/**
* Stages new redirects for a project.
*
* @remarks
* Stages new redirects for a project and returns the new version.
*/
async stageRedirects(request, options) {
return unwrapAsync(bulkRedirectsStageRedirects(this, request, options));
}
/**
* Gets project-level redirects.
*
* @remarks
* Get the version history for a project's bulk redirects
*/
async getRedirects(request, options) {
return unwrapAsync(bulkRedirectsGetRedirects(this, request, options));
}
/**
* Delete project-level redirects.
*
* @remarks
* Deletes the provided redirects from the latest version of the projects' bulk redirects. Stages a new change with the new redirects and returns the alias for the new version in the response.
*/
async deleteRedirects(request, options) {
return unwrapAsync(bulkRedirectsDeleteRedirects(this, request, options));
}
/**
* Edit a project-level redirect.
*
* @remarks
* Edits a single redirect identified by its source path. Stages a new change with the modified redirect and returns the alias for the new version in the response.
*/
async editRedirect(request, options) {
return unwrapAsync(bulkRedirectsEditRedirect(this, request, options));
}
/**
* Restore staged project-level redirects to their production version.
*
* @remarks
* Restores the provided redirects in the staging version to the value in the production version. If no production version exists, removes the redirects from staging.
*/
async restoreRedirects(request, options) {
return unwrapAsync(bulkRedirectsRestoreRedirects(this, request, options));
}
/**
* Get the version history for a project's redirects.
*
* @remarks
* Get the version history for a project's bulk redirects
*/
async getVersions(request, options) {
return unwrapAsync(bulkRedirectsGetVersions(this, request, options));
}
/**
* Promote a staging version to production or restore a previous production version.
*
* @remarks
* Update a version by promoting staging to production or restoring a previous production version
*/
async updateVersion(request, options) {
return unwrapAsync(bulkRedirectsUpdateVersion(this, request, options));
}
}
//# sourceMappingURL=bulkredirects.js.map