Operations for managing companies in Plain.
Summary
Functions
Returns a paginated list of companies.
Searches companies by name or domain.
Updates the tier associated with a company.
Creates or updates a company.
Functions
@spec list( ExPlain.Client.t(), keyword() ) :: {:ok, %{nodes: [ExPlain.Companies.Company.t()], page_info: ExPlain.PageInfo.t()}} | {:error, ExPlain.Error.t()}
Returns a paginated list of companies.
Options
Pagination: first:, after:, last:, before:.
@spec search(ExPlain.Client.t(), map(), keyword()) :: {:ok, %{nodes: [ExPlain.Companies.Company.t()], page_info: ExPlain.PageInfo.t()}} | {:error, ExPlain.Error.t()}
Searches companies by name or domain.
The search_query map must include :name or :domain_name.
@spec update_tier(ExPlain.Client.t(), map()) :: {:ok, map()} | {:error, ExPlain.Error.t()}
Updates the tier associated with a company.
The input map must include :company_identifier and :tier_identifier.
@spec upsert(ExPlain.Client.t(), map()) :: {:ok, ExPlain.Companies.Company.t()} | {:error, ExPlain.Error.t()}
Creates or updates a company.
The input map should include :domain_name as the identifier,
and optionally :name.