Constructor
new MAFSizerBatchController()
Source
Methods
create(siteId, createData) → {Promise.<MAFSizerBatchModel>}
Create a MAF Sizer Batch [POST /packhouse/sites/{siteId}/maf-sizer-batches]
Parameters
-
siteId
number
The Site ID
-
createData
MAFSizerBatchController.CreateData
The MAF Sizer Batch Create Data
Returns
-
Promise.<MAFSizerBatchModel>
Source
createComment(siteId, id, content) → {Promise.<MAFSizerBatchController.CommentItem>}
Create a Comment [POST /packhouse/sites/{siteId}/maf-sizer-batches/{id}/comments]
Create a Comment for a MAF Sizer Batch
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
-
content
string
The Content of the New Comment
Returns
-
Promise.<MAFSizerBatchController.CommentItem>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a MAF Sizer Batch [DELETE /packhouse/sites/{siteId}/maf-sizer-batches/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
Returns
-
Promise.<boolean>
Source
deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}
Delete a Comment [DELETE /packhouse/sites/{siteId}/maf-sizer-batches/{id}/comments/{commentId}]
Delete a Comment for a MAF Sizer Batch
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
-
commentId
string
The Comment ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<MAFSizerBatchModel>>}
List all MAF Sizer Batches [GET /packhouse/sites/{siteId}/maf-sizer-batches]
Parameters
-
siteId
number
The Site ID
-
queryParameters
MAFSizerBatchController.GetAllQueryParameters
<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<MAFSizerBatchModel>>
Source
getComments(siteId, id) → {Promise.<Array.<MAFSizerBatchController.CommentItem>>}
Retrieve Comments [GET /packhouse/sites/{siteId}/maf-sizer-batches/{id}/comments]
Retrieves Comments for a MAF Sizer Batch
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
Returns
-
Promise.<Array.<MAFSizerBatchController.CommentItem>>
Source
getOne(siteId, id) → {Promise.<MAFSizerBatchModel>}
Retrieve a MAF Sizer Batch [GET /packhouse/sites/{siteId}/maf-sizer-batches/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
Returns
-
Promise.<MAFSizerBatchModel>
Source
getOneComment(siteId, id, commentId) → {Promise.<MAFSizerBatchController.CommentItem>}
Retrieve a Comment [GET /packhouse/sites/{siteId}/maf-sizer-batches/{id}/comments/{commentId}]
Retrieves Comments for a MAF Sizer Batch
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
-
commentId
string
The Comment ID
Returns
-
Promise.<MAFSizerBatchController.CommentItem>
Source
update(siteId, id, updateData) → {Promise.<MAFSizerBatchModel>}
Update a MAF Sizer Batch [PATCH /packhouse/sites/{siteId}/maf-sizer-batches/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
-
updateData
MAFSizerBatchController.UpdateData
The MAF Sizer Batch Update Data
Returns
-
Promise.<MAFSizerBatchModel>
Source
updateOneComment(siteId, id, commentId, content) → {Promise.<MAFSizerBatchController.CommentItem>}
Update a Comment [PATCH /packhouse/sites/{siteId}/maf-sizer-batches/{id}/comments/{commentId}]
Update a Comment for a MAF Sizer Batch
Parameters
-
siteId
number
The Site ID
-
id
string
The MAF Sizer Batch ID
-
commentId
string
The Comment ID
-
content
string
The Updated Content for the Comment
Returns
-
Promise.<MAFSizerBatchController.CommentItem>
Source
Type Definitions
ArticleSummary
A ArticleSummary Type
Type
-
Object
Properties
-
name
string
The Article Name
-
fruitCount
number
The Fruit Count
-
fruitWeight
number
The Fruit Weight expressed in Kilograms
Source
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
string
The Comment ID
-
userAccount
MAFSizerBatchController.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 MAF Sizer Batch
Type
-
Object
Properties
-
mafSizerId
string
The MAF Sizer ID this Batch is associated with
-
batchId
string
<optional>
The Numeric MAF Batch ID
-
createdTimestamp
Date
<optional>
When this Batch was Created
-
batchName
string
<optional>
<nullable>
The Batch Name
-
growerCode
string
<optional>
<nullable>
The Grower Code
-
growerName
string
<optional>
<nullable>
The Grower Name
-
varietyCode
string
<optional>
<nullable>
The Variety Code
-
varietyName
string
<optional>
<nullable>
The Variety Name
-
totalWeight
number
The Total Weight Processed for this Batch
-
packrunId
string
<optional>
<nullable>
The Packrun ID associated with this Batch
-
articleSummaries
Array.<MAFSizerBatchController.ArticleSummary>
<optional>
An Array of Summary Data Objects for each Article
-
outletSummaries
Array.<MAFSizerBatchController.OutletSummary>
<optional>
An Array of Summary Data Objects for each Outlet
-
fruitSummaries
Array.<MAFSizerBatchController.FruitSummary>
<optional>
An Array of Summary Data Objects for each Fruit Size and Article
Source
FruitSummary
A FruitSummary Type
Type
-
Object
Properties
-
articleName
string
The Article Name
-
fruitSize
string
The Fruit Size
-
fruitCount
number
The Fruit Count
-
fruitWeight
number
The Fruit Weight expressed in Kilograms
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
mafSizerId
string
<optional>
The MAF Sizer ID this Batch is associated with
-
batchId
string
<optional>
The Numeric MAF Batch ID
-
batchName
string
<optional>
<nullable>
The Batch Name
-
packrunId
string
<optional>
<nullable>
The Packrun ID associated with this Batch
-
createdTimestampBegin
Date
<optional>
Filter by the Timestamp when this MAF Sizer Batch was Created. Results Greater than or Equal to Timestamp
-
createdTimestampEnd
Date
<optional>
Filter by the Timestamp when this MAF Sizer Batch was Created. Results Less than or Equal to Timestamp
Source
OutletSummary
A OutletSummary Type
Type
-
Object
Properties
-
number
number
The Outlet Number
-
fruitCount
number
The Fruit Count
-
fruitWeight
number
The Fruit Weight expressed in Kilograms
Source
UpdateData
The Update Data for a MAF Sizer Batch
Type
-
Object
Properties
-
mafSizerId
string
<optional>
The MAF Sizer ID this Batch is associated with
-
createdTimestamp
Date
<optional>
When this Batch was Created
-
batchName
string
<optional>
<nullable>
The Batch Name
-
growerCode
string
<optional>
<nullable>
The Grower Code
-
growerName
string
<optional>
<nullable>
The Grower Name
-
varietyCode
string
<optional>
<nullable>
The Variety Code
-
varietyName
string
<optional>
<nullable>
The Variety Name
-
totalWeight
number
<optional>
The Total Weight Processed for this Batch
-
packrunId
string
<optional>
<nullable>
The Packrun ID associated with this Batch
-
articleSummaries
Array.<MAFSizerBatchController.ArticleSummary>
<optional>
An Array of Summary Data Objects for each Article
-
outletSummaries
Array.<MAFSizerBatchController.OutletSummary>
<optional>
An Array of Summary Data Objects for each Outlet
-
fruitSummaries
Array.<MAFSizerBatchController.FruitSummary>
<optional>
An Array of Summary Data Objects for each Fruit Size and Article
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