RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

ShiftSummaryReportController

Controller Class for Shift Summary Reports

Constructor

new ShiftSummaryReportController()

Source

Methods

static

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

Create a Shift Summary Report [POST /packhouse/sites/{siteId}/shift-summary-reports]

Parameters

  • siteId number

    The Site ID

  • createData ShiftSummaryReportController.CreateData

    The Shift Summary Report Create Data

Returns

  • Promise.<ShiftSummaryReportModel>

Source

static

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

Create a Comment [POST /packhouse/sites/{siteId}/shift-summary-reports/{id}/comments]

Create a Comment for a Shift Summary Report

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<ShiftSummaryReportController.CommentItem>

Source

static

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

Delete a Comment [DELETE /packhouse/sites/{siteId}/shift-summary-reports/{id}/comments/{commentId}]

Delete a Comment for a Shift Summary Report

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

List all Shift Summary Reports [GET /packhouse/sites/{siteId}/shift-summary-reports]

Parameters

  • siteId number

    The Site ID

  • queryParameters ShiftSummaryReportController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<ShiftSummaryReportModel>>

Source

static

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

Retrieve Comments [GET /packhouse/sites/{siteId}/shift-summary-reports/{id}/comments]

Retrieves Comments for a Shift Summary Report

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

Returns

  • Promise.<Array.<ShiftSummaryReportController.CommentItem>>

Source

static

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

Retrieve a Shift Summary Report [GET /packhouse/sites/{siteId}/shift-summary-reports/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

Returns

  • Promise.<ShiftSummaryReportModel>

Source

static

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

Retrieve a Comment [GET /packhouse/sites/{siteId}/shift-summary-reports/{id}/comments/{commentId}]

Retrieves Comments for a Shift Summary Report

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

  • commentId string

    The Comment ID

Returns

  • Promise.<ShiftSummaryReportController.CommentItem>

Source

static

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

Update a Shift Summary Report [PATCH /packhouse/sites/{siteId}/shift-summary-reports/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

  • updateData ShiftSummaryReportController.UpdateData

    The Shift Summary Report Update Data

Returns

  • Promise.<ShiftSummaryReportModel>

Source

static

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

Update a Comment [PATCH /packhouse/sites/{siteId}/shift-summary-reports/{id}/comments/{commentId}]

Update a Comment for a Shift Summary Report

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Summary Report ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<ShiftSummaryReportController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount ShiftSummaryReportController.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 Shift Summary Report

Type

  • Object

Properties

  • packingLineId string

    The Packing Line ID this Summary Report is associated with

  • shiftId string <optional>

    The Shift ID this Summary Report relates to

  • createdTimestamp Date <optional>

    When this Summary Report was Created

  • pdfReportContent string <optional>
    <nullable>

    The Base64 Encoded PDF Report

  • pdfReportFileName string <nullable>

    The Filename that should be used with the PDF Report

  • sendGridApi ShiftSummaryReportController.SendGridApiResult <optional>
    <nullable>

    The SendGrid API Status indicating progress when sending emails

  • status string

    Whether the Report is in the process of being Emailed

  • emailContacts Array.<ShiftSummaryReportController.EmailContact> <optional>

    An Array of Email Contacts that were sent this Summary Report

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Summary Report is associated with

  • shiftId string <optional>

    The Shift ID this Summary Report relates to

  • status string <optional>

    Whether the Report is in the process of being Emailed

  • createdTimestampBegin Date <optional>

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

  • createdTimestampEnd Date <optional>

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

  • updateTimestampBegin Date <optional>

    Filter by the Timestamp when Summary Reports were last Updated. Results Greater than or Equal to Timestamp

  • updateTimestampEnd Date <optional>

    Filter by the Timestamp when Summary Reports were last Updated. Results Less than or Equal to Timestamp

Source

SendGridApiResult

A SendGridApiResult Type

Type

  • Object

Properties

  • requestCount number

    The Number of API Requests made to SendGrid

  • requestTimestamp Date <nullable>

    When the latest API Request was made

  • responseCode number <nullable>

    The HTTP Response Code received from the SendGrid API

  • responseMessage string <nullable>

    The HTTP Response Message received from the SendGrid API

  • completed boolean

    Whether the sending of API Requests has been completed

Source

UpdateData

The Update Data for a Shift Summary Report

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Summary Report is associated with

  • createdTimestamp Date <optional>

    When this Summary Report was Created

  • pdfReportContent string <optional>
    <nullable>

    The Base64 Encoded PDF Report

  • pdfReportFileName string <optional>
    <nullable>

    The Filename that should be used with the PDF Report

  • sendGridApi ShiftSummaryReportController.SendGridApiResult <optional>
    <nullable>

    The SendGrid API Status indicating progress when sending emails

  • status string <optional>

    Whether the Report is in the process of being Emailed

  • emailContacts Array.<ShiftSummaryReportController.EmailContact> <optional>

    An Array of Email Contacts that were sent this Summary Report

Source