/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { organizationsCreate } from "../funcs/organizationsCreate.js"; import { organizationsDelete } from "../funcs/organizationsDelete.js"; import { organizationsGet } from "../funcs/organizationsGet.js"; import { organizationsList } from "../funcs/organizationsList.js"; import { organizationsUpdate } from "../funcs/organizationsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Organizations extends ClientSDK { /** * List all organizations * * @remarks * Retrieves a list of all organizations in a tenant */ async list( request: operations.GetApiLeadScraperMicroserviceApiV1OrganizationRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1OrganizationResponseBody > { return unwrapAsync(organizationsList( this, request, options, )); } /** * Create a new organization * * @remarks * Creates a new organization within a tenant */ async create( request: operations.PostApiLeadScraperMicroserviceApiV1OrganizationRequestBody, options?: RequestOptions, ): Promise< operations.PostApiLeadScraperMicroserviceApiV1OrganizationResponseBody > { return unwrapAsync(organizationsCreate( this, request, options, )); } /** * Update organization details * * @remarks * Updates the configuration of a specific organization */ async update( request: operations.PutApiLeadScraperMicroserviceApiV1OrganizationRequestBody, options?: RequestOptions, ): Promise< operations.PutApiLeadScraperMicroserviceApiV1OrganizationResponseBody > { return unwrapAsync(organizationsUpdate( this, request, options, )); } /** * Get organization details * * @remarks * Retrieves details of a specific organization */ async get( request: operations.GetApiLeadScraperMicroserviceApiV1OrganizationIdRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1OrganizationIdResponseBody > { return unwrapAsync(organizationsGet( this, request, options, )); } /** * Delete an organization * * @remarks * Permanently deletes an organization and all associated resources */ async delete( request: operations.DeleteApiLeadScraperMicroserviceApiV1OrganizationIdRequest, options?: RequestOptions, ): Promise< operations.DeleteApiLeadScraperMicroserviceApiV1OrganizationIdResponseBody > { return unwrapAsync(organizationsDelete( this, request, options, )); } }