feat(custom-widgets): add extensible widget platform
This commit is contained in:
1 parent
6cca757493
commit
8f152f1929
317 files changed
+32326
-1788
No files matched your search
@@ -0,0 +1,75 @@
|
||||
CREATE TABLE `custom_widget_activity` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`installation_id` varchar(128) NOT NULL,
|
||||
`item_id` varchar(128),
|
||||
`user_id` varchar(128),
|
||||
`handler` varchar(128) NOT NULL,
|
||||
`status` varchar(128) NOT NULL,
|
||||
`created_at` timestamp NOT NULL,
|
||||
CONSTRAINT `custom_widget_activity_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_artifact` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`package_id` varchar(128) NOT NULL,
|
||||
`version` varchar(128) NOT NULL,
|
||||
`source` longtext NOT NULL,
|
||||
`artifact` longtext NOT NULL,
|
||||
`created_at` timestamp NOT NULL,
|
||||
CONSTRAINT `custom_widget_artifact_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_connection` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`name` varchar(128) NOT NULL,
|
||||
`integration_id` varchar(128),
|
||||
`configuration` longtext NOT NULL,
|
||||
`encrypted_secrets` longtext NOT NULL,
|
||||
`created_at` timestamp NOT NULL,
|
||||
`updated_at` timestamp NOT NULL,
|
||||
CONSTRAINT `custom_widget_connection_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_guest_grant` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`item_id` varchar(128) NOT NULL,
|
||||
`handler` varchar(128) NOT NULL,
|
||||
`artifact_digest` varchar(128) NOT NULL,
|
||||
`bindings_digest` varchar(128) NOT NULL,
|
||||
`allowed_inputs` longtext NOT NULL,
|
||||
`created_at` timestamp NOT NULL,
|
||||
CONSTRAINT `custom_widget_guest_grant_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_installation` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`name` varchar(128) NOT NULL,
|
||||
`draft` longtext NOT NULL,
|
||||
`active_artifact_id` varchar(128),
|
||||
`previous_artifact_id` varchar(128),
|
||||
`previous_snapshot` longtext,
|
||||
`bindings` longtext NOT NULL,
|
||||
`origin` longtext,
|
||||
`enabled` boolean NOT NULL DEFAULT false,
|
||||
`creator_id` varchar(128),
|
||||
`created_at` timestamp NOT NULL,
|
||||
`updated_at` timestamp NOT NULL,
|
||||
CONSTRAINT `custom_widget_installation_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_storage` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`installation_id` varchar(128) NOT NULL,
|
||||
`scope` varchar(128) NOT NULL,
|
||||
`owner_key` varchar(128) NOT NULL,
|
||||
`key` varchar(128) NOT NULL,
|
||||
`value` longtext NOT NULL,
|
||||
`updated_at` timestamp NOT NULL,
|
||||
CONSTRAINT `custom_widget_storage_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `custom_widget_activity` ADD CONSTRAINT `custom_widget_activity_installation_fk` FOREIGN KEY (`installation_id`) REFERENCES `custom_widget_installation`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE `custom_widget_connection` ADD CONSTRAINT `custom_widget_connection_integration_id_integration_id_fk` FOREIGN KEY (`integration_id`) REFERENCES `integration`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE `custom_widget_guest_grant` ADD CONSTRAINT `custom_widget_guest_grant_item_id_item_id_fk` FOREIGN KEY (`item_id`) REFERENCES `item`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE `custom_widget_installation` ADD CONSTRAINT `custom_widget_installation_creator_id_user_id_fk` FOREIGN KEY (`creator_id`) REFERENCES `user`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE `custom_widget_storage` ADD CONSTRAINT `custom_widget_storage_installation_fk` FOREIGN KEY (`installation_id`) REFERENCES `custom_widget_installation`(`id`) ON DELETE cascade ON UPDATE no action;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -351,6 +351,13 @@
|
||||
"when": 1788763848931,
|
||||
"tag": "0049_add_byte_unit_system",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 50,
|
||||
"version": "5",
|
||||
"when": 1789201372182,
|
||||
"tag": "0050_custom_widget_platform",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
CREATE TABLE "custom_widget_activity" (
|
||||
"id" varchar(128) PRIMARY KEY NOT NULL,
|
||||
"installation_id" varchar(128) NOT NULL,
|
||||
"item_id" varchar(128),
|
||||
"user_id" varchar(128),
|
||||
"handler" varchar(128) NOT NULL,
|
||||
"status" varchar(128) NOT NULL,
|
||||
"created_at" timestamp NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "custom_widget_artifact" (
|
||||
"id" varchar(128) PRIMARY KEY NOT NULL,
|
||||
"package_id" varchar(128) NOT NULL,
|
||||
"version" varchar(128) NOT NULL,
|
||||
"source" text NOT NULL,
|
||||
"artifact" text NOT NULL,
|
||||
"created_at" timestamp NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "custom_widget_connection" (
|
||||
"id" varchar(128) PRIMARY KEY NOT NULL,
|
||||
"name" varchar(128) NOT NULL,
|
||||
"integration_id" varchar(128),
|
||||
"configuration" text NOT NULL,
|
||||
"encrypted_secrets" text NOT NULL,
|
||||
"created_at" timestamp NOT NULL,
|
||||
"updated_at" timestamp NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "custom_widget_guest_grant" (
|
||||
"id" varchar(128) PRIMARY KEY NOT NULL,
|
||||
"item_id" varchar(128) NOT NULL,
|
||||
"handler" varchar(128) NOT NULL,
|
||||
"artifact_digest" varchar(128) NOT NULL,
|
||||
"bindings_digest" varchar(128) NOT NULL,
|
||||
"allowed_inputs" text NOT NULL,
|
||||
"created_at" timestamp NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "custom_widget_installation" (
|
||||
"id" varchar(128) PRIMARY KEY NOT NULL,
|
||||
"name" varchar(128) NOT NULL,
|
||||
"draft" text NOT NULL,
|
||||
"active_artifact_id" varchar(128),
|
||||
"previous_artifact_id" varchar(128),
|
||||
"previous_snapshot" text,
|
||||
"bindings" text NOT NULL,
|
||||
"origin" text,
|
||||
"enabled" boolean DEFAULT false NOT NULL,
|
||||
"creator_id" varchar(128),
|
||||
"created_at" timestamp NOT NULL,
|
||||
"updated_at" timestamp NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "custom_widget_storage" (
|
||||
"id" varchar(128) PRIMARY KEY NOT NULL,
|
||||
"installation_id" varchar(128) NOT NULL,
|
||||
"scope" varchar(128) NOT NULL,
|
||||
"owner_key" varchar(128) NOT NULL,
|
||||
"key" varchar(128) NOT NULL,
|
||||
"value" text NOT NULL,
|
||||
"updated_at" timestamp NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "custom_widget_activity" ADD CONSTRAINT "custom_widget_activity_installation_fk" FOREIGN KEY ("installation_id") REFERENCES "public"."custom_widget_installation"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "custom_widget_connection" ADD CONSTRAINT "custom_widget_connection_integration_id_integration_id_fk" FOREIGN KEY ("integration_id") REFERENCES "public"."integration"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "custom_widget_guest_grant" ADD CONSTRAINT "custom_widget_guest_grant_item_id_item_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."item"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "custom_widget_installation" ADD CONSTRAINT "custom_widget_installation_creator_id_user_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "custom_widget_storage" ADD CONSTRAINT "custom_widget_storage_installation_fk" FOREIGN KEY ("installation_id") REFERENCES "public"."custom_widget_installation"("id") ON DELETE cascade ON UPDATE no action;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -113,6 +113,13 @@
|
||||
"when": 1788763848932,
|
||||
"tag": "0015_add_byte_unit_system",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 16,
|
||||
"version": "7",
|
||||
"when": 1789201372200,
|
||||
"tag": "0016_custom_widget_platform",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
CREATE TABLE `custom_widget_activity` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`installation_id` text NOT NULL,
|
||||
`item_id` text,
|
||||
`user_id` text,
|
||||
`handler` text NOT NULL,
|
||||
`status` text NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
FOREIGN KEY (`installation_id`) REFERENCES `custom_widget_installation`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_artifact` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`package_id` text NOT NULL,
|
||||
`version` text NOT NULL,
|
||||
`source` text NOT NULL,
|
||||
`artifact` text NOT NULL,
|
||||
`created_at` integer NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_connection` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`integration_id` text,
|
||||
`configuration` text NOT NULL,
|
||||
`encrypted_secrets` text NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`integration_id`) REFERENCES `integration`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_guest_grant` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`item_id` text NOT NULL,
|
||||
`handler` text NOT NULL,
|
||||
`artifact_digest` text NOT NULL,
|
||||
`bindings_digest` text NOT NULL,
|
||||
`allowed_inputs` text NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
FOREIGN KEY (`item_id`) REFERENCES `item`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_installation` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`draft` text NOT NULL,
|
||||
`active_artifact_id` text,
|
||||
`previous_artifact_id` text,
|
||||
`previous_snapshot` text,
|
||||
`bindings` text NOT NULL,
|
||||
`origin` text,
|
||||
`enabled` integer DEFAULT false NOT NULL,
|
||||
`creator_id` text,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`creator_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_storage` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`installation_id` text NOT NULL,
|
||||
`scope` text NOT NULL,
|
||||
`owner_key` text NOT NULL,
|
||||
`key` text NOT NULL,
|
||||
`value` text NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`installation_id`) REFERENCES `custom_widget_installation`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
File diff suppressed because it is too large.
Load diff
@@ -337,6 +337,13 @@
|
||||
"when": 1788763848930,
|
||||
"tag": "0047_add_byte_unit_system",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 48,
|
||||
"version": "6",
|
||||
"when": 1789201372190,
|
||||
"tag": "0048_custom_widget_platform",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user