Constructor
new MAFSizerBatchController()
Source
Methods
create(siteId, createData) → {Promise.<MAFSizerBatchModel>}
Create a MAF Sizer Batch [POST /packhouse/sites/{siteId}/maf-sizer-batches]
Parameters
-
siteId
numberThe Site ID
-
createData
MAFSizerBatchController.CreateDataThe 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
numberThe Site ID
-
id
stringThe MAF Sizer Batch ID
-
content
stringThe 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
numberThe Site ID
-
id
stringThe 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
numberThe Site ID
-
id
stringThe MAF Sizer Batch ID
-
commentId
stringThe 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
numberThe 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
numberThe Site ID
-
id
stringThe 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
numberThe Site ID
-
id
stringThe 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
numberThe Site ID
-
id
stringThe MAF Sizer Batch ID
-
commentId
stringThe 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
numberThe Site ID
-
id
stringThe MAF Sizer Batch ID
-
updateData
MAFSizerBatchController.UpdateDataThe 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
numberThe Site ID
-
id
stringThe MAF Sizer Batch ID
-
commentId
stringThe Comment ID
-
content
stringThe Updated Content for the Comment
Returns
-
Promise.<MAFSizerBatchController.CommentItem>
Source
Type Definitions
ArticleNameLookup
A ArticleNameLookup Type
Type
-
Object
Properties
-
index
numberThe Article Index
-
name
stringThe Article Name
Source
ArticleSummary
A ArticleSummary Type
Type
-
Object
Properties
-
index
number<nullable>
The Article Index
-
name
stringThe Article Name
-
fruitCount
numberThe Fruit Count
-
fruitWeight
numberThe Fruit Weight expressed in Kilograms
Source
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
stringThe 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
stringThe 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
numberThe Total Weight Processed for this Batch
-
packrunId
string<optional>
<nullable>
The Packrun ID associated with this Batch
-
finalOrpheaUpdate
Date<optional>
<nullable>
When the Final Update from the MAF Sizer Orphea Database has been Received
-
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
-
outletFruitSummaries
Array.<MAFSizerBatchController.OutletFruitSummary><optional>
An Array of Summary Data Objects for each Outlet by Fruit Size and Article
-
sizeNames
Array.<MAFSizerBatchController.SizeNameLookup><optional>
An Array of Size Names and Indexes
-
articleNames
Array.<MAFSizerBatchController.ArticleNameLookup><optional>
An Array of Article Names and Indexes
Source
FruitSummary
A FruitSummary Type
Type
-
Object
Properties
-
sizeIndex
numberThe Size Index
-
sizeName
stringThe Size Name
-
articleIndex
numberThe Article Index
-
articleName
stringThe Article Name
-
fruitCount
numberThe Fruit Count
-
fruitWeight
numberThe 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
OutletFruitSummary
A OutletFruitSummary Type
Type
-
Object
Properties
-
outletNumber
numberThe Outlet Number
-
sizeIndex
numberThe Size Index
-
sizeName
stringThe Size Name
-
articleIndex
numberThe Article Index
-
articleName
stringThe Article Name
-
fruitCount
numberThe Fruit Count
-
fruitWeight
numberThe Fruit Weight expressed in Kilograms
Source
OutletSummary
A OutletSummary Type
Type
-
Object
Properties
-
number
numberThe Outlet Number
-
fruitCount
numberThe Fruit Count
-
fruitWeight
numberThe Fruit Weight expressed in Kilograms
-
seenArticles
Array.<number>An Array of Article Indexes that have been Seen assigned to the Outlet
-
activeArticles
Array.<number>An Array of Article Indexes that have are Actively assigned to the Outlet
Source
SizeNameLookup
A SizeNameLookup Type
Type
-
Object
Properties
-
index
numberThe Size Index
-
name
stringThe Size Name
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
-
finalOrpheaUpdate
Date<optional>
<nullable>
When the Final Update from the MAF Sizer Orphea Database has been Received
-
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
-
outletFruitSummaries
Array.<MAFSizerBatchController.OutletFruitSummary><optional>
An Array of Summary Data Objects for each Outlet by Fruit Size and Article
-
sizeNames
Array.<MAFSizerBatchController.SizeNameLookup><optional>
An Array of Size Names and Indexes
-
articleNames
Array.<MAFSizerBatchController.ArticleNameLookup><optional>
An Array of Article Names and Indexes
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