0.0.2 • Published 6 months ago

cloudflare-email-thread v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Cloudflare Email Thread

A thread manager for Cloudflare Email Kit.

Pre-requisites

  1. Setup D1 database
CREATE TABLE `threads` (
  `id` TEXT PRIMARY KEY,
  `subject` TEXT NOT NULL,
  `status` TEXT,
  `created_at` TEXT NOT NULL,
  `updated_at` TEXT NOT NULL
);
CREATE TABLE `thread_messages` (
  `message_id` TEXT PRIMARY KEY,
  `thread_id` TEXT NOT NULL,
  `received_at` TEXT NOT NULL
);
CREATE TABLE `thread_participants` (
  `thread_id` TEXT NOT NULL,
  `email` TEXT NOT NULL,
  `name` TEXT NOT NULL,
  `role` TEXT,
  `joined_at` TEXT NOT NULL,
  PRIMARY KEY (`thread_id`, `email`)
);