@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>
135 lines (127 loc) • 3.17 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { drainsCreateDrain } from "../funcs/drainsCreateDrain.js";
import { drainsDeleteDrain } from "../funcs/drainsDeleteDrain.js";
import { drainsGetDrain } from "../funcs/drainsGetDrain.js";
import { drainsGetDrains } from "../funcs/drainsGetDrains.js";
import { drainsTestDrain } from "../funcs/drainsTestDrain.js";
import { drainsUpdateDrain } from "../funcs/drainsUpdateDrain.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import {
CreateDrainRequest,
CreateDrainResponseBody,
} from "../models/createdrainop.js";
import { DeleteDrainRequest } from "../models/deletedrainop.js";
import { GetDrainRequest, GetDrainResponseBody } from "../models/getdrainop.js";
import {
GetDrainsRequest,
GetDrainsResponseBody,
} from "../models/getdrainsop.js";
import {
TestDrainRequest,
TestDrainResponseBody,
} from "../models/testdrainop.js";
import {
UpdateDrainRequest,
UpdateDrainResponseBody,
} from "../models/updatedrainop.js";
import { unwrapAsync } from "../types/fp.js";
export class Drains extends ClientSDK {
/**
* Create a new Drain
*
* @remarks
* Create a new Drain with the provided configuration.
*/
async createDrain(
request: CreateDrainRequest,
options?: RequestOptions,
): Promise<CreateDrainResponseBody> {
return unwrapAsync(drainsCreateDrain(
this,
request,
options,
));
}
/**
* Retrieve a list of all Drains
*
* @remarks
* Allows to retrieve the list of Drains of the authenticated team.
*/
async getDrains(
request: GetDrainsRequest,
options?: RequestOptions,
): Promise<GetDrainsResponseBody> {
return unwrapAsync(drainsGetDrains(
this,
request,
options,
));
}
/**
* Delete a drain
*
* @remarks
* Delete a specific Drain by passing the drain id in the URL.
*/
async deleteDrain(
request: DeleteDrainRequest,
options?: RequestOptions,
): Promise<void> {
return unwrapAsync(drainsDeleteDrain(
this,
request,
options,
));
}
/**
* Find a Drain by id
*
* @remarks
* Get the information for a specific Drain by passing the drain id in the URL.
*/
async getDrain(
request: GetDrainRequest,
options?: RequestOptions,
): Promise<GetDrainResponseBody> {
return unwrapAsync(drainsGetDrain(
this,
request,
options,
));
}
/**
* Update an existing Drain
*
* @remarks
* Update the configuration of an existing drain.
*/
async updateDrain(
request: UpdateDrainRequest,
options?: RequestOptions,
): Promise<UpdateDrainResponseBody> {
return unwrapAsync(drainsUpdateDrain(
this,
request,
options,
));
}
/**
* Validate Drain delivery configuration
*
* @remarks
* Validate the delivery configuration of a Drain using sample events.
*/
async testDrain(
request: TestDrainRequest,
options?: RequestOptions,
): Promise<TestDrainResponseBody> {
return unwrapAsync(drainsTestDrain(
this,
request,
options,
));
}
}