Class: FilesResource

FilesResource(client)

Files Resource Generated: 2025-04-01T19:44:53.325Z

Constructor

new FilesResource(client)

Create a new Files resource

Parameters:
Name Type Description
client ApiClient

API client instance

Source:

Classes

FilesResource
FilesResource

Methods

(async) create(data) → {Promise.<Object>}

Create a new record

Parameters:
Name Type Description
data Object

Record data

Source:
Returns:
  • Created record with data and headers
Type
Promise.<Object>

(async) create(data) → {Promise.<Object>}

Create a new record

Parameters:
Name Type Description
data Object

Record data

Source:
Returns:
  • Created record with data and headers
Type
Promise.<Object>

(async) deleteFilesId() → {Promise.<file>}

Delete File (destroy) Delete the File record with the specified ID.

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) deleteFilesId() → {Promise.<file>}

Delete File (destroy) Delete the File record with the specified ID.

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) destroy(id) → {Promise.<Object>}

Delete a record by id

Parameters:
Name Type Description
id string | number

Record id

Source:
Returns:
  • Deletion result with data and headers
Type
Promise.<Object>

(async) destroy(id) → {Promise.<Object>}

Delete a record by id

Parameters:
Name Type Description
id string | number

Record id

Source:
Returns:
  • Deletion result with data and headers
Type
Promise.<Object>

find(criteria) → {QueryChain}

Starts a new query chain with the given criteria

Parameters:
Name Type Description
criteria Object

Filter criteria

Source:
Returns:
  • Query chain for further operations
Type
QueryChain

find(criteria) → {QueryChain}

Starts a new query chain with the given criteria

Parameters:
Name Type Description
criteria Object

Filter criteria

Source:
Returns:
  • Query chain for further operations
Type
QueryChain

findOne(id, populateopt) → {QueryChain|Promise.<Object>}

Find a single record by id

Parameters:
Name Type Attributes Description
id string | number

Record id

populate string | Array.<string> <optional>

Fields to populate

Source:
Returns:
  • Query chain for further operations or found record with data and headers
Type
QueryChain | Promise.<Object>

findOne(id, populateopt) → {QueryChain|Promise.<Object>}

Find a single record by id

Parameters:
Name Type Attributes Description
id string | number

Record id

populate string | Array.<string> <optional>

Fields to populate

Source:
Returns:
  • Query chain for further operations or found record with data and headers
Type
QueryChain | Promise.<Object>

(async) getFiles(queryopt) → {Promise.<Array.<file>>}

List File (find where) Find a list of File records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<file>>

(async) getFiles(queryopt) → {Promise.<Array.<file>>}

List File (find where) Find a list of File records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<file>>

(async) getFilesCount(queryopt) → {Promise.<any>}

Count records Count the number of records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesCount(queryopt) → {Promise.<any>}

Count records Count the number of records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesDownloadId(_id, queryopt) → {Promise.<any>}

Download file Download a file by ID.

Parameters:
Name Type Attributes Description
_id string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesDownloadId(_id, queryopt) → {Promise.<any>}

Download file Download a file by ID.

Parameters:
Name Type Attributes Description
_id string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesId(queryopt) → {Promise.<file>}

Get File (find one) Look up the File record with the specified ID.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) getFilesId(queryopt) → {Promise.<file>}

Get File (find one) Look up the File record with the specified ID.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) getFilesIdAssociation(association, queryopt) → {Promise.<Array.<any>>}

Populate association for File Populate and return foreign record(s) for the given association of this File record.

Parameters:
Name Type Attributes Description
association string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<any>>

(async) getFilesIdAssociation(association, queryopt) → {Promise.<Array.<any>>}

Populate association for File Populate and return foreign record(s) for the given association of this File record.

Parameters:
Name Type Attributes Description
association string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<any>>

(async) getFilesSum(queryopt) → {Promise.<any>}

Sum field values Calculate the sum of a specified numeric field across filtered records.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesSum(queryopt) → {Promise.<any>}

Sum field values Calculate the sum of a specified numeric field across filtered records.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) patchFilesId(data) → {Promise.<file>}

Update File Update an existing File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) patchFilesId(data) → {Promise.<file>}

Update File Update an existing File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) postFiles(data) → {Promise.<file>}

Create File Create a new File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) postFiles(data) → {Promise.<file>}

Create File Create a new File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) postFilesUpload(queryopt) → {Promise.<void>}

Upload file Upload a file and store its metadata.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<void>

(async) postFilesUpload(queryopt) → {Promise.<void>}

Upload file Upload a file and store its metadata.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<void>

(async) update(id, data) → {Promise.<Object>}

Update a record by id

Parameters:
Name Type Description
id string | number

Record id

data Object

Update data

Source:
Returns:
  • Updated record with data and headers
Type
Promise.<Object>

(async) update(id, data) → {Promise.<Object>}

Update a record by id

Parameters:
Name Type Description
id string | number

Record id

data Object

Update data

Source:
Returns:
  • Updated record with data and headers
Type
Promise.<Object>

FilesResourceFilesResource(client)

Files Resource Generated: 2025-04-01T19:44:53.325Z

Constructor

new FilesResource(client)

Create a new Files resource

Parameters:
Name Type Description
client ApiClient

API client instance

Source:

Classes

FilesResource
FilesResource

Methods

(async) create(data) → {Promise.<Object>}

Create a new record

Parameters:
Name Type Description
data Object

Record data

Source:
Returns:
  • Created record with data and headers
Type
Promise.<Object>

(async) create(data) → {Promise.<Object>}

Create a new record

Parameters:
Name Type Description
data Object

Record data

Source:
Returns:
  • Created record with data and headers
Type
Promise.<Object>

(async) deleteFilesId() → {Promise.<file>}

Delete File (destroy) Delete the File record with the specified ID.

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) deleteFilesId() → {Promise.<file>}

Delete File (destroy) Delete the File record with the specified ID.

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) destroy(id) → {Promise.<Object>}

Delete a record by id

Parameters:
Name Type Description
id string | number

Record id

Source:
Returns:
  • Deletion result with data and headers
Type
Promise.<Object>

(async) destroy(id) → {Promise.<Object>}

Delete a record by id

Parameters:
Name Type Description
id string | number

Record id

Source:
Returns:
  • Deletion result with data and headers
Type
Promise.<Object>

find(criteria) → {QueryChain}

Starts a new query chain with the given criteria

Parameters:
Name Type Description
criteria Object

Filter criteria

Source:
Returns:
  • Query chain for further operations
Type
QueryChain

find(criteria) → {QueryChain}

Starts a new query chain with the given criteria

Parameters:
Name Type Description
criteria Object

Filter criteria

Source:
Returns:
  • Query chain for further operations
Type
QueryChain

findOne(id, populateopt) → {QueryChain|Promise.<Object>}

Find a single record by id

Parameters:
Name Type Attributes Description
id string | number

Record id

populate string | Array.<string> <optional>

Fields to populate

Source:
Returns:
  • Query chain for further operations or found record with data and headers
Type
QueryChain | Promise.<Object>

findOne(id, populateopt) → {QueryChain|Promise.<Object>}

Find a single record by id

Parameters:
Name Type Attributes Description
id string | number

Record id

populate string | Array.<string> <optional>

Fields to populate

Source:
Returns:
  • Query chain for further operations or found record with data and headers
Type
QueryChain | Promise.<Object>

(async) getFiles(queryopt) → {Promise.<Array.<file>>}

List File (find where) Find a list of File records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<file>>

(async) getFiles(queryopt) → {Promise.<Array.<file>>}

List File (find where) Find a list of File records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<file>>

(async) getFilesCount(queryopt) → {Promise.<any>}

Count records Count the number of records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesCount(queryopt) → {Promise.<any>}

Count records Count the number of records that match the specified criteria.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesDownloadId(_id, queryopt) → {Promise.<any>}

Download file Download a file by ID.

Parameters:
Name Type Attributes Description
_id string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesDownloadId(_id, queryopt) → {Promise.<any>}

Download file Download a file by ID.

Parameters:
Name Type Attributes Description
_id string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesId(queryopt) → {Promise.<file>}

Get File (find one) Look up the File record with the specified ID.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) getFilesId(queryopt) → {Promise.<file>}

Get File (find one) Look up the File record with the specified ID.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) getFilesIdAssociation(association, queryopt) → {Promise.<Array.<any>>}

Populate association for File Populate and return foreign record(s) for the given association of this File record.

Parameters:
Name Type Attributes Description
association string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<any>>

(async) getFilesIdAssociation(association, queryopt) → {Promise.<Array.<any>>}

Populate association for File Populate and return foreign record(s) for the given association of this File record.

Parameters:
Name Type Attributes Description
association string

Path parameter

query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<Array.<any>>

(async) getFilesSum(queryopt) → {Promise.<any>}

Sum field values Calculate the sum of a specified numeric field across filtered records.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) getFilesSum(queryopt) → {Promise.<any>}

Sum field values Calculate the sum of a specified numeric field across filtered records.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<any>

(async) patchFilesId(data) → {Promise.<file>}

Update File Update an existing File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) patchFilesId(data) → {Promise.<file>}

Update File Update an existing File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) postFiles(data) → {Promise.<file>}

Create File Create a new File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) postFiles(data) → {Promise.<file>}

Create File Create a new File record.

Parameters:
Name Type Description
data Object

Request body

Source:
Returns:
  • Response with data and headers
Type
Promise.<file>

(async) postFilesUpload(queryopt) → {Promise.<void>}

Upload file Upload a file and store its metadata.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<void>

(async) postFilesUpload(queryopt) → {Promise.<void>}

Upload file Upload a file and store its metadata.

Parameters:
Name Type Attributes Description
query Object <optional>

Query parameters

Source:
Returns:
  • Response with data and headers
Type
Promise.<void>

(async) update(id, data) → {Promise.<Object>}

Update a record by id

Parameters:
Name Type Description
id string | number

Record id

data Object

Update data

Source:
Returns:
  • Updated record with data and headers
Type
Promise.<Object>

(async) update(id, data) → {Promise.<Object>}

Update a record by id

Parameters:
Name Type Description
id string | number

Record id

data Object

Update data

Source:
Returns:
  • Updated record with data and headers
Type
Promise.<Object>