Constructor
new PrePackSampleController()
Source
Methods
create(siteId, createData) → {Promise.<PrePackSampleModel>}
Create a PrePack Sample [POST /packhouse/sites/{siteId}/prepack-samples]
Parameters
-
siteId
numberThe Site ID
-
createData
PrePackSampleController.CreateDataThe 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
numberThe Site ID
-
id
stringThe PrePack Sample ID
-
content
stringThe 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
numberThe Site ID
-
id
stringThe 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
numberThe Site ID
-
id
stringThe PrePack Sample ID
-
commentId
stringThe Comment ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<PrePackSampleModel>>}
List all PrePack Samples [GET /packhouse/sites/{siteId}/prepack-samples]
Parameters
-
siteId
numberThe 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
numberThe Site ID
-
id
stringThe 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
numberThe Site ID
-
id
stringThe 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
numberThe Site ID
-
id
stringThe PrePack Sample ID
-
commentId
stringThe 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
numberThe Site ID
-
id
stringThe PrePack Sample ID
-
updateData
PrePackSampleController.UpdateDataThe 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
numberThe Site ID
-
id
stringThe PrePack Sample ID
-
commentId
stringThe Comment ID
-
content
stringThe Updated Content for the Comment
Returns
-
Promise.<PrePackSampleController.CommentItem>
Source
Type Definitions
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
stringThe 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
stringThe 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
stringThe ID of the User who created this Pre-Pack Sample
-
userName
stringThe 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
stringA String ID for the Defect
-
name
stringThe Defect Name
-
fruitCount
numberThe 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