feat: Optout of SMS workflows (#20769)
* Do not call dub if API key isn't present * Add `WorkflowOptOutContact` table * Add `sendTo` column to `WorkflowReminder` * Add `workflowOptOutContactRepository` * Add `WorkflowReminderRepository` * Write `sendTo` number when scheduling SMS messages * Add `p-limit` package * Add `determineOptOutType` to `TwilioProvider` * Add `deleteMultipleScheduledSMS` * Create `WorkflowOptOutService` * Add endpoint handler for Twilio SMS responses * Add `isOptedOut` method to `workflowOptOutContactRepository` * Verify phone number is not opted out before scheduling SMS * Use `smsReminderNumber` instead of `sendTo` * Type fix * Add .env variable if opt out is available * Add opt out message to SMS * Import `pLimit` directly in method * Address select comment * Guard against undefined phone number from form * Add early return to `deleteWorkflowReminders` * Add request validation from Twilio * Add fallback message as i18N string * Only delete SMS attendee scheduled reminders
This commit is contained in:
1 parent
d86a28bf7f
commit
6bbf263981
17 files changed
+323
-4
No files matched your search
@@ -116,6 +116,7 @@
|
||||
"@vercel/functions": "^1.4.0",
|
||||
"city-timezones": "^1.2.1",
|
||||
"eslint": "^8.34.0",
|
||||
"p-limit": "^6.2.0",
|
||||
"turbo": "^1.10.1"
|
||||
},
|
||||
"resolutions": {
|
||||
|
||||
Reference in new issue
Block a user