Constructor
new DowntimeEventController()
Source
Methods
create(siteId, createData) → {Promise.<DowntimeEventModel>}
Create a Downtime Event [POST /packhouse/sites/{siteId}/downtime-events]
Parameters
-
siteId
number
The Site ID
-
createData
DowntimeEventController.CreateData
The Downtime Event Create Data
Returns
-
Promise.<DowntimeEventModel>
Source
createComment(siteId, id, content) → {Promise.<DowntimeEventController.CommentItem>}
Create a Comment [POST /packhouse/sites/{siteId}/downtime-events/{id}/comments]
Create a Comment for a Downtime Event
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
-
content
string
The Content of the New Comment
Returns
-
Promise.<DowntimeEventController.CommentItem>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a Downtime Event [DELETE /packhouse/sites/{siteId}/downtime-events/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
Returns
-
Promise.<boolean>
Source
deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}
Delete a Comment [DELETE /packhouse/sites/{siteId}/downtime-events/{id}/comments/{commentId}]
Delete a Comment for a Downtime Event
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
-
commentId
string
The Comment ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<DowntimeEventModel>>}
List all Downtime Events [GET /packhouse/sites/{siteId}/downtime-events]
Parameters
-
siteId
number
The Site ID
-
queryParameters
DowntimeEventController.GetAllQueryParameters
<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<DowntimeEventModel>>
Source
getComments(siteId, id) → {Promise.<Array.<DowntimeEventController.CommentItem>>}
Retrieve Comments [GET /packhouse/sites/{siteId}/downtime-events/{id}/comments]
Retrieves Comments for a Downtime Event
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
Returns
-
Promise.<Array.<DowntimeEventController.CommentItem>>
Source
getOne(siteId, id) → {Promise.<DowntimeEventModel>}
Retrieve a Downtime Event [GET /packhouse/sites/{siteId}/downtime-events/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
Returns
-
Promise.<DowntimeEventModel>
Source
getOneComment(siteId, id, commentId) → {Promise.<DowntimeEventController.CommentItem>}
Retrieve a Comment [GET /packhouse/sites/{siteId}/downtime-events/{id}/comments/{commentId}]
Retrieves Comments for a Downtime Event
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
-
commentId
string
The Comment ID
Returns
-
Promise.<DowntimeEventController.CommentItem>
Source
update(siteId, id, updateData) → {Promise.<DowntimeEventModel>}
Update a Downtime Event [PATCH /packhouse/sites/{siteId}/downtime-events/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
-
updateData
DowntimeEventController.UpdateData
The Downtime Event Update Data
Returns
-
Promise.<DowntimeEventModel>
Source
updateOneComment(siteId, id, commentId, content) → {Promise.<DowntimeEventController.CommentItem>}
Update a Comment [PATCH /packhouse/sites/{siteId}/downtime-events/{id}/comments/{commentId}]
Update a Comment for a Downtime Event
Parameters
-
siteId
number
The Site ID
-
id
string
The Downtime Event ID
-
commentId
string
The Comment ID
-
content
string
The Updated Content for the Comment
Returns
-
Promise.<DowntimeEventController.CommentItem>
Source
Type Definitions
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
string
The Comment ID
-
userAccount
DowntimeEventController.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 Downtime Event
Type
-
Object
Properties
-
packingLineId
string
The Packing Line ID this Downtime Event is associated with
-
shiftId
string
<optional>
The Shift ID this Downtime Event is asssociated with
-
createdTimestamp
Date
<optional>
When this Downtime Event was Created
-
startTimestamp
Date
When this Downtime Event Started
-
endTimestamp
Date
<optional>
<nullable>
When this Downtime Event Ended
-
reasonCategory
string
<optional>
<nullable>
The Reason Category for this Downtime Event
-
reasonTag
string
<optional>
<nullable>
The Reason Tag for this Downtime Event
-
remedyAction
string
<optional>
<nullable>
An Optional Summary of the Action taken to Remedy this Downtime Event
-
avoidableRating
number
<optional>
<nullable>
An Optional Rating between 1 and 10 on how likely this Downtime Event could have been Avoided
-
source
string
<optional>
The Source which Created this Downtime Event
-
status
string
<optional>
The Status of this Downtime Event
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
packingLineId
string
<optional>
The Packing Line ID this Downtime Event is associated with
-
shiftId
string
<optional>
The Shift ID this Downtime Event is asssociated with
-
reasonCategory
string
<optional>
<nullable>
The Reason Category for this Downtime Event
-
reasonTag
string
<optional>
<nullable>
The Reason Tag for this Downtime Event
-
source
string
<optional>
The Source which Created this Downtime Event
-
status
string
<optional>
The Status of this Downtime Event
-
createdTimestampBegin
Date
<optional>
Filter by the Timestamp when Downtime Events were Created. Results Greater than or Equal to Timestamp
-
createdTimestampEnd
Date
<optional>
Filter by the Timestamp when Downtime Events were Created. Results Less than or Equal to Timestamp
-
startTimestampBegin
Date
<optional>
Filter by the Timestamp when Downtime Events Started. Results Greater than or Equal to Timestamp
-
startTimestampEnd
Date
<optional>
Filter by the Timestamp when Downtime Events Started. Results Less than or Equal to Timestamp
-
endTimestampBegin
Date
<optional>
Filter by the Timestamp when Downtime Events Ended. Results Greater than or Equal to Timestamp
-
endTimestampEnd
Date
<optional>
Filter by the Timestamp when Downtime Events Ended. Results Less than or Equal to Timestamp
-
updateTimestampBegin
Date
<optional>
Filter by the Timestamp when Downtime Events were last Updated. Results Greater than or Equal to Timestamp
-
updateTimestampEnd
Date
<optional>
Filter by the Timestamp when Downtime Events were last Updated. Results Less than or Equal to Timestamp
Source
UpdateData
The Update Data for a Downtime Event
Type
-
Object
Properties
-
packingLineId
string
<optional>
The Packing Line ID this Downtime Event is associated with
-
createdTimestamp
Date
<optional>
When this Downtime Event was Created
-
startTimestamp
Date
<optional>
When this Downtime Event Started
-
endTimestamp
Date
<optional>
<nullable>
When this Downtime Event Ended
-
reasonCategory
string
<optional>
<nullable>
The Reason Category for this Downtime Event
-
reasonTag
string
<optional>
<nullable>
The Reason Tag for this Downtime Event
-
remedyAction
string
<optional>
<nullable>
An Optional Summary of the Action taken to Remedy this Downtime Event
-
avoidableRating
number
<optional>
<nullable>
An Optional Rating between 1 and 10 on how likely this Downtime Event could have been Avoided
-
source
string
<optional>
The Source which Created this Downtime Event
-
status
string
<optional>
The Status of this Downtime Event
Source
UserAccount
A UserAccount Type
Type
-
Object
Properties
-
id
string
<nullable>
The User Account ID
-
firstName
string
<nullable>
The User's First Name
-
lastName
string
<nullable>
The User's Last Name