Constructor
new PrePackSampleController()
Source
Methods
create(siteId, createData) → {Promise.<PrePackSampleModel>}
Create a PrePack Sample [POST /packhouse/sites/{siteId}/prepack-samples]
Parameters
-
siteId
number
The Site ID
-
createData
PrePackSampleController.CreateData
The PrePack Sample Create Data
Returns
-
Promise.<PrePackSampleModel>
Source
createComment(siteId, id, content) → {Promise.<PrePackSampleController.CommentItem>}
Create a Comment [POST /packhouse/sites/{siteId}/prepack-samples/{id}/comments]
Create a Comment for a PrePack Sample
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
-
content
string
The Content of the New Comment
Returns
-
Promise.<PrePackSampleController.CommentItem>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a PrePack Sample [DELETE /packhouse/sites/{siteId}/prepack-samples/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
Returns
-
Promise.<boolean>
Source
deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}
Delete a Comment [DELETE /packhouse/sites/{siteId}/prepack-samples/{id}/comments/{commentId}]
Delete a Comment for a PrePack Sample
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
-
commentId
string
The Comment ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<PrePackSampleModel>>}
List all PrePack Samples [GET /packhouse/sites/{siteId}/prepack-samples]
Parameters
-
siteId
number
The Site ID
-
queryParameters
PrePackSampleController.GetAllQueryParameters
<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<PrePackSampleModel>>
Source
getComments(siteId, id) → {Promise.<Array.<PrePackSampleController.CommentItem>>}
Retrieve Comments [GET /packhouse/sites/{siteId}/prepack-samples/{id}/comments]
Retrieves Comments for a PrePack Sample
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
Returns
-
Promise.<Array.<PrePackSampleController.CommentItem>>
Source
getOne(siteId, id) → {Promise.<PrePackSampleModel>}
Retrieve a PrePack Sample [GET /packhouse/sites/{siteId}/prepack-samples/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
Returns
-
Promise.<PrePackSampleModel>
Source
getOneComment(siteId, id, commentId) → {Promise.<PrePackSampleController.CommentItem>}
Retrieve a Comment [GET /packhouse/sites/{siteId}/prepack-samples/{id}/comments/{commentId}]
Retrieves Comments for a PrePack Sample
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
-
commentId
string
The Comment ID
Returns
-
Promise.<PrePackSampleController.CommentItem>
Source
update(siteId, id, updateData) → {Promise.<PrePackSampleModel>}
Update a PrePack Sample [PATCH /packhouse/sites/{siteId}/prepack-samples/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
-
updateData
PrePackSampleController.UpdateData
The PrePack Sample Update Data
Returns
-
Promise.<PrePackSampleModel>
Source
updateOneComment(siteId, id, commentId, content) → {Promise.<PrePackSampleController.CommentItem>}
Update a Comment [PATCH /packhouse/sites/{siteId}/prepack-samples/{id}/comments/{commentId}]
Update a Comment for a PrePack Sample
Parameters
-
siteId
number
The Site ID
-
id
string
The PrePack Sample ID
-
commentId
string
The Comment ID
-
content
string
The Updated Content for the Comment
Returns
-
Promise.<PrePackSampleController.CommentItem>
Source
Type Definitions
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
string
The Comment ID
-
userAccount
PrePackSampleController.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 PrePack Sample
Type
-
Object
Properties
-
packingLineId
string
The Packing Line ID this Sample is associated with
-
packrunId
string
<optional>
The Packrun ID this Sample is associated with
-
createdTimestamp
Date
<optional>
When this Sample was Created
-
userId
string
The ID of the User who created this Pre-Pack Sample
-
userName
string
The Name of the User who created this Pre-Pack Sample
-
sampleDefects
Array.<PrePackSampleController.SampleDefect>
<optional>
An Array of Defects found in this Pre-Pack Sample
-
totalFruitSampled
number
<optional>
The Total Number of Fruit Sampled in this Pre-Pack Sample
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
packingLineId
string
<optional>
The Packing Line ID this Sample is associated with
-
packrunId
string
<optional>
The Packrun ID this Sample is associated with
-
userId
string
<optional>
The ID of the User who created this Pre-Pack Sample
-
userName
string
<optional>
The Name of the User who created this Pre-Pack Sample
-
createdTimestampBegin
Date
<optional>
Filter by the Timestamp when Pre-Pack Samples were Created. Results Greater than or Equal to Timestamp
-
createdTimestampEnd
Date
<optional>
Filter by the Timestamp when Pre-Pack Samples were Created. Results Less than or Equal to Timestamp
-
updateTimestampBegin
Date
<optional>
Filter by the Timestamp when Pre-Pack Samples were last Updated. Results Greater than or Equal to Timestamp
-
updateTimestampEnd
Date
<optional>
Filter by the Timestamp when Pre-Pack Samples were last Updated. Results Less than or Equal to Timestamp
Source
SampleDefect
A SampleDefect Type
Type
-
Object
Properties
-
id
string
A String ID for the Defect
-
name
string
The Defect Name
-
fruitCount
number
The Number of Fruit with this Defect
Source
UpdateData
The Update Data for a PrePack Sample
Type
-
Object
Properties
-
packingLineId
string
<optional>
The Packing Line ID this Sample is associated with
-
createdTimestamp
Date
<optional>
When this Sample was Created
-
userId
string
<optional>
The ID of the User who created this Pre-Pack Sample
-
userName
string
<optional>
The Name of the User who created this Pre-Pack Sample
-
sampleDefects
Array.<PrePackSampleController.SampleDefect>
<optional>
An Array of Defects found in this Pre-Pack Sample
-
totalFruitSampled
number
<optional>
The Total Number of Fruit Sampled in this Pre-Pack Sample
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