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>

87 lines (81 loc) 2.34 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { aiGatewayCreateAiGatewayRule } from "../funcs/aiGatewayCreateAiGatewayRule.js"; import { aiGatewayDeleteAiGatewayRule } from "../funcs/aiGatewayDeleteAiGatewayRule.js"; import { aiGatewayListAiGatewayRules } from "../funcs/aiGatewayListAiGatewayRules.js"; import { aiGatewayUpdateAiGatewayRule } from "../funcs/aiGatewayUpdateAiGatewayRule.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { AiGatewayRule } from "../models/aigatewayrule.js"; import { AiGatewayRuleList } from "../models/aigatewayrulelist.js"; import { CreateAiGatewayRuleRequest } from "../models/createaigatewayruleop.js"; import { DeleteAiGatewayRuleRequest } from "../models/deleteaigatewayruleop.js"; import { ListAiGatewayRulesRequest } from "../models/listaigatewayrulesop.js"; import { UpdateAiGatewayRuleRequest } from "../models/updateaigatewayruleop.js"; import { unwrapAsync } from "../types/fp.js"; export class AiGateway extends ClientSDK { /** * Create rule * * @remarks * Create a routing rule */ async createAiGatewayRule( request: CreateAiGatewayRuleRequest, options?: RequestOptions, ): Promise<AiGatewayRule> { return unwrapAsync(aiGatewayCreateAiGatewayRule( this, request, options, )); } /** * List rules * * @remarks * List the authenticated team's routing rules */ async listAiGatewayRules( request: ListAiGatewayRulesRequest, options?: RequestOptions, ): Promise<AiGatewayRuleList> { return unwrapAsync(aiGatewayListAiGatewayRules( this, request, options, )); } /** * Update rule * * @remarks * Update a routing rule (enabled, action, or description) */ async updateAiGatewayRule( request: UpdateAiGatewayRuleRequest, options?: RequestOptions, ): Promise<AiGatewayRule> { return unwrapAsync(aiGatewayUpdateAiGatewayRule( this, request, options, )); } /** * Delete rule * * @remarks * Delete a routing rule (soft delete) */ async deleteAiGatewayRule( request: DeleteAiGatewayRuleRequest, options?: RequestOptions, ): Promise<any> { return unwrapAsync(aiGatewayDeleteAiGatewayRule( this, request, options, )); } }