Add additional translations and cleanup.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Patrick Fic
2026-04-27 11:37:25 -07:00
parent a96a1139fa
commit 6ca0ebff5f
8 changed files with 2925 additions and 157 deletions

View File

@@ -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, {