@crewx/sdk 0.9.0-rc.30 → 0.9.0-rc.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ CREATE TABLE IF NOT EXISTS `notification_reads` (
2
+ `notification_id` text NOT NULL,
3
+ `user_id` text NOT NULL,
4
+ `read_at` text NOT NULL,
5
+ PRIMARY KEY(`notification_id`, `user_id`)
6
+ );
7
+ --> statement-breakpoint
8
+ CREATE TABLE IF NOT EXISTS `notifications` (
9
+ `id` text PRIMARY KEY NOT NULL,
10
+ `workspace_id` text NOT NULL,
11
+ `agent_id` text,
12
+ `task_id` text,
13
+ `thread_id` text,
14
+ `source` text DEFAULT 'agent' NOT NULL,
15
+ `level` text DEFAULT 'info' NOT NULL,
16
+ `title` text NOT NULL,
17
+ `body` text,
18
+ `target_user_id` text,
19
+ `created_at` text NOT NULL,
20
+ `metadata` text
21
+ );
22
+ --> statement-breakpoint
23
+ CREATE INDEX IF NOT EXISTS `idx_notifications_ws_created` ON `notifications` (`workspace_id`,"created_at" DESC);