RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

ShiftTaskController

Controller Class for Shift Tasks

Constructor

new ShiftTaskController()

Source

Methods

static

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

Create a Shift Task [POST /packhouse/sites/{siteId}/shift-tasks]

Parameters

  • siteId number

    The Site ID

  • createData ShiftTaskController.CreateData

    The Shift Task Create Data

Returns

  • Promise.<ShiftTaskModel>

Source

static

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

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

Create a Comment for a Shift Task

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<ShiftTaskController.CommentItem>

Source

static

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

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

Delete a Comment for a Shift Task

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

List all Shift Tasks [GET /packhouse/sites/{siteId}/shift-tasks]

Parameters

  • siteId number

    The Site ID

  • queryParameters ShiftTaskController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<ShiftTaskModel>>

Source

static

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

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

Retrieves Comments for a Shift Task

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

Returns

  • Promise.<Array.<ShiftTaskController.CommentItem>>

Source

static

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

Retrieve a Shift Task [GET /packhouse/sites/{siteId}/shift-tasks/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

Returns

  • Promise.<ShiftTaskModel>

Source

static

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

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

Retrieves Comments for a Shift Task

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

  • commentId string

    The Comment ID

Returns

  • Promise.<ShiftTaskController.CommentItem>

Source

static

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

Update a Shift Task [PATCH /packhouse/sites/{siteId}/shift-tasks/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

  • updateData ShiftTaskController.UpdateData

    The Shift Task Update Data

Returns

  • Promise.<ShiftTaskModel>

Source

static

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

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

Update a Comment for a Shift Task

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift Task ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<ShiftTaskController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount ShiftTaskController.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 Task

Type

  • Object

Properties

  • packingLineId string

    The Packing Line ID this Task is associated with

  • shiftId string <optional>

    The Shift ID this Task is asssociated with

  • createdTimestamp Date <optional>

    When this Task was Created

  • completedTimestamp Date <optional>
    <nullable>

    When this Task was Completed

  • authorUserId string <optional>
    <nullable>

    The User ID of the Author for this Task

  • authorName string

    The Name of the Author for this Task

  • type string

    The Task Type

  • tags Array.<string> <optional>

    An Array of Tag IDs for this Task

  • title string

    The Title of this Task

  • content string <optional>

    The Content of this Task

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Task is associated with

  • shiftId string <optional>

    The Shift ID this Task is asssociated with

  • completedTimestamp Date <optional>
    <nullable>

    When this Task was Completed

  • authorUserId string <optional>
    <nullable>

    The User ID of the Author for this Task

  • authorName string <optional>

    The Name of the Author for this Task

  • type string <optional>

    The Task Type

  • tags Array.<string> <optional>

    An Array of Tag IDs for this Task

  • createdTimestampBegin Date <optional>

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

  • createdTimestampEnd Date <optional>

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

  • completedTimestampBegin Date <optional>

    Filter by the Timestamp when Tasks were Completed. Results Greater than or Equal to Timestamp

  • completedTimestampEnd Date <optional>

    Filter by the Timestamp when Tasks were Completed. Results Less than or Equal to Timestamp

  • updateTimestampBegin Date <optional>

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

  • updateTimestampEnd Date <optional>

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

Source

UpdateData

The Update Data for a Shift Task

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Task is associated with

  • createdTimestamp Date <optional>

    When this Task was Created

  • completedTimestamp Date <optional>
    <nullable>

    When this Task was Completed

  • authorUserId string <optional>
    <nullable>

    The User ID of the Author for this Task

  • authorName string <optional>

    The Name of the Author for this Task

  • type string <optional>

    The Task Type

  • tags Array.<string> <optional>

    An Array of Tag IDs for this Task

  • title string <optional>

    The Title of this Task

  • content string <optional>

    The Content of this Task

Source