Class

Companies

Companies(client)

Class corresponding to Aworks Companies Endpoints
Constructor

# new Companies(client)

Endpoint constructor
Parameters:
Name Type Description
client Client
See:
  • [Companies in Awork API Docs](https://openapi.awork.com/#/Companies)

View Source endpoints/Companies.js, line 12

Classes

Companies

Methods

# contactInfo(companyId) → {CompaniesContactInfos}

Returns company contact informations.
Parameters:
Name Type Description
companyId String The id of the company.

View Source endpoints/Companies.js, line 110

# async create(company) → {Promise.<Company>}

Creates a new company.
Parameters:
Name Type Description
company CompaniesCreateModel The model to create a new company.

View Source endpoints/Companies.js, line 58

Promise.<Company>

# async delete(companyId, optionsopt) → {Promise.<void>}

There are several ways to delete a company. Look into the property description of the post model to get detailed information. If the post is executed without a model, the default process 'delete-only-company' will be executed.
Parameters:
Name Type Attributes Description
companyId String The id of the company.
options DeleteCompanyOptions <optional>
The model to delete a company.

View Source endpoints/Companies.js, line 92

Promise.<void>

# entityTags(companyId)

Returns the EntityTags Endpoint with the specified company Id and name.
Parameters:
Name Type Description
companyId String The id of the company.
Deprecated:
  • Yes

View Source endpoints/Companies.js, line 147

# files(companyId) → {EntityFiles}

Returns the EntityFiles Endpoint with the specified company Id and entityType 'companies'.
Parameters:
Name Type Description
companyId String The id of the company.

View Source endpoints/Companies.js, line 119

EntityFiles

# async get(companyId) → {Promise.<Company>}

Returns the company with the specified id.
Parameters:
Name Type Description
companyId String The id of the company.

View Source endpoints/Companies.js, line 29

Promise.<Company>

# images(projectId) → {EntityImages}

Returns the EntityImages Endpoint with the specified company Id.
Parameters:
Name Type Description
projectId String The id of the company.

View Source endpoints/Companies.js, line 128

EntityImages

# async industries()

Returns all company industries that are currently in use.

View Source endpoints/Companies.js, line 100

# async list(optionsopt) → {Promise.<Array.<Company>>}

Returns all companies.
Parameters:
Name Type Attributes Description
options ListOptions <optional>
Pagination and filtering options

View Source endpoints/Companies.js, line 40

Promise.<Array.<Company>>

# tags(companyId)

Returns the EntityTags Endpoint with the specified company Id and name.
Parameters:
Name Type Description
companyId String The id of the company.

View Source endpoints/Companies.js, line 137

# async update(companyId, company) → {Promise.<Company>}

Updates the company with the specified id.
Parameters:
Name Type Description
companyId String The id of the company.
company CompaniesUpdateModel The model to update a company.

View Source endpoints/Companies.js, line 74

Promise.<Company>