/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountsCreate } from "../funcs/accountsCreate.js"; import { accountsDelete } from "../funcs/accountsDelete.js"; import { accountsFetchById } from "../funcs/accountsFetchById.js"; import { accountsGet } from "../funcs/accountsGet.js"; import { accountsGetUsage } from "../funcs/accountsGetUsage.js"; import { accountsList } from "../funcs/accountsList.js"; import { accountsModifyDetails } from "../funcs/accountsModifyDetails.js"; import { accountsRegister } from "../funcs/accountsRegister.js"; import { accountsRemoveById } from "../funcs/accountsRemoveById.js"; import { accountsUpdate } from "../funcs/accountsUpdate.js"; import { accountsUpdateSettings } from "../funcs/accountsUpdateSettings.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Accounts extends ClientSDK { /** * Create a new account * * @remarks * Creates a new user account in the workspace service */ async register( request: operations.PostApiLeadScraperMicroserviceApiV1AccountsRequestBody, options?: RequestOptions, ): Promise< operations.PostApiLeadScraperMicroserviceApiV1AccountsResponseBody > { return unwrapAsync(accountsRegister( this, request, options, )); } /** * List all accounts * * @remarks * Retrieves a list of accounts */ async list( request: operations.GetApiLeadScraperMicroserviceApiV1AccountsListRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1AccountsListResponseBody > { return unwrapAsync(accountsList( this, request, options, )); } /** * Update account settings * * @remarks * Updates the settings for a given account */ async updateSettings( request: operations.PutApiLeadScraperMicroserviceApiV1AccountsSettingsRequestBody, options?: RequestOptions, ): Promise< operations.PutApiLeadScraperMicroserviceApiV1AccountsSettingsResponseBody > { return unwrapAsync(accountsUpdateSettings( this, request, options, )); } /** * Update account details * * @remarks * Updates specified fields of an existing account */ async modifyDetails( request: operations.PutApiLeadScraperMicroserviceApiV1AccountsUpdateRequestBody, options?: RequestOptions, ): Promise< operations.PutApiLeadScraperMicroserviceApiV1AccountsUpdateResponseBody > { return unwrapAsync(accountsModifyDetails( this, request, options, )); } /** * Get account details * * @remarks * Retrieves details of a specific account */ async fetchById( request: operations.GetApiLeadScraperMicroserviceApiV1AccountsIdRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1AccountsIdResponseBody > { return unwrapAsync(accountsFetchById( this, request, options, )); } /** * Delete account * * @remarks * Permanently deletes an account and associated resources */ async removeById( request: operations.DeleteApiLeadScraperMicroserviceApiV1AccountsIdRequest, options?: RequestOptions, ): Promise< operations.DeleteApiLeadScraperMicroserviceApiV1AccountsIdResponseBody > { return unwrapAsync(accountsRemoveById( this, request, options, )); } /** * Get account usage * * @remarks * Retrieves usage details for a given account */ async getUsage( request: operations.GetApiLeadScraperMicroserviceApiV1AccountsIdUsageRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1AccountsIdUsageResponseBody > { return unwrapAsync(accountsGetUsage( this, request, options, )); } /** * Create a new account * * @remarks * Creates a new user account with initial workspace */ async create( request: operations.PostApiWorkspaceServiceV1AccountsRequestBody, options?: RequestOptions, ): Promise { return unwrapAsync(accountsCreate( this, request, options, )); } /** * Update account details */ async update( request: operations.PutApiWorkspaceServiceV1AccountsRequestBody, options?: RequestOptions, ): Promise { return unwrapAsync(accountsUpdate( this, request, options, )); } /** * Get account details */ async get( request: operations.GetApiWorkspaceServiceV1AccountsIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountsGet( this, request, options, )); } /** * Delete account */ async delete( request: operations.DeleteApiWorkspaceServiceV1AccountsIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountsDelete( this, request, options, )); } }