RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

CompacSizerBatchController

Controller Class for Compac Sizer Batches

Constructor

new CompacSizerBatchController()

Source

Methods

static

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

Create a Compac Sizer Batch [POST /packhouse/sites/{siteId}/compac-sizer-batches]

Parameters

  • siteId number

    The Site ID

  • createData CompacSizerBatchController.CreateData

    The Compac Sizer Batch Create Data

Returns

  • Promise.<CompacSizerBatchModel>

Source

static

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

Create a Comment [POST /packhouse/sites/{siteId}/compac-sizer-batches/{id}/comments]

Create a Comment for a Compac Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<CompacSizerBatchController.CommentItem>

Source

static

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

Delete a Comment [DELETE /packhouse/sites/{siteId}/compac-sizer-batches/{id}/comments/{commentId}]

Delete a Comment for a Compac Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

List all Compac Sizer Batches [GET /packhouse/sites/{siteId}/compac-sizer-batches]

Parameters

  • siteId number

    The Site ID

  • queryParameters CompacSizerBatchController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<CompacSizerBatchModel>>

Source

static

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

Retrieve Comments [GET /packhouse/sites/{siteId}/compac-sizer-batches/{id}/comments]

Retrieves Comments for a Compac Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

Returns

  • Promise.<Array.<CompacSizerBatchController.CommentItem>>

Source

static

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

Retrieve a Compac Sizer Batch [GET /packhouse/sites/{siteId}/compac-sizer-batches/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

Returns

  • Promise.<CompacSizerBatchModel>

Source

static

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

Retrieve a Comment [GET /packhouse/sites/{siteId}/compac-sizer-batches/{id}/comments/{commentId}]

Retrieves Comments for a Compac Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

  • commentId string

    The Comment ID

Returns

  • Promise.<CompacSizerBatchController.CommentItem>

Source

static

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

Update a Compac Sizer Batch [PATCH /packhouse/sites/{siteId}/compac-sizer-batches/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

  • updateData CompacSizerBatchController.UpdateData

    The Compac Sizer Batch Update Data

Returns

  • Promise.<CompacSizerBatchModel>

Source

static

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

Update a Comment [PATCH /packhouse/sites/{siteId}/compac-sizer-batches/{id}/comments/{commentId}]

Update a Comment for a Compac Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Batch ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<CompacSizerBatchController.CommentItem>

Source

Type Definitions

BatchDropSummary

A BatchDropSummary Type

Type

  • Object

Properties

  • id number

    ID of this Drop Summary

  • eventId number

    The Event ID this Drop Summary is associated with

  • summaryGroupId number

    ID of the Summary Group for this Drop Summary

  • productId number

    ID of the Product for this Drop Summary

  • dropId number

    ID of the Drop for this Drop Summary

  • gradeIndex number

    Index of the Grade for this Drop Summary

  • sizeIndex number

    Index of the Fruit Size for this Drop Summary

  • qualityIndex number

    Index of the Quality for this Drop Summary

  • fruitWeight number

    Fruit Weight in Grams for this Drop Summary

  • fruitCount number

    Fruit Count for this Drop Summary

  • varietySizingMapId number

    Variety Sizing Map ID for this Drop Summary

Source

BatchEvent

A BatchEvent Type

Type

  • Object

Properties

  • id number

    ID of this Event

  • batchId number

    The Batch ID this Event is associated with

  • type string

    The Event Type

  • details string

    Details of this Event

  • timestamp Date

    When this Event Occurred

  • runningSeconds number

    Total Seconds the Sizer was Running during this Event

  • fruitRunningSeconds number

    Total Seconds the Sizer was Running with Fruit during this Event

Source

BatchPackSummary

A BatchPackSummary Type

Type

  • Object

Properties

  • id number

    ID of this Pack Summary

  • eventId number

    The Event ID this Pack Summary is associated with

  • summaryGroupId number

    ID of the Summary Group for this Pack Summary

  • productId number

    ID of the Product for this Pack Summary

  • packId number

    ID of the Pack for this Pack Summary

  • packCount number

    Pack Count for this Pack Summary

  • fruitWeight number

    Fruit Weight in Grams for this Drop Summary

  • fruitCount number

    Fruit Count for this Drop Summary

Source

BatchRecycleSummary

A BatchRecycleSummary Type

Type

  • Object

Properties

  • id number

    ID of this Recycle Summary

  • eventId number

    The Event ID this Recycle Summary is associated with

  • productId number

    ID of the Product for this Recycle Summary

  • dropId number

    ID of the Drop for this Recycle Summary

  • gradeIndex number

    Index of the Grade for this Recycle Summary

  • sizeIndex number

    Index of the Fruit Size for this Recycle Summary

  • qualityIndex number

    Index of the Quality for this Recycle Summary

  • fruitWeight number

    Fruit Weight in Grams for this Recycle Summary

  • fruitCount number

    Fruit Count for this Recycle Summary

  • varietySizingMapId number

    Variety Sizing Map ID for this Recycle Summary

Source

BatchSizingMap

A BatchSizingMap Type

Type

  • Object

Properties

  • id number

    ID of this Sizing Map

  • eventId number

    The Event ID this Sizing Map is associated with

  • varietySizingMapId number

    ID of the Variety Sizing Map

  • name string <nullable>

    Name of this Sizing Map

  • fruitSizes Array.<CompacSizerBatchController.BatchSizingMapFruitSize>

    An Array of Fruit Sizes defined in this Sizing Map

Source

BatchSizingMapFruitSize

A BatchSizingMapFruitSize Type

Type

  • Object

Properties

  • id number

    ID of this Fruit Size

  • eventId number

    The Event ID this Fruit Size is associated with

  • index number

    Index of this Fruit Size

  • name string <nullable>

    Name of this Fruit Size

  • minimumFruitWeight number

    The Minimum Weight in Grams for this Fruit Size

  • fruitCount number

    The Fruit Count for this Fruit Size

  • minimumTrayWeight number

    The Minimum Tray Weight in Grams for this Fruit Size

  • varietySizingMapId number

    ID of the Variety Sizing Map

Source

BatchSummaryGroup

A BatchSummaryGroup Type

Type

  • Object

Properties

  • id number

    ID of this Summary Group

  • name string <nullable>

    Name of this Summary Group

  • isReject boolean

    Whether this Summary Group is classes as Reject

  • orderIndex number

    The Display Order Index for this Summary Group

Source

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount CompacSizerBatchController.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

CompacSizerBatch

A CompacSizerBatch Type

Type

  • Object

Properties

  • id number

    ID of this Batch

  • name string <nullable>

    Name of this Batch

  • growerCode string <nullable>

    Code of the Grower for this Batch

  • growerName string <nullable>

    Name of the Grower for this Batch

  • startTimestamp Date <nullable>

    When this Batch was Started

  • endTimestamp Date <nullable>

    When this Batch was Finished

  • comments Array.<string>

    An Array of Comments for this Batch

  • varietyId string

    ID of the Variety for this Batch

  • varietyName string

    Name of the Variety for this Batch

  • finished boolean

    Whether this Batch has been Finished

  • events Array.<CompacSizerBatchController.BatchEvent>

    An Array of Events for this Batch

  • sizingMaps Array.<CompacSizerBatchController.BatchSizingMap>

    An Array of Sizing Maps for this Batch

  • grades Array.<CompacSizerBatchController.BatchGrade>

    An Array of Grades for this Batch

  • qualities Array.<CompacSizerBatchController.BatchQuality>

    An Array of Qualities for this Batch

  • products Array.<CompacSizerBatchController.BatchProduct>

    An Array of Products for this Batch

  • packs Array.<CompacSizerBatchController.BatchPack>

    An Array of Packs for this Batch

  • summaryGroups Array.<CompacSizerBatchController.BatchSummaryGroup>

    An Array of Summary Groups for this Batch

  • dropSummaries Array.<CompacSizerBatchController.BatchDropSummary>

    An Array of Drop Summaries for this Batch

  • recycleSummaries Array.<CompacSizerBatchController.BatchRecycleSummary>

    An Array of Recycle Summaries for this Batch

  • packSummaries Array.<CompacSizerBatchController.BatchPackSummary>

    An Array of Pack Summaries for this Batch

  • drops Array.<CompacSizerBatchController.BatchDrop>

    An Array of Drops (Outlets) for this Batch

Source

CreateData

The Create Data for a Compac Sizer Batch

Type

  • Object

Properties

  • compacSizerId string

    The Compac Sizer ID this Batch is associated with

  • batchId string <optional>

    The Numeric Compac Batch ID

  • createdTimestamp Date <optional>

    When this Batch was Created

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • batch CompacSizerBatchController.CompacSizerBatch

    The Compac Sizer Batch Data

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • compacSizerId string <optional>

    The Compac Sizer ID this Batch is associated with

  • batchId string <optional>

    The Numeric Compac Batch ID

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when this Compac Sizer Batch was Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when this Compac Sizer Batch was Created. Results Less than or Equal to Timestamp

  • batchName string <optional>

    Filter by the Compac Batch Name

Source

UpdateData

The Update Data for a Compac Sizer Batch

Type

  • Object

Properties

  • compacSizerId string <optional>

    The Compac Sizer ID this Batch is associated with

  • createdTimestamp Date <optional>

    When this Batch was Created

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • batch CompacSizerBatchController.CompacSizerBatch <optional>

    The Compac Sizer Batch Data

Source