RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

SampleResultController

Controller Class for Sample Results

Constructor

new SampleResultController()

Source

Methods

static

create(siteId, createData) → {Promise.<SampleResultModel>}

Create a Sample Result [POST /lab/sites/{siteId}/sample-results]

Parameters

  • siteId number

    The Site ID

  • createData SampleResultController.CreateData

    The Sample Result Create Data

Returns

  • Promise.<SampleResultModel>

Source

static

createComment(siteId, id, content) → {Promise.<SampleResultController.CommentItem>}

Create a Comment [POST /lab/sites/{siteId}/sample-results/{id}/comments]

Create a Comment for a Sample Result

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<SampleResultController.CommentItem>

Source

static

delete(siteId, id) → {Promise.<boolean>}

Delete a Sample Result [DELETE /lab/sites/{siteId}/sample-results/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

Returns

  • Promise.<boolean>

Source

static

deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}

Delete a Comment [DELETE /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]

Delete a Comment for a Sample Result

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

getAll(siteId, queryParametersopt) → {Promise.<Array.<SampleResultModel>>}

List all Sample Results [GET /lab/sites/{siteId}/sample-results]

Parameters

  • siteId number

    The Site ID

  • queryParameters SampleResultController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<SampleResultModel>>

Source

static

getComments(siteId, id) → {Promise.<Array.<SampleResultController.CommentItem>>}

Retrieve Comments [GET /lab/sites/{siteId}/sample-results/{id}/comments]

Retrieves Comments for a Sample Result

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

Returns

  • Promise.<Array.<SampleResultController.CommentItem>>

Source

static

getOne(siteId, id) → {Promise.<SampleResultModel>}

Retrieve a Sample Result [GET /lab/sites/{siteId}/sample-results/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

Returns

  • Promise.<SampleResultModel>

Source

static

getOneComment(siteId, id, commentId) → {Promise.<SampleResultController.CommentItem>}

Retrieve a Comment [GET /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]

Retrieves Comments for a Sample Result

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

  • commentId string

    The Comment ID

Returns

  • Promise.<SampleResultController.CommentItem>

Source

static

update(siteId, id, updateData) → {Promise.<SampleResultModel>}

Update a Sample Result [PATCH /lab/sites/{siteId}/sample-results/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

  • updateData SampleResultController.UpdateData

    The Sample Result Update Data

Returns

  • Promise.<SampleResultModel>

Source

static

updateOneComment(siteId, id, commentId, content) → {Promise.<SampleResultController.CommentItem>}

Update a Comment [PATCH /lab/sites/{siteId}/sample-results/{id}/comments/{commentId}]

Update a Comment for a Sample Result

Parameters

  • siteId number

    The Site ID

  • id string

    The Sample Result ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<SampleResultController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount SampleResultController.UserAccount
  • content string <nullable>

    The Content of the Comment

  • createdTimestamp Date <nullable>

    When the Comment was Created

  • updatedTimestamp Date <nullable>

    When the Comment was last Updated

Source

CreateData

The Create Data for a Sample Result

Type

  • Object

Properties

  • labId string

    The Lab ID this Sample Result is associated with

  • sampleId string <optional>

    The Sample ID this Sample Result is associated with

  • createdTimestamp Date <optional>

    When this Sample Result was Created

  • totalDuration number

    The Total Duration (in seconds) of the Sample

  • warmUpDuration number

    The Warm Up Duration (in seconds) of the Sample

  • warmUpCompletedTimestamp Date <optional>
    <nullable>

    Timestamp of when the Warm Up process was Completed - null if not Completed

  • belowTargetDuration number

    The Below Temperature Target Duration (in seconds) of the Sample

  • aboveTargetDuration number

    The Above Temperature Target Duration (in seconds) of the Sample

  • withinTargetDuration number

    The Within Temperature Target Duration (in seconds) of the Sample

  • finishCriteriaMetTimestamp Date <optional>
    <nullable>

    Timestamp of when the Finish Criteria was Met for the Sample - null if not Met

  • latestUnloadTimestamp Date <optional>
    <nullable>

    Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant

  • totalAverageTemperature number <optional>
    <nullable>

    The Average Temperature for the Total Duration of the Sample

  • warmUpRateOfChangeTemperature number <optional>
    <nullable>

    The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample

  • belowTargetMinimumTemperature number <optional>
    <nullable>

    The Minimum Temperature seen Below the Temperature Target for the Sample

  • belowTargetAverageTemperature number <optional>
    <nullable>

    The Average Temperature seen Below the Temperature Target for the Sample

  • aboveTargetMaximumTemperature number <optional>
    <nullable>

    The Maximum Temperature seen Above the Temperature Target for the Sample

  • aboveTargetAverageTemperature number <optional>
    <nullable>

    The Average Temperature seen Above the Temperature Target for the Sample

  • withinTargetMinimumTemperature number <optional>
    <nullable>

    The Minimum Temperature seen Within the Temperature Target for the Sample

  • withinTargetMaximumTemperature number <optional>
    <nullable>

    The Maximum Temperature seen Within the Temperature Target for the Sample

  • withinTargetAverageTemperature number <optional>
    <nullable>

    The Average Temperature seen Within the Temperature Target for the Sample

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • labId string <optional>

    The Lab ID this Sample Result is associated with

  • sampleId string <optional>

    The Sample ID this Sample Result is associated with

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when Sample Results were Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when Sample Results were Created. Results Less than or Equal to Timestamp

Source

UpdateData

The Update Data for a Sample Result

Type

  • Object

Properties

  • labId string <optional>

    The Lab ID this Sample Result is associated with

  • createdTimestamp Date <optional>

    When this Sample Result was Created

  • totalDuration number <optional>

    The Total Duration (in seconds) of the Sample

  • warmUpDuration number <optional>

    The Warm Up Duration (in seconds) of the Sample

  • warmUpCompletedTimestamp Date <optional>
    <nullable>

    Timestamp of when the Warm Up process was Completed - null if not Completed

  • belowTargetDuration number <optional>

    The Below Temperature Target Duration (in seconds) of the Sample

  • aboveTargetDuration number <optional>

    The Above Temperature Target Duration (in seconds) of the Sample

  • withinTargetDuration number <optional>

    The Within Temperature Target Duration (in seconds) of the Sample

  • finishCriteriaMetTimestamp Date <optional>
    <nullable>

    Timestamp of when the Finish Criteria was Met for the Sample - null if not Met

  • latestUnloadTimestamp Date <optional>
    <nullable>

    Latest Possible Timestamp of when the Sample should have been Unloaded to remain Compliant

  • totalAverageTemperature number <optional>
    <nullable>

    The Average Temperature for the Total Duration of the Sample

  • warmUpRateOfChangeTemperature number <optional>
    <nullable>

    The Average Temperature Rate-of-Change seen during the Warm Up process for the Sample

  • belowTargetMinimumTemperature number <optional>
    <nullable>

    The Minimum Temperature seen Below the Temperature Target for the Sample

  • belowTargetAverageTemperature number <optional>
    <nullable>

    The Average Temperature seen Below the Temperature Target for the Sample

  • aboveTargetMaximumTemperature number <optional>
    <nullable>

    The Maximum Temperature seen Above the Temperature Target for the Sample

  • aboveTargetAverageTemperature number <optional>
    <nullable>

    The Average Temperature seen Above the Temperature Target for the Sample

  • withinTargetMinimumTemperature number <optional>
    <nullable>

    The Minimum Temperature seen Within the Temperature Target for the Sample

  • withinTargetMaximumTemperature number <optional>
    <nullable>

    The Maximum Temperature seen Within the Temperature Target for the Sample

  • withinTargetAverageTemperature number <optional>
    <nullable>

    The Average Temperature seen Within the Temperature Target for the Sample

Source