@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>
118 lines • 4.87 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { connectCreateConnector } from "../funcs/connectCreateConnector.js";
import { connectDeleteConnector } from "../funcs/connectDeleteConnector.js";
import { connectDeleteConnectorProjectConnection } from "../funcs/connectDeleteConnectorProjectConnection.js";
import { connectGetConnector } from "../funcs/connectGetConnector.js";
import { connectGetConnectorProjectConnection } from "../funcs/connectGetConnectorProjectConnection.js";
import { connectListConnectorProjectConnections } from "../funcs/connectListConnectorProjectConnections.js";
import { connectListConnectors } from "../funcs/connectListConnectors.js";
import { connectListProjectConnectorConnections } from "../funcs/connectListProjectConnectorConnections.js";
import { connectReplaceConnectorTriggerDestinations } from "../funcs/connectReplaceConnectorTriggerDestinations.js";
import { connectUpdateConnector } from "../funcs/connectUpdateConnector.js";
import { connectUpsertConnectorProjectConnection } from "../funcs/connectUpsertConnectorProjectConnection.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Connect extends ClientSDK {
/**
* List connectors
*
* @remarks
* List connectors that belong to a team.
*/
async listConnectors(request, options) {
return unwrapAsync(connectListConnectors(this, request, options));
}
/**
* Get a connector
*
* @remarks
* Get the connector by ID. Accepts a dashboard/team requester or a deployment's project OIDC token; project requesters may only read connectors linked to their project and environment.
*/
async getConnector(request, options) {
return unwrapAsync(connectGetConnector(this, request, options));
}
/**
* Delete a connector
*
* @remarks
* Delete a connector, its project connections, and its installation records.
*/
async deleteConnector(request, options) {
return unwrapAsync(connectDeleteConnector(this, request, options));
}
/**
* Create a connector
*
* @remarks
* Create a connector and optionally link it to a project. Use `type` with complete provider data, or use `service` with `connectionMethod` so Connect can supply the type, endpoints, templates, and defaults.
*/
async createConnector(request, options) {
return unwrapAsync(connectCreateConnector(this, request, options));
}
/**
* Update a connector
*
* @remarks
* Update a connector and return the connector with any service-side update signals that the caller must handle.
*/
async updateConnector(request, options) {
return unwrapAsync(connectUpdateConnector(this, request, options));
}
/**
* Update connector trigger destinations
*
* @remarks
* Replace the full set of destinations that receive trigger requests for a connector.
*/
async replaceConnectorTriggerDestinations(request, options) {
return unwrapAsync(connectReplaceConnectorTriggerDestinations(this, request, options));
}
/**
* List projects for a connector
*
* @remarks
* List the projects connected to a connector and the environments where each connection is available.
*/
async listConnectorProjectConnections(request, options) {
return unwrapAsync(connectListConnectorProjectConnections(this, request, options));
}
/**
* Get a connector project connection
*
* @remarks
* Get the configuration that connects a connector to a project.
*/
async getConnectorProjectConnection(request, options) {
return unwrapAsync(connectGetConnectorProjectConnection(this, request, options));
}
/**
* Create or update a connector project connection
*
* @remarks
* Connect a connector to a project, or replace the environments on an existing project connection.
*/
async upsertConnectorProjectConnection(request, options) {
return unwrapAsync(connectUpsertConnectorProjectConnection(this, request, options));
}
/**
* Disconnect a connector from a project
*
* @remarks
* Disconnect a connector from a project.
*/
async deleteConnectorProjectConnection(request, options) {
return unwrapAsync(connectDeleteConnectorProjectConnection(this, request, options));
}
/**
* List connectors for a project
*
* @remarks
* List the connectors connected to a project and the environments where each connection is available.
*/
async listProjectConnectorConnections(request, options) {
return unwrapAsync(connectListProjectConnectorConnections(this, request, options));
}
}
//# sourceMappingURL=connect.js.map