/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { customersDelete } from "../funcs/customersDelete.js"; import { customersGet } from "../funcs/customersGet.js"; import { customersList } from "../funcs/customersList.js"; import { customersUpdate } from "../funcs/customersUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Customers extends ClientSDK { /** * Retrieve a list of customers * * @remarks * Retrieve a list of customers for the authenticated workspace. */ async list( request?: operations.GetCustomersRequest | undefined, options?: RequestOptions, ): Promise< PageIterator > { return unwrapResultIterator(customersList( this, request, options, )); } /** * Retrieve a customer * * @remarks * Retrieve a customer by ID for the authenticated workspace. */ async get( request: operations.GetCustomerRequest, options?: RequestOptions, ): Promise { return unwrapAsync(customersGet( this, request, options, )); } /** * Delete a customer * * @remarks * Delete a customer from a workspace. */ async delete( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(customersDelete( this, id, options, )); } /** * Update a customer * * @remarks * Update a customer for the authenticated workspace. */ async update( request: operations.UpdateCustomerRequest, options?: RequestOptions, ): Promise { return unwrapAsync(customersUpdate( this, request, options, )); } }