Add additional translations and cleanup.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -16,6 +16,7 @@ const webhookTypeEnums = {
|
||||
DOCUMENT_CANCELLED: "DOCUMENT_CANCELLED",
|
||||
DOCUMENT_OPENED: "DOCUMENT_OPENED",
|
||||
DOCUMENT_SIGNED: "DOCUMENT_SIGNED",
|
||||
DOCUMENT_REMINDER_SENT: "DOCUMENT_REMINDER_SENT",
|
||||
}
|
||||
|
||||
async function esignWebhook(req, res) {
|
||||
@@ -29,6 +30,8 @@ async function esignWebhook(req, res) {
|
||||
const documentId = (message.payload?.id || message.payload?.payload?.id)?.toString()
|
||||
//TODO: Implement checks to prevent this from going backwards in status? If a request fails, it retries, which could cause a document marked as completed to be marked as rejected if the rejection event is processed after the completion event.
|
||||
switch (message.event) {
|
||||
case webhookTypeEnums.DOCUMENT_REMINDER_SENT:
|
||||
break;
|
||||
case webhookTypeEnums.DOCUMENT_OPENED:
|
||||
//TODO: DR: Add notification for document opened.
|
||||
await client.request(UPDATE_ESIGNATURE_DOCUMENT, {
|
||||
|
||||
Reference in New Issue
Block a user