mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* 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
18 lines
551 B
SQL
18 lines
551 B
SQL
-- CreateEnum
|
|
CREATE TYPE "WorkflowContactType" AS ENUM ('PHONE', 'EMAIL');
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "WorkflowOptOutContact" (
|
|
"id" SERIAL NOT NULL,
|
|
"type" "WorkflowContactType" NOT NULL,
|
|
"value" TEXT NOT NULL,
|
|
"optedOut" BOOLEAN NOT NULL,
|
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
|
|
CONSTRAINT "WorkflowOptOutContact_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "WorkflowOptOutContact_type_value_key" ON "WorkflowOptOutContact"("type", "value");
|