Constructor
new PackrunGrowerNotificationController()
Source
Methods
create(siteId, createData) → {Promise.<PackrunGrowerNotificationModel>}
Create a Packrun Grower Notification [POST /packhouse/sites/{siteId}/packrun-grower-notifications]
Parameters
-
siteId
numberThe Site ID
-
createData
PackrunGrowerNotificationController.CreateDataThe Packrun Grower Notification Create Data
Returns
-
Promise.<PackrunGrowerNotificationModel>
Source
createComment(siteId, id, content) → {Promise.<PackrunGrowerNotificationController.CommentItem>}
Create a Comment [POST /packhouse/sites/{siteId}/packrun-grower-notifications/{id}/comments]
Create a Comment for a Packrun Grower Notification
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
-
content
stringThe Content of the New Comment
Returns
-
Promise.<PackrunGrowerNotificationController.CommentItem>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a Packrun Grower Notification [DELETE /packhouse/sites/{siteId}/packrun-grower-notifications/{id}]
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
Returns
-
Promise.<boolean>
Source
deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}
Delete a Comment [DELETE /packhouse/sites/{siteId}/packrun-grower-notifications/{id}/comments/{commentId}]
Delete a Comment for a Packrun Grower Notification
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
-
commentId
stringThe Comment ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<PackrunGrowerNotificationModel>>}
List all Packrun Grower Notifications [GET /packhouse/sites/{siteId}/packrun-grower-notifications]
Parameters
-
siteId
numberThe Site ID
-
queryParameters
PackrunGrowerNotificationController.GetAllQueryParameters<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<PackrunGrowerNotificationModel>>
Source
getComments(siteId, id) → {Promise.<Array.<PackrunGrowerNotificationController.CommentItem>>}
Retrieve Comments [GET /packhouse/sites/{siteId}/packrun-grower-notifications/{id}/comments]
Retrieves Comments for a Packrun Grower Notification
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
Returns
-
Promise.<Array.<PackrunGrowerNotificationController.CommentItem>>
Source
getOne(siteId, id) → {Promise.<PackrunGrowerNotificationModel>}
Retrieve a Packrun Grower Notification [GET /packhouse/sites/{siteId}/packrun-grower-notifications/{id}]
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
Returns
-
Promise.<PackrunGrowerNotificationModel>
Source
getOneComment(siteId, id, commentId) → {Promise.<PackrunGrowerNotificationController.CommentItem>}
Retrieve a Comment [GET /packhouse/sites/{siteId}/packrun-grower-notifications/{id}/comments/{commentId}]
Retrieves Comments for a Packrun Grower Notification
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
-
commentId
stringThe Comment ID
Returns
-
Promise.<PackrunGrowerNotificationController.CommentItem>
Source
update(siteId, id, updateData) → {Promise.<PackrunGrowerNotificationModel>}
Update a Packrun Grower Notification [PATCH /packhouse/sites/{siteId}/packrun-grower-notifications/{id}]
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
-
updateData
PackrunGrowerNotificationController.UpdateDataThe Packrun Grower Notification Update Data
Returns
-
Promise.<PackrunGrowerNotificationModel>
Source
updateOneComment(siteId, id, commentId, content) → {Promise.<PackrunGrowerNotificationController.CommentItem>}
Update a Comment [PATCH /packhouse/sites/{siteId}/packrun-grower-notifications/{id}/comments/{commentId}]
Update a Comment for a Packrun Grower Notification
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Packrun Grower Notification ID
-
commentId
stringThe Comment ID
-
content
stringThe Updated Content for the Comment
Returns
-
Promise.<PackrunGrowerNotificationController.CommentItem>
Source
Type Definitions
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
stringThe Comment ID
-
userAccount
PackrunGrowerNotificationController.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 Packrun Grower Notification
Type
-
Object
Properties
-
packingLineId
stringThe Packing Line ID this Grower Notification is associated with
-
packrunId
string<optional>
The Packrun ID this Grower Notification is associated with
-
createdTimestamp
Date<optional>
When this Grower Notification was Created
-
notificationType
stringThe Grower Notification Type
-
smsRequests
Array.<PackrunGrowerNotificationController.SmsRequestStatus><optional>
The SMS Request Statuses indicating progress when sending SMS Messages
-
emailRequest
PackrunGrowerNotificationController.EmailRequestStatus<optional>
<nullable>
The Email Request Status indicating progress when sending Emails
-
status
stringWhether the Grower Notification is in the process of being Sent
-
smsContacts
Array.<PackrunGrowerNotificationController.SmsContact><optional>
An Array of SMS Contacts for this Grower Notification
-
emailContacts
Array.<PackrunGrowerNotificationController.EmailContact><optional>
An Array of Email Contacts for this Grower Notification
Source
EmailContact
A EmailContact Type
Type
-
Object
Properties
-
email
stringEmail Address of the Contact
-
firstName
stringFirst Name of the Contact
-
lastName
string<nullable>
Last Name of the Contact
Source
EmailRequestStatus
A EmailRequestStatus Type
Type
-
Object
Properties
-
requestCount
numberThe Number of API Requests made to Attempt to Send the Email
-
requestTimestamp
Date<nullable>
When the latest API Request was made
-
responseCode
number<nullable>
The HTTP Response Code received from the Email API
-
responseMessage
string<nullable>
The HTTP Response Message received from the Email API
-
completed
booleanWhether the sending of API Requests has been completed
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
packingLineId
string<optional>
The Packing Line ID this Grower Notification is associated with
-
packrunId
string<optional>
The Packrun ID this Grower Notification is associated with
-
notificationType
string<optional>
The Grower Notification Type
-
status
string<optional>
Whether the Grower Notification is in the process of being Sent
-
createdTimestampBegin
Date<optional>
Filter by the Timestamp when Grower Notifications were Created. Results Greater than or Equal to Timestamp
-
createdTimestampEnd
Date<optional>
Filter by the Timestamp when Grower Notifications were Created. Results Less than or Equal to Timestamp
-
updateTimestampBegin
Date<optional>
Filter by the Timestamp when Grower Notifications were last Updated. Results Greater than or Equal to Timestamp
-
updateTimestampEnd
Date<optional>
Filter by the Timestamp when Grower Notifications were last Updated. Results Less than or Equal to Timestamp
Source
SmsContact
A SmsContact Type
Type
-
Object
Properties
-
mobileNumber
stringMobile Number of the Contact
-
firstName
stringFirst Name of the Contact
-
lastName
string<nullable>
Last Name of the Contact
Source
SmsRequestStatus
A SmsRequestStatus Type
Type
-
Object
Properties
-
mobileNumber
stringThe Recipient Mobile Number for this SMS Request
-
messageId
string<nullable>
The Message ID returned from the SMS API
-
messageStatus
string<nullable>
The Message Status returned from the SMS API
-
sendRequestCount
numberThe Number of API Requests made to Attempt to Send the SMS
-
sendRequestTimestamp
Date<nullable>
When the latest API Request was made to Send the SMS
-
sendResponseCode
number<nullable>
The HTTP Response Code received from the SMS API Send Message Request
-
sendResponseMessage
string<nullable>
The HTTP Response Message received from the SMS API Send Message Request
-
getStatusRequestCount
numberThe Number of API Requests made to Attempt to Get the SMS Status
-
getStatusRequestTimestamp
Date<nullable>
When the latest API Request was made to Get the SMS Status
-
getStatusResponseCode
number<nullable>
The HTTP Response Code received from the SMS API Get Message Status Request
-
getStatusResponseMessage
string<nullable>
The HTTP Response Message received from the SMS API Get Message Status Request
-
completed
booleanWhether the sending of API Requests has been completed
Source
UpdateData
The Update Data for a Packrun Grower Notification
Type
-
Object
Properties
-
packingLineId
string<optional>
The Packing Line ID this Grower Notification is associated with
-
createdTimestamp
Date<optional>
When this Grower Notification was Created
-
notificationType
string<optional>
The Grower Notification Type
-
smsRequests
Array.<PackrunGrowerNotificationController.SmsRequestStatus><optional>
The SMS Request Statuses indicating progress when sending SMS Messages
-
emailRequest
PackrunGrowerNotificationController.EmailRequestStatus<optional>
<nullable>
The Email Request Status indicating progress when sending Emails
-
status
string<optional>
Whether the Grower Notification is in the process of being Sent
-
smsContacts
Array.<PackrunGrowerNotificationController.SmsContact><optional>
An Array of SMS Contacts for this Grower Notification
-
emailContacts
Array.<PackrunGrowerNotificationController.EmailContact><optional>
An Array of Email Contacts for this Grower Notification
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