⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
feat: harden notification prefs schema, delivery, OpenAPI, and i18n
Tin88d57ff3912e
diff --git a/apps/api/drizzle/0022_real_deathstrike.sql b/apps/api/drizzle/0022_real_deathstrike.sqlnew file mode 100644index 000000000..9a43c79d4--- /dev/null+++ b/apps/api/drizzle/0022_real_deathstrike.sql@@ -0,0 +1,36 @@+ALTER TABLE "user_notification_workspace_project" DROP CONSTRAINT "user_notification_workspace_project_workspace_rule_id_user_notification_workspace_rule_id_fk";+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" DROP CONSTRAINT "user_notification_workspace_project_project_id_project_id_fk";+--> statement-breakpoint+ALTER TABLE "project" ADD CONSTRAINT "project_workspace_id_id_unique" UNIQUE("workspace_id","id");+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_rule" ADD CONSTRAINT "user_notification_workspace_rule_workspace_id_id_unique" UNIQUE("workspace_id","id");+--> statement-breakpoint+ALTER TABLE "user_notification_preference" ADD COLUMN "id" text;+--> statement-breakpoint+UPDATE "user_notification_preference" SET "id" = "user_id" WHERE "id" IS NULL;+--> statement-breakpoint+ALTER TABLE "user_notification_preference" DROP CONSTRAINT "user_notification_preference_pkey";+--> statement-breakpoint+ALTER TABLE "user_notification_preference" ALTER COLUMN "id" SET NOT NULL;+--> statement-breakpoint+ALTER TABLE "user_notification_preference" ADD CONSTRAINT "user_notification_preference_pkey" PRIMARY KEY ("id");+--> statement-breakpoint+ALTER TABLE "user_notification_preference" ADD CONSTRAINT "user_notification_preference_user_id_unique" UNIQUE("user_id");+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" ADD COLUMN "workspace_id" text;+--> statement-breakpoint+UPDATE "user_notification_workspace_project" AS unp+SET "workspace_id" = r."workspace_id"+FROM "user_notification_workspace_rule" AS r+WHERE unp."workspace_rule_id" = r."id";+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" ALTER COLUMN "workspace_id" SET NOT NULL;+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" ADD COLUMN "updated_at" timestamp DEFAULT now() NOT NULL;+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" ADD CONSTRAINT "user_notification_workspace_project_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE cascade;+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" ADD CONSTRAINT "user_notification_workspace_project_workspace_id_workspace_rule_id_user_notification_workspace_rule_workspace_id_id_fk" FOREIGN KEY ("workspace_id","workspace_rule_id") REFERENCES "public"."user_notification_workspace_rule"("workspace_id","id") ON DELETE cascade ON UPDATE cascade;+--> statement-breakpoint+ALTER TABLE "user_notification_workspace_project" ADD CONSTRAINT "user_notification_workspace_project_workspace_id_project_id_project_workspace_id_id_fk" FOREIGN KEY ("workspace_id","project_id") REFERENCES "public"."project"("workspace_id","id") ON DELETE cascade ON UPDATE cascade;diff --git a/apps/api/drizzle/meta/0022_snapshot.json b/apps/api/drizzle/meta/0022_snapshot.jsonnew file mode 100644index 000000000..5350ba67a--- /dev/null+++ b/apps/api/drizzle/meta/0022_snapshot.json@@ -0,0 +1,2925 @@+{+ "id": "41c7b5b4-1c82-4c03-9176-5ca22b1a1163",+ "prevId": "0bc097ca-a6c6-4555-930d-a15f045eb3e8",+ "version": "7",+ "dialect": "postgresql",+ "tables": {+ "public.account": {+ "name": "account",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "account_id": {+ "name": "account_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "provider_id": {+ "name": "provider_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "access_token": {+ "name": "access_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "refresh_token": {+ "name": "refresh_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "id_token": {+ "name": "id_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "access_token_expires_at": {+ "name": "access_token_expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "refresh_token_expires_at": {+ "name": "refresh_token_expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "scope": {+ "name": "scope",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "password": {+ "name": "password",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "account_userId_idx": {+ "name": "account_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "account_user_id_user_id_fk": {+ "name": "account_user_id_user_id_fk",+ "tableFrom": "account",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.activity": {+ "name": "activity",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "type": {+ "name": "type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "event_data": {+ "name": "event_data",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "external_user_name": {+ "name": "external_user_name",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "external_user_avatar": {+ "name": "external_user_avatar",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "external_source": {+ "name": "external_source",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "external_url": {+ "name": "external_url",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {},+ "foreignKeys": {+ "activity_task_id_task_id_fk": {+ "name": "activity_task_id_task_id_fk",+ "tableFrom": "activity",+ "tableTo": "task",+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "activity_user_id_user_id_fk": {+ "name": "activity_user_id_user_id_fk",+ "tableFrom": "activity",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.apikey": {+ "name": "apikey",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "config_id": {+ "name": "config_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'default'"+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "start": {+ "name": "start",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "reference_id": {+ "name": "reference_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "prefix": {+ "name": "prefix",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "key": {+ "name": "key",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "refill_interval": {+ "name": "refill_interval",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "refill_amount": {+ "name": "refill_amount",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "last_refill_at": {+ "name": "last_refill_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "enabled": {+ "name": "enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": true+ },+ "rate_limit_enabled": {+ "name": "rate_limit_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": true+ },+ "rate_limit_time_window": {+ "name": "rate_limit_time_window",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "default": 86400000+ },+ "rate_limit_max": {+ "name": "rate_limit_max",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "default": 10+ },+ "request_count": {+ "name": "request_count",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "default": 0+ },+ "remaining": {+ "name": "remaining",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "last_request": {+ "name": "last_request",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "expires_at": {+ "name": "expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "permissions": {+ "name": "permissions",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {+ "apikey_configId_idx": {+ "name": "apikey_configId_idx",+ "columns": [+ {+ "expression": "config_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "apikey_key_idx": {+ "name": "apikey_key_idx",+ "columns": [+ {+ "expression": "key",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "apikey_referenceId_idx": {+ "name": "apikey_referenceId_idx",+ "columns": [+ {+ "expression": "reference_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "apikey_userId_idx": {+ "name": "apikey_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "apikey_reference_id_user_id_fk": {+ "name": "apikey_reference_id_user_id_fk",+ "tableFrom": "apikey",+ "tableTo": "user",+ "columnsFrom": ["reference_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "apikey_user_id_user_id_fk": {+ "name": "apikey_user_id_user_id_fk",+ "tableFrom": "apikey",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.asset": {+ "name": "asset",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "activity_id": {+ "name": "activity_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "object_key": {+ "name": "object_key",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "filename": {+ "name": "filename",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "mime_type": {+ "name": "mime_type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "size": {+ "name": "size",+ "type": "integer",+ "primaryKey": false,+ "notNull": true+ },+ "kind": {+ "name": "kind",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'image'"+ },+ "surface": {+ "name": "surface",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'description'"+ },+ "created_by": {+ "name": "created_by",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "asset_workspaceId_idx": {+ "name": "asset_workspaceId_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "asset_projectId_idx": {+ "name": "asset_projectId_idx",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "asset_taskId_idx": {+ "name": "asset_taskId_idx",+ "columns": [+ {+ "expression": "task_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "asset_activityId_idx": {+ "name": "asset_activityId_idx",+ "columns": [+ {+ "expression": "activity_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "asset_workspace_id_workspace_id_fk": {+ "name": "asset_workspace_id_workspace_id_fk",+ "tableFrom": "asset",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "asset_project_id_project_id_fk": {+ "name": "asset_project_id_project_id_fk",+ "tableFrom": "asset",+ "tableTo": "project",+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "asset_task_id_task_id_fk": {+ "name": "asset_task_id_task_id_fk",+ "tableFrom": "asset",+ "tableTo": "task",+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "asset_activity_id_activity_id_fk": {+ "name": "asset_activity_id_activity_id_fk",+ "tableFrom": "asset",+ "tableTo": "activity",+ "columnsFrom": ["activity_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "asset_created_by_user_id_fk": {+ "name": "asset_created_by_user_id_fk",+ "tableFrom": "asset",+ "tableTo": "user",+ "columnsFrom": ["created_by"],+ "columnsTo": ["id"],+ "onDelete": "set null",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "asset_object_key_unique": {+ "name": "asset_object_key_unique",+ "nullsNotDistinct": false,+ "columns": ["object_key"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.column": {+ "name": "column",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "slug": {+ "name": "slug",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "position": {+ "name": "position",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "default": 0+ },+ "icon": {+ "name": "icon",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "color": {+ "name": "color",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "is_final": {+ "name": "is_final",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "column_projectId_idx": {+ "name": "column_projectId_idx",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "column_project_id_project_id_fk": {+ "name": "column_project_id_project_id_fk",+ "tableFrom": "column",+ "tableTo": "project",+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.comment": {+ "name": "comment",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "comment_task_idx": {+ "name": "comment_task_idx",+ "columns": [+ {+ "expression": "task_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "comment_user_idx": {+ "name": "comment_user_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "comment_task_id_task_id_fk": {+ "name": "comment_task_id_task_id_fk",+ "tableFrom": "comment",+ "tableTo": "task",+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "comment_user_id_user_id_fk": {+ "name": "comment_user_id_user_id_fk",+ "tableFrom": "comment",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.external_link": {+ "name": "external_link",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "integration_id": {+ "name": "integration_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "resource_type": {+ "name": "resource_type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "external_id": {+ "name": "external_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "url": {+ "name": "url",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "external_link_taskId_idx": {+ "name": "external_link_taskId_idx",+ "columns": [+ {+ "expression": "task_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "external_link_integrationId_idx": {+ "name": "external_link_integrationId_idx",+ "columns": [+ {+ "expression": "integration_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "external_link_externalId_idx": {+ "name": "external_link_externalId_idx",+ "columns": [+ {+ "expression": "external_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "external_link_resourceType_idx": {+ "name": "external_link_resourceType_idx",+ "columns": [+ {+ "expression": "resource_type",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "external_link_task_id_task_id_fk": {+ "name": "external_link_task_id_task_id_fk",+ "tableFrom": "external_link",+ "tableTo": "task",+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "external_link_integration_id_integration_id_fk": {+ "name": "external_link_integration_id_integration_id_fk",+ "tableFrom": "external_link",+ "tableTo": "integration",+ "columnsFrom": ["integration_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.github_integration": {+ "name": "github_integration",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "repository_owner": {+ "name": "repository_owner",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "repository_name": {+ "name": "repository_name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "installation_id": {+ "name": "installation_id",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "is_active": {+ "name": "is_active",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {},+ "foreignKeys": {+ "github_integration_project_id_project_id_fk": {+ "name": "github_integration_project_id_project_id_fk",+ "tableFrom": "github_integration",+ "tableTo": "project",+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "github_integration_project_id_unique": {+ "name": "github_integration_project_id_unique",+ "nullsNotDistinct": false,+ "columns": ["project_id"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.integration": {+ "name": "integration",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "type": {+ "name": "type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "config": {+ "name": "config",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "is_active": {+ "name": "is_active",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "integration_projectId_idx": {+ "name": "integration_projectId_idx",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "integration_type_idx": {+ "name": "integration_type_idx",+ "columns": [+ {+ "expression": "type",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "integration_project_id_project_id_fk": {+ "name": "integration_project_id_project_id_fk",+ "tableFrom": "integration",+ "tableTo": "project",+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "integration_project_type_unique": {+ "name": "integration_project_type_unique",+ "nullsNotDistinct": false,+ "columns": ["project_id", "type"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.invitation": {+ "name": "invitation",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "email": {+ "name": "email",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "role": {+ "name": "role",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "team_id": {+ "name": "team_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'pending'"+ },+ "expires_at": {+ "name": "expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "inviter_id": {+ "name": "inviter_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "invitation_workspaceId_idx": {+ "name": "invitation_workspaceId_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "invitation_email_idx": {+ "name": "invitation_email_idx",+ "columns": [+ {+ "expression": "email",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "invitation_workspace_id_workspace_id_fk": {+ "name": "invitation_workspace_id_workspace_id_fk",+ "tableFrom": "invitation",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "invitation_inviter_id_user_id_fk": {+ "name": "invitation_inviter_id_user_id_fk",+ "tableFrom": "invitation",+ "tableTo": "user",+ "columnsFrom": ["inviter_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.label": {+ "name": "label",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "color": {+ "name": "color",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {},+ "foreignKeys": {+ "label_task_id_task_id_fk": {+ "name": "label_task_id_task_id_fk",+ "tableFrom": "label",+ "tableTo": "task",+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "label_workspace_id_workspace_id_fk": {+ "name": "label_workspace_id_workspace_id_fk",+ "tableFrom": "label",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.notification": {+ "name": "notification",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "type": {+ "name": "type",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'info'"+ },+ "event_data": {+ "name": "event_data",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "is_read": {+ "name": "is_read",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": false+ },+ "resource_id": {+ "name": "resource_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "resource_type": {+ "name": "resource_type",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {},+ "foreignKeys": {+ "notification_user_id_user_id_fk": {+ "name": "notification_user_id_user_id_fk",+ "tableFrom": "notification",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.project": {+ "name": "project",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "slug": {+ "name": "slug",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "icon": {+ "name": "icon",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "default": "'Layout'"+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "is_public": {+ "name": "is_public",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": false+ },+ "archived_at": {+ "name": "archived_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {},+ "foreignKeys": {+ "project_workspace_id_workspace_id_fk": {+ "name": "project_workspace_id_workspace_id_fk",+ "tableFrom": "project",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "project_workspace_id_id_unique": {+ "name": "project_workspace_id_id_unique",+ "nullsNotDistinct": false,+ "columns": ["workspace_id", "id"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.session": {+ "name": "session",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "expires_at": {+ "name": "expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "token": {+ "name": "token",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "ip_address": {+ "name": "ip_address",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "user_agent": {+ "name": "user_agent",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "active_organization_id": {+ "name": "active_organization_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "active_team_id": {+ "name": "active_team_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {+ "session_userId_idx": {+ "name": "session_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "session_user_id_user_id_fk": {+ "name": "session_user_id_user_id_fk",+ "tableFrom": "session",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "session_token_unique": {+ "name": "session_token_unique",+ "nullsNotDistinct": false,+ "columns": ["token"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.task_relation": {+ "name": "task_relation",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "source_task_id": {+ "name": "source_task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "target_task_id": {+ "name": "target_task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "relation_type": {+ "name": "relation_type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "task_relation_source_idx": {+ "name": "task_relation_source_idx",+ "columns": [+ {+ "expression": "source_task_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "task_relation_target_idx": {+ "name": "task_relation_target_idx",+ "columns": [+ {+ "expression": "target_task_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "task_relation_source_task_id_task_id_fk": {+ "name": "task_relation_source_task_id_task_id_fk",+ "tableFrom": "task_relation",+ "tableTo": "task",+ "columnsFrom": ["source_task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "task_relation_target_task_id_task_id_fk": {+ "name": "task_relation_target_task_id_task_id_fk",+ "tableFrom": "task_relation",+ "tableTo": "task",+ "columnsFrom": ["target_task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.task": {+ "name": "task",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "position": {+ "name": "position",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "default": 0+ },+ "number": {+ "name": "number",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "default": 1+ },+ "assignee_id": {+ "name": "assignee_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'to-do'"+ },+ "column_id": {+ "name": "column_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "priority": {+ "name": "priority",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "default": "'low'"+ },+ "start_date": {+ "name": "start_date",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "due_date": {+ "name": "due_date",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {},+ "foreignKeys": {+ "task_project_id_project_id_fk": {+ "name": "task_project_id_project_id_fk",+ "tableFrom": "task",+ "tableTo": "project",+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "task_assignee_id_user_id_fk": {+ "name": "task_assignee_id_user_id_fk",+ "tableFrom": "task",+ "tableTo": "user",+ "columnsFrom": ["assignee_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "task_column_id_column_id_fk": {+ "name": "task_column_id_column_id_fk",+ "tableFrom": "task",+ "tableTo": "column",+ "columnsFrom": ["column_id"],+ "columnsTo": ["id"],+ "onDelete": "set null",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.team": {+ "name": "team",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {+ "team_workspaceId_idx": {+ "name": "team_workspaceId_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "team_workspace_id_workspace_id_fk": {+ "name": "team_workspace_id_workspace_id_fk",+ "tableFrom": "team",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.team_member": {+ "name": "team_member",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "team_id": {+ "name": "team_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ }+ },+ "indexes": {+ "teamMember_teamId_idx": {+ "name": "teamMember_teamId_idx",+ "columns": [+ {+ "expression": "team_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "teamMember_userId_idx": {+ "name": "teamMember_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "team_member_team_id_team_id_fk": {+ "name": "team_member_team_id_team_id_fk",+ "tableFrom": "team_member",+ "tableTo": "team",+ "columnsFrom": ["team_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "team_member_user_id_user_id_fk": {+ "name": "team_member_user_id_user_id_fk",+ "tableFrom": "team_member",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.time_entry": {+ "name": "time_entry",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "start_time": {+ "name": "start_time",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "end_time": {+ "name": "end_time",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "duration": {+ "name": "duration",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "default": 0+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {},+ "foreignKeys": {+ "time_entry_task_id_task_id_fk": {+ "name": "time_entry_task_id_task_id_fk",+ "tableFrom": "time_entry",+ "tableTo": "task",+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "time_entry_user_id_user_id_fk": {+ "name": "time_entry_user_id_user_id_fk",+ "tableFrom": "time_entry",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.user": {+ "name": "user",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "email": {+ "name": "email",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "email_verified": {+ "name": "email_verified",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true+ },+ "image": {+ "name": "image",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "locale": {+ "name": "locale",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "is_anonymous": {+ "name": "is_anonymous",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false,+ "default": false+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "user_email_unique": {+ "name": "user_email_unique",+ "nullsNotDistinct": false,+ "columns": ["email"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.user_notification_preference": {+ "name": "user_notification_preference",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "email_enabled": {+ "name": "email_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "ntfy_enabled": {+ "name": "ntfy_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "ntfy_server_url": {+ "name": "ntfy_server_url",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "ntfy_topic": {+ "name": "ntfy_topic",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "ntfy_token": {+ "name": "ntfy_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "gotify_enabled": {+ "name": "gotify_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "gotify_server_url": {+ "name": "gotify_server_url",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "gotify_token": {+ "name": "gotify_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "webhook_enabled": {+ "name": "webhook_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "webhook_url": {+ "name": "webhook_url",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "webhook_secret": {+ "name": "webhook_secret",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {},+ "foreignKeys": {+ "user_notification_preference_user_id_user_id_fk": {+ "name": "user_notification_preference_user_id_user_id_fk",+ "tableFrom": "user_notification_preference",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "user_notification_preference_user_id_unique": {+ "name": "user_notification_preference_user_id_unique",+ "nullsNotDistinct": false,+ "columns": ["user_id"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.user_notification_workspace_project": {+ "name": "user_notification_workspace_project",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_rule_id": {+ "name": "workspace_rule_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "user_notification_workspace_project_ruleId_idx": {+ "name": "user_notification_workspace_project_ruleId_idx",+ "columns": [+ {+ "expression": "workspace_rule_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "user_notification_workspace_project_projectId_idx": {+ "name": "user_notification_workspace_project_projectId_idx",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "user_notification_workspace_project_workspace_id_workspace_id_fk": {+ "name": "user_notification_workspace_project_workspace_id_workspace_id_fk",+ "tableFrom": "user_notification_workspace_project",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "user_notification_workspace_project_workspace_id_workspace_rule_id_user_notification_workspace_rule_workspace_id_id_fk": {+ "name": "user_notification_workspace_project_workspace_id_workspace_rule_id_user_notification_workspace_rule_workspace_id_id_fk",+ "tableFrom": "user_notification_workspace_project",+ "tableTo": "user_notification_workspace_rule",+ "columnsFrom": ["workspace_id", "workspace_rule_id"],+ "columnsTo": ["workspace_id", "id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "user_notification_workspace_project_workspace_id_project_id_project_workspace_id_id_fk": {+ "name": "user_notification_workspace_project_workspace_id_project_id_project_workspace_id_id_fk",+ "tableFrom": "user_notification_workspace_project",+ "tableTo": "project",+ "columnsFrom": ["workspace_id", "project_id"],+ "columnsTo": ["workspace_id", "id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "user_notification_workspace_project_rule_project_unique": {+ "name": "user_notification_workspace_project_rule_project_unique",+ "nullsNotDistinct": false,+ "columns": ["workspace_rule_id", "project_id"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.user_notification_workspace_rule": {+ "name": "user_notification_workspace_rule",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "is_active": {+ "name": "is_active",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": true+ },+ "email_enabled": {+ "name": "email_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "ntfy_enabled": {+ "name": "ntfy_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "gotify_enabled": {+ "name": "gotify_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "webhook_enabled": {+ "name": "webhook_enabled",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "project_mode": {+ "name": "project_mode",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'all'"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "user_notification_workspace_rule_userId_idx": {+ "name": "user_notification_workspace_rule_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "user_notification_workspace_rule_workspaceId_idx": {+ "name": "user_notification_workspace_rule_workspaceId_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "user_notification_workspace_rule_user_id_user_id_fk": {+ "name": "user_notification_workspace_rule_user_id_user_id_fk",+ "tableFrom": "user_notification_workspace_rule",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "user_notification_workspace_rule_workspace_id_workspace_id_fk": {+ "name": "user_notification_workspace_rule_workspace_id_workspace_id_fk",+ "tableFrom": "user_notification_workspace_rule",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "user_notification_workspace_rule_user_workspace_unique": {+ "name": "user_notification_workspace_rule_user_workspace_unique",+ "nullsNotDistinct": false,+ "columns": ["user_id", "workspace_id"]+ },+ "user_notification_workspace_rule_workspace_id_id_unique": {+ "name": "user_notification_workspace_rule_workspace_id_id_unique",+ "nullsNotDistinct": false,+ "columns": ["workspace_id", "id"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.verification": {+ "name": "verification",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "identifier": {+ "name": "identifier",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "value": {+ "name": "value",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "expires_at": {+ "name": "expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "verification_identifier_idx": {+ "name": "verification_identifier_idx",+ "columns": [+ {+ "expression": "identifier",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.workflow_rule": {+ "name": "workflow_rule",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "integration_type": {+ "name": "integration_type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "event_type": {+ "name": "event_type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "column_id": {+ "name": "column_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "workflow_rule_projectId_idx": {+ "name": "workflow_rule_projectId_idx",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "workflow_rule_project_id_project_id_fk": {+ "name": "workflow_rule_project_id_project_id_fk",+ "tableFrom": "workflow_rule",+ "tableTo": "project",+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ },+ "workflow_rule_column_id_column_id_fk": {+ "name": "workflow_rule_column_id_column_id_fk",+ "tableFrom": "workflow_rule",+ "tableTo": "column",+ "columnsFrom": ["column_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.workspace": {+ "name": "workspace",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "slug": {+ "name": "slug",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "logo": {+ "name": "logo",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "workspace_slug_unique": {+ "name": "workspace_slug_unique",+ "nullsNotDistinct": false,+ "columns": ["slug"]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.workspace_member": {+ "name": "workspace_member",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "role": {+ "name": "role",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'member'"+ },+ "joined_at": {+ "name": "joined_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "workspace_member_workspaceId_idx": {+ "name": "workspace_member_workspaceId_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "workspace_member_userId_idx": {+ "name": "workspace_member_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "workspace_member_workspace_id_workspace_id_fk": {+ "name": "workspace_member_workspace_id_workspace_id_fk",+ "tableFrom": "workspace_member",+ "tableTo": "workspace",+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "workspace_member_user_id_user_id_fk": {+ "name": "workspace_member_user_id_user_id_fk",+ "tableFrom": "workspace_member",+ "tableTo": "user",+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ }+ },+ "enums": {},+ "schemas": {},+ "sequences": {},+ "roles": {},+ "policies": {},+ "views": {},+ "_meta": {+ "columns": {},+ "schemas": {},+ "tables": {}+ }+}diff --git a/apps/api/drizzle/meta/_journal.json b/apps/api/drizzle/meta/_journal.jsonindex 59309dd19..6111ff5f7 100644--- a/apps/api/drizzle/meta/_journal.json+++ b/apps/api/drizzle/meta/_journal.json@@ -155,6 +155,13 @@"when": 1775037521104,"tag": "0021_tiny_bill_hollister","breakpoints": true+ },+ {+ "idx": 22,+ "version": "7",+ "when": 1775039833883,+ "tag": "0022_real_deathstrike",+ "breakpoints": true}]}diff --git a/apps/api/src/database/relations.ts b/apps/api/src/database/relations.tsindex 603ad18d3..9c46209f9 100644--- a/apps/api/src/database/relations.ts+++ b/apps/api/src/database/relations.ts@@ -246,12 +246,21 @@ export const userNotificationWorkspaceProjectTableRelations = relations(userNotificationWorkspaceProjectTable,({ one }) => ({workspaceRule: one(userNotificationWorkspaceRuleTable, {- fields: [userNotificationWorkspaceProjectTable.workspaceRuleId],- references: [userNotificationWorkspaceRuleTable.id],+ fields: [+ userNotificationWorkspaceProjectTable.workspaceId,+ userNotificationWorkspaceProjectTable.workspaceRuleId,+ ],+ references: [+ userNotificationWorkspaceRuleTable.workspaceId,+ userNotificationWorkspaceRuleTable.id,+ ],}),project: one(projectTable, {- fields: [userNotificationWorkspaceProjectTable.projectId],- references: [projectTable.id],+ fields: [+ userNotificationWorkspaceProjectTable.workspaceId,+ userNotificationWorkspaceProjectTable.projectId,+ ],+ references: [projectTable.workspaceId, projectTable.id],}),}),);diff --git a/apps/api/src/database/schema.ts b/apps/api/src/database/schema.tsindex e1a9f5017..04fb685bb 100644--- a/apps/api/src/database/schema.ts+++ b/apps/api/src/database/schema.ts@@ -2,6 +2,7 @@ import { createId } from "@paralleldrive/cuid2";import { relations } from "drizzle-orm";import {boolean,+ foreignKey,index,integer,jsonb,@@ -195,24 +196,30 @@ export const invitationTable = pgTable(],);-export const projectTable = pgTable("project", {- id: text("id")- .$defaultFn(() => createId())- .primaryKey(),- workspaceId: text("workspace_id")- .notNull()- .references(() => workspaceTable.id, {- onDelete: "cascade",- onUpdate: "cascade",- }),- slug: text("slug").notNull(),- icon: text("icon").default("Layout"),- name: text("name").notNull(),- description: text("description"),- createdAt: timestamp("created_at", { mode: "date" }).defaultNow().notNull(),- isPublic: boolean("is_public").default(false),- archivedAt: timestamp("archived_at", { mode: "date" }),-});+export const projectTable = pgTable(+ "project",+ {+ id: text("id")+ .$defaultFn(() => createId())+ .primaryKey(),+ workspaceId: text("workspace_id")+ .notNull()+ .references(() => workspaceTable.id, {+ onDelete: "cascade",+ onUpdate: "cascade",+ }),+ slug: text("slug").notNull(),+ icon: text("icon").default("Layout"),+ name: text("name").notNull(),+ description: text("description"),+ createdAt: timestamp("created_at", { mode: "date" }).defaultNow().notNull(),+ isPublic: boolean("is_public").default(false),+ archivedAt: timestamp("archived_at", { mode: "date" }),+ },+ (table) => [+ unique("project_workspace_id_id_unique").on(table.workspaceId, table.id),+ ],+);export const columnTable = pgTable("column",@@ -432,8 +439,12 @@ export const notificationTable = pgTable("notification", {export const userNotificationPreferenceTable = pgTable("user_notification_preference",{+ id: text("id")+ .$defaultFn(() => createId())+ .primaryKey(),userId: text("user_id")- .primaryKey()+ .notNull()+ .unique().references(() => userTable.id, {onDelete: "cascade",onUpdate: "cascade",@@ -496,6 +507,10 @@ export const userNotificationWorkspaceRuleTable = pgTable(table.userId,table.workspaceId,),+ unique("user_notification_workspace_rule_workspace_id_id_unique").on(+ table.workspaceId,+ table.id,+ ),],);@@ -505,21 +520,36 @@ export const userNotificationWorkspaceProjectTable = pgTable(id: text("id").$defaultFn(() => createId()).primaryKey(),- workspaceRuleId: text("workspace_rule_id")- .notNull()- .references(() => userNotificationWorkspaceRuleTable.id, {- onDelete: "cascade",- onUpdate: "cascade",- }),- projectId: text("project_id")+ workspaceId: text("workspace_id").notNull()- .references(() => projectTable.id, {+ .references(() => workspaceTable.id, {onDelete: "cascade",onUpdate: "cascade",}),+ workspaceRuleId: text("workspace_rule_id").notNull(),+ projectId: text("project_id").notNull(),createdAt: timestamp("created_at", { mode: "date" }).defaultNow().notNull(),+ updatedAt: timestamp("updated_at", { mode: "date" })+ .defaultNow()+ .$onUpdate(() => new Date())+ .notNull(),},(table) => [+ foreignKey({+ columns: [table.workspaceId, table.workspaceRuleId],+ foreignColumns: [+ userNotificationWorkspaceRuleTable.workspaceId,+ userNotificationWorkspaceRuleTable.id,+ ],+ })+ .onDelete("cascade")+ .onUpdate("cascade"),+ foreignKey({+ columns: [table.workspaceId, table.projectId],+ foreignColumns: [projectTable.workspaceId, projectTable.id],+ })+ .onDelete("cascade")+ .onUpdate("cascade"),index("user_notification_workspace_project_ruleId_idx").on(table.workspaceRuleId,),diff --git a/apps/api/src/notification-preferences/delivery.ts b/apps/api/src/notification-preferences/delivery.tsindex 17fe6e616..5bbae0d62 100644--- a/apps/api/src/notification-preferences/delivery.ts+++ b/apps/api/src/notification-preferences/delivery.ts@@ -1,19 +1,35 @@import { createHmac } from "node:crypto";import { sendNotificationEmail } from "@kaneo/email";-import { and, eq, inArray } from "drizzle-orm";+import { and, eq } from "drizzle-orm";import db from "../database";import {notificationTable,projectTable,taskTable,userNotificationPreferenceTable,- userNotificationWorkspaceProjectTable,userNotificationWorkspaceRuleTable,userTable,workspaceTable,} from "../database/schema";import { assertPublicWebhookDestination } from "../plugins/generic-webhook/config";+const DEFAULT_OUTBOUND_FETCH_TIMEOUT_MS = 15_000;++async function fetchWithTimeout(+ url: string,+ init: RequestInit & { timeoutMs?: number },+): Promise<Response> {+ const timeoutMs = init.timeoutMs ?? DEFAULT_OUTBOUND_FETCH_TIMEOUT_MS;+ const { timeoutMs: _timeout, ...rest } = init;+ const controller = new AbortController();+ const timer = setTimeout(() => controller.abort(), timeoutMs);+ try {+ return await fetch(url, { ...rest, signal: controller.signal });+ } finally {+ clearTimeout(timer);+ }+}+type ResolvedNotificationContext = {workspaceId: string;workspaceName: string;@@ -195,7 +211,7 @@ async function sendNtfyNotification(input: {}) {await assertPublicWebhookDestination(input.serverUrl);- const response = await fetch(+ const response = await fetchWithTimeout(`${input.serverUrl.replace(/\/+$/, "")}/${encodeURIComponent(input.topic)}`,{method: "POST",@@ -224,7 +240,8 @@ async function sendGotifyNotification(input: {}) {await assertPublicWebhookDestination(input.serverUrl);- const response = await fetch(+ // Gotify expects the app token in the query string; that can surface in logs, proxies, and browser history — factor this into Gotify placement and log handling.+ const response = await fetchWithTimeout(`${input.serverUrl.replace(/\/+$/, "")}/message?token=${encodeURIComponent(input.token,)}`,@@ -278,7 +295,7 @@ async function sendWebhookNotification(input: {.digest("hex");}- const response = await fetch(input.webhookUrl, {+ const response = await fetchWithTimeout(input.webhookUrl, {method: "POST",headers,body,@@ -304,6 +321,14 @@ export async function deliverNotification(const context = await resolveNotificationContext(notification);if (!context) {+ console.info("Notification delivery skipped: unresolved context", {+ notificationId,+ notificationTableId: notification.id,+ resourceType: notification.resourceType,+ resourceId: notification.resourceId,+ reason:+ "resolveNotificationContext returned null (missing resource, deleted task, or unsupported resource type)",+ });return;}@@ -471,29 +496,3 @@ export async function deliverNotification(}}}--export async function hasSelectedProjects(- userId: string,- workspaceId: string,- projectIds: string[],-) {- const rows = await db- .select({ projectId: userNotificationWorkspaceProjectTable.projectId })- .from(userNotificationWorkspaceProjectTable)- .innerJoin(- userNotificationWorkspaceRuleTable,- eq(- userNotificationWorkspaceProjectTable.workspaceRuleId,- userNotificationWorkspaceRuleTable.id,- ),- )- .where(- and(- eq(userNotificationWorkspaceRuleTable.userId, userId),- eq(userNotificationWorkspaceRuleTable.workspaceId, workspaceId),- inArray(userNotificationWorkspaceProjectTable.projectId, projectIds),- ),- );-- return rows.length > 0;-}diff --git a/apps/api/src/notification-preferences/index.ts b/apps/api/src/notification-preferences/index.tsindex 9cadda17c..00be494d5 100644--- a/apps/api/src/notification-preferences/index.ts+++ b/apps/api/src/notification-preferences/index.ts@@ -9,6 +9,8 @@ import {upsertWorkspaceRule,} from "./service";+const httpErrorSchema = v.object({ message: v.string() });+const workspaceRuleSchema = v.object({isActive: v.boolean(),emailEnabled: v.boolean(),@@ -42,6 +44,24 @@ notificationPreferences},},},+ 400: {+ description: "Validation error",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 401: {+ description: "Unauthorized",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 403: {+ description: "Forbidden",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },},}),async (c) => {@@ -67,6 +87,24 @@ notificationPreferences},},},+ 400: {+ description: "Validation error",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 401: {+ description: "Unauthorized",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 403: {+ description: "Forbidden",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },},}),validator(@@ -110,6 +148,24 @@ notificationPreferences},},},+ 400: {+ description: "Validation error",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 401: {+ description: "Unauthorized",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 403: {+ description: "Forbidden",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },},}),validator("param", v.object({ workspaceId: v.string() })),@@ -140,6 +196,30 @@ notificationPreferences},},},+ 400: {+ description: "Validation error",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 401: {+ description: "Unauthorized",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 403: {+ description: "Forbidden",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },+ 404: {+ description: "Workspace rule not found",+ content: {+ "application/json": { schema: resolver(httpErrorSchema) },+ },+ },},}),validator("param", v.object({ workspaceId: v.string() })),diff --git a/apps/api/src/notification-preferences/service.ts b/apps/api/src/notification-preferences/service.tsindex 65842d405..bf8564d7f 100644--- a/apps/api/src/notification-preferences/service.ts+++ b/apps/api/src/notification-preferences/service.ts@@ -317,31 +317,36 @@ export async function updateNotificationPreferences(await db.insert(userNotificationPreferenceTable).values(data);}+ const ruleCascade: {+ emailEnabled?: boolean;+ ntfyEnabled?: boolean;+ gotifyEnabled?: boolean;+ webhookEnabled?: boolean;+ } = {};+if (!emailEnabled) {- await db- .update(userNotificationWorkspaceRuleTable)- .set({ emailEnabled: false, updatedAt: new Date() })- .where(eq(userNotificationWorkspaceRuleTable.userId, userId));+ ruleCascade.emailEnabled = false;}if (!ntfyEnabled || !ntfyServerUrl || !ntfyTopic) {- await db- .update(userNotificationWorkspaceRuleTable)- .set({ ntfyEnabled: false, updatedAt: new Date() })- .where(eq(userNotificationWorkspaceRuleTable.userId, userId));+ ruleCascade.ntfyEnabled = false;}if (!gotifyEnabled || !gotifyServerUrl || !data.gotifyToken) {- await db- .update(userNotificationWorkspaceRuleTable)- .set({ gotifyEnabled: false, updatedAt: new Date() })- .where(eq(userNotificationWorkspaceRuleTable.userId, userId));+ ruleCascade.gotifyEnabled = false;}if (!webhookEnabled || !webhookUrl) {+ ruleCascade.webhookEnabled = false;+ }++ if (Object.keys(ruleCascade).length > 0) {await db.update(userNotificationWorkspaceRuleTable)- .set({ webhookEnabled: false, updatedAt: new Date() })+ .set({+ ...ruleCascade,+ updatedAt: new Date(),+ }).where(eq(userNotificationWorkspaceRuleTable.userId, userId));}@@ -460,6 +465,7 @@ export async function upsertWorkspaceRule(if (input.projectMode === "selected") {await db.insert(userNotificationWorkspaceProjectTable).values((input.selectedProjectIds ?? []).map((projectId) => ({+ workspaceId,workspaceRuleId,projectId,})),@@ -495,19 +501,3 @@ export async function deleteWorkspaceRule(return getNotificationPreferences(userId, emailAddress);}--export async function listWorkspaceProjects(- workspaceId: string,- userId: string,-) {- await assertWorkspaceMembership(userId, workspaceId);-- return db- .select({- id: projectTable.id,- name: projectTable.name,- workspaceId: projectTable.workspaceId,- })- .from(projectTable)- .where(eq(projectTable.workspaceId, workspaceId));-}diff --git a/apps/api/src/schemas.ts b/apps/api/src/schemas.tsindex 658436c20..1bf46bbf2 100644--- a/apps/api/src/schemas.ts+++ b/apps/api/src/schemas.ts@@ -109,8 +109,8 @@ export const notificationPreferenceWorkspaceRuleSchema = v.object({webhookEnabled: v.boolean(),projectMode: v.picklist(["all", "selected"] as const),selectedProjectIds: v.array(v.string()),- createdAt: v.date(),- updatedAt: v.date(),+ createdAt: v.string(),+ updatedAt: v.string(),});export const notificationPreferenceSchema = v.object({@@ -133,8 +133,8 @@ export const notificationPreferenceSchema = v.object({webhookSecretConfigured: v.boolean(),maskedWebhookSecret: v.nullable(v.string()),workspaces: v.array(notificationPreferenceWorkspaceRuleSchema),- createdAt: v.nullable(v.date()),- updatedAt: v.nullable(v.date()),+ createdAt: v.nullable(v.string()),+ updatedAt: v.nullable(v.string()),});export const githubIntegrationSchema = v.object({diff --git a/apps/docs/core/functional/account-notifications.mdx b/apps/docs/core/functional/account-notifications.mdxindex 61f44318a..f48b1bce7 100644--- a/apps/docs/core/functional/account-notifications.mdx+++ b/apps/docs/core/functional/account-notifications.mdx@@ -1,6 +1,6 @@---title: Account Notifications-description: Deliver your personal Kaneo notifications by email, ntfy, or a custom webhook with workspace and project scoping+description: Deliver your personal Kaneo notifications by email, ntfy, Gotify, or a custom webhook with workspace and project scoping---Kaneo can keep the normal in-app notification inbox and also forward matching notifications to external channels for the signed-in user.@@ -9,8 +9,7 @@ You can configure this under:1. Open **Settings**2. Open **Account**-3. Open **Information**-4. Scroll to **Notifications**+3. Open **Notifications**## Available channels@@ -18,6 +17,7 @@ Users can forward matching notifications through:- `Email`- `ntfy`+- `Gotify`- `Custom webhook`These settings are personal to the signed-in account. They do not change notification routing for other users in the workspace.@@ -39,6 +39,7 @@ Important rules:The Notifications page includes separate connection cards for:- `Email`+- `Gotify`- `ntfy`- `Custom webhook`@@ -77,7 +78,7 @@ Below the global channel cards, Kaneo shows workspace delivery rules.Each workspace rule can:- be active or paused-- enable or disable `Email`, `ntfy`, and `Custom webhook`+- enable or disable `Email`, `Gotify`, `ntfy`, and `Custom webhook`- apply to `All projects`- or apply to `Selected projects` only@@ -112,6 +113,7 @@ Private or non-routable destinations are rejected, including examples like:This applies to:- `ntfy` server URLs+- `Gotify` server URLs- custom webhook URLsIf you are using a self-hosted ntfy instance or webhook receiver, it must be reachable from the API with an accepted public or routable hostname.diff --git a/apps/web/src/components/account/notification-preferences-settings.tsx b/apps/web/src/components/account/notification-preferences-settings.tsxindex 5741bb6d4..46d369450 100644--- a/apps/web/src/components/account/notification-preferences-settings.tsx+++ b/apps/web/src/components/account/notification-preferences-settings.tsx@@ -16,7 +16,6 @@ import {import useGetNotificationPreferences from "@/hooks/queries/notification-preferences/use-get-notification-preferences";import useGetProjects from "@/hooks/queries/project/use-get-projects";import useGetWorkspaces from "@/hooks/queries/workspace/use-get-workspaces";-import { toast } from "@/lib/toast";type WorkspaceSummary = {id: string;@@ -33,6 +32,55 @@ type WorkspaceRuleState = {selectedProjectIds: string[];};+type GlobalChannelPrefsState = {+ emailEnabled: boolean;+ ntfy: { enabled: boolean; serverUrl: string; topic: string; token: string };+ gotify: { enabled: boolean; serverUrl: string; token: string };+ webhook: { enabled: boolean; url: string; secret: string };+};++function createDefaultGlobalChannelPrefs(): GlobalChannelPrefsState {+ return {+ emailEnabled: false,+ ntfy: { enabled: false, serverUrl: "", topic: "", token: "" },+ gotify: { enabled: false, serverUrl: "", token: "" },+ webhook: { enabled: false, url: "", secret: "" },+ };+}++function ChannelCard({+ actions,+ channel,+ children,+ description,+ headerRight,+ title,+}: {+ channel: "email" | "gotify" | "ntfy" | "webhook";+ title: React.ReactNode;+ description: React.ReactNode;+ headerRight: React.ReactNode;+ children: React.ReactNode;+ actions: React.ReactNode;+}) {+ return (+ <div+ className="space-y-4 rounded-md border border-border bg-sidebar p-4"+ data-channel={channel}+ >+ <div className="flex items-start justify-between gap-4">+ <div className="space-y-1">+ <h3 className="font-medium">{title}</h3>+ <p className="text-sm text-muted-foreground">{description}</p>+ </div>+ {headerRight}+ </div>+ {children}+ {actions}+ </div>+ );+}+function ChannelToggle({checked,disabled,@@ -319,20 +367,9 @@ function WorkspaceRuleCard({<Buttondisabled={isBusy}onClick={async () => {+ setIsSaving(true);try {- setIsSaving(true);await onSave(workspace.id, state);- toast.success(- t("settings:notificationsPage.toastRuleSaved", {- workspaceName: workspace.name,- }),- );- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t("settings:notificationsPage.toastRuleSaveFailed"),- );} finally {setIsSaving(false);}@@ -347,20 +384,9 @@ function WorkspaceRuleCard({<Buttondisabled={isBusy}onClick={async () => {+ setIsDeleting(true);try {- setIsDeleting(true);await onDelete(workspace.id);- toast.success(- t("settings:notificationsPage.toastRuleRemoved", {- workspaceName: workspace.name,- }),- );- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t("settings:notificationsPage.toastRuleRemoveFailed"),- );} finally {setIsDeleting(false);}@@ -397,31 +423,31 @@ export function NotificationPreferencesSettings() {[workspacesData],);- const [emailEnabled, setEmailEnabled] = React.useState(false);- const [ntfyEnabled, setNtfyEnabled] = React.useState(false);- const [ntfyServerUrl, setNtfyServerUrl] = React.useState("");- const [ntfyTopic, setNtfyTopic] = React.useState("");- const [ntfyToken, setNtfyToken] = React.useState("");- const [gotifyEnabled, setGotifyEnabled] = React.useState(false);- const [gotifyServerUrl, setGotifyServerUrl] = React.useState("");- const [gotifyToken, setGotifyToken] = React.useState("");- const [webhookEnabled, setWebhookEnabled] = React.useState(false);- const [webhookUrl, setWebhookUrl] = React.useState("");- const [webhookSecret, setWebhookSecret] = React.useState("");+ const [globalPrefs, setGlobalPrefs] = React.useState<GlobalChannelPrefsState>(+ createDefaultGlobalChannelPrefs,+ );React.useEffect(() => {if (!preferences) return;- setEmailEnabled(preferences.emailEnabled);- setNtfyEnabled(preferences.ntfyEnabled);- setNtfyServerUrl(preferences.ntfyServerUrl ?? "");- setNtfyTopic(preferences.ntfyTopic ?? "");- setNtfyToken("");- setGotifyEnabled(preferences.gotifyEnabled);- setGotifyServerUrl(preferences.gotifyServerUrl ?? "");- setGotifyToken("");- setWebhookEnabled(preferences.webhookEnabled);- setWebhookUrl(preferences.webhookUrl ?? "");- setWebhookSecret("");+ setGlobalPrefs({+ emailEnabled: preferences.emailEnabled,+ ntfy: {+ enabled: preferences.ntfyEnabled,+ serverUrl: preferences.ntfyServerUrl ?? "",+ topic: preferences.ntfyTopic ?? "",+ token: "",+ },+ gotify: {+ enabled: preferences.gotifyEnabled,+ serverUrl: preferences.gotifyServerUrl ?? "",+ token: "",+ },+ webhook: {+ enabled: preferences.webhookEnabled,+ url: preferences.webhookUrl ?? "",+ secret: "",+ },+ });}, [preferences]);const workspaceRuleMap = React.useMemo(@@ -447,16 +473,25 @@ export function NotificationPreferencesSettings() {return (<div className="space-y-8">- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">- <div className="flex items-start justify-between gap-4">- <div className="space-y-1">- <h3 className="font-medium">- {t("settings:notificationsPage.emailTitle")}- </h3>- <p className="text-sm text-muted-foreground">- {t("settings:notificationsPage.emailDescription")}- </p>+ <ChannelCard+ actions={+ <div className="flex gap-2">+ <Button+ disabled={isSavingPreferences || !preferences?.emailAddress}+ onClick={async () => {+ await updatePreferences({+ emailEnabled: globalPrefs.emailEnabled,+ });+ }}+ type="button"+ >+ {t("settings:notificationsPage.saveChanges")}+ </Button></div>+ }+ channel="email"+ description={t("settings:notificationsPage.emailDescription")}+ headerRight={<div className="flex items-center gap-3">{preferences?.emailEnabled ? (<div className="flex items-center gap-2 text-sm text-muted-foreground">@@ -465,13 +500,16 @@ export function NotificationPreferencesSettings() {</div>) : null}<Switch- checked={emailEnabled}+ checked={globalPrefs.emailEnabled}disabled={isSavingPreferences || !preferences?.emailAddress}- onCheckedChange={setEmailEnabled}+ onCheckedChange={(checked) =>+ setGlobalPrefs((prev) => ({ ...prev, emailEnabled: checked }))+ }/></div>- </div>-+ }+ title={t("settings:notificationsPage.emailTitle")}+ ><div className="space-y-1"><Label className="text-sm font-medium">{t("settings:notificationsPage.accountEmailLabel")}@@ -488,39 +526,62 @@ export function NotificationPreferencesSettings() {{t("settings:notificationsPage.accountEmailHint")}</p></div>+ </ChannelCard>- <div className="flex gap-2">- <Button- disabled={isSavingPreferences || !preferences?.emailAddress}- onClick={async () => {- try {- await updatePreferences({ emailEnabled });- toast.success(t("settings:notificationsPage.toastEmailSaved"));- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t("settings:notificationsPage.toastEmailSaveFailed"),- );- }- }}- type="button"- >- {t("settings:notificationsPage.saveChanges")}- </Button>- </div>- </div>-- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">- <div className="flex items-start justify-between gap-4">- <div className="space-y-1">- <h3 className="font-medium">- {t("settings:notificationsPage.gotifyTitle")}- </h3>- <p className="text-sm text-muted-foreground">- {t("settings:notificationsPage.gotifyDescription")}- </p>+ <ChannelCard+ actions={+ <div className="flex flex-wrap gap-2">+ <Button+ disabled={isSavingPreferences}+ onClick={async () => {+ await updatePreferences({+ gotifyEnabled: globalPrefs.gotify.enabled,+ gotifyServerUrl: globalPrefs.gotify.serverUrl,+ gotifyToken: globalPrefs.gotify.token.trim()+ ? globalPrefs.gotify.token+ : undefined,+ });+ setGlobalPrefs((prev) => ({+ ...prev,+ gotify: { ...prev.gotify, token: "" },+ }));+ }}+ type="button"+ >+ {preferences?.gotifyConfigured+ ? t("settings:notificationsPage.saveChanges")+ : t("settings:notificationsPage.connectGotify")}+ </Button>+ {preferences?.gotifyConfigured ? (+ <Button+ disabled={isSavingPreferences}+ onClick={async () => {+ await updatePreferences({+ gotifyEnabled: false,+ gotifyServerUrl: null,+ gotifyToken: null,+ });+ setGlobalPrefs((prev) => ({+ ...prev,+ gotify: {+ enabled: false,+ serverUrl: "",+ token: "",+ },+ }));+ }}+ type="button"+ variant="outline"+ >+ <Trash2 className="size-4" />+ {t("settings:notificationsPage.disconnect")}+ </Button>+ ) : null}</div>+ }+ channel="gotify"+ description={t("settings:notificationsPage.gotifyDescription")}+ headerRight={<div className="flex items-center gap-3">{preferences?.gotifyConfigured ? (<div className="flex items-center gap-2 text-sm text-muted-foreground">@@ -533,13 +594,19 @@ export function NotificationPreferencesSettings() {</div>) : null}<Switch- checked={gotifyEnabled}+ checked={globalPrefs.gotify.enabled}disabled={isSavingPreferences}- onCheckedChange={setGotifyEnabled}+ onCheckedChange={(checked) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ gotify: { ...prev.gotify, enabled: checked },+ }))+ }/></div>- </div>-+ }+ title={t("settings:notificationsPage.gotifyTitle")}+ ><div className="space-y-4"><div className="space-y-1"><Label className="text-sm font-medium">@@ -550,8 +617,13 @@ export function NotificationPreferencesSettings() {placeholder={t("settings:notificationsPage.gotifyServerPlaceholder",)}- value={gotifyServerUrl}- onChange={(event) => setGotifyServerUrl(event.target.value)}+ value={globalPrefs.gotify.serverUrl}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ gotify: { ...prev.gotify, serverUrl: event.target.value },+ }))+ }/></div><div className="space-y-1">@@ -564,8 +636,13 @@ export function NotificationPreferencesSettings() {"settings:notificationsPage.gotifyTokenPlaceholder",)}type="password"- value={gotifyToken}- onChange={(event) => setGotifyToken(event.target.value)}+ value={globalPrefs.gotify.token}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ gotify: { ...prev.gotify, token: event.target.value },+ }))+ }/><p className="text-xs text-muted-foreground">{preferences?.gotifyTokenConfigured@@ -576,79 +653,65 @@ export function NotificationPreferencesSettings() {</p></div></div>+ </ChannelCard>- <div className="flex flex-wrap gap-2">- <Button- disabled={isSavingPreferences}- onClick={async () => {- try {- await updatePreferences({- gotifyEnabled,- gotifyServerUrl,- gotifyToken: gotifyToken.trim() ? gotifyToken : undefined,- });- setGotifyToken("");- toast.success(t("settings:notificationsPage.toastGotifySaved"));- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t("settings:notificationsPage.toastGotifySaveFailed"),- );- }- }}- type="button"- >- {preferences?.gotifyConfigured- ? t("settings:notificationsPage.saveChanges")- : t("settings:notificationsPage.connectGotify")}- </Button>- {preferences?.gotifyConfigured ? (+ <ChannelCard+ actions={+ <div className="flex flex-wrap gap-2"><Buttondisabled={isSavingPreferences}onClick={async () => {- try {- await updatePreferences({- gotifyEnabled: false,- gotifyServerUrl: null,- gotifyToken: null,- });- setGotifyEnabled(false);- setGotifyServerUrl("");- setGotifyToken("");- toast.success(- t("settings:notificationsPage.toastGotifyDisconnected"),- );- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t(- "settings:notificationsPage.toastGotifyDisconnectFailed",- ),- );- }+ await updatePreferences({+ ntfyEnabled: globalPrefs.ntfy.enabled,+ ntfyServerUrl: globalPrefs.ntfy.serverUrl,+ ntfyTopic: globalPrefs.ntfy.topic,+ ntfyToken: globalPrefs.ntfy.token.trim()+ ? globalPrefs.ntfy.token+ : undefined,+ });+ setGlobalPrefs((prev) => ({+ ...prev,+ ntfy: { ...prev.ntfy, token: "" },+ }));}}type="button"- variant="outline">- <Trash2 className="size-4" />- {t("settings:notificationsPage.disconnect")}+ {preferences?.ntfyConfigured+ ? t("settings:notificationsPage.saveChanges")+ : t("settings:notificationsPage.connectNtfy")}</Button>- ) : null}- </div>- </div>-- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">- <div className="flex items-start justify-between gap-4">- <div className="space-y-1">- <h3 className="font-medium">- {t("settings:notificationsPage.ntfyTitle")}- </h3>- <p className="text-sm text-muted-foreground">- {t("settings:notificationsPage.ntfyDescription")}- </p>+ {preferences?.ntfyConfigured ? (+ <Button+ disabled={isSavingPreferences}+ onClick={async () => {+ await updatePreferences({+ ntfyEnabled: false,+ ntfyServerUrl: null,+ ntfyTopic: null,+ ntfyToken: null,+ });+ setGlobalPrefs((prev) => ({+ ...prev,+ ntfy: {+ enabled: false,+ serverUrl: "",+ topic: "",+ token: "",+ },+ }));+ }}+ type="button"+ variant="outline"+ >+ <Trash2 className="size-4" />+ {t("settings:notificationsPage.disconnect")}+ </Button>+ ) : null}</div>+ }+ channel="ntfy"+ description={t("settings:notificationsPage.ntfyDescription")}+ headerRight={<div className="flex items-center gap-3">{preferences?.ntfyConfigured ? (<div className="flex items-center gap-2 text-sm text-muted-foreground">@@ -661,13 +724,19 @@ export function NotificationPreferencesSettings() {</div>) : null}<Switch- checked={ntfyEnabled}+ checked={globalPrefs.ntfy.enabled}disabled={isSavingPreferences}- onCheckedChange={setNtfyEnabled}+ onCheckedChange={(checked) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ ntfy: { ...prev.ntfy, enabled: checked },+ }))+ }/></div>- </div>-+ }+ title={t("settings:notificationsPage.ntfyTitle")}+ ><div className="space-y-4"><div className="space-y-1"><Label className="text-sm font-medium">@@ -678,8 +747,13 @@ export function NotificationPreferencesSettings() {placeholder={t("settings:notificationsPage.ntfyServerPlaceholder",)}- value={ntfyServerUrl}- onChange={(event) => setNtfyServerUrl(event.target.value)}+ value={globalPrefs.ntfy.serverUrl}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ ntfy: { ...prev.ntfy, serverUrl: event.target.value },+ }))+ }/></div><div className="space-y-1">@@ -689,8 +763,13 @@ export function NotificationPreferencesSettings() {<InputautoComplete="off"placeholder={t("settings:notificationsPage.ntfyTopicPlaceholder")}- value={ntfyTopic}- onChange={(event) => setNtfyTopic(event.target.value)}+ value={globalPrefs.ntfy.topic}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ ntfy: { ...prev.ntfy, topic: event.target.value },+ }))+ }/></div><div className="space-y-1">@@ -701,8 +780,13 @@ export function NotificationPreferencesSettings() {autoComplete="off"placeholder={t("settings:notificationsPage.ntfyTokenPlaceholder")}type="password"- value={ntfyToken}- onChange={(event) => setNtfyToken(event.target.value)}+ value={globalPrefs.ntfy.token}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ ntfy: { ...prev.ntfy, token: event.target.value },+ }))+ }/><p className="text-xs text-muted-foreground">{preferences?.ntfyTokenConfigured@@ -713,82 +797,62 @@ export function NotificationPreferencesSettings() {</p></div></div>+ </ChannelCard>- <div className="flex flex-wrap gap-2">- <Button- disabled={isSavingPreferences}- onClick={async () => {- try {- await updatePreferences({- ntfyEnabled,- ntfyServerUrl,- ntfyTopic,- ntfyToken: ntfyToken.trim() ? ntfyToken : undefined,- });- setNtfyToken("");- toast.success(t("settings:notificationsPage.toastNtfySaved"));- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t("settings:notificationsPage.toastNtfySaveFailed"),- );- }- }}- type="button"- >- {preferences?.ntfyConfigured- ? t("settings:notificationsPage.saveChanges")- : t("settings:notificationsPage.connectNtfy")}- </Button>- {preferences?.ntfyConfigured ? (+ <ChannelCard+ actions={+ <div className="flex flex-wrap gap-2"><Buttondisabled={isSavingPreferences}onClick={async () => {- try {- await updatePreferences({- ntfyEnabled: false,- ntfyServerUrl: null,- ntfyTopic: null,- ntfyToken: null,- });- setNtfyEnabled(false);- setNtfyServerUrl("");- setNtfyTopic("");- setNtfyToken("");- toast.success(- t("settings:notificationsPage.toastNtfyDisconnected"),- );- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t(- "settings:notificationsPage.toastNtfyDisconnectFailed",- ),- );- }+ await updatePreferences({+ webhookEnabled: globalPrefs.webhook.enabled,+ webhookUrl: globalPrefs.webhook.url,+ webhookSecret: globalPrefs.webhook.secret.trim()+ ? globalPrefs.webhook.secret+ : undefined,+ });+ setGlobalPrefs((prev) => ({+ ...prev,+ webhook: { ...prev.webhook, secret: "" },+ }));}}type="button"- variant="outline">- <Trash2 className="size-4" />- {t("settings:notificationsPage.disconnect")}+ {preferences?.webhookConfigured+ ? t("settings:notificationsPage.saveChanges")+ : t("settings:notificationsPage.connectWebhook")}</Button>- ) : null}- </div>- </div>-- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">- <div className="flex items-start justify-between gap-4">- <div className="space-y-1">- <h3 className="font-medium">- {t("settings:notificationsPage.webhookTitle")}- </h3>- <p className="text-sm text-muted-foreground">- {t("settings:notificationsPage.webhookDescription")}- </p>+ {preferences?.webhookConfigured ? (+ <Button+ disabled={isSavingPreferences}+ onClick={async () => {+ await updatePreferences({+ webhookEnabled: false,+ webhookUrl: null,+ webhookSecret: null,+ });+ setGlobalPrefs((prev) => ({+ ...prev,+ webhook: {+ enabled: false,+ url: "",+ secret: "",+ },+ }));+ }}+ type="button"+ variant="outline"+ >+ <Trash2 className="size-4" />+ {t("settings:notificationsPage.disconnect")}+ </Button>+ ) : null}</div>+ }+ channel="webhook"+ description={t("settings:notificationsPage.webhookDescription")}+ headerRight={<div className="flex items-center gap-3">{preferences?.webhookConfigured ? (<div className="flex items-center gap-2 text-sm text-muted-foreground">@@ -801,13 +865,19 @@ export function NotificationPreferencesSettings() {</div>) : null}<Switch- checked={webhookEnabled}+ checked={globalPrefs.webhook.enabled}disabled={isSavingPreferences}- onCheckedChange={setWebhookEnabled}+ onCheckedChange={(checked) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ webhook: { ...prev.webhook, enabled: checked },+ }))+ }/></div>- </div>-+ }+ title={t("settings:notificationsPage.webhookTitle")}+ ><div className="space-y-4"><div className="space-y-1"><Label className="text-sm font-medium">@@ -819,8 +889,13 @@ export function NotificationPreferencesSettings() {"settings:notificationsPage.webhookUrlPlaceholder",)}type="url"- value={webhookUrl}- onChange={(event) => setWebhookUrl(event.target.value)}+ value={globalPrefs.webhook.url}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ webhook: { ...prev.webhook, url: event.target.value },+ }))+ }/></div><div className="space-y-1">@@ -833,8 +908,13 @@ export function NotificationPreferencesSettings() {"settings:notificationsPage.webhookSecretPlaceholder",)}type="password"- value={webhookSecret}- onChange={(event) => setWebhookSecret(event.target.value)}+ value={globalPrefs.webhook.secret}+ onChange={(event) =>+ setGlobalPrefs((prev) => ({+ ...prev,+ webhook: { ...prev.webhook, secret: event.target.value },+ }))+ }/><p className="text-xs text-muted-foreground">{preferences?.webhookSecretConfigured@@ -845,72 +925,7 @@ export function NotificationPreferencesSettings() {</p></div></div>-- <div className="flex flex-wrap gap-2">- <Button- disabled={isSavingPreferences}- onClick={async () => {- try {- await updatePreferences({- webhookEnabled,- webhookUrl,- webhookSecret: webhookSecret.trim()- ? webhookSecret- : undefined,- });- setWebhookSecret("");- toast.success(- t("settings:notificationsPage.toastWebhookSaved"),- );- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t("settings:notificationsPage.toastWebhookSaveFailed"),- );- }- }}- type="button"- >- {preferences?.webhookConfigured- ? t("settings:notificationsPage.saveChanges")- : t("settings:notificationsPage.connectWebhook")}- </Button>- {preferences?.webhookConfigured ? (- <Button- disabled={isSavingPreferences}- onClick={async () => {- try {- await updatePreferences({- webhookEnabled: false,- webhookUrl: null,- webhookSecret: null,- });- setWebhookEnabled(false);- setWebhookUrl("");- setWebhookSecret("");- toast.success(- t("settings:notificationsPage.toastWebhookDisconnected"),- );- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : t(- "settings:notificationsPage.toastWebhookDisconnectFailed",- ),- );- }- }}- type="button"- variant="outline"- >- <Trash2 className="size-4" />- {t("settings:notificationsPage.disconnect")}- </Button>- ) : null}- </div>- </div>+ </ChannelCard><div className="space-y-4"><div className="space-y-1">diff --git a/apps/web/src/hooks/mutations/notification-preferences/use-notification-preferences.ts b/apps/web/src/hooks/mutations/notification-preferences/use-notification-preferences.tsindex d5e5a57c0..57087b443 100644--- a/apps/web/src/hooks/mutations/notification-preferences/use-notification-preferences.ts+++ b/apps/web/src/hooks/mutations/notification-preferences/use-notification-preferences.ts@@ -1,4 +1,5 @@import { useMutation, useQueryClient } from "@tanstack/react-query";+import i18n from "i18next";import deleteNotificationWorkspaceRule from "@/fetchers/notification-preferences/delete-notification-workspace-rule";import updateNotificationPreferences, {type UpdateNotificationPreferencesRequest,@@ -6,6 +7,7 @@ import updateNotificationPreferences, {import upsertNotificationWorkspaceRule, {type UpsertNotificationWorkspaceRuleRequest,} from "@/fetchers/notification-preferences/upsert-notification-workspace-rule";+import { toast } from "@/lib/toast";export function useUpdateNotificationPreferences() {const queryClient = useQueryClient();@@ -17,6 +19,14 @@ export function useUpdateNotificationPreferences() {void queryClient.invalidateQueries({queryKey: ["notification-preferences"],});+ toast.success(i18n.t("settings:notificationsPage.toastPreferencesSaved"));+ },+ onError: (error) => {+ toast.error(+ error instanceof Error+ ? error.message+ : i18n.t("settings:notificationsPage.toastPreferencesSaveFailed"),+ );},});}@@ -36,6 +46,14 @@ export function useUpsertNotificationWorkspaceRule() {void queryClient.invalidateQueries({queryKey: ["notification-preferences"],});+ toast.success(i18n.t("settings:notificationsPage.toastRuleSavedGeneric"));+ },+ onError: (error) => {+ toast.error(+ error instanceof Error+ ? error.message+ : i18n.t("settings:notificationsPage.toastRuleSaveFailed", {}),+ );},});}@@ -50,6 +68,16 @@ export function useDeleteNotificationWorkspaceRule() {void queryClient.invalidateQueries({queryKey: ["notification-preferences"],});+ toast.success(+ i18n.t("settings:notificationsPage.toastRuleRemovedGeneric"),+ );+ },+ onError: (error) => {+ toast.error(+ error instanceof Error+ ? error.message+ : i18n.t("settings:notificationsPage.toastRuleRemoveFailed", {}),+ );},});}diff --git a/i18n/de-DE.json b/i18n/de-DE.jsonindex d8b0114ce..88b0148c6 100644--- a/i18n/de-DE.json+++ b/i18n/de-DE.json@@ -402,7 +402,11 @@"toastRuleSaved": "Benachrichtigungsregel für {{workspaceName}} gespeichert","toastRuleSaveFailed": "Arbeitsbereichs-Benachrichtigungsregel konnte nicht gespeichert werden","toastRuleRemoved": "Benachrichtigungsregel für {{workspaceName}} entfernt",- "toastRuleRemoveFailed": "Arbeitsbereichs-Benachrichtigungsregel konnte nicht entfernt werden"+ "toastRuleRemoveFailed": "Arbeitsbereichs-Benachrichtigungsregel konnte nicht entfernt werden",+ "toastPreferencesSaved": "Benachrichtigungseinstellungen gespeichert",+ "toastPreferencesSaveFailed": "Benachrichtigungseinstellungen konnten nicht gespeichert werden",+ "toastRuleSavedGeneric": "Arbeitsbereichs-Benachrichtigungsregel gespeichert",+ "toastRuleRemovedGeneric": "Arbeitsbereichs-Benachrichtigungsregel entfernt"},"preferencesPage": {"title": "Einstellungen",diff --git a/i18n/el-GR.json b/i18n/el-GR.jsonindex 0a534717c..b9efd4ba5 100644--- a/i18n/el-GR.json+++ b/i18n/el-GR.json@@ -402,7 +402,11 @@"toastRuleSaved": "Αποθηκεύτηκε ο κανόνας ειδοποίησης για {{workspaceName}}","toastRuleSaveFailed": "Αποτυχία αποθήκευσης κανόνα ειδοποίησης χώρου εργασίας","toastRuleRemoved": "Αφαιρέθηκε ο κανόνας ειδοποίησης για {{workspaceName}}",- "toastRuleRemoveFailed": "Αποτυχία αφαίρεσης κανόνα ειδοποίησης χώρου εργασίας"+ "toastRuleRemoveFailed": "Αποτυχία αφαίρεσης κανόνα ειδοποίησης χώρου εργασίας",+ "toastPreferencesSaved": "Notification preferences saved",+ "toastPreferencesSaveFailed": "Failed to save notification preferences",+ "toastRuleRemovedGeneric": "Workspace notification rule removed",+ "toastRuleSavedGeneric": "Workspace notification rule saved"},"preferencesPage": {"title": "Προτιμήσεις",@@ -577,7 +581,13 @@"title": "Ενσωματώσεις έργου","subtitle": "Συνδέστε το έργο σας με εξωτερικά εργαλεία και υπηρεσίες για πιο ομαλή ροή εργασίας.","githubSectionTitle": "Ενσωμάτωση GitHub",- "githubSectionSubtitle": "Συγχρονίστε εργασίες με GitHub issues και ενεργοποιήστε αμφίδρομο συγχρονισμό."+ "githubSectionSubtitle": "Συγχρονίστε εργασίες με GitHub issues και ενεργοποιήστε αμφίδρομο συγχρονισμό.",+ "discordSectionSubtitle": "Send project task updates into a Discord channel with a webhook.",+ "discordSectionTitle": "Discord Integration",+ "genericWebhookSectionSubtitle": "Send project task events to any HTTP endpoint as JSON.",+ "genericWebhookSectionTitle": "Generic Webhooks",+ "slackSectionSubtitle": "Send project task updates into a Slack channel with an incoming webhook.",+ "slackSectionTitle": "Slack Integration"},"projectVisibility": {"pageTitle": "Ορατότητα έργου",@@ -748,6 +758,120 @@"merged": "Συγχωνευμένο","draft": "Πρόχειρο","open": "Ανοιχτό"+ },+ "discordIntegration": {+ "channelHint": "Optional label for your reference. Discord controls the actual destination channel from the webhook setup.",+ "channelLabel": "Channel name",+ "channelPlaceholder": "#team-updates",+ "connect": "Connect Discord",+ "connected": "Connected",+ "connectionHint": "Paste a Discord webhook URL and choose which task events should be posted.",+ "connectionTitle": "Discord webhook connection",+ "disconnect": "Disconnect",+ "events": {+ "taskCommentCreated": "New comments",+ "taskCreated": "New tasks",+ "taskDescriptionChanged": "Description changes",+ "taskPriorityChanged": "Priority changes",+ "taskStatusChanged": "Status changes",+ "taskTitleChanged": "Title changes"+ },+ "eventsHint": "Choose which project changes should post to Discord.",+ "eventsTitle": "Event notifications",+ "paused": "Paused",+ "saveChanges": "Save changes",+ "toast": {+ "disabled": "Discord notifications paused",+ "enabled": "Discord notifications enabled",+ "removed": "Discord integration removed successfully",+ "removeError": "Failed to remove Discord integration",+ "saved": "Discord integration saved successfully",+ "saveError": "Failed to save Discord integration",+ "updateError": "Failed to update Discord integration"+ },+ "update": "Update Discord",+ "validation": {+ "webhookInvalid": "Enter a valid Discord webhook URL"+ },+ "webhookHint": "Create a Discord channel webhook and paste the generated URL here.",+ "webhookLabel": "Webhook URL",+ "webhookPlaceholder": "https://discord.com/api/webhooks/..."+ },+ "genericWebhookIntegration": {+ "connect": "Connect webhook",+ "connected": "Connected",+ "connectionHint": "Send task events to your own endpoint as JSON. A signed X-Kaneo-Signature header is included when a secret is configured.",+ "connectionTitle": "Outgoing webhook connection",+ "disconnect": "Disconnect",+ "events": {+ "taskCommentCreated": "New comments",+ "taskCreated": "New tasks",+ "taskDescriptionChanged": "Description changes",+ "taskPriorityChanged": "Priority changes",+ "taskStatusChanged": "Status changes",+ "taskTitleChanged": "Title changes"+ },+ "eventsHint": "Choose which project changes should trigger outgoing webhooks.",+ "eventsTitle": "Event notifications",+ "paused": "Paused",+ "saveChanges": "Save changes",+ "secretHint": "Optional. If provided, Kaneo signs the request body and sends the hex digest in the X-Kaneo-Signature header.",+ "secretHintConfigured": "A signing secret is already configured ({{secret}}). Enter a new one to replace it.",+ "secretLabel": "Signing secret",+ "secretPlaceholder": "Optional shared secret",+ "toast": {+ "disabled": "Generic webhook notifications paused",+ "enabled": "Generic webhook notifications enabled",+ "removed": "Generic webhook integration removed successfully",+ "removeError": "Failed to remove generic webhook integration",+ "saved": "Generic webhook integration saved successfully",+ "saveError": "Failed to save generic webhook integration",+ "updateError": "Failed to update generic webhook integration"+ },+ "validation": {+ "webhookInvalid": "Enter a valid webhook URL"+ },+ "webhookHint": "Kaneo sends POST requests with a JSON payload for each enabled event.",+ "webhookLabel": "Endpoint URL",+ "webhookPlaceholder": "https://example.com/webhooks/kaneo"+ },+ "slackIntegration": {+ "channelHint": "Optional label for your reference. Slack controls the actual destination channel from the webhook setup.",+ "channelLabel": "Channel name",+ "channelPlaceholder": "#team-updates",+ "connect": "Connect Slack",+ "connected": "Connected",+ "connectionHint": "Paste a Slack incoming webhook URL and choose which task events should be posted.",+ "connectionTitle": "Slack webhook connection",+ "disconnect": "Disconnect",+ "events": {+ "taskCommentCreated": "New comments",+ "taskCreated": "New tasks",+ "taskDescriptionChanged": "Description changes",+ "taskPriorityChanged": "Priority changes",+ "taskStatusChanged": "Status changes",+ "taskTitleChanged": "Title changes"+ },+ "eventsHint": "Choose which project changes should post to Slack.",+ "eventsTitle": "Event notifications",+ "paused": "Paused",+ "saveChanges": "Save changes",+ "toast": {+ "disabled": "Slack notifications paused",+ "enabled": "Slack notifications enabled",+ "removed": "Slack integration removed successfully",+ "removeError": "Failed to remove Slack integration",+ "saved": "Slack integration saved successfully",+ "saveError": "Failed to save Slack integration",+ "updateError": "Failed to update Slack integration"+ },+ "update": "Update Slack",+ "validation": {+ "webhookInvalid": "Enter a valid Slack webhook URL"+ },+ "webhookHint": "Create an Incoming Webhook in Slack and paste the generated URL here.",+ "webhookLabel": "Incoming webhook URL",+ "webhookPlaceholder": "https://hooks.slack.com/services/..."}},"navigation": {diff --git a/i18n/en-US.json b/i18n/en-US.jsonindex 4c9af4f74..906af9f3a 100644--- a/i18n/en-US.json+++ b/i18n/en-US.json@@ -402,7 +402,11 @@"toastRuleSaved": "Saved notification rule for {{workspaceName}}","toastRuleSaveFailed": "Failed to save workspace notification rule","toastRuleRemoved": "Removed notification rule for {{workspaceName}}",- "toastRuleRemoveFailed": "Failed to remove workspace notification rule"+ "toastRuleRemoveFailed": "Failed to remove workspace notification rule",+ "toastPreferencesSaved": "Notification preferences saved",+ "toastPreferencesSaveFailed": "Failed to save notification preferences",+ "toastRuleSavedGeneric": "Workspace notification rule saved",+ "toastRuleRemovedGeneric": "Workspace notification rule removed"},"preferencesPage": {"title": "Preferences",diff --git a/i18n/fr-FR.json b/i18n/fr-FR.jsonindex d2ae4918a..b8a855cdb 100644--- a/i18n/fr-FR.json+++ b/i18n/fr-FR.json@@ -402,7 +402,11 @@"toastRuleSaved": "Règle de notification enregistrée pour {{workspaceName}}","toastRuleSaveFailed": "Échec de l’enregistrement de la règle de notification de l’espace de travail","toastRuleRemoved": "Règle de notification supprimée pour {{workspaceName}}",- "toastRuleRemoveFailed": "Échec de la suppression de la règle de notification de l’espace de travail"+ "toastRuleRemoveFailed": "Échec de la suppression de la règle de notification de l’espace de travail",+ "toastPreferencesSaved": "Préférences de notification enregistrées",+ "toastPreferencesSaveFailed": "Échec de l'enregistrement des préférences de notification",+ "toastRuleSavedGeneric": "Règle de notification de l'espace de travail enregistrée",+ "toastRuleRemovedGeneric": "Règle de notification de l'espace de travail supprimée"},"preferencesPage": {"title": "Préférences",@@ -577,7 +581,13 @@"title": "Intégrations du projet","subtitle": "Connectez votre projet avec des outils et services externes pour rationaliser votre flux de travail.","githubSectionTitle": "Intégration GitHub",- "githubSectionSubtitle": "Synchronisez les tâches avec les problèmes GitHub et activez la synchronisation bidirectionnelle."+ "githubSectionSubtitle": "Synchronisez les tâches avec les problèmes GitHub et activez la synchronisation bidirectionnelle.",+ "discordSectionTitle": "Intégration Discord",+ "discordSectionSubtitle": "Envoyez les mises à jour des tâches du projet dans un canal Discord via un webhook.",+ "genericWebhookSectionTitle": "Webhooks génériques",+ "genericWebhookSectionSubtitle": "Envoyez les événements des tâches du projet vers n'importe quel point de terminaison HTTP au format JSON.",+ "slackSectionTitle": "Intégration Slack",+ "slackSectionSubtitle": "Envoyez les mises à jour des tâches du projet dans un canal Slack via un webhook entrant."},"projectVisibility": {"pageTitle": "Visibilité du projet",@@ -687,6 +697,120 @@"importIssues": "Importer les problèmes","importDisabledHint": "Complétez la configuration du dépôt ci-dessus pour activer l'importation"},+ "slackIntegration": {+ "validation": {+ "webhookInvalid": "Entrez une URL de webhook Slack valide"+ },+ "toast": {+ "saved": "Intégration Slack enregistrée avec succès",+ "saveError": "Échec de l'enregistrement de l'intégration Slack",+ "enabled": "Notifications Slack activées",+ "disabled": "Notifications Slack en pause",+ "updateError": "Échec de la mise à jour de l'intégration Slack",+ "removed": "Intégration Slack supprimée avec succès",+ "removeError": "Échec de la suppression de l'intégration Slack"+ },+ "connectionTitle": "Connexion webhook Slack",+ "connectionHint": "Collez une URL de webhook entrant Slack et choisissez les événements de tâche à publier.",+ "connected": "Connecté",+ "paused": "En pause",+ "webhookLabel": "URL du webhook entrant",+ "webhookPlaceholder": "https://hooks.slack.com/services/...",+ "webhookHint": "Créez un webhook entrant dans Slack et collez l'URL générée ici.",+ "channelLabel": "Nom du canal",+ "channelPlaceholder": "#team-updates",+ "channelHint": "Libellé facultatif pour votre référence. Slack contrôle le canal réel via la configuration du webhook.",+ "eventsTitle": "Notifications d'événements",+ "eventsHint": "Choisissez les changements de projet à envoyer vers Slack.",+ "events": {+ "taskCreated": "Nouvelles tâches",+ "taskStatusChanged": "Changements de statut",+ "taskPriorityChanged": "Changements de priorité",+ "taskTitleChanged": "Changements de titre",+ "taskDescriptionChanged": "Changements de description",+ "taskCommentCreated": "Nouveaux commentaires"+ },+ "connect": "Connecter Slack",+ "saveChanges": "Enregistrer les modifications",+ "update": "Mettre à jour Slack",+ "disconnect": "Déconnecter"+ },+ "discordIntegration": {+ "validation": {+ "webhookInvalid": "Entrez une URL de webhook Discord valide"+ },+ "toast": {+ "saved": "Intégration Discord enregistrée avec succès",+ "saveError": "Échec de l'enregistrement de l'intégration Discord",+ "enabled": "Notifications Discord activées",+ "disabled": "Notifications Discord en pause",+ "updateError": "Échec de la mise à jour de l'intégration Discord",+ "removed": "Intégration Discord supprimée avec succès",+ "removeError": "Échec de la suppression de l'intégration Discord"+ },+ "connectionTitle": "Connexion webhook Discord",+ "connectionHint": "Collez une URL de webhook Discord et choisissez les événements de tâche à publier.",+ "connected": "Connecté",+ "paused": "En pause",+ "webhookLabel": "URL du webhook",+ "webhookPlaceholder": "https://discord.com/api/webhooks/...",+ "webhookHint": "Créez un webhook de canal dans Discord et collez l'URL générée ici.",+ "channelLabel": "Nom du canal",+ "channelPlaceholder": "#team-updates",+ "channelHint": "Libellé facultatif pour votre référence. Discord contrôle le canal réel via la configuration du webhook.",+ "eventsTitle": "Notifications d'événements",+ "eventsHint": "Choisissez les changements de projet à envoyer vers Discord.",+ "events": {+ "taskCreated": "Nouvelles tâches",+ "taskStatusChanged": "Changements de statut",+ "taskPriorityChanged": "Changements de priorité",+ "taskTitleChanged": "Changements de titre",+ "taskDescriptionChanged": "Changements de description",+ "taskCommentCreated": "Nouveaux commentaires"+ },+ "connect": "Connecter Discord",+ "saveChanges": "Enregistrer les modifications",+ "update": "Mettre à jour Discord",+ "disconnect": "Déconnecter"+ },+ "genericWebhookIntegration": {+ "validation": {+ "webhookInvalid": "Entrez une URL de webhook valide"+ },+ "toast": {+ "saved": "Intégration webhook générique enregistrée avec succès",+ "saveError": "Échec de l'enregistrement de l'intégration webhook générique",+ "enabled": "Notifications webhook génériques activées",+ "disabled": "Notifications webhook génériques en pause",+ "updateError": "Échec de la mise à jour de l'intégration webhook générique",+ "removed": "Intégration webhook générique supprimée avec succès",+ "removeError": "Échec de la suppression de l'intégration webhook générique"+ },+ "connectionTitle": "Connexion webhook sortant",+ "connectionHint": "Envoyez les événements de tâche en JSON vers votre propre point de terminaison. Un en-tête signé X-Kaneo-Signature est inclus lorsqu'un secret est configuré.",+ "connected": "Connecté",+ "paused": "En pause",+ "webhookLabel": "URL du point de terminaison",+ "webhookPlaceholder": "https://example.com/webhooks/kaneo",+ "webhookHint": "Kaneo envoie des requêtes POST avec une charge JSON pour chaque événement activé.",+ "secretLabel": "Secret de signature",+ "secretPlaceholder": "Secret partagé facultatif",+ "secretHint": "Facultatif. Si défini, Kaneo signe le corps de la requête et envoie le digest hexadécimal dans l'en-tête X-Kaneo-Signature.",+ "secretHintConfigured": "Un secret de signature est déjà configuré ({{secret}}). Entrez-en un nouveau pour le remplacer.",+ "eventsTitle": "Notifications d'événements",+ "eventsHint": "Choisissez les changements de projet qui déclenchent les webhooks sortants.",+ "events": {+ "taskCreated": "Nouvelles tâches",+ "taskStatusChanged": "Changements de statut",+ "taskPriorityChanged": "Changements de priorité",+ "taskTitleChanged": "Changements de titre",+ "taskDescriptionChanged": "Changements de description",+ "taskCommentCreated": "Nouveaux commentaires"+ },+ "connect": "Connecter le webhook",+ "saveChanges": "Enregistrer les modifications",+ "disconnect": "Déconnecter"+ },"repositoryBrowser": {"title": "Sélectionner un dépôt","description": "Choisissez un dépôt où votre application GitHub est installée pour activer la synchronisation des problèmes.",diff --git a/i18n/mk-MK.json b/i18n/mk-MK.jsonindex 4cc547a3c..8fcb627e3 100644--- a/i18n/mk-MK.json+++ b/i18n/mk-MK.json@@ -402,7 +402,11 @@"toastRuleSaved": "Зачувано е правилото за известување за {{workspaceName}}","toastRuleSaveFailed": "Не успеа зачувувањето на правилото за известување за работниот простор","toastRuleRemoved": "Отстрането е правилото за известување за {{workspaceName}}",- "toastRuleRemoveFailed": "Не успеа отстранувањето на правилото за известување за работниот простор"+ "toastRuleRemoveFailed": "Не успеа отстранувањето на правилото за известување за работниот простор",+ "toastPreferencesSaved": "Зачувани се поставките за известувања",+ "toastPreferencesSaveFailed": "Не успеа зачувувањето на поставките за известувања",+ "toastRuleSavedGeneric": "Зачувано е правилото за известување за работниот простор",+ "toastRuleRemovedGeneric": "Отстрането е правилото за известување за работниот простор"},"preferencesPage": {"title": "Преференции",@@ -577,7 +581,13 @@"title": "Интеграции на проект","subtitle": "Поврзи го твојот проект со надворешни алатки и сервиси за да го подобриш работниот тек.","githubSectionTitle": "GitHub интеграција",- "githubSectionSubtitle": "Синхронизирај задачи со GitHub issues и овозможи двонасочна синхронизација."+ "githubSectionSubtitle": "Синхронизирај задачи со GitHub issues и овозможи двонасочна синхронизација.",+ "discordSectionTitle": "Discord интеграција",+ "discordSectionSubtitle": "Испрати ажурирања за задачи на проектот во Discord канал преку webhook.",+ "genericWebhookSectionTitle": "Општи webhooks",+ "genericWebhookSectionSubtitle": "Испрати настани за задачи на проектот до кој било HTTP endpoint како JSON.",+ "slackSectionTitle": "Slack интеграција",+ "slackSectionSubtitle": "Испрати ажурирања за задачи на проектот во Slack канал преку дојдовен webhook."},"projectVisibility": {"pageTitle": "Видливост на проект",@@ -687,6 +697,120 @@"importIssues": "Увези Issues","importDisabledHint": "Заврши ја конфигурацијата на репозиториумот погоре за да овозможиш увоз"},+ "slackIntegration": {+ "validation": {+ "webhookInvalid": "Внеси валидна Slack webhook URL"+ },+ "toast": {+ "saved": "Slack интеграцијата е успешно зачувана",+ "saveError": "Не успеа зачувувањето на Slack интеграцијата",+ "enabled": "Slack известувањата се вклучени",+ "disabled": "Slack известувањата се паузирани",+ "updateError": "Не успеа ажурирањето на Slack интеграцијата",+ "removed": "Slack интеграцијата е успешно отстранета",+ "removeError": "Не успеа отстранувањето на Slack интеграцијата"+ },+ "connectionTitle": "Slack webhook конекција",+ "connectionHint": "Залепи Slack incoming webhook URL и избери кои настани за задачи да се испраќаат.",+ "connected": "Поврзано",+ "paused": "Паузирано",+ "webhookLabel": "Incoming webhook URL",+ "webhookPlaceholder": "https://hooks.slack.com/services/...",+ "webhookHint": "Креирај Incoming Webhook во Slack и залепи ја генерираната URL тука.",+ "channelLabel": "Име на канал",+ "channelPlaceholder": "#team-updates",+ "channelHint": "Опционална ознака за тебе. Slack го одредува каналот преку webhook поставките.",+ "eventsTitle": "Известувања за настани",+ "eventsHint": "Избери кои промени на проектот да се испраќаат во Slack.",+ "events": {+ "taskCreated": "Нови задачи",+ "taskStatusChanged": "Промени на статус",+ "taskPriorityChanged": "Промени на приоритет",+ "taskTitleChanged": "Промени на наслов",+ "taskDescriptionChanged": "Промени на опис",+ "taskCommentCreated": "Нови коментари"+ },+ "connect": "Поврзи Slack",+ "saveChanges": "Зачувај промени",+ "update": "Ажурирај Slack",+ "disconnect": "Откачи"+ },+ "discordIntegration": {+ "validation": {+ "webhookInvalid": "Внеси валидна Discord webhook URL"+ },+ "toast": {+ "saved": "Discord интеграцијата е успешно зачувана",+ "saveError": "Не успеа зачувувањето на Discord интеграцијата",+ "enabled": "Discord известувањата се вклучени",+ "disabled": "Discord известувањата се паузирани",+ "updateError": "Не успеа ажурирањето на Discord интеграцијата",+ "removed": "Discord интеграцијата е успешно отстранета",+ "removeError": "Не успеа отстранувањето на Discord интеграцијата"+ },+ "connectionTitle": "Discord webhook конекција",+ "connectionHint": "Залепи Discord webhook URL и избери кои настани за задачи да се испраќаат.",+ "connected": "Поврзано",+ "paused": "Паузирано",+ "webhookLabel": "Webhook URL",+ "webhookPlaceholder": "https://discord.com/api/webhooks/...",+ "webhookHint": "Креирај webhook за канал во Discord и залепи ја генерираната URL тука.",+ "channelLabel": "Име на канал",+ "channelPlaceholder": "#team-updates",+ "channelHint": "Опционална ознака за тебе. Discord го одредува каналот преку webhook поставките.",+ "eventsTitle": "Известувања за настани",+ "eventsHint": "Избери кои промени на проектот да се испраќаат во Discord.",+ "events": {+ "taskCreated": "Нови задачи",+ "taskStatusChanged": "Промени на статус",+ "taskPriorityChanged": "Промени на приоритет",+ "taskTitleChanged": "Промени на наслов",+ "taskDescriptionChanged": "Промени на опис",+ "taskCommentCreated": "Нови коментари"+ },+ "connect": "Поврзи Discord",+ "saveChanges": "Зачувај промени",+ "update": "Ажурирај Discord",+ "disconnect": "Откачи"+ },+ "genericWebhookIntegration": {+ "validation": {+ "webhookInvalid": "Внеси валидна webhook URL"+ },+ "toast": {+ "saved": "Општиот webhook е успешно зачуван",+ "saveError": "Не успеа зачувувањето на општиот webhook",+ "enabled": "Општите webhook известувања се вклучени",+ "disabled": "Општите webhook известувања се паузирани",+ "updateError": "Не успеа ажурирањето на општиот webhook",+ "removed": "Општиот webhook е успешно отстранет",+ "removeError": "Не успеа отстранувањето на општиот webhook"+ },+ "connectionTitle": "Излезен webhook",+ "connectionHint": "Испрати настани за задачи како JSON до твојот endpoint. Кога е поставена тајна, се испраќа потпис X-Kaneo-Signature.",+ "connected": "Поврзано",+ "paused": "Паузирано",+ "webhookLabel": "URL на endpoint",+ "webhookPlaceholder": "https://example.com/webhooks/kaneo",+ "webhookHint": "Kaneo испраќа POST барања со JSON за секој овозможен настан.",+ "secretLabel": "Тајна за потпис",+ "secretPlaceholder": "Опционална заедничка тајна",+ "secretHint": "Опционално. Ако е поставена, Kaneo го потпишува телото на барањето и го испраќа hex-от во X-Kaneo-Signature.",+ "secretHintConfigured": "Тајна за потпис веќе е конфигурирана ({{secret}}). Внеси нова за да ја замениш.",+ "eventsTitle": "Известувања за настани",+ "eventsHint": "Избери кои промени на проектот да го активираат излезниот webhook.",+ "events": {+ "taskCreated": "Нови задачи",+ "taskStatusChanged": "Промени на статус",+ "taskPriorityChanged": "Промени на приоритет",+ "taskTitleChanged": "Промени на наслов",+ "taskDescriptionChanged": "Промени на опис",+ "taskCommentCreated": "Нови коментари"+ },+ "connect": "Поврзи webhook",+ "saveChanges": "Зачувај промени",+ "disconnect": "Откачи"+ },"repositoryBrowser": {"title": "Избери репозиториум","description": "Избери репозиториум каде е инсталирана твојата GitHub апликација за да овозможиш синхронизација на issues.",diff --git a/i18n/schema.json b/i18n/schema.jsonindex 589afc926..32669c06c 100644--- a/i18n/schema.json+++ b/i18n/schema.json@@ -1338,6 +1338,30 @@"connectNtfy": {"type": "string"},+ "gotifyTitle": {+ "type": "string"+ },+ "gotifyDescription": {+ "type": "string"+ },+ "gotifyTokenLabel": {+ "type": "string"+ },+ "gotifyServerPlaceholder": {+ "type": "string"+ },+ "gotifyTokenPlaceholder": {+ "type": "string"+ },+ "gotifyTokenHintConfigured": {+ "type": "string"+ },+ "gotifyTokenHintRequired": {+ "type": "string"+ },+ "connectGotify": {+ "type": "string"+ },"webhookTitle": {"type": "string"},@@ -1380,6 +1404,9 @@"workspaceCardLabelNtfy": {"type": "string"},+ "workspaceCardLabelGotify": {+ "type": "string"+ },"workspaceCardLabelWebhook": {"type": "string"},@@ -1395,6 +1422,12 @@"ntfyChannelHintDisabled": {"type": "string"},+ "gotifyChannelHintEnabled": {+ "type": "string"+ },+ "gotifyChannelHintDisabled": {+ "type": "string"+ },"webhookChannelHintEnabled": {"type": "string"},@@ -1446,6 +1479,18 @@"toastNtfyDisconnectFailed": {"type": "string"},+ "toastGotifySaved": {+ "type": "string"+ },+ "toastGotifySaveFailed": {+ "type": "string"+ },+ "toastGotifyDisconnected": {+ "type": "string"+ },+ "toastGotifyDisconnectFailed": {+ "type": "string"+ },"toastWebhookSaved": {"type": "string"},@@ -1469,6 +1514,18 @@},"toastRuleRemoveFailed": {"type": "string"+ },+ "toastPreferencesSaved": {+ "type": "string"+ },+ "toastPreferencesSaveFailed": {+ "type": "string"+ },+ "toastRuleSavedGeneric": {+ "type": "string"+ },+ "toastRuleRemovedGeneric": {+ "type": "string"}},"required": [@@ -1495,6 +1552,14 @@"ntfyTokenHintConfigured","ntfyTokenHintOptional","connectNtfy",+ "gotifyTitle",+ "gotifyDescription",+ "gotifyTokenLabel",+ "gotifyServerPlaceholder",+ "gotifyTokenPlaceholder",+ "gotifyTokenHintConfigured",+ "gotifyTokenHintRequired",+ "connectGotify","webhookTitle","webhookDescription","endpointUrl",@@ -1509,11 +1574,14 @@"workspaceCardHint","workspaceCardLabelEmail","workspaceCardLabelNtfy",+ "workspaceCardLabelGotify","workspaceCardLabelWebhook","emailChannelHintEnabled","emailChannelHintDisabled","ntfyChannelHintEnabled","ntfyChannelHintDisabled",+ "gotifyChannelHintEnabled",+ "gotifyChannelHintDisabled","webhookChannelHintEnabled","webhookChannelHintDisabled","projectScope",@@ -1531,6 +1599,10 @@"toastNtfySaveFailed","toastNtfyDisconnected","toastNtfyDisconnectFailed",+ "toastGotifySaved",+ "toastGotifySaveFailed",+ "toastGotifyDisconnected",+ "toastGotifyDisconnectFailed","toastWebhookSaved","toastWebhookSaveFailed","toastWebhookDisconnected",@@ -1538,7 +1610,11 @@"toastRuleSaved","toastRuleSaveFailed","toastRuleRemoved",- "toastRuleRemoveFailed"+ "toastRuleRemoveFailed",+ "toastPreferencesSaved",+ "toastPreferencesSaveFailed",+ "toastRuleSavedGeneric",+ "toastRuleRemovedGeneric"]},"preferencesPage": {