npm

cloudflare-email-thread
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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`)
);

Dependencies (2)

Dev Dependencies (6)

Package Sidebar

Install

npm i cloudflare-email-thread

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

10 kB

Total Files

5

Last publish

Collaborators

  • jacoblincool