/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { channelEndpointsCreate } from "../funcs/channelEndpointsCreate.js"; import { channelEndpointsDelete } from "../funcs/channelEndpointsDelete.js"; import { channelEndpointsList } from "../funcs/channelEndpointsList.js"; import { channelEndpointsRetrieve } from "../funcs/channelEndpointsRetrieve.js"; import { channelEndpointsUpdate } from "../funcs/channelEndpointsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ChannelEndpoints extends ClientSDK { /** * List all channel endpoints * * @remarks * List all channel endpoints for a resource based on query filters. */ async list( request: operations.ChannelEndpointsControllerListChannelEndpointsRequest, options?: RequestOptions, ): Promise< operations.ChannelEndpointsControllerListChannelEndpointsResponse > { return unwrapAsync(channelEndpointsList( this, request, options, )); } /** * Create a channel endpoint * * @remarks * Create a new channel endpoint for a resource. */ async create( requestBody: operations.ChannelEndpointsControllerCreateChannelEndpointRequestBody, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise< operations.ChannelEndpointsControllerCreateChannelEndpointResponse > { return unwrapAsync(channelEndpointsCreate( this, requestBody, idempotencyKey, options, )); } /** * Retrieve a channel endpoint * * @remarks * Retrieve a specific channel endpoint by its unique identifier. */ async retrieve( identifier: string, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(channelEndpointsRetrieve( this, identifier, idempotencyKey, options, )); } /** * Update a channel endpoint * * @remarks * Update an existing channel endpoint by its unique identifier. */ async update( updateChannelEndpointRequestDto: components.UpdateChannelEndpointRequestDto, identifier: string, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise< operations.ChannelEndpointsControllerUpdateChannelEndpointResponse > { return unwrapAsync(channelEndpointsUpdate( this, updateChannelEndpointRequestDto, identifier, idempotencyKey, options, )); } /** * Delete a channel endpoint * * @remarks * Delete a specific channel endpoint by its unique identifier. */ async delete( identifier: string, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise< | operations.ChannelEndpointsControllerDeleteChannelEndpointResponse | undefined > { return unwrapAsync(channelEndpointsDelete( this, identifier, idempotencyKey, options, )); } }