Validated Methods
HACC Hui uses Validated Methods to allow the clients to update the Mongo collections and send Slack direct messages.
Accessing the Mongo Collections
We have 3 Validated Methods to access the Mongo Collections:
The defineMethod allows the client to define new documents in collections.
The updateMethod allows the client to update existing documents.
The removeItMethod allows the client to remove existing documents.
Each method has two parameters, the collection name, and the data needed to perform the operation. The methods first check the collection name to ensure it exists, then they check to see if the user has permission to perform the operation, lastly they perform the operation.
Sending Slack DMs
We have 2 Validated Methods for sending Slack direct messages:
The sendDM2AdministratorsMethod allows the client to send direct messages to all the HACC Hui Administrators.
The sendDM2DeveloperMethod allows the client to send direct messages to a HACC Hui developer.
Recording User Interactions
We have 3 Validated Methods for recording user interactions:
The userInteractionDefineMethod allows the client to record a user interaction.
The userInteractionRemoveUserMethod allows a client to remove all the user interactions for a given user. The user must be an Administrator to run this method.
The userInteractionFindMethod allows clients to query the UserInteractionCollection. The user must be an Administrator to run this method.