Vercel MCP
by zueai
- vercel-sdk-docs
- integrations
# Integrations
(*integrations*)
## Overview
### Available Operations
* [getConfigurations](#getconfigurations) - Get configurations for the authenticated user or team
* [getConfiguration](#getconfiguration) - Retrieve an integration configuration
* [deleteConfiguration](#deleteconfiguration) - Delete an integration configuration
* [gitNamespaces](#gitnamespaces) - List git namespaces by provider
* [searchRepo](#searchrepo) - List git repositories linked to namespace by provider
## getConfigurations
Allows to retrieve all configurations for an authenticated integration. When the `project` view is used, configurations generated for the authorization flow will be filtered out of the results.
### Example Usage
```typescript
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.integrations.getConfigurations({
view: "account",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { VercelCore } from "@vercel/sdk/core.js";
import { integrationsGetConfigurations } from "@vercel/sdk/funcs/integrationsGetConfigurations.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await integrationsGetConfigurations(vercel, {
view: "account",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [models.GetConfigurationsRequest](../../models/getconfigurationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.GetConfigurationsResponseBody](../../models/getconfigurationsresponsebody.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| models.VercelBadRequestError | 400 | application/json |
| models.VercelForbiddenError | 401 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |
## getConfiguration
Allows to retrieve a the configuration with the provided id in case it exists. The authenticated user or team must be the owner of the config in order to access it.
### Example Usage
```typescript
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.integrations.getConfiguration({
id: "icfg_cuwj0AdCdH3BwWT4LPijCC7t",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { VercelCore } from "@vercel/sdk/core.js";
import { integrationsGetConfiguration } from "@vercel/sdk/funcs/integrationsGetConfiguration.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await integrationsGetConfiguration(vercel, {
id: "icfg_cuwj0AdCdH3BwWT4LPijCC7t",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [models.GetConfigurationRequest](../../models/getconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.GetConfigurationResponseBody](../../models/getconfigurationresponsebody.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| models.VercelBadRequestError | 400 | application/json |
| models.VercelForbiddenError | 401 | application/json |
| models.VercelNotFoundError | 404 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |
## deleteConfiguration
Allows to remove the configuration with the `id` provided in the parameters. The configuration and all of its resources will be removed. This includes Webhooks, LogDrains and Project Env variables.
### Example Usage
```typescript
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
await vercel.integrations.deleteConfiguration({
id: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { VercelCore } from "@vercel/sdk/core.js";
import { integrationsDeleteConfiguration } from "@vercel/sdk/funcs/integrationsDeleteConfiguration.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await integrationsDeleteConfiguration(vercel, {
id: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [models.DeleteConfigurationRequest](../../models/deleteconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<void\>**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| models.VercelBadRequestError | 400 | application/json |
| models.VercelForbiddenError | 401 | application/json |
| models.VercelNotFoundError | 404 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |
## gitNamespaces
Lists git namespaces for a supported provider. Supported providers are `github`, `gitlab` and `bitbucket`. If the provider is not provided, it will try to obtain it from the user that authenticated the request.
### Example Usage
```typescript
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.integrations.gitNamespaces({
host: "ghes-test.now.systems",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { VercelCore } from "@vercel/sdk/core.js";
import { integrationsGitNamespaces } from "@vercel/sdk/funcs/integrationsGitNamespaces.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await integrationsGitNamespaces(vercel, {
host: "ghes-test.now.systems",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [models.GitNamespacesRequest](../../models/gitnamespacesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.GitNamespacesResponseBody[]](../../models/.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| models.VercelBadRequestError | 400 | application/json |
| models.VercelForbiddenError | 401 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |
## searchRepo
Lists git repositories linked to a namespace `id` for a supported provider. A specific namespace `id` can be obtained via the `git-namespaces` endpoint. Supported providers are `github`, `gitlab` and `bitbucket`. If the provider or namespace is not provided, it will try to obtain it from the user that authenticated the request.
### Example Usage
```typescript
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.integrations.searchRepo({
host: "ghes-test.now.systems",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
```
### Standalone function
The standalone function version of this method:
```typescript
import { VercelCore } from "@vercel/sdk/core.js";
import { integrationsSearchRepo } from "@vercel/sdk/funcs/integrationsSearchRepo.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await integrationsSearchRepo(vercel, {
host: "ghes-test.now.systems",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request` | [models.SearchRepoRequest](../../models/searchreporequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
### Response
**Promise\<[models.SearchRepoResponseBody](../../models/searchreporesponsebody.md)\>**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------- | ---------------------------- | ---------------------------- |
| models.VercelBadRequestError | 400 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |